Re: [Mesa-dev] [PATCH 26/28] i965/blorp: Add bilinear blending support to the NIR path

2016-05-12 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:46PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 120 > +-- Reviewed-by: Topi Pohjolainen ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lis

Re: [Mesa-dev] [PATCH v2 21/30] i965/fs: support doubles with shared variable stores

2016-05-12 Thread Iago Toral
On Thu, 2016-05-12 at 13:35 +0200, Samuel Iglesias Gonsálvez wrote: > From: Iago Toral Quiroga > > This is pretty much the same we do with SSBOs. > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 37 > +++- > 1 file changed, 32 insertions(+), 5 deletions(-) > > dif

Re: [Mesa-dev] [PATCH v2 19/30] i965/fs: add shuffle_64bit_data_for_32bit_write helper

2016-05-12 Thread Iago Toral
On Thu, 2016-05-12 at 20:05 -0700, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > > > From: Iago Toral Quiroga > > > > This does the inverse operation of shuffle_32bit_load_result_to_64bit_data > > and we will use it when we need to write 64-bit data in the layout expected > > by u

Re: [Mesa-dev] GBM backend dynamic dispatch method

2016-05-12 Thread Jammy Zhou
2016-05-13 14:01 GMT+08:00 Nicolai Hähnle : > On 13.05.2016 00:22, Jammy Zhou wrote: > >> >> >> 2016-05-13 12:39 GMT+08:00 Nicolai Hähnle > >: >> >> On 12.05.2016 20:20, Jammy Zhou wrote: >> >> >> >> 2016-05-12 17:39 GMT+08:00 Michel Dänzer >

Re: [Mesa-dev] [PATCH v2 25/30] i965/tcs/scalar: fix load input for doubles

2016-05-12 Thread Iago Toral
On Thu, 2016-05-12 at 11:42 -0700, Kenneth Graunke wrote: > On Thursday, May 12, 2016 1:36:02 PM PDT Samuel Iglesias Gonsálvez wrote: > > From: Iago Toral Quiroga > > > > --- > > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 96 ++ > +- > > 1 file changed, 71 insertions(

Re: [Mesa-dev] [PATCH v2 11/30] i965/fs: add shuffle_32bit_load_result_to_64bit_data helper

2016-05-12 Thread Iago Toral
On Thu, 2016-05-12 at 20:01 -0700, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > > > From: Iago Toral Quiroga > > > > There will be a few places where we need to shuffle the result of a 32-bit > > load into valid 64-bit data, so extract this logic into a separate helper > > that w

[Mesa-dev] [PATCH] st/mesa: fix reversed copyimage canonical format

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle The format_desc swizzle describes where in the array each color channel comes from - but the existing code was written as if each entry in the swizzle described the meaning of an array element. Fixes piglit's arb_copy_image-format-swizzle. Cc: "11.1 11.2" --- src/mesa/sta

Re: [Mesa-dev] [PATCH] glsl: make sure that texture(bias) variants are only exposed in fs

2016-05-12 Thread Kenneth Graunke
On Friday, May 13, 2016 1:12:20 AM PDT Ilia Mirkin wrote: > Many were already marked as fs_only, but not all. This fixes the > remaining ir_txb entries. > > Signed-off-by: Ilia Mirkin > --- > src/compiler/glsl/builtin_functions.cpp | 74 +++ +- > 1 file changed, 37 in

[Mesa-dev] [PATCH 10/12] tgsi: remove culldist semantic.

2016-05-12 Thread Dave Airlie
From: Dave Airlie This isn't used anymore in the tree, culldist's are part of the clipdist semantic, we could in theory rename it, but I'm not sure there is much point, and I'd have to be careful with virgl. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_strings.c | 1 - src/

[Mesa-dev] [PATCH 08/12] mesa/st: Add support for GL_ARB_cull_distance (v2)

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann v2: don't bother with cull dist varyings except to assert. Signed-off-by: Tobias Klausmann Reviewed-by: Marek Olšák Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_extensions.c | 1 + src/mesa/state_tracker/st_program.c| 26 ++ 2 f

[Mesa-dev] [PATCH 12/12] docs: update ARB_cull_distance status.

2016-05-12 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- docs/relnotes/11.3.0.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index e2dabea..04976c6 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -211,7 +211,7 @@ G

[Mesa-dev] [PATCH 11/12] llvmpipe: Enable cull_distance as draw supports it.

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann Signed-off-by: Tobias Klausmann Signed-off-by: Dave Airlie --- src/gallium/drivers/llvmpipe/lp_screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index c6c18e

[Mesa-dev] [PATCH 06/12] glsl: Add arb_cull_distance support (v2)

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann v2: make too large array a compile error Signed-off-by: Tobias Klausmann Signed-off-by: Dave Airlie --- src/compiler/glsl/ast_to_hir.cpp | 46 src/compiler/glsl/builtin_variables.cpp | 11 ++- src/compiler/glsl/glcpp/glcpp-parse.y

[Mesa-dev] [PATCH 07/12] gallium: Add a pipe cap for arb_cull_distance

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann This lets us safely enable or disable the extension as needed Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Reviewed-by: Marek Olšák Signed-off-by: Dave Airlie --- src/gallium/docs/source/screen.rst | 2 ++ src/gallium/drivers/freedreno

[Mesa-dev] [PATCH 03/12] mesa/prog: Add varyings for arb_cull_distance

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Signed-off-by: Dave Airlie --- src/mesa/program/prog_print.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c index 08381b4..755d644 1006

[Mesa-dev] [PATCH 02/12] mesa/main: Add support for GL_ARB_cull_distance (v2)

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann airlied: v2: rename LowerClipDistance to LowerCombinedClipCullDistnace. I don't think we want any other behaviour with any current hw. Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Reviewed-by: Ian Romanick Signed-off-by: Dave Airlie --- src/compiler

[Mesa-dev] [PATCH 09/12] draw: stop using CULLDIST semantic.

2016-05-12 Thread Dave Airlie
From: Dave Airlie The way the HW works doesn't really fit with having two semantics for this. The GLSL compiler emits 2 vec4s and two properties, this makes draw use those instead of CULLDIST semantics. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/draw/draw_cliptest_tmp.h | 4 ++-- s

[Mesa-dev] [PATCH 04/12] glsl: rename lower_clip_distance to lower_distance.

2016-05-12 Thread Dave Airlie
From: Dave Airlie This just renames the file in anticipation of adding cull lowering. Signed-off-by: Tobias Klausmann Signed-off-by: Dave Airlie Reviewed-by: Edward O'Callaghan --- src/compiler/Makefile.sources | 2 +- src/compiler/glsl/lower_clip_distance.cpp | 574 ---

[Mesa-dev] ARB_cull_distance (final?) and llvmpipe support

2016-05-12 Thread Dave Airlie
This is hopefully the final posting for this series, I've gotten the lowering pass to look like I wanted, which is to say it lowers to vec4[2]. TGSI then uses the CLIPDIST semantic and the two properties to workout what is what. This means the CULLDIST semantic is no longer required. So I've ripp

[Mesa-dev] [PATCH 01/12] glapi: Add GL_ARB_cull_distance

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Signed-off-by: Dave Airlie --- src/mapi/glapi/gen/gl_API.xml | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 4bf

[Mesa-dev] [PATCH 05/12] glsl: Extend lowering pass for gl_ClipDistance to support other arrays (v4)

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann This will come in handy when we want to lower gl_CullDistance into gl_CullDistanceMESA. [airlied: drop separate APIs for clip/cull - just use single API to call both passes.] v3: reexamine my sanity, this was pretty broken, the new code creates one copy of gl_ClipDistance

Re: [Mesa-dev] [PATCH 25/28] i965/blorp: Add support for averaging resolves to the NIR path

2016-05-12 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:45PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 162 > --- > 1 file changed, 144 insertions(+), 18 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp > b/src/mesa/drivers/dri/i

Re: [Mesa-dev] GBM backend dynamic dispatch method

2016-05-12 Thread Nicolai Hähnle
On 13.05.2016 00:22, Jammy Zhou wrote: 2016-05-13 12:39 GMT+08:00 Nicolai Hähnle mailto:nhaeh...@gmail.com>>: On 12.05.2016 20:20, Jammy Zhou wrote: 2016-05-12 17:39 GMT+08:00 Michel Dänzer mailto:mic...@daenzer.net>

Re: [Mesa-dev] [PATCH 24/28] i965/blorp: Add MSAA encode/decode support to the NIR path

2016-05-12 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:44PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 203 > +-- Reviewed-by: Topi Pohjolainen > 1 file changed, 194 insertions(+), 9 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit

Re: [Mesa-dev] [PATCH 22/28] i965/blorp: Add support for discard-based bounds checks to the NIR path

2016-05-12 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:42PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) Reviewed-by: Topi Pohjolainen > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp > b/src/

Re: [Mesa-dev] [PATCH v2 19/30] i965/fs: add shuffle_64bit_data_for_32bit_write helper

2016-05-12 Thread Samuel Iglesias Gonsálvez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 13/05/16 05:05, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > >> From: Iago Toral Quiroga >> >> This does the inverse operation of >> shuffle_32bit_load_result_to_64bit_data and we will use it when >> we need to write 64-bit d

Re: [Mesa-dev] [PATCH 23/28] i965/blorp: Add support for W-[de]tiling to the NIR path

2016-05-12 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:43PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 107 > ++- > 1 file changed, 105 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp > b/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH] radeonsi: force level zero on image instructions in non-fragment shaders (v2)

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle Section 8.9 (Texture Functions) of the OpenGL Shading Language 4.5 specification: However, automatic level of detail is computed only for fragment shaders. Other shaders operate as though the base level of detail were computed as zero. and Section 8.9.3 (Texture Ga

Re: [Mesa-dev] [PATCH v2 09/30] i965/fs: fix copy/constant propagation regioning checks

2016-05-12 Thread Samuel Iglesias Gonsálvez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 13/05/16 07:11, Samuel Iglesias Gonsálvez wrote: > > > On 13/05/16 02:42, Francisco Jerez wrote: >> Samuel Iglesias Gonsálvez writes: >> >>> From: Iago Toral Quiroga >>> >>> We were not accounting for subreg_offset in the check for the >>>

Re: [Mesa-dev] GBM backend dynamic dispatch method

2016-05-12 Thread Jammy Zhou
2016-05-13 12:39 GMT+08:00 Nicolai Hähnle : > On 12.05.2016 20:20, Jammy Zhou wrote: > >> >> >> 2016-05-12 17:39 GMT+08:00 Michel Dänzer > >: >> >> On 12.05.2016 17:58, Yu, Qiang wrote: >> > Oh, what a crazy idea. So you mean it can work like this? >> > >>

Re: [Mesa-dev] [PATCH v2 03/30] i965/fs: Fix copy propagation of load payload for double operands

2016-05-12 Thread Samuel Iglesias Gonsálvez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 13/05/16 07:09, Samuel Iglesias Gonsálvez wrote: > > > On 13/05/16 01:52, Francisco Jerez wrote: >> Samuel Iglesias Gonsálvez writes: >> >>> From: Iago Toral Quiroga >>> >>> Specifically, consider the size of the data type of the operand >

Re: [Mesa-dev] [PATCH 2/2] i965: check each field separately in backend_end::equals()

2016-05-12 Thread Samuel Iglesias Gonsálvez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 13/05/16 05:38, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > >> Extra bits required to make room for the df field of the union >> don't get initialized in all codepaths, so backend_reg >> comparisons done using memcmp() can bas

[Mesa-dev] [PATCH] glsl: make sure that texture(bias) variants are only exposed in fs

2016-05-12 Thread Ilia Mirkin
Many were already marked as fs_only, but not all. This fixes the remaining ir_txb entries. Signed-off-by: Ilia Mirkin --- src/compiler/glsl/builtin_functions.cpp | 74 - 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/compiler/glsl/builtin_func

Re: [Mesa-dev] [PATCH v2 09/30] i965/fs: fix copy/constant propagation regioning checks

2016-05-12 Thread Samuel Iglesias Gonsálvez
On 13/05/16 02:42, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > >> From: Iago Toral Quiroga >> >> We were not accounting for subreg_offset in the check for the start >> of the region. >> >> Also, fs_reg::regs_read() already takes the stride into account, so we >> should not mul

Re: [Mesa-dev] [PATCH v2 03/30] i965/fs: Fix copy propagation of load payload for double operands

2016-05-12 Thread Samuel Iglesias Gonsálvez
On 13/05/16 01:52, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > >> From: Iago Toral Quiroga >> >> Specifically, consider the size of the data type of the operand to compute >> the number of registers written. >> >> v2 (Sam): >> - Fix line width (Jordan). >> - Add an assert (Jor

Re: [Mesa-dev] [PATCH 21/28] i965/blorp: Add initial support for NIR-based blit shaders

2016-05-12 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:41PM -0700, Jason Ekstrand wrote: > Many of the more complex cases still fall back to the old shader builder. > --- > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 425 > +-- > 1 file changed, 401 insertions(+), 24 deletions(-) > > diff --gi

Re: [Mesa-dev] [PATCH 2/2] radeonsi: force level zero on image instructions in non-fragment shaders

2016-05-12 Thread Ilia Mirkin
On Fri, May 13, 2016 at 12:57 AM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Section 8.9 (Texture Functions) of the OpenGL Shading Language 4.5 > specification: > >However, automatic level of detail is computed only for fragment shaders. >Other shaders operate as though the base lev

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Chris Forbes
With the version cutoff fixed, this and the patch it builds on are (squashed together or not): Reviewed-by: Chris Forbes On Fri, May 13, 2016 at 4:58 PM, Ilia Mirkin wrote: > On Fri, May 13, 2016 at 12:51 AM, Dave Airlie wrote: > >>> second argument is for ES... 0 means "never"). > >> > >> I

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Ilia Mirkin
On Fri, May 13, 2016 at 12:51 AM, Dave Airlie wrote: >>> second argument is for ES... 0 means "never"). >> >> I see. (You can tell how much of this sort of code I've written...). >> >> I don't know that I'd trust me but it looks fine as far add I can see. >> Thanks for taking care of 4.50 while y

[Mesa-dev] [PATCH 1/2] radeonsi: emit TXQ in separate functions

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle TXQ is sufficiently different that having in it in the same code path as texture sampling/fetching opcodes doesn't make much sense. --- src/gallium/drivers/radeonsi/si_shader.c | 109 ++- 1 file changed, 64 insertions(+), 45 deletions(-) diff --g

[Mesa-dev] [PATCH 2/2] radeonsi: force level zero on image instructions in non-fragment shaders

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle Section 8.9 (Texture Functions) of the OpenGL Shading Language 4.5 specification: However, automatic level of detail is computed only for fragment shaders. Other shaders operate as though the base level of detail were computed as zero. Of course, explicit LOD or de

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Dave Airlie
>> second argument is for ES... 0 means "never"). > > I see. (You can tell how much of this sort of code I've written...). > > I don't know that I'd trust me but it looks fine as far add I can see. > Thanks for taking care of 4.50 while you were in the neighborhood. For what > it's worth, Do we

[Mesa-dev] [PATCH v2 3/5] compiler/glsl: avoid downcasting list sentinel nodes (v2)

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle This avoids undefined downcasting of list sentinels that crashes gcc's ubsan. v2: don't use a new macro (Ian Romanick) --- src/compiler/glsl/opt_tree_grafting.cpp | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/glsl/opt_tree_grafting.

[Mesa-dev] [PATCH v2 0/5] compiler/glsl: fix crashes when running with ubsan

2016-05-12 Thread Nicolai Hähnle
Hi, some minor adjustment based on feedback. Mostly I've gotten rid of the new macros which were really only used in at most two places each. Cheers, Nicolai ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman

[Mesa-dev] [PATCH v2 2/5] compiler/list: avoid downcasting sentinel nodes (v2)

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle This avoids undefined behaviour that crashes gcc's ubsan. v2: don't add a new macro (Ian Romanick) --- src/compiler/glsl/opt_dead_code_local.cpp | 8 +--- src/compiler/glsl/opt_tree_grafting.cpp | 9 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --

[Mesa-dev] [PATCH v2 4/5] compiler/glsl: move list node downcasts after sentinel/counter checks (v2)

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle v2: make variable const + style change Reviewed-by: Ian Romanick --- src/compiler/glsl/ast_function.cpp | 4 ++-- src/compiler/glsl/link_uniform_initializers.cpp | 8 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/compiler/glsl/ast

[Mesa-dev] [PATCH v2 5/5] compiler/list: avoid downcasting list sentinel nodes (v2)

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle v2: don't add new macros --- src/compiler/glsl/lower_jumps.cpp | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/compiler/glsl/lower_jumps.cpp b/src/compiler/glsl/lower_jumps.cpp index 3cfa2e0..b62e76e 100644 --- a/src/compiler/glsl/lo

[Mesa-dev] [PATCH v2 1/5] compiler: guard list iteration macros against undefined behavior (v2)

2016-05-12 Thread Nicolai Hähnle
From: Nicolai Hähnle The old iteration casts sentinel nodes (which are mere exec_nodes) into whatever type we're looping over, which leads to badness (in fact, gcc's undefined behaviour sanitizer crashes while trying to verify that we have the correct type at hand). These modified looping constr

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Jason Ekstrand
On May 12, 2016 9:42 PM, "Ilia Mirkin" wrote: > > On Fri, May 13, 2016 at 12:41 AM, Jason Ekstrand wrote: > > > > On May 12, 2016 9:29 PM, "Ilia Mirkin" wrote: > >> > >> interpolateAt* can only take input variables or an element of an input > >> variable array. No structs. > >> > >> Further, GLS

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Jason Ekstrand
On May 12, 2016 9:41 PM, "Jason Ekstrand" wrote: > > > On May 12, 2016 9:29 PM, "Ilia Mirkin" wrote: > > > > interpolateAt* can only take input variables or an element of an input > > variable array. No structs. > > > > Further, GLSL 4.50 relaxes the requirement to allow swizzles, so enable > > t

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Ilia Mirkin
On Fri, May 13, 2016 at 12:41 AM, Jason Ekstrand wrote: > > On May 12, 2016 9:29 PM, "Ilia Mirkin" wrote: >> >> interpolateAt* can only take input variables or an element of an input >> variable array. No structs. >> >> Further, GLSL 4.50 relaxes the requirement to allow swizzles, so enable >> th

[Mesa-dev] [PATCH 3/6] mesa/prog: Add varyings for arb_cull_distance

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Signed-off-by: Dave Airlie --- src/mesa/program/prog_print.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c index 08381b4..755d644 1006

[Mesa-dev] [PATCH 1/6] glapi: Add GL_ARB_cull_distance

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Signed-off-by: Dave Airlie --- src/mapi/glapi/gen/gl_API.xml | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 4bf

[Mesa-dev] [PATCH 6/6] glsl: Add arb_cull_distance support

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann Signed-off-by: Tobias Klausmann Signed-off-by: Dave Airlie --- src/compiler/glsl/ast_to_hir.cpp | 14 src/compiler/glsl/builtin_variables.cpp | 11 ++- src/compiler/glsl/glcpp/glcpp-parse.y| 3 + src/compiler/glsl/glsl_parser_extras.cpp

[Mesa-dev] ARB_cull_distance support v4?

2016-05-12 Thread Dave Airlie
This is just the core patches, as I think the lowering was pretty broken in the last couple of reposts. The lowering now lowers to one array of 8 or whatever. I need to recheck the gallium and llvmpipe bits on top of this, as I think llvmpipe will be broken. I think I'm going to rip out the CULLD

[Mesa-dev] [PATCH 2/6] mesa/main: Add support for GL_ARB_cull_distance (v2)

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann airlied: v2: rename LowerClipDistance to LowerCombinedClipCullDistnace. I don't think we want any other behaviour with any current hw. Signed-off-by: Tobias Klausmann Reviewed-by: Edward O'Callaghan Reviewed-by: Ian Romanick Signed-off-by: Dave Airlie --- src/compiler

[Mesa-dev] [PATCH 5/6] glsl: Extend lowering pass for gl_ClipDistance to support other arrays (v3)

2016-05-12 Thread Dave Airlie
From: Tobias Klausmann This will come in handy when we want to lower gl_CullDistance into gl_CullDistanceMESA. [airlied: drop separate APIs for clip/cull - just use single API to call both passes.] v3: reexamine my sanity, this was pretty broken, the new code creates one copy of gl_ClipDistance

[Mesa-dev] [PATCH 4/6] glsl: rename lower_clip_distance to lower_distance.

2016-05-12 Thread Dave Airlie
From: Dave Airlie This just renames the file in anticipation of adding cull lowering. Signed-off-by: Tobias Klausmann Signed-off-by: Dave Airlie Reviewed-by: Edward O'Callaghan --- src/compiler/Makefile.sources | 2 +- src/compiler/glsl/lower_clip_distance.cpp | 574 ---

Re: [Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Jason Ekstrand
On May 12, 2016 9:29 PM, "Ilia Mirkin" wrote: > > interpolateAt* can only take input variables or an element of an input > variable array. No structs. > > Further, GLSL 4.50 relaxes the requirement to allow swizzles, so enable > that as well. > > This fixes the following dEQP tests: > > dEQP-GLES3

Re: [Mesa-dev] GBM backend dynamic dispatch method

2016-05-12 Thread Nicolai Hähnle
On 12.05.2016 20:20, Jammy Zhou wrote: 2016-05-12 17:39 GMT+08:00 Michel Dänzer mailto:mic...@daenzer.net>>: On 12.05.2016 17:58, Yu, Qiang wrote: > Oh, what a crazy idea. So you mean it can work like this? > > 1. use the libgbm/gbm_dri/libEGL/libGLES from mesa which will load

[Mesa-dev] [PATCH] glsl: be more strict when validating shader inputs

2016-05-12 Thread Ilia Mirkin
interpolateAt* can only take input variables or an element of an input variable array. No structs. Further, GLSL 4.50 relaxes the requirement to allow swizzles, so enable that as well. This fixes the following dEQP tests: dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sa

[Mesa-dev] [PATCH] i965: Add support for GL_ARB_cull_distance

2016-05-12 Thread Kristian Høgsberg
From: Kristian Høgsberg Kristensen Signed-off-by: Kristian Høgsberg Kristensen Reviewed-by: Kenneth Graunke --- Setting cull_distance_mask for gs and tes now as well. Also, moved extension enable bit into gen6+ section. src/mesa/drivers/dri/i965/brw_compiler.h | 2 ++ src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH v2] gallium/ddebug: Support compute states.

2016-05-12 Thread Nicolai Hähnle
Thanks for taking care of this! Reviewed-by: Nicolai Hähnle On 10.05.2016 13:07, Bas Nieuwenhuizen wrote: v2: Reuse the macro for bind & delete. Note that may not be able to share the delete long-term as pipe_compute_state contains members not in pipe_shader_state, and we need to distinguish

[Mesa-dev] [PATCH] glsl: make sure that interpolateAt arguments are variables

2016-05-12 Thread Ilia Mirkin
In the case of a constant, it might have been propagated through and variable_referenced() returns NULL. Error out in that case. Fixes 3 dEQP tests: dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_constant dEQP-GLES31.functional.shaders.multisam

[Mesa-dev] [PATCH] nv50/ir: avoid asserts when the state tracker feeds us bogus inputs

2016-05-12 Thread Ilia Mirkin
INTERP is defined (by me) to have to have a INPUT source. However the state tracker does not always obey this. This happens due to varying packing logic introducing additional mov's which can't always be undone. Instead of just giving up, we instead try harder to find the original input. This won't

Re: [Mesa-dev] [PATCH 2/2] i965: check each field separately in backend_end::equals()

2016-05-12 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > Extra bits required to make room for the df field of the union don't get > initialized in all codepaths, so backend_reg comparisons done using > memcmp() can basically return random results. Check field by field to > avoid this. > > Signed-off-by: Samuel Iglesi

Re: [Mesa-dev] [PATCH 1/2] i965: Enable ES 3.2 sample shading extensions.

2016-05-12 Thread Ilia Mirkin
I think it's more than 8... for example, these 6 fail for me as well: dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_struct_member,Fail dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_constant,

Re: [Mesa-dev] [PATCH 2/3] nir/algebraic: support for power-of-two optimizations

2016-05-12 Thread Jason Ekstrand
On Thu, May 12, 2016 at 8:12 PM, Matt Turner wrote: > On Tue, May 10, 2016 at 11:57 AM, Rob Clark wrote: > > From: Rob Clark > > > > Some optimizations, like converting integer multiply/divide into left/ > > right shifts, have additional constraints on the search expression. > > Like requiring

Re: [Mesa-dev] [PATCH 2/3] nir/algebraic: support for power-of-two optimizations

2016-05-12 Thread Matt Turner
On Tue, May 10, 2016 at 11:57 AM, Rob Clark wrote: > From: Rob Clark > > Some optimizations, like converting integer multiply/divide into left/ > right shifts, have additional constraints on the search expression. > Like requiring that a variable is a constant power of two. Support > these cases

Re: [Mesa-dev] [PATCH v2 19/30] i965/fs: add shuffle_64bit_data_for_32bit_write helper

2016-05-12 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > This does the inverse operation of shuffle_32bit_load_result_to_64bit_data > and we will use it when we need to write 64-bit data in the layout expected > by untyped write messages. > > v2 (curro): > - Use subscript() instead of st

Re: [Mesa-dev] [PATCH v2 11/30] i965/fs: add shuffle_32bit_load_result_to_64bit_data helper

2016-05-12 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > There will be a few places where we need to shuffle the result of a 32-bit > load into valid 64-bit data, so extract this logic into a separate helper > that we can reuse. > > The shuffling needs to operate with WE_all set because

Re: [Mesa-dev] [PATCH 2/3] nir/algebraic: support for power-of-two optimizations

2016-05-12 Thread Jason Ekstrand
On Tue, May 10, 2016 at 11:57 AM, Rob Clark wrote: > From: Rob Clark > > Some optimizations, like converting integer multiply/divide into left/ > right shifts, have additional constraints on the search expression. > Like requiring that a variable is a constant power of two. Support > these case

[Mesa-dev] [PATCH] st/mesa: flip y coordinate of interpolateAtOffset for winsys

2016-05-12 Thread Ilia Mirkin
This fixes a few dEQP tests like dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.no_qualifiers.default_framebuffer Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 24 ++-- 1 file changed, 22 insertions(+), 2 deletion

Re: [Mesa-dev] [PATCH 04/17] nir: add lowering pass for y-transform

2016-05-12 Thread Jason Ekstrand
On Mon, May 9, 2016 at 12:33 PM, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > Reviewed-by: Connor Abbott > --- > src/compiler/Makefile.sources| 1 + > src/compiler/nir/nir.h | 11 + > src/compiler/nir/nir_lower_wpos_ytransform.c |

[Mesa-dev] [PATCH] gallivm: eliminate a unnecessary AND with unorm lerps

2016-05-12 Thread sroland
From: Roland Scheidegger Instead of doing a add and then mask out the upper bits, we can simply do a add with a half wide type (this, of course, assumes the hw can actually do it...), so we'll get the required zero in the upper bits automatically. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c

Re: [Mesa-dev] [PATCH 1/2] i965: Enable ES 3.2 sample shading extensions.

2016-05-12 Thread Jason Ekstrand
I just finished crawling through this code and I'm pretty sure we do mostly the right thing for ES. I'll be even more sure after my series lands. Reviewed-by: Jason Ekstrand On Thu, May 12, 2016 at 6:31 PM, Kenneth Graunke wrote: > This enables: > - GL_OES_sample_shading > - GL_OES_sample_var

Re: [Mesa-dev] [PATCH 3/4] i965: Combine Gen4-7 and Gen8+ state base address emitters.

2016-05-12 Thread Jason Ekstrand
On Wed, Apr 27, 2016 at 5:24 PM, Kenneth Graunke wrote: > We're about to start calling it directly, and this means the callers > won't have to think about generations. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/Makefile.sources | 1 - > src/mesa/drivers/dri/i965/brw

Re: [Mesa-dev] [PATCH] i965: Add support for GL_ARB_cull_distance

2016-05-12 Thread Kenneth Graunke
On Thursday, May 12, 2016 5:39:02 PM PDT Kristian Høgsberg wrote: > From: Kristian Høgsberg Kristensen > > This applies on top of Tobias series. > > Signed-off-by: Kristian Høgsberg Kristensen > --- > src/mesa/drivers/dri/i965/brw_compiler.h | 2 ++ > src/mesa/drivers/dri/i965/brw_vs.c

[Mesa-dev] [PATCH v2 08/14] radeonsi: Store inputs to memory when not using a TCS.

2016-05-12 Thread Bas Nieuwenhuizen
We need to copy the VS outputs to memory. I decided to do this using a shader key, as the value depends on other shaders. I also switch the fixed function TCS over to monolithic, as otherwisze many of the user SGPR's need to be passed to the epilog, which increases register pressure, or complexity

[Mesa-dev] [PATCH v2 14/14] radeonsi: Allow TES distribution between shader engines.

2016-05-12 Thread Bas Nieuwenhuizen
Setting 028B6C_DISTRIBUTION_MODE to a non-zero value and either setting 028B6C_NUM_DS_WAVES_PER_SIMD to a non-zero value or storing a zero control word hang my card. The R_028B50_VGT_TESS_DISTRIBUTION value is copied from amdgpu-pro. Smaller values in the ACCUM fields seem to decrease the performa

[Mesa-dev] [PATCH v2 12/14] radeonsi: Use barrier instructions for TCS barriers.

2016-05-12 Thread Bas Nieuwenhuizen
With potentially more than 1 wave working on a patch we need the barrier. Also adds a barrier before loading the tessellation factors to write them to the TF ring. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 48 ++-

[Mesa-dev] [PATCH v2 07/14] radeonsi: Add offchip buffer address calculation.

2016-05-12 Thread Bas Nieuwenhuizen
Instead of creating a memory area per patch and per vertex, we put the same attribute of every vertex & patch together. Most loads and stores access the same attribute across all lanes, only for different patches and vertices. For the TCS this results in tightly packed data for 4-component stores.

[Mesa-dev] [PATCH v2 04/14] radeonsi: Add buffer load functions.

2016-05-12 Thread Bas Nieuwenhuizen
v2: - Use llvm.admgcn.buffer.load instrinsics for new LLVM. - Code style fixes. Signed-off-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeonsi/si_shader.c | 115 +++ 1 file changed, 115 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src

[Mesa-dev] [PATCH v2 13/14] radeonsi: Process multiple patches per threadgroup.

2016-05-12 Thread Bas Nieuwenhuizen
Using more than 1 wave per threadgroup does increase performance generally. Not using too many patches per threadgroup also increases performance. Both catalyst and amdgpu-pro seem to use 40 patches as their maximum, but I haven't really seen any performance increase from limiting the number of pa

[Mesa-dev] [PATCH v2 06/14] radeonsi: Add user SGPR for the layout of the offchip buffer.

2016-05-12 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 3 +++ src/gallium/drivers/radeonsi/si_shader.h | 12 ++-- src/gallium/drivers/radeonsi/si_state_draw.c | 9 +++-- 3 files changed, 20 insertions(+), 4 deletions(-)

[Mesa-dev] [PATCH v2 05/14] radeonsi: Use correct parameter index for LS_OUT_LAYOUT.

2016-05-12 Thread Bas Nieuwenhuizen
This happens to be in the right position, but that changes when TCS/TES get new parameters. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/ra

[Mesa-dev] [PATCH v2 01/14] radeonsi: Add buffer for offchip storage between TCS and TES.

2016-05-12 Thread Bas Nieuwenhuizen
The buffer is quite large, but should only be allocated if the application uses tessellation. Most non-games don't. v2: - Use the correct register for SI. - Add define for block size. Signed-off-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeonsi/si_pipe.c | 1 + src/gallium/dr

[Mesa-dev] [PATCH v2 10/14] radeonsi: Remove LDS layout user SGPR's from TES.

2016-05-12 Thread Bas Nieuwenhuizen
They are unused. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 4 +--- src/gallium/drivers/radeonsi/si_shader.h | 15 --- src/gallium/drivers/radeonsi/si_state_draw.c | 4 +--- 3 files changed, 10 insertions(+),

[Mesa-dev] [PATCH v2 02/14] radeonsi: Add offchip tessellation parameters.

2016-05-12 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c| 28 - src/gallium/drivers/radeonsi/si_shader.h| 3 ++- src/gallium/drivers/radeonsi/si_state_shaders.c | 9 3 files changed, 34 insertions

[Mesa-dev] [PATCH v2 11/14] radeonsi: Enable dynamic HS.

2016-05-12 Thread Bas Nieuwenhuizen
This allows running the TES on different CU's than the TCS which results in performance improvements. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c| 11 --- src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +- 2 fil

[Mesa-dev] [PATCH v2 03/14] radeonsi: Define build_tbuffer_store_dwords earlier to support new users.

2016-05-12 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 138 +++ 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c in

[Mesa-dev] [PATCH v2 09/14] radeonsi: Use buffer loads and stores for passing data from TCS to TES.

2016-05-12 Thread Bas Nieuwenhuizen
We always try to use 4-component loads, as LLVM does not combine loads and they bypass the L1 cache. We can't use a similar strategy for stores and this is especially notable with the tess factors, as they are often set with separate MOV's per component in the TGSI. We keep storing to LDS and the

[Mesa-dev] [PATCH v2 00/14] radeonsi: Offchip tessellation

2016-05-12 Thread Bas Nieuwenhuizen
I fixed the issues pointed out by Nicolai and Michel. For convenience a branch is available at https://github.com/BNieuwenhuizen/mesa/tree/si-offchip-tess-v2 Please review. - Bas Bas Nieuwenhuizen (14): radeonsi: Add buffer for offchip storage between TCS and TES. radeonsi: Add offchip tess

[Mesa-dev] [PATCH 1/2] i965: Enable ES 3.2 sample shading extensions.

2016-05-12 Thread Kenneth Graunke
This enables: - GL_OES_sample_shading - GL_OES_sample_variables - GL_OES_shader_multisample_interpolation We pass all the CTS tests, and all but 8 of the dEQP-GLES31 tests. Half of the failing dEQP tests appear to be broken tests; the other four still need investigating but cover an obscure corner

[Mesa-dev] [PATCH 2/2] i965: Enable GL_ARB_ES3_1_compatibility.

2016-05-12 Thread Kenneth Graunke
There are almost no tests in any test suite, but what little I've found seems to work. Ilia believes everything is in place. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extens

[Mesa-dev] [Bug 95374] ARK:survival of the fittest fails when GL4.3 is enabled.

2016-05-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95374 Bug ID: 95374 Summary: ARK:survival of the fittest fails when GL4.3 is enabled. Product: Mesa Version: git Hardware: Other OS: All Status: NEW

Re: [Mesa-dev] GBM backend dynamic dispatch method

2016-05-12 Thread Jammy Zhou
2016-05-12 17:39 GMT+08:00 Michel Dänzer : > On 12.05.2016 17:58, Yu, Qiang wrote: > > Oh, what a crazy idea. So you mean it can work like this? > > > > 1. use the libgbm/gbm_dri/libEGL/libGLES from mesa which will load > > radeonsi_dri.so > > > > 2. libGL/amdgpu_dri.so from amdgpu-pro > > glamor

Re: [Mesa-dev] [PATCH v2 09/30] i965/fs: fix copy/constant propagation regioning checks

2016-05-12 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > We were not accounting for subreg_offset in the check for the start > of the region. > > Also, fs_reg::regs_read() already takes the stride into account, so we > should not multiply its result by the stride again. This was making >

[Mesa-dev] [PATCH] i965: Add support for GL_ARB_cull_distance

2016-05-12 Thread Kristian Høgsberg
From: Kristian Høgsberg Kristensen This applies on top of Tobias series. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_compiler.h | 2 ++ src/mesa/drivers/dri/i965/brw_vs.c | 4 src/mesa/drivers/dri/i965/gen6_clip_state.c | 2 ++ src/mesa/dri

Re: [Mesa-dev] [PATCH v2 07/30] i965/fs: fix copy propagation of partially invalidated entries

2016-05-12 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > We were not invalidating entries with a src that reads more than one register > when we find writes that overwrite any register read by entry->src after > the first. This leads to incorrect copy propagation because we re-use > entr

  1   2   3   >