Re: [Mesa-dev] [PATCH v3 3/4] drm/i915/uapi: convert i915_query and friend to kernel doc

2021-04-17 Thread Jonathan Corbet
Daniel Vetter writes: > On Fri, Apr 16, 2021 at 12:25 AM Ian Romanick wrote: >> Since we just had a big discussion about this on mesa-dev w.r.t. Mesa >> code and documentation... does the kernel have a policy about which >> flavor (pun intended) of English should be used? > > I'm not finding it

[Mesa-dev] [PATCH 4/4] util/os_misc: os_get_available_system_memory() for OpenBSD

2019-12-05 Thread Jonathan Gray
Return the smallest value of available non-kernel physical memory and the static per process data size limit as the amount of available system memory on OpenBSD. Signed-off-by: Jonathan Gray --- src/util/os_misc.c | 20 1 file changed, 20 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 2/4] util/os_misc: add os_get_available_system_memory()

2019-12-05 Thread Jonathan Gray
Add os_get_available_system_memory() derived from src/intel/vulkan/anv_device.c get_available_system_memory() Signed-off-by: Jonathan Gray --- src/util/os_misc.c | 31 +++ src/util/os_misc.h | 6 ++ 2 files changed, 37 insertions(+) diff --git a/src/util

[Mesa-dev] [PATCH 3/4] anv: use os_get_available_system_memory()

2019-12-05 Thread Jonathan Gray
Replace local get_available_system_memory() function with os_get_available_system_memory(). Signed-off-by: Jonathan Gray --- src/intel/vulkan/anv_device.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src

[Mesa-dev] [PATCH 1/4] anv: use os_get_total_physical_memory()

2019-12-05 Thread Jonathan Gray
Replace non-portable sysinfo() use with Mesa's os_get_total_physical_memory() Signed-off-by: Jonathan Gray --- src/intel/vulkan/anv_device.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c

Re: [Mesa-dev] CVE-2019-19520: Local privilege escalation via xlock

2019-12-04 Thread Jonathan Gray
On Thu, Dec 05, 2019 at 01:59:50PM +1000, Dave Airlie wrote: > On Thu, 5 Dec 2019 at 13:42, Jonathan Gray wrote: > > > > Until very recently OpenBSD built xlockmore against Mesa. xlock is > > setgid auth. As described by Qualys in their advisory > > https://

[Mesa-dev] CVE-2019-19520: Local privilege escalation via xlock

2019-12-04 Thread Jonathan Gray
Until very recently OpenBSD built xlockmore against Mesa. xlock is setgid auth. As described by Qualys in their advisory https://marc.info/?l=oss-security&m=157549260013521&w=2 "CVE-2019-19520: Local privilege escalation via xlock" the setuid check in the loader for LIBGL_DRIVERS_PATH does not ha

[Mesa-dev] [PATCH] util: unbreak endian detection on OpenBSD

2019-12-04 Thread Jonathan Gray
under the endian.h block did not check if symbols were defined before equating them so '#if __BYTE_ORDER == __LITTLE_ENDIAN' would turn into '#if 0 == 0' which is always true. Signed-off-by: Jonathan Gray Fixes: cbee1bfb342 ("meson/configure: detect endian.h instead of t

Re: [Mesa-dev] [PATCH 2/2] anv: implement OpenBSD get_available_system_memory()

2019-11-30 Thread Jonathan Gray
On Sun, Dec 01, 2019 at 03:22:01AM +1100, Jonathan Gray wrote: > On Sun, Dec 01, 2019 at 02:21:49AM +1100, Jonathan Gray wrote: > > map linux /proc/meminfo "MemAvailable" to uvm free pages > > On second thought HW_USERMEM64 may be a better fit here. > > "The a

Re: [Mesa-dev] [PATCH 2/2] anv: implement OpenBSD get_available_system_memory()

2019-11-30 Thread Jonathan Gray
On Sun, Dec 01, 2019 at 02:21:49AM +1100, Jonathan Gray wrote: > map linux /proc/meminfo "MemAvailable" to uvm free pages On second thought HW_USERMEM64 may be a better fit here. "The amount of available non-kernel memory in bytes" Which ends up being physmem - uvmexp.w

[Mesa-dev] [PATCH 2/2] anv: implement OpenBSD get_available_system_memory()

2019-11-30 Thread Jonathan Gray
map linux /proc/meminfo "MemAvailable" to uvm free pages Signed-off-by: Jonathan Gray --- src/intel/vulkan/anv_device.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 81e3905ae99..ce93718c106 100644

[Mesa-dev] [PATCH 1/2] anv: get total system memory on OpenBSD

2019-11-30 Thread Jonathan Gray
Use sysctl to get total ram on OpenBSD where sysinfo() is not available. Signed-off-by: Jonathan Gray --- src/intel/vulkan/anv_device.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 250f75e9936

[Mesa-dev] [PATCH] util/futex: use futex syscall on OpenBSD

2019-11-30 Thread Jonathan Gray
Make use of the futex syscall added in OpenBSD 6.2. Signed-off-by: Jonathan Gray --- src/util/futex.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/util/futex.h b/src/util/futex.h index 268af92882a..cf8dd0206c9 100644 --- a/src/util/futex.h +++ b/src/util/futex.h

[Mesa-dev] [PATCH] util/anon_file: add OpenBSD shm_mkstemp() path

2019-11-30 Thread Jonathan Gray
memfd_create() is a linux syscall replace the use of it with shm_mkstemp() on OpenBSD. unconditionally include stdlib.h for mkstemp()/mkostemp() Signed-off-by: Jonathan Gray --- src/util/anon_file.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/util

[Mesa-dev] [PATCH] util/u_thread: don't restrict u_thread_get_time_nano() to __linux__

2019-11-30 Thread Jonathan Gray
pthread_getcpuclockid() and clock_gettime() are also available on at least OpenBSD, FreeBSD, NetBSD, DragonFly, Cygwin. Signed-off-by: Jonathan Gray --- src/util/u_thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/u_thread.h b/src/util/u_thread.h index

[Mesa-dev] [PATCH] i965: update Makefile.sources for perf changes

2019-11-27 Thread Jonathan Gray
brw_performance_query_metrics.h was removed in 134e750e16bfc53480e0bba6f0ae3e1d2a7fb87c and brw_performance_query.h was removed in 8ae6667992ccca41d08884d863b8aeb22a4c4e65 remove reference to these files from Makefile.sources Signed-off-by: Jonathan Gray Cc: 19.2 19.3 --- src/mesa/drivers/dri

[Mesa-dev] [PATCH] winsys/amdgpu: avoid double simple_mtx_unlock()

2019-11-27 Thread Jonathan Gray
-by: Jonathan Gray Cc: 19.2 19.3 --- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index a89432d8594..2fe227c9213 100644 --- a/src/gallium/winsys

Re: [Mesa-dev] [PATCH v2] mapi: avoid text relocation in x86 tsd stubs

2019-11-27 Thread Jonathan Gray
On Sun, Nov 11, 2018 at 03:47:35PM +1100, Jonathan Gray wrote: > Make similiar changes to libglvnd to avoid a text relocation in > x86 tsd stubs fixing the build with lld. > > v2: > - store the address of the GOT in ebx required before calling PLT stub > - change .bali

Re: [Mesa-dev] freedreno: 'Unhandled NIR tex src type: 11' on A3XX

2019-06-10 Thread Jonathan Marek
On 6/10/19 10:00 PM, Brian Masney wrote: On Mon, Jun 10, 2019 at 09:53:25PM -0400, Jonathan Marek wrote: This error doesn't happen on X11 using the mesa master branch. Instead, I get the following error on that branch: ../src/gallium/drivers/freedreno/freedreno_batch.c:424:fd_batch_ad

Re: [Mesa-dev] freedreno: 'Unhandled NIR tex src type: 11' on A3XX

2019-06-10 Thread Jonathan Marek
On 6/10/19 9:52 PM, Brian Masney wrote: Hi Rob, On Mon, Jun 10, 2019 at 05:10:45PM -0700, Rob Clark wrote: On Mon, Jun 10, 2019 at 3:54 PM Brian Masney wrote: On Mon, Jun 10, 2019 at 06:58:30AM -0700, Rob Clark wrote: On Mon, Jun 10, 2019 at 6:53 AM Rob Clark wrote: On Sat, Jun 8, 2019 a

Re: [Mesa-dev] freedreno: 'Unhandled NIR tex src type: 11' on A3XX

2019-06-09 Thread Jonathan Marek
On 6/9/19 8:41 AM, Brian Masney wrote: On Sat, Jun 08, 2019 at 10:58:11PM -0400, Jonathan Marek wrote: Hi, It's possible 19.1 has another issue, I only tested the master branch with my fix. I would suggest trying 19.0 or the master branch. The mesa master branch and 19.0.6 both giv

Re: [Mesa-dev] freedreno: 'Unhandled NIR tex src type: 11' on A3XX

2019-06-08 Thread Jonathan Marek
Hi, It's possible 19.1 has another issue, I only tested the master branch with my fix. I would suggest trying 19.0 or the master branch. FYI, I haven't pushed it anywhere but I recently rebased my Nexus 5 patches from last year (and been looking at getting call audio working). Jo

[Mesa-dev] Mesa compatibility range

2019-04-10 Thread Jonathan Jackson
all of OpenGL 2.1? (is it common that a system(high or low end) will support all of Mesa’s equivalents of OpenGL 2.1 features). Thank you for your support. Jonathan Jackson ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https

Re: [Mesa-dev] [PATCH] intel: Add more PCI Device IDs for Coffee Lake and Ice Lake.

2019-02-17 Thread Jonathan Gray
Compared to linux and libdrm Mesa is missing a VLV and ICL id. 0x0f30 ff049b6ce21d2814451afd4a116d001712e0116b drm/i915: bind driver to ValleyView chipsets 0x8A70 d55cb4fa2cf0105bfb16b60a2846737b91fdc173 drm/i915/icl: Add the ICL PCI IDs The Intel Media SDK describes these as /* VLV */

Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools

2019-01-17 Thread Jonathan Gray
On Thu, Jan 17, 2019 at 05:05:41PM -0500, Rob Clark wrote: > On Thu, Jan 17, 2019 at 3:56 PM Jonathan Gray wrote: > > > > On Mon, Jan 14, 2019 at 03:46:35PM +0200, Eero Tamminen wrote: > > > Hi, > > > > > > On 13.1.2019 9.44, Jonathan Gray wrote: > >

Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools

2019-01-17 Thread Jonathan Gray
On Mon, Jan 14, 2019 at 03:46:35PM +0200, Eero Tamminen wrote: > Hi, > > On 13.1.2019 9.44, Jonathan Gray wrote: > ...> As we can not depend on python to build Mesa in OpenBSD I will have to > > go back to maintaining a local Mesa build system if autotools is removed. &g

Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools

2019-01-12 Thread Jonathan Gray
On Fri, Jan 11, 2019 at 02:11:28PM -0800, Matt Turner wrote: > From: Gert Wollny > > Since Meson will eventually be the only build system deprecate autotools > now. It can still be used by invoking configure with the flag > --enable-autotools > > NAKed-by: Ilia Mirkin > Acked-by: Eric Engestr

Re: [Mesa-dev] [PATCH 06/16] nir: improve convert_yuv_to_rgb when fuse_ffma=true

2019-01-07 Thread Jonathan Marek
ve link to the updated series? Thanks, - Lionel On 07/01/2019 16:54, Jonathan Marek wrote: Hi, Did you get a chance try this? If not, I might be able to try it myself as I have Intel HW. On 12/19/18 12:34 PM, Lionel Landwerlin wrote: Hey Jonathan, I'm kind of curious as to whethe

Re: [Mesa-dev] [PATCH 06/16] nir: improve convert_yuv_to_rgb when fuse_ffma=true

2019-01-07 Thread Jonathan Marek
Hi, Did you get a chance try this? If not, I might be able to try it myself as I have Intel HW. On 12/19/18 12:34 PM, Lionel Landwerlin wrote: Hey Jonathan, I'm kind of curious as to whether we can have a single expression that pretty much generates the same final code (through some o

Re: [Mesa-dev] [PATCH 06/16] nir: improve convert_yuv_to_rgb when fuse_ffma=true

2018-12-20 Thread Jonathan marek
On 12/20/2018 01:28 AM, Nils Wallménius wrote: Den ons 19 dec. 2018 17:44 skrev Jonathan Marek : When ffma is available, we can use a different arrangement of constants to get a better result. On freedreno/ir3, this reduces the YUV->RGB to 7 scalar ffma. On freedreno/a2xx, it will allow

Re: [Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false

2018-12-19 Thread Jonathan marek
I haven't encountered such dereference issues, but lowering integers later is a good idea (as with bools which are now lowered later). On 12/19/2018 01:22 PM, Eric Anholt wrote: Jonathan Marek writes: Note: the backend must take care that uniform index is now a float This makes me

Re: [Mesa-dev] [PATCH 08/16] freedreno: a2xx: enable early-Z testing

2018-12-19 Thread Jonathan marek
it). Why should we need to check if the shader does discards? On 12/19/2018 01:05 PM, Eric Anholt wrote: Jonathan Marek writes: Enable earlyZ when alpha test is disabled. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_zsa.c | 3 ++- 1 file changed, 2 insert

Re: [Mesa-dev] [PATCH 04/16] nir: add nir_lower_bool_to_float

2018-12-19 Thread Jonathan marek
r wrote: Am Mi., 19. Dez. 2018 um 17:44 Uhr schrieb Jonathan Marek : Mainly a copy of nir_lower_bool_to_int32, but with float opcodes. Hmmm.. are you aware of https://patchwork.freedesktop.org/patch/257867/ and https://gitlab.freedesktop.org/jekstrand/mesa/commit/cf819c8a3fa99ccedf423ea77cf710dbd

[Mesa-dev] [PATCH 11/16] freedreno: a2xx: use fd_resource_offset for base in emit_texture

2018-12-19 Thread Jonathan Marek
Fixup for the texture update patch. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index ce275a78a6

[Mesa-dev] [PATCH 12/16] freedreno: a2xx: sysmem rendering

2018-12-19 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index d9aad16b4a..77c8d80055 100644 --- a/src

[Mesa-dev] [PATCH 16/16] freedreno: a2xx: a20x hw binning

2018-12-19 Thread Jonathan Marek
--- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 32 +++- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 52 ++ src/gallium/drivers/freedreno/a2xx/fd2_emit.h | 3 +- src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 150 ++ .../drivers/freedreno/a2xx/fd2_program.c |

[Mesa-dev] [PATCH 07/16] freedreno: a2xx: improve REG_A2XX_PA_CL_VTE_CNTL management

2018-12-19 Thread Jonathan Marek
Doesn't change much, but reduces the size of fd2_emit_state gmem2mem does not need to change the value: no Z clipping on resolve mem2gmem now needs to restore the common value after rendering Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c

[Mesa-dev] [PATCH 06/16] nir: improve convert_yuv_to_rgb when fuse_ffma=true

2018-12-19 Thread Jonathan Marek
When ffma is available, we can use a different arrangement of constants to get a better result. On freedreno/ir3, this reduces the YUV->RGB to 7 scalar ffma. On freedreno/a2xx, it will allow YUV->RGB to be 3 vec4 ffma. Signed-off-by: Jonathan Marek --- src/compiler/nir/nir_lower_tex.

[Mesa-dev] [PATCH 05/16] nir: combine fmul and fadd across ffma operations

2018-12-19 Thread Jonathan Marek
ample: matrix * vec4(coord, 1.0) is compiled as: fmul, ffma, ffma, fadd and with this patch: ffma, ffma, ffma Signed-off-by: Jonathan Marek --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compile

[Mesa-dev] [PATCH 15/16] freedreno: a2xx: add partial lower_scalar pass for ir2

2018-12-19 Thread Jonathan Marek
Some instructions can only be scalar on a2xx, lower these only Signed-off-by: Jonathan Marek --- .../drivers/freedreno/Makefile.sources| 1 + src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 3 + .../freedreno/a2xx/ir2_nir_lower_scalar.c | 174 ++ .../drivers

[Mesa-dev] [PATCH 14/16] freedreno: a2xx: add ir2 copy propagation

2018-12-19 Thread Jonathan Marek
Two cases: * replacing srcs which refer to MOV instructions * replacing MOVs used to write to exports Signed-off-by: Jonathan Marek --- .../drivers/freedreno/Makefile.sources| 1 + src/gallium/drivers/freedreno/a2xx/ir2.c | 6 + src/gallium/drivers/freedreno/a2xx/ir2_cp.c

[Mesa-dev] [PATCH 09/16] freedreno: a2xx: set viewport in gmem2mem

2018-12-19 Thread Jonathan Marek
Fixes cases where previous viewport values might case gmem2mem to fail. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 8 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx

[Mesa-dev] [PATCH 10/16] freedreno: a2xx: fix VERTEX_REUSE/DEALLOC on a20x

2018-12-19 Thread Jonathan Marek
On a20x, set VGT_VERTEX_REUSE_BLOCK_CNTL to 2 and don't change it. Small rearrangement on a220 to reduce the size of draw commands. Only set DEALLOC_CNTL on a20x because the correct a220 value is not known. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c

[Mesa-dev] [PATCH 01/16] glsl/nir: int constants as float for native_integers=false

2018-12-19 Thread Jonathan Marek
Note: the backend must take care that uniform index is now a float Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp

[Mesa-dev] [PATCH 08/16] freedreno: a2xx: enable early-Z testing

2018-12-19 Thread Jonathan Marek
Enable earlyZ when alpha test is disabled. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_zsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_zsa.c b/src/gallium/drivers/freedreno/a2xx/fd2_zsa.c index

[Mesa-dev] [PATCH 03/16] glsl/nir: keep bool types when native_integers=false

2018-12-19 Thread Jonathan Marek
We should now lower bool to float later. Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 175 -- 1 file changed, 71 insertions(+), 104 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index

[Mesa-dev] [PATCH 04/16] nir: add nir_lower_bool_to_float

2018-12-19 Thread Jonathan Marek
Mainly a copy of nir_lower_bool_to_int32, but with float opcodes. Signed-off-by: Jonathan Marek --- src/compiler/Makefile.sources | 1 + src/compiler/nir/meson.build | 3 +- src/compiler/nir/nir.h | 1 + src/compiler/nir

[Mesa-dev] [PATCH 02/16] glsl/nir: ftrunc for native_integers=false float to int cast

2018-12-19 Thread Jonathan Marek
out_type is always GLSL_TYPE_FLOAT, so we don't get the ftrunc otherwise Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index c8a7f

[Mesa-dev] [PATCH 2/4] freedreno: a2xx: add partial lower_scalar pass for ir2

2018-11-19 Thread Jonathan Marek
some instructions can only be scalar on a2xx, lower these only Signed-off-by: Jonathan Marek --- .../drivers/freedreno/Makefile.sources| 1 + src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 3 + .../freedreno/a2xx/ir2_nir_lower_scalar.c | 174 ++ .../drivers

[Mesa-dev] [PATCH 3/4] freedreno: implement a20x hw binning

2018-11-19 Thread Jonathan Marek
Not in this patch: emitting the hw binning variant and filling the "draw_patches". That is part of the ir2 patch. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 51 ++-- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 8 +- src/gallium/drivers

[Mesa-dev] [PATCH 4/4] freedreno: use MSM_BO_SCANOUT with scanout buffers

2018-11-19 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/drm/freedreno_drmif.h | 1 + src/gallium/drivers/freedreno/drm/msm_bo.c | 3 +++ src/gallium/drivers/freedreno/freedreno_resource.c | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium

Re: [Mesa-dev] [PATCH 1/3] nir: add fceil lowering

2018-11-19 Thread Jonathan marek
I don't have push rights, but robclark added this patch to his staging branch so I imagine he will push it soon. On 11/19/2018 03:15 PM, Christian Gmeiner wrote: Am Mo., 12. Nov. 2018 um 19:17 Uhr schrieb Jonathan Marek : lowers ceil(x) as -floor(-x) Signed-off-by: Jonathan Marek D

[Mesa-dev] [PATCH 3/3] nir: combine fmul and fadd across ffma operations

2018-11-19 Thread Jonathan Marek
ample: matrix * vec4(coord, 1.0) is compiled as: fmul, ffma, ffma, fadd and with this patch: ffma, ffma, ffma Signed-off-by: Jonathan Marek --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compile

[Mesa-dev] [PATCH 2/3] glsl/nir: ftrunc for native_integers=false float to int cast

2018-11-19 Thread Jonathan Marek
out_type is always GLSL_TYPE_FLOAT, so we don't get the ftrunc otherwise since there are no other conversions needed, use fmov for the other cases (there is the f2b case, but the 1-bit bool patches should fix that) Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp

[Mesa-dev] [PATCH 1/3] glsl/nir: int constants as float for native_integers=false

2018-11-19 Thread Jonathan Marek
Note: the backend must take care that uniform index is now a float Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp

[Mesa-dev] [PATCH 4/9] freedreno: a2xx: set VIZ_QUERY_ID on a20x

2018-11-13 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index 20bfd06b13..50e2fe13eb 100644 --- a/src/gallium/drivers

[Mesa-dev] [PATCH 7/9] freedreno: use GENERIC instead of TEXCOORD for blit program

2018-11-13 Thread Jonathan Marek
blip_fp uses GENERIC as input, so blit_vp should match for linking Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/freedreno_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers

[Mesa-dev] [PATCH 8/9] freedreno: implement a20x hw binning

2018-11-13 Thread Jonathan Marek
Not in this patch: emitting the hw binning variant and filling the "draw_patches". That is part of the ir2 patch. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 47 +-- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 8 +- src/gallium/drivers

[Mesa-dev] [PATCH 6/9] freedreno: a2xx texture update

2018-11-13 Thread Jonathan Marek
Adds all missing texture related logic. For everything to work it also needs changes to ir2/fd2_program, which are part of the ir2 update patch. Note: it needs rnndb update Signed-off-by: Jonathan Marek --- .../drivers/freedreno/Makefile.sources| 2 + src/gallium/drivers/freedreno

[Mesa-dev] [PATCH 2/9] freedreno: a2xx: fix POINT_MINMAX_MAX overflow

2018-11-13 Thread Jonathan Marek
As it stands, it overflows to zero. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_rasterizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_rasterizer.c b/src/gallium/drivers/freedreno/a2xx

[Mesa-dev] [PATCH 5/9] a2xx: Compute depth base in gmem correctly

2018-11-13 Thread Jonathan Marek
Note: it needs rnndb update Signed-off-by: Marek Vasut Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno

[Mesa-dev] [PATCH 1/9] freedreno: a2xx: fd2_draw update for a20x

2018-11-13 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 97 --- .../drivers/freedreno/freedreno_batch.c | 1 + .../drivers/freedreno/freedreno_batch.h | 1 + .../drivers/freedreno/freedreno_draw.c| 2 + .../drivers/freedreno

[Mesa-dev] [PATCH 3/9] freedreno: add missing a20x ids

2018-11-13 Thread Jonathan Marek
200: 256KiB GMEM A200 (imx53) 201: 128KiB GMEM A200 (imx51) Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/freedreno_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno

Re: [Mesa-dev] [PATCH 2/3] nir: combine fmul and fadd across ffma operations

2018-11-13 Thread Jonathan marek
ov 12, 2018 at 12:17 PM Jonathan Marek wrote: This works by moving the fadd up across the ffma operations, so that it can eventually can be combined with a fmul. I'm not sure it works in all cases, but it works in all the common cases. Example: matrix * vec4(coord, 1.0) is compiled as:

[Mesa-dev] [PATCH 3/3] glsl/nir: glsl_to_nir fixes for native_integers=false

2018-11-12 Thread Jonathan Marek
to int (ftrunc), and f2b (which represents the operation that is the opposite of a fnot). Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src

[Mesa-dev] [PATCH 2/3] nir: combine fmul and fadd across ffma operations

2018-11-12 Thread Jonathan Marek
patch: ffma, ffma, ffma Signed-off-by: Jonathan Marek --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 8f4df891b8..82e10731a6 100644 --- a/src/compile

[Mesa-dev] [PATCH 1/3] nir: add fceil lowering

2018-11-12 Thread Jonathan Marek
lowers ceil(x) as -floor(-x) Signed-off-by: Jonathan Marek --- src/compiler/nir/nir.h| 3 +++ src/compiler/nir/nir_opt_algebraic.py | 1 + 2 files changed, 4 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index dc3c729dee..f9b32a5daf 100644 --- a/src

[Mesa-dev] [PATCH v2] mapi: avoid text relocation in x86 tsd stubs

2018-11-10 Thread Jonathan Gray
Make similiar changes to libglvnd to avoid a text relocation in x86 tsd stubs fixing the build with lld. v2: - store the address of the GOT in ebx required before calling PLT stub - change .balign values to match X86_ENTRY_SIZE Signed-off-by: Jonathan Gray Cc: mesa-sta

Re: [Mesa-dev] [Mesa-stable] [PATCH] mapi: avoid text relocation in x86 tsd stubs

2018-11-10 Thread Jonathan Gray
On Fri, Nov 09, 2018 at 10:30:42PM +1100, Jonathan Gray wrote: > On Thu, Nov 08, 2018 at 03:54:20PM +, Emil Velikov wrote: > > On Fri, 2 Nov 2018 at 00:02, Jonathan Gray wrote: > > > > > > On Thu, Nov 01, 2018 at 12:26:34PM -0700, Ian Romanick wrote: > > >

Re: [Mesa-dev] [Mesa-stable] [PATCH] mapi: avoid text relocation in x86 tsd stubs

2018-11-09 Thread Jonathan Gray
On Thu, Nov 08, 2018 at 03:54:20PM +, Emil Velikov wrote: > On Fri, 2 Nov 2018 at 00:02, Jonathan Gray wrote: > > > > On Thu, Nov 01, 2018 at 12:26:34PM -0700, Ian Romanick wrote: > > > On 10/31/2018 09:08 PM, Jonathan Gray wrote: > > > > Make similiar

Re: [Mesa-dev] [Mesa-stable] [PATCH] mapi: avoid text relocation in x86 tsd stubs

2018-11-01 Thread Jonathan Gray
On Thu, Nov 01, 2018 at 12:26:34PM -0700, Ian Romanick wrote: > On 10/31/2018 09:08 PM, Jonathan Gray wrote: > > Make similiar changes to libglvnd to avoid a text relocation in > > x86 tsd stubs fixing the build with lld. > > > > Signed-off-by: Jona

Re: [Mesa-dev] [PATCH] intel/aubinator_error_decode: link libm

2018-11-01 Thread Jonathan Gray
Patch: https://patchwork.freedesktop.org/patch/259176/ > > On Thu, Nov 1, 2018 at 6:12 AM Jonathan Gray wrote: > > > aubinator_error_decode needs to link libm to build on OpenBSD/i386 > > ../../src/util/.libs/libmesautil.a(libmesautil_la-half_float.o): In > > function `_mesa_float

[Mesa-dev] [PATCH] mapi: avoid text relocation in x86 tsd stubs

2018-10-31 Thread Jonathan Gray
Make similiar changes to libglvnd to avoid a text relocation in x86 tsd stubs fixing the build with lld. Signed-off-by: Jonathan Gray Cc: mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108541 --- src/mapi/entry_x86_tsd.h | 14 +- 1 file

[Mesa-dev] [PATCH] intel/tools: include stdarg.h in error2aub

2018-10-31 Thread Jonathan Gray
Include stdarg.h in error2aub.c otherwise it fails to build on OpenBSD due to not finding definitions for va_list va_start va_end. Signed-off-by: Jonathan Gray Cc: mesa-sta...@lists.freedesktop.org --- src/intel/tools/error2aub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel

[Mesa-dev] [PATCH] intel/aubinator_error_decode: link libm

2018-10-31 Thread Jonathan Gray
27; Signed-off-by: Jonathan Gray Cc: mesa-sta...@lists.freedesktop.org --- src/intel/Makefile.tools.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/Makefile.tools.am b/src/intel/Makefile.tools.am index 4809962b188..da49d37a728 100644 --- a/src/intel/Makefile.too

[Mesa-dev] [PATCH] util/xmlpool: avoid using a GNU make pattern rule

2018-10-31 Thread Jonathan Gray
% pattern rules are a GNU extension. Convert the use of one to a inference rule to allow this to build on OpenBSD. Signed-off-by: Jonathan Gray --- src/util/xmlpool/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/xmlpool/Makefile.am b/src/util/xmlpool

Re: [Mesa-dev] [PATCH 08/11] freedreno: a2xx: split large draws on a20x

2018-10-08 Thread Jonathan marek
.org/patch/250192/ On Mon, Oct 8, 2018 at 12:07 AM Jonathan Marek wrote: a20x can only draw 65535 vertices at once. this fix only applies to triangles. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 30 +-- 1 file changed, 28 insertions(+), 2

[Mesa-dev] [PATCH 09/11] freedreno: a2xx: set PA_SC_VIZ_QUERY register

2018-10-07 Thread Jonathan Marek
on a20x the GPU will hang if this register is zero Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index

[Mesa-dev] [PATCH 10/11] freedreno: a2xx: start max_reg at -1

2018-10-07 Thread Jonathan Marek
on a220 it makes a difference if the max register # is -1 or 0 Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/ir-a2xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c b/src/gallium/drivers/freedreno

[Mesa-dev] [PATCH 07/11] freedreno: a2xx: a20x hw binning

2018-10-07 Thread Jonathan Marek
adds all the required logic for a20x hw binning to work Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 95 src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 10 +- src/gallium/drivers/freedreno/a2xx/fd2_emit.h | 3 +- src/gallium/drivers

[Mesa-dev] [PATCH 11/11] a2xx: Compute depth base in gmem correctly

2018-10-07 Thread Jonathan Marek
From: Marek Vasut This fixes "a2xx: Compute depth base in gmem consistently" by using the already present zsbuf and cbuf bases rather than incorrect hand crafted calculation. Without this patch, the following assertion triggers ie. with Qt5 on system with 480x272 display: appliation: ../../../

[Mesa-dev] [PATCH 02/11] freedreno: implement different pipe configuration for a20x

2018-10-07 Thread Jonathan Marek
this also adds a num_vsc_pipe which represents the number of pipes to use: this value is useful because more pipes has a higher cost (on a20x) Signed-off-by: Jonathan Marek --- .../drivers/freedreno/freedreno_gmem.c| 29 ++- .../drivers/freedreno/freedreno_gmem.h

[Mesa-dev] [PATCH 08/11] freedreno: a2xx: split large draws on a20x

2018-10-07 Thread Jonathan Marek
a20x can only draw 65535 vertices at once. this fix only applies to triangles. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 30 +-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c

[Mesa-dev] [PATCH 06/11] freedreno: a2xx: add fragcoord

2018-10-07 Thread Jonathan Marek
emulated fragcoord. a2xx has *some* hw support but it is not practical Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c| 16 1 file changed, 16 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c b/src/gallium

[Mesa-dev] [PATCH 04/11] freedreno: a2xx: map tgsi ids to ir2 ids

2018-10-07 Thread Jonathan Marek
this is for a2xx specific semantics (vertex id) and a basic SSA form Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c | 54 +-- src/gallium/drivers/freedreno/a2xx/ir-a2xx.c | 45 ++-- src/gallium/drivers/freedreno/a2xx/ir-a2xx.h | 9

[Mesa-dev] [PATCH 05/11] freedreno: a2xx: implement a20x binning shader

2018-10-07 Thread Jonathan Marek
binning data "pointer" - relative_addr=1 (in ir-a2xx) makes it not interfere with the other shader constants Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c | 72 +-- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 14 .../drivers

[Mesa-dev] [PATCH 03/11] freedreno: add a20x ids

2018-10-07 Thread Jonathan Marek
the two a20x GPUs tested are a200 in the imx51 and the imx53 (not a205). the 201 id is used for the imx51 (it only has 128kb gmem as opposed to the typical 256kb for a200) Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/freedreno_screen.c | 2 ++ 1 file changed, 2 insertions

[Mesa-dev] [PATCH 01/11] freedreno: implement the USE_VISIBILITY case for a20x in fd_draw

2018-10-07 Thread Jonathan Marek
this introduces some tracking of the number of vertices drawn in the current batch: the draw command needs an offset to the start of the binning data Signed-off-by: Jonathan Marek --- .../drivers/freedreno/adreno_pm4.xml.h| 7 + .../drivers/freedreno/freedreno_batch.c | 1

[Mesa-dev] [PATCH 11/11] freedreno: a2xx: set PA_SC_VIZ_QUERY register

2018-09-17 Thread Jonathan Marek
on a20x the GPU will hang if this register is zero Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index

[Mesa-dev] [PATCH 10/11] freedreno: a2xx: split large draws on a20x

2018-09-17 Thread Jonathan Marek
a20x can only draw 65535 vertices at once. this fix only applies to triangles. Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 30 +-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c

[Mesa-dev] [PATCH 08/11] freedreno: a2xx: add fragcoord

2018-09-17 Thread Jonathan Marek
emulated fragcoord. a2xx has *some* hw support but it is not practical Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c| 16 1 file changed, 16 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c b/src/gallium

[Mesa-dev] [PATCH 09/11] freedreno: a2xx: a20x hw binning

2018-09-17 Thread Jonathan Marek
adds all the required logic for a20x hw binning to work Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 95 src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 10 +- src/gallium/drivers/freedreno/a2xx/fd2_emit.h | 3 +- src/gallium/drivers

[Mesa-dev] [PATCH 07/11] freedreno: a2xx: implement a20x binning shader

2018-09-17 Thread Jonathan Marek
binning data "pointer" - relative_addr=1 (in ir-a2xx) makes it not interfere with the other shader constants Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c | 72 +-- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 14 .../drivers

[Mesa-dev] [PATCH 06/11] freedreno: a2xx: map tgsi ids to ir2 ids

2018-09-17 Thread Jonathan Marek
this is for a2xx specific semantics (vertex id) and a basic SSA form Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c | 54 +-- src/gallium/drivers/freedreno/a2xx/ir-a2xx.c | 45 ++-- src/gallium/drivers/freedreno/a2xx/ir-a2xx.h | 9

[Mesa-dev] [PATCH 02/11] freedreno: implement different pipe configuration for a20x

2018-09-17 Thread Jonathan Marek
this also adds a num_vsc_pipe which represents the number of pipes to use: this value is useful because more pipes has a higher cost (on a20x) Signed-off-by: Jonathan Marek --- .../drivers/freedreno/freedreno_context.h | 1 + .../drivers/freedreno/freedreno_gmem.c| 30

[Mesa-dev] [PATCH 01/11] freedreno: implement the USE_VISIBILITY case for a20x in fd_draw

2018-09-17 Thread Jonathan Marek
this introduces some tracking of the number of vertices drawn in the current batch: the draw command needs an offset to the start of the binning data Signed-off-by: Jonathan Marek --- .../drivers/freedreno/adreno_pm4.xml.h| 7 + .../drivers/freedreno/freedreno_batch.c | 1

[Mesa-dev] [PATCH 03/11] freedreno: use renderonly scanout

2018-09-17 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- .../drivers/freedreno/freedreno_resource.c| 57 +-- .../drivers/freedreno/freedreno_resource.h| 1 + .../drivers/freedreno/freedreno_screen.c | 29 +++--- .../drivers/freedreno/freedreno_screen.h | 10 ++-- .../freedreno

[Mesa-dev] [PATCH 05/11] freedreno: add a20x ids

2018-09-17 Thread Jonathan Marek
the two a20x GPUs tested are a200 in the imx51 and the imx53 (not a205). the 201 id is used for the imx51 (it only has 128kb gmem as opposed to the typical 256kb for a200) Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/freedreno_screen.c | 2 ++ 1 file changed, 2 insertions

[Mesa-dev] [PATCH 04/11] imx: add freedreno

2018-09-17 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- configure.ac| 4 ++-- src/gallium/targets/dri/target.c| 5 +++- src/gallium/winsys/imx/drm/Makefile.am | 9 +++ src/gallium/winsys/imx/drm/imx_drm_winsys.c | 26 - 4 files changed, 35

[Mesa-dev] [PATCH] freedreno: a2xx: ir2 update

2018-07-24 Thread Jonathan Marek
IN/OUT MOV instructions generated by TGSI and removal of unused instructions when some exports are disabled -ir2 now allows full 8-bit index for constants -ir2_alloc no longer allocates 4 times too many bytes Signed-off-by: Jonathan Marek --- .../drivers/freedreno/a2xx/fd2_compiler.c | 210

  1   2   3   4   >