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_add_dep

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

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 give

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). Jonathan On

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

2019-01-07 Thread Jonathan Marek
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 whether we can have

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

2019-01-07 Thread Jonathan Marek
of the algebraic lowering/optimizations). I'll give it a try on Intel HW, see what it does. - Lionel On 19/12/2018 16:39, Jonathan Marek wrote: 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 f

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 think

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

2018-12-19 Thread Jonathan marek
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 insertions(+), 1

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

2018-12-19 Thread Jonathan marek
te: 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/cf819c8a3fa99ccedf423ea77cf710dbd85206

[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 | 20

[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
: 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/compiler/nir

[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 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 | 18

[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 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 c8a7f3bd6c

[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 Do you

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

2018-11-19 Thread Jonathan Marek
: 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/compiler/nir

[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 | 13

[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
, 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: fmul

[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
: 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/compiler/nir

[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

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

2018-10-08 Thread Jonathan marek
/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 deletions

[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
is the 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
is the 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 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 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 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
of 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

[Mesa-dev] [PATCH 5/5] freedreno: a2xx: fix clear color

2018-06-21 Thread Jonathan Marek
the format of the CLEAR_COLOR register doesn't depend on the target format this fixes clear color when rendering to 32-bit RGBA and 16-bit targets Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 4/5] freedreno: a2xx: fix crash when freeing context

2018-06-21 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_program.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c index 9a77457251..834a7c7fcd 100644 --- a/src/gallium

[Mesa-dev] [PATCH 1/5] freedreno: a2xx: increase size of the offset field in instr_fetch_vtx_t

2018-06-21 Thread Jonathan Marek
The offset field is 22 bit large. 11 bits are necessary because MaxVertexAttribRelativeOffset = 2047 Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/instr-a2xx.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx

[Mesa-dev] [PATCH 3/5] freedreno: a2xx: fix crash on first clear

2018-06-21 Thread Jonathan Marek
blend can be NULL, so check for that Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index

[Mesa-dev] [PATCH 2/5] freedreno: add a20x

2018-06-21 Thread Jonathan Marek
this patch adds support for a20x, which has some differences with a220: -no VGT_MAX_VTX_INDX register -no CLEAR_COLOR register -set RB_BC_CONTROL in restore (hangs without) -different CP_DRAW_INDX format tested with kmscube and glmark2 scenes, on par with a220 Signed-off-by: Jonathan Marek

[Mesa-dev] [PATCH] freedreno: add a20x

2018-06-19 Thread Jonathan Marek
this patch adds support for a20x, which has some differences with a220: -no VGT_MAX_VTX_INDX register -no CLEAR_COLOR register -set RB_BC_CONTROL in restore (hangs without) -different CP_DRAW_INDX format tested with kmscube and glmark2 scenes, on par with a220 Signed-off-by: Jonathan Marek

[Mesa-dev] [PATCH 2/2] freedreno: a2xx: fix crash when freeing context

2018-06-19 Thread Jonathan Marek
Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_program.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c index 9a77457251..834a7c7fcd 100644 --- a/src/gallium

[Mesa-dev] [PATCH 1/2] freedreno: a2xx: fix crash on first clear

2018-06-19 Thread Jonathan Marek
blend can be NULL, so check for that Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index

[Mesa-dev] [PATCH 1/2] freedreno: a2xx: fix crash on first clear

2018-06-19 Thread Jonathan Marek
blend can be NULL, so check for that Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index

[Mesa-dev] [PATCH] freedreno: a2xx: fix clear color

2018-06-18 Thread Jonathan Marek
the format of the CLEAR_COLOR register doesn't depend on the target format this fixes clear color when rendering to 32-bit RGBA and 16-bit targets Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH] freedreno: add initial a20x support

2018-06-18 Thread Jonathan Marek
the bare minimum to get a20x running with kmscube and some glmark2 scenes: different CP_DRAW_INDX format and the different clear color register Signed-off-by: Jonathan Marek --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 15 +++-- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 10