Re: [Mesa-dev] [PATCH 2/2] glsl/linker: Include the interface name for input and output blocks

2016-05-13 Thread Kenneth Graunke
On Friday, May 13, 2016 6:42:54 PM PDT Ian Romanick wrote: > From: Ian Romanick > > On my oes_shader_io_blocks branch, this fixes 71 > dEQP-GLES31.functional.program_interface_query.* tests. > > Signed-off-by: Ian Romanick > Cc: mesa-sta...@lists.freedesktop.org > --- > src/compiler/glsl/linke

[Mesa-dev] [PATCH] glsl: Drop bad ASSERT_TRUE in gl_CullDistance link_varyings test.

2016-05-13 Thread Kenneth Graunke
I don't know what the intention was here, but this function returns void. We can't assert anything about its return value. Fixes "make check" failures. Signed-off-by: Kenneth Graunke --- src/compiler/glsl/tests/varyings_test.cpp | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [Mesa-dev] [PATCH] i965: Fix undefined df bits in brw_reg comparisons.

2016-05-13 Thread Kenneth Graunke
On Friday, May 13, 2016 5:58:25 PM PDT Francisco Jerez wrote: > Kenneth Graunke writes: > > > Commit 5310bca024f77da40ea6f4c275455f9cb0528f9e added a new "double df" > > field to the brw_reg struct, adding an extra 4 bytes of data that isn't > > usually initialized (or may contain irrelevant garb

[Mesa-dev] [PATCH 2/2] glsl/linker: Include the interface name for input and output blocks

2016-05-13 Thread Ian Romanick
From: Ian Romanick On my oes_shader_io_blocks branch, this fixes 71 dEQP-GLES31.functional.program_interface_query.* tests. Signed-off-by: Ian Romanick Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/glsl/linker.cpp | 17 - 1 file changed, 16 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 1/2] glsl/linker: Use canonical format for ARB_program_interface_query spec quotes

2016-05-13 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/linker.cpp | 100 ++- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index eae10655..41b43ab 100644 --- a/src

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Rob Clark
On Fri, May 13, 2016 at 9:13 PM, Connor Abbott wrote: > On Fri, May 13, 2016 at 9:07 PM, Rob Clark wrote: >> On Fri, May 13, 2016 at 8:23 PM, Connor Abbott wrote: >>> On Fri, May 13, 2016 at 4:14 PM, Rob Clark wrote: On Fri, May 13, 2016 at 4:10 PM, Jason Ekstrand wrote: > On Fr

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Connor Abbott
On Fri, May 13, 2016 at 9:07 PM, Rob Clark wrote: > On Fri, May 13, 2016 at 8:23 PM, Connor Abbott wrote: >> On Fri, May 13, 2016 at 4:14 PM, Rob Clark wrote: >>> On Fri, May 13, 2016 at 4:10 PM, Jason Ekstrand >>> wrote: On Fri, May 13, 2016 at 1:02 PM, Rob Clark wrote: > > From

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Rob Clark
On Fri, May 13, 2016 at 8:23 PM, Connor Abbott wrote: > On Fri, May 13, 2016 at 4:14 PM, Rob Clark wrote: >> On Fri, May 13, 2016 at 4:10 PM, Jason Ekstrand wrote: >>> On Fri, May 13, 2016 at 1:02 PM, Rob Clark wrote: From: Rob Clark If we assert in nir_validate_shader(), p

Re: [Mesa-dev] [PATCH] i965: Fix undefined df bits in brw_reg comparisons.

2016-05-13 Thread Francisco Jerez
Kenneth Graunke writes: > Commit 5310bca024f77da40ea6f4c275455f9cb0528f9e added a new "double df" > field to the brw_reg struct, adding an extra 4 bytes of data that isn't > usually initialized (or may contain irrelevant garbage if the struct is > mutated). This means that it's no longer safe to

Re: [Mesa-dev] [PATCH v2 27/30] i965/tes/scalar: Fix load input for doubles

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > Reviewed-by: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > b/src/mesa/drivers/dri/i965/brw

[Mesa-dev] [PATCH] i965: Fix undefined df bits in brw_reg comparisons.

2016-05-13 Thread Kenneth Graunke
Commit 5310bca024f77da40ea6f4c275455f9cb0528f9e added a new "double df" field to the brw_reg struct, adding an extra 4 bytes of data that isn't usually initialized (or may contain irrelevant garbage if the struct is mutated). This means that it's no longer safe to memcmp(). Instead, add a brw_reg

Re: [Mesa-dev] [PATCH v2 22/30] i965/vec4: handle doubles in type_size_vec4()

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > The scalar backend uses this to check URB input sizes. > --- > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vis

Re: [Mesa-dev] [PATCH v2 18/30] i965/fs: support doubles with SSBO loads

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > Same comment as for PATCH 17, and likewise: Reviewed-by: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/src/mesa/drivers/dri/i96

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Connor Abbott
On Fri, May 13, 2016 at 4:14 PM, Rob Clark wrote: > On Fri, May 13, 2016 at 4:10 PM, Jason Ekstrand wrote: >> On Fri, May 13, 2016 at 1:02 PM, Rob Clark wrote: >>> >>> From: Rob Clark >>> >>> If we assert in nir_validate_shader(), print the shader with the >>> offending instruction prefixed wit

Re: [Mesa-dev] [PATCH v2 17/30] i965/fs: support double with shared variable loads

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > Reviewed-by: Kenneth Graunke If you change the argument ordering of do_untyped_vector_read make sure you remember to update this patch. With that taken into account: Reviewed-by: Francisco Jerez > --- > src/mesa/drivers/dri/

Re: [Mesa-dev] [PATCH v2 16/30] i965/fs: Add do_untyped_vector_read helper

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > We are going to need the same logic for anything that reads > doubles via untyped messages (CS shared variables and SSBOs). Add a > helper function with that logic so that we can reuse it. > > Reviewed-by: Kenneth Graunke > --- >

Re: [Mesa-dev] [PATCH 1/2] util: Add ATTRIBUTE_RETURNS_NONNULL.

2016-05-13 Thread Kenneth Graunke
On Friday, May 13, 2016 2:31:30 PM PDT Matt Turner wrote: > --- > configure.ac| 1 + > m4/ax_gcc_func_attribute.m4 | 7 +++ > src/util/macros.h | 6 ++ > 3 files changed, 14 insertions(+) I wonder if Coverity pays attention to this. Either way, seems handy. Ser

Re: [Mesa-dev] [PATCH 2/2] i965: initialize the alignment related bits in struct brw_reg

2016-05-13 Thread Francisco Jerez
Kenneth Graunke writes: > On Friday, May 13, 2016 1:21:03 PM PDT Francisco Jerez wrote: >> Samuel Iglesias Gonsálvez writes: >> >> > With the inclusion of the "df" field in the union, this union is going >> > to be at the offset 8 because of the alignment rules. The alignment >> > bits in the m

Re: [Mesa-dev] [PATCH 2/2] i965: initialize the alignment related bits in struct brw_reg

2016-05-13 Thread Kenneth Graunke
On Friday, May 13, 2016 1:21:03 PM PDT Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > > > With the inclusion of the "df" field in the union, this union is going > > to be at the offset 8 because of the alignment rules. The alignment > > bits in the middle are uninitialized and valgr

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > If we assert in nir_validate_shader(), print the shader with the > offending instruction prefixed with "=>" to make it easier to find what > part of the shader nir_validate is complaining about. > > Macro funny-business in nir_validate() was just to avoid

Re: [Mesa-dev] [PATCH v2 15/30] i965/fs: support doubles with UBO loads

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > UBO loads with constant offset use the UNIFORM_PULL_CONSTANT_LOAD > instruction, which reads 16 bytes (a vec4) of data from memory. For dvec > types this only provides components x and y. Thus, if we are reading > more than 2 compo

Re: [Mesa-dev] ARB_cull_distance support v4?

2016-05-13 Thread Roland Scheidegger
Am 13.05.2016 um 23:12 schrieb Dave Airlie: > On 14 May 2016 at 01:12, Roland Scheidegger wrote: >> Am 13.05.2016 um 06:41 schrieb 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 arr

Re: [Mesa-dev] [PATCH v2 14/30] i965/fs: fix pull constant load component selection for doubles

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > UNIFORM_PULL_CONSTANT_LOAD is used to load a contiguous vec4 starting at a > constant offset that is 16-byte aligned. If we need to access an unaligned > offset we emit a load with an aligned offset and use the remaining constant >

Re: [Mesa-dev] [PATCH 09/11] tgsi: remove culldist semantic.

2016-05-13 Thread Ilia Mirkin
On Fri, May 13, 2016 at 6:43 PM, Roland Scheidegger wrote: > Am 13.05.2016 um 23:10 schrieb 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

Re: [Mesa-dev] [PATCH v2 12/30] i965/fs: Fix fs_visitor::VARYING_PULL_CONSTANT_LOAD for doubles

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > From: Iago Toral Quiroga > > Reviewed-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH 09/11] tgsi: remove culldist semantic.

2016-05-13 Thread Roland Scheidegger
Am 13.05.2016 um 23:10 schrieb 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

Re: [Mesa-dev] [PATCH] i965: check tcs for NULL dereference

2016-05-13 Thread Kenneth Graunke
On Friday, May 13, 2016 1:11:28 PM PDT Mark Janes wrote: > Coverity issue 1361544 found an instance where the tcs variable is > checked for NULL, but unconditionally dereferenced later in the same > function. > > CC: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_tcs.c | 8 +--- > 1 f

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

2016-05-13 Thread Kristian Høgsberg Kristensen
Dave Airlie writes: > 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

Re: [Mesa-dev] [PATCH] genxml: Use llroundf() and store to appropriate type.

2016-05-13 Thread Kristian Høgsberg
On Fri, May 13, 2016 at 2:31 PM, Matt Turner wrote: > Both functions return uint64_t, so I expect the masking/shifting should > be done on 64-bit types. Yea, this is more consistent. We don't have any fixed point fields over 32 bits, but there's no good reason to mix 32bit and 64bit types here.

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

2016-05-13 Thread Francisco Jerez
Iago Toral writes: > 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

[Mesa-dev] [PATCH 1/2] util: Add ATTRIBUTE_RETURNS_NONNULL.

2016-05-13 Thread Matt Turner
--- configure.ac| 1 + m4/ax_gcc_func_attribute.m4 | 7 +++ src/util/macros.h | 6 ++ 3 files changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 023110e..9fbfe4d 100644 --- a/configure.ac +++ b/configure.ac @@ -224,6 +224,7 @@ AX_GCC_FUNC_AT

[Mesa-dev] [PATCH 2/2] nir: Mark nir_start_block()/nir_impl_last_block() with returns_nonnull.

2016-05-13 Thread Matt Turner
--- src/compiler/nir/nir.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 8a616d4..7ea6791 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -34,6 +34,7 @@ #include "util/ralloc.h" #include "uti

[Mesa-dev] [PATCH] genxml: Use llroundf() and store to appropriate type.

2016-05-13 Thread Matt Turner
Both functions return uint64_t, so I expect the masking/shifting should be done on 64-bit types. --- src/intel/genxml/gen_pack_header.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py index 9ef7122.

Re: [Mesa-dev] [PATCH 0/5] ARB_internalformat_query2 support for OpenGL ES and other fixes

2016-05-13 Thread Alejandro Piñeiro
On 13/05/16 17:06, Ilia Mirkin wrote: > On Fri, May 13, 2016 at 10:57 AM, Alejandro Piñeiro > wrote: >> Earlier this year the support for ARB_internalformat_query2 has landed >> [1][2], initially only for desktop GL. >> >> But looking more carefully to the spec [3], we found the following: >> >>

Re: [Mesa-dev] ARB_cull_distance support v4?

2016-05-13 Thread Dave Airlie
On 14 May 2016 at 01:12, Roland Scheidegger wrote: > Am 13.05.2016 um 06:41 schrieb 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 galli

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

2016-05-13 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 02/11] mesa/main: Add support for GL_ARB_cull_distance (v2)

2016-05-13 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 05/11] glsl: Add arb_cull_distance support (v3)

2016-05-13 Thread Dave Airlie
From: Tobias Klausmann v2: make too large array a compile error v3: squash mesa/prog patch to avoid static compiler errors in bisect Signed-off-by: Tobias Klausmann Signed-off-by: Dave Airlie --- src/compiler/glsl/ast_to_hir.cpp | 46 src/compiler/glsl/builtin_variab

[Mesa-dev] [PATCH 06/11] gallium: Add a pipe cap for arb_cull_distance

2016-05-13 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 07/11] mesa/st: Add support for GL_ARB_cull_distance (v2)

2016-05-13 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 10/11] llvmpipe: Enable cull_distance as draw supports it.

2016-05-13 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 09/11] tgsi: remove culldist semantic.

2016-05-13 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 04/11] glsl: Extend lowering pass for gl_ClipDistance to support other arrays (v4)

2016-05-13 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 08/11] draw: stop using CULLDIST semantic.

2016-05-13 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 01/11] glapi: Add GL_ARB_cull_distance

2016-05-13 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 03/11] glsl: rename lower_clip_distance to lower_distance.

2016-05-13 Thread Dave Airlie
From: Dave Airlie This just renames the file in anticipation of adding cull lowering, and renames the internals. 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_dis

[Mesa-dev] arb_cull_distance (last time for sure)

2016-05-13 Thread Dave Airlie
Same patch series as last time, except squashed the mesa/prog patch as it broke bisecting with static asserts on builds. renamed more stuff in the renaming patch so most clip_distance->distance should make reviewing the lowering pass patch easier. Dave. _

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

2016-05-13 Thread Dave Airlie
On 13 May 2016 at 21:45, Tobias Klausmann wrote: > Hi Dave, > > i was not aware you are working on this actively as well, i had a series > posted 5 days ago which got some critics and reviews [1]. The most important > points where: I wasn't really, then krh asked my how it worked and when I read

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

2016-05-13 Thread Ian Romanick
This series looks good to me. Perhaps docs/GL3.txt needs some updates? Reviewed-by: Ian Romanick On 05/12/2016 06:31 PM, Kenneth Graunke wrote: > This enables: > - GL_OES_sample_shading > - GL_OES_sample_variables > - GL_OES_shader_multisample_interpolation > > We pass all the CTS tests, and a

Re: [Mesa-dev] [PATCH] anv/copy: Fix Copying between Buffers and Images of different dimensions

2016-05-13 Thread Jason Ekstrand
On Mon, May 9, 2016 at 12:26 PM, Nanley Chery wrote: > From: Nanley Chery > > This function previously assumed that the Buffer and Image had matching > dimensions. However, it is possible to copy from a buffer with larger > dimensions than the image. Modify the copy function to enable this. > >

Re: [Mesa-dev] [PATCH v2 11/15] glsl/linker: dvec3/dvec4 may consume twice input vertex attributes

2016-05-13 Thread Dave Airlie
On 13 May 2016 at 18:34, Juan A. Suarez Romero wrote: > On Fri, 2016-05-13 at 05:34 +1000, Dave Airlie wrote: >> On 13 May 2016 4:28 AM, "Antia Puentes" wrote: >> > >> > >> > From: "Juan A. Suarez Romero" >> > >> > From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes): >> > >> > "A progr

Re: [Mesa-dev] [PATCH 2/2] i965: initialize the alignment related bits in struct brw_reg

2016-05-13 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > With the inclusion of the "df" field in the union, this union is going > to be at the offset 8 because of the alignment rules. The alignment > bits in the middle are uninitialized and valgrind complains with errors > similar to this: > > ==10298== Conditional j

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Rob Clark
On Fri, May 13, 2016 at 4:14 PM, Rob Clark wrote: > On Fri, May 13, 2016 at 4:10 PM, Jason Ekstrand wrote: >> On Fri, May 13, 2016 at 1:02 PM, Rob Clark wrote: >>> >>> From: Rob Clark >>> >>> If we assert in nir_validate_shader(), print the shader with the >>> offending instruction prefixed wit

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Rob Clark
On Fri, May 13, 2016 at 4:10 PM, Jason Ekstrand wrote: > On Fri, May 13, 2016 at 1:02 PM, Rob Clark wrote: >> >> From: Rob Clark >> >> If we assert in nir_validate_shader(), print the shader with the >> offending instruction prefixed with "=>" to make it easier to find what >> part of the shader

[Mesa-dev] [PATCH] i965: check tcs for NULL dereference

2016-05-13 Thread Mark Janes
Coverity issue 1361544 found an instance where the tcs variable is checked for NULL, but unconditionally dereferenced later in the same function. CC: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_tcs.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/drive

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Jason Ekstrand
On Fri, May 13, 2016 at 1:02 PM, Rob Clark wrote: > From: Rob Clark > > If we assert in nir_validate_shader(), print the shader with the > offending instruction prefixed with "=>" to make it easier to find what > part of the shader nir_validate is complaining about. > > Macro funny-business in n

[Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Rob Clark
From: Rob Clark If we assert in nir_validate_shader(), print the shader with the offending instruction prefixed with "=>" to make it easier to find what part of the shader nir_validate is complaining about. Macro funny-business in nir_validate() was just to avoid changing a bazillion assert() li

Re: [Mesa-dev] [PATCH] i965: Make exec_size 16 word/byte registers use exec_size halving again.

2016-05-13 Thread Francisco Jerez
Francisco Jerez writes: > Francisco Jerez writes: > >> Kenneth Graunke writes: >> >>> On Friday, May 13, 2016 3:39:29 AM PDT Connor Abbott wrote: My understanding is that compression isn't necessary here, at least on newer gens (I don't know much about gen4/5). Could you explain why a

[Mesa-dev] [Bug 95346] Stellaris - Black/super dark planets

2016-05-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95346 Alexander Tsoy changed: What|Removed |Added CC||alexan...@tsoy.me -- You are receiving

Re: [Mesa-dev] [PATCH] i965: Make exec_size 16 word/byte registers use exec_size halving again.

2016-05-13 Thread Francisco Jerez
Francisco Jerez writes: > Kenneth Graunke writes: > >> On Friday, May 13, 2016 3:39:29 AM PDT Connor Abbott wrote: >>> My understanding is that compression isn't necessary here, at least on >>> newer gens (I don't know much about gen4/5). Could you explain why a >>> <16,16,1>:w region is illegal

Re: [Mesa-dev] [PATCH 19/28] i965/blorp: Use NIR for clear shaders

2016-05-13 Thread Jason Ekstrand
On Fri, May 13, 2016 at 11:48 AM, Pohjolainen, Topi < topi.pohjolai...@intel.com> wrote: > On Tue, May 10, 2016 at 04:16:39PM -0700, Jason Ekstrand wrote: > > --- > > src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 184 > ++ > > 1 file changed, 39 insertions(+), 145 deleti

Re: [Mesa-dev] [PATCH] i965: Make exec_size 16 word/byte registers use exec_size halving again.

2016-05-13 Thread Francisco Jerez
Kenneth Graunke writes: > On Friday, May 13, 2016 3:39:29 AM PDT Connor Abbott wrote: >> My understanding is that compression isn't necessary here, at least on >> newer gens (I don't know much about gen4/5). Could you explain why a >> <16,16,1>:w region is illegal? It would be nice to get a PRM c

Re: [Mesa-dev] [PATCH 19/28] i965/blorp: Use NIR for clear shaders

2016-05-13 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:39PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 184 > ++ > 1 file changed, 39 insertions(+), 145 deletions(-) Can you also add: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95373 We concl

Re: [Mesa-dev] [PATCH 2/2] i965: Flip interpolateAtOffset's y offset when necessary.

2016-05-13 Thread Jason Ekstrand
On Fri, May 13, 2016 at 1:42 AM, Kenneth Graunke wrote: > Fixes 5 dEQP-GLES31.functional.shaders.multisample_interpolation tests: > - interpolate_at_offset.no_qualifiers.default_framebuffer > - interpolate_at_offset.centroid_qualifier.default_framebuffer > - interpolate_at_offset.sample_qualifier

Re: [Mesa-dev] [PATCH 1/2] nir: Add a nir->info.uses_interp_var_at_offset flag.

2016-05-13 Thread Jason Ekstrand
On Fri, May 13, 2016 at 1:42 AM, Kenneth Graunke wrote: > It would probably make more sense to set this from nir_gather_info() > in case we manage to dead code eliminate these intrinsics. However, > we haven't transitioned the GL driver to using that pass yet... > Please add it anyway so nir_ga

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

2016-05-13 Thread Ilia Mirkin
On Fri, May 13, 2016 at 2:05 PM, Kenneth Graunke wrote: > On Thursday, May 12, 2016 11:28:35 PM PDT Ilia Mirkin wrote: >> 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.interpola

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

2016-05-13 Thread Kenneth Graunke
On Thursday, May 12, 2016 11:28:35 PM PDT Ilia Mirkin wrote: > 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.multisa

Re: [Mesa-dev] [PATCH] i965: Make exec_size 16 word/byte registers use exec_size halving again.

2016-05-13 Thread Kenneth Graunke
On Friday, May 13, 2016 3:39:29 AM PDT Connor Abbott wrote: > My understanding is that compression isn't necessary here, at least on > newer gens (I don't know much about gen4/5). Could you explain why a > <16,16,1>:w region is illegal? It would be nice to get a PRM citation > in the comment below.

Re: [Mesa-dev] [PATCH v2] i965/blorp: Special-case the clear color in MSAA resolves

2016-05-13 Thread Jason Ekstrand
On Wed, May 11, 2016 at 7:42 PM, Jason Ekstrand wrote: > The current MSAA resolve code has a special-case for if the MCS value is 0. > In this case we can only sample once because we know that all values are in > slice 0. This commit adds a second optimization that detecs the magic MCS > value t

Re: [Mesa-dev] [PATCH] egl: Check if API is supported when using eglBindAPI.

2016-05-13 Thread Manolova, Plamena
Hi Daniel, Thanks for reviewing! On Fri, May 13, 2016 at 5:09 PM, Daniel Stone wrote: > Hi, > > On 13 May 2016 at 17:03, Plamena Manolova > wrote: > > @@ -444,6 +444,8 @@ _eglCreateAPIsString(_EGLDisplay *dpy) > >strcat(dpy->ClientAPIsString, "OpenVG "); > > > > assert(strlen(dpy->C

Re: [Mesa-dev] [PATCH] egl: Check if API is supported when using eglBindAPI.

2016-05-13 Thread Daniel Stone
Hi, On 13 May 2016 at 17:03, Plamena Manolova wrote: > @@ -444,6 +444,8 @@ _eglCreateAPIsString(_EGLDisplay *dpy) >strcat(dpy->ClientAPIsString, "OpenVG "); > > assert(strlen(dpy->ClientAPIsString) < sizeof(dpy->ClientAPIsString)); > + > + _eglGlobal.ClientAPIsString = dpy->ClientAP

Re: [Mesa-dev] [PATCH 0/5] ARB_internalformat_query2 support for OpenGL ES and other fixes

2016-05-13 Thread Alejandro Piñeiro
On 13/05/16 17:06, Ilia Mirkin wrote: > On Fri, May 13, 2016 at 10:57 AM, Alejandro Piñeiro > wrote: >> Earlier this year the support for ARB_internalformat_query2 has landed >> [1][2], initially only for desktop GL. >> >> But looking more carefully to the spec [3], we found the following: >> >>

[Mesa-dev] [PATCH] egl: Check if API is supported when using eglBindAPI.

2016-05-13 Thread Plamena Manolova
According to the EGL specifications before binding an API we must check whether it's supported first. If not eglBindAPI should return EGL_FALSE and generate a EGL_BAD_PARAMETER error. Signed-off-by: Plamena Manolova --- src/egl/main/eglapi.c | 2 ++ src/egl/main/eglcurrent.h | 22 ++

Re: [Mesa-dev] ARB_cull_distance support v4?

2016-05-13 Thread Roland Scheidegger
Am 13.05.2016 um 06:41 schrieb 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

Re: [Mesa-dev] [PATCH 0/5] ARB_internalformat_query2 support for OpenGL ES and other fixes

2016-05-13 Thread Ilia Mirkin
On Fri, May 13, 2016 at 10:57 AM, Alejandro Piñeiro wrote: > Earlier this year the support for ARB_internalformat_query2 has landed > [1][2], initially only for desktop GL. > > But looking more carefully to the spec [3], we found the following: > > "Dependencies > > OpenGL 2.0 or OpenGL E

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

2016-05-13 Thread Eduardo Lima Mitev
Patch is: Reviewed-by: Eduardo Lima Mitev On 05/13/2016 05:55 AM, Ilia Mirkin wrote: > 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_inter

[Mesa-dev] [PATCH 5/5] mesa/main: expose ARB_internalformat_query2 on ES2.

2016-05-13 Thread Alejandro Piñeiro
From the ARB_internalformat_query2 spec: "Dependencies OpenGL 2.0 or OpenGL ES 2.0 is required." Additionally there are other mentions to ES 2.0 and 3.0 on the spec. Acked-by: Eduardo Lima Acked-by: Antia Puentes --- src/mapi/glapi/gen/ARB_internalformat_query2.xml | 2 +- src

[Mesa-dev] [PATCH 4/5] mesa/glformats: add desktop gl checks on _mesa_base_tex_format

2016-05-13 Thread Alejandro Piñeiro
There are several internalformat that are not supported on gl es, so it should return -1 if that is the case. This is needed in order to get ARB_internalformat_query2 implementation deciding correctly if a resource is supported or not on opengl es. FWIW, in some cases, _mesa_base_fbo_format has eq

[Mesa-dev] [PATCH 0/5] ARB_internalformat_query2 support for OpenGL ES and other fixes

2016-05-13 Thread Alejandro Piñeiro
Earlier this year the support for ARB_internalformat_query2 has landed [1][2], initially only for desktop GL. But looking more carefully to the spec [3], we found the following: "Dependencies OpenGL 2.0 or OpenGL ES 2.0 is required" Note the *or*. Additionally the spec list other GL ES

[Mesa-dev] [PATCH 3/5] mesa/formatquery: expand NUM_SAMPLE_COUNTS OpenGL ES comment

2016-05-13 Thread Alejandro Piñeiro
For ES 3.0 NUM_SAMPLE_COUNTS spec points that some formats will be always zero. But on ES 3.1 can be different to zero. The current code is correctly checking exactly against version 3.0, but the comment only mentions 3.0 spec. It is clearer mentioning both. Acked-by: Eduardo Lima Acked-by: Anti

[Mesa-dev] [PATCH 2/5] mesa/formatquery: add a comment to clarify INTERNALFORMAT_PREFERRED

2016-05-13 Thread Alejandro Piñeiro
The comment clarifies that the driver is called only to try to get a preferred internalformat, and that it was already checked if the format is supported or not. Acked-by: Eduardo Lima Acked-by: Antia Puentes --- src/mesa/main/formatquery.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

[Mesa-dev] [PATCH 1/5] i965/formatquery: remove INTERNALFORMAT_PREFERRED implementation

2016-05-13 Thread Alejandro Piñeiro
Right now the implementation only checks if the internalformat is supported or not. But that implementation is wrong, returning unsupported for some internalformats. Additionally, checking if the internalformat is supported or not is already done at mesa/main before calling the driver hook, so this

[Mesa-dev] [PATCH 2/2] i965: initialize the alignment related bits in struct brw_reg

2016-05-13 Thread Samuel Iglesias Gonsálvez
With the inclusion of the "df" field in the union, this union is going to be at the offset 8 because of the alignment rules. The alignment bits in the middle are uninitialized and valgrind complains with errors similar to this: ==10298== Conditional jump or move depends on uninitialised value(s) =

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

2016-05-13 Thread Tobias Klausmann
Hi Dave, i was not aware you are working on this actively as well, i had a series posted 5 days ago which got some critics and reviews [1]. The most important points where: 1. split functional change and renaming of the lowering pass [Ian] 2. check max clip/cull array sizes in link_shaders f

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

2016-05-13 Thread Daniel Vetter
On Fri, May 13, 2016 at 02:33:13PM +0800, Jammy Zhou wrote: > 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:

Re: [Mesa-dev] [PATCH v2 00/30] Finishing arb_gpu_shader_fp64 support to the i965 scalar backend

2016-05-13 Thread Iago Toral
On Thu, 2016-05-12 at 13:35 +0200, Samuel Iglesias Gonsálvez wrote: > Hi, > > this version includes all the feedback received to v1 plus a few new > patches (22-27) that deal with 64bit URB read/writes, which was > missing in v1. Below is a list of patches that still need to get the Rb: > > [PATC

[Mesa-dev] [PATCH v3] i965/fs: add shuffle_64bit_data_for_32bit_write helper

2016-05-13 Thread 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 stride() - Assert on the input types rather than silently retyping. - Use offse

[Mesa-dev] [PATCH v3] i965/fs: support doubles with shared variable stores

2016-05-13 Thread Iago Toral Quiroga
This is pretty much the same we do with SSBOs. v2: do not shuffle in-place, it is not safe since the original 64-bit data could be used after the write, instead use a temporary like we do for SSBO stores (Iago) Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp |

[Mesa-dev] [PATCH 2/2] i965: Flip interpolateAtOffset's y offset when necessary.

2016-05-13 Thread Kenneth Graunke
Fixes 5 dEQP-GLES31.functional.shaders.multisample_interpolation tests: - interpolate_at_offset.no_qualifiers.default_framebuffer - interpolate_at_offset.centroid_qualifier.default_framebuffer - interpolate_at_offset.sample_qualifier.default_framebuffer - interpolate_at_offset.at_sample_position.de

[Mesa-dev] [PATCH 1/2] nir: Add a nir->info.uses_interp_var_at_offset flag.

2016-05-13 Thread Kenneth Graunke
It would probably make more sense to set this from nir_gather_info() in case we manage to dead code eliminate these intrinsics. However, we haven't transitioned the GL driver to using that pass yet... Signed-off-by: Kenneth Graunke --- src/compiler/nir/glsl_to_nir.cpp | 3 +++ src/compiler/nir/

Re: [Mesa-dev] [PATCH v2 11/15] glsl/linker: dvec3/dvec4 may consume twice input vertex attributes

2016-05-13 Thread Juan A. Suarez Romero
On Thu, 2016-05-12 at 15:42 -0700, Kenneth Graunke wrote: > I'm a bit confused - it looks like we already do this check slightly > earlier in the function.  Why do we need to do it again (or later?)? In the earlier case, we are using explicit location. So we already know how many locations we are

Re: [Mesa-dev] [PATCH v2 11/15] glsl/linker: dvec3/dvec4 may consume twice input vertex attributes

2016-05-13 Thread Juan A. Suarez Romero
On Fri, 2016-05-13 at 05:34 +1000, Dave Airlie wrote: > On 13 May 2016 4:28 AM, "Antia Puentes" wrote: > > > > > > From: "Juan A. Suarez Romero" > > > > From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes): > > > > "A program with more than the value of MAX_VERTEX_ATTRIBS > > active

Re: [Mesa-dev] [PATCH 0/8] i965: Stop using brw_meta for blits and clears

2016-05-13 Thread Pohjolainen, Topi
On Thu, May 12, 2016 at 04:30:42PM -0700, Jason Ekstrand wrote: > Now that blorp is up-and-running on gen9, there's not much stopping us from > using blorp basically everywhere on gen6+. The only real problem is 16x > MSAA. This little series adds 16x MSAA support to blorp and starts using > it f

[Mesa-dev] [PATCH] glsl: add unit tests data vertex/expected outcome for uninitialized warning

2016-05-13 Thread Alejandro Piñeiro
v2: fix 025 test. Add three more tests (Ian Romanick) --- This patch adds the two tests Ian suggested: 026-out-function-parameter-shaderout.ver 027-inout-function-parameter-shaderout.vert Plus one combining function parameters and undefined/then defined arrays with undefined indexes: 030-ar

[Mesa-dev] [PATCH v3] glsl: do not raise uninitialized warning with out function parameters

2016-05-13 Thread Alejandro Piñeiro
It silence by default warnings with function parameters, as the parameters need to be processed in order to have the actual and the formal parameter, and the function signature. Then it raises the warning if needed at verify_parameter_modes where other in/out/inout modes checks are done. v2: fix c

Re: [Mesa-dev] [PATCH 06/28] i965/gen7_wm: Move where we set the fast clear op

2016-05-13 Thread Jason Ekstrand
On Fri, May 13, 2016 at 12:58 AM, Pohjolainen, Topi < topi.pohjolai...@intel.com> wrote: > On Tue, May 10, 2016 at 04:16:26PM -0700, Jason Ekstrand wrote: > > This better matches gen8 state setup > > I don't think anything in the rest of the series depends on this: > It mostly just made the next

Re: [Mesa-dev] [PATCH 06/28] i965/gen7_wm: Move where we set the fast clear op

2016-05-13 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:26PM -0700, Jason Ekstrand wrote: > This better matches gen8 state setup I don't think anything in the rest of the series depends on this: Acked-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/gen7_wm_state.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 d

Re: [Mesa-dev] [PATCH 05/28] i965/fs: Stop setting dispatch_grf_start_reg from the visitor

2016-05-13 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:25PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 18 -- > src/mesa/drivers/dri/i965/brw_shader.cpp | 1 + > src/mesa/drivers/dri/i965/brw_vec4.cpp| 2 ++ > src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH 04/28] i965/fs: Clean up the logic in compile_fs a bit

2016-05-13 Thread Pohjolainen, Topi
On Tue, May 10, 2016 at 04:16:24PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 73 > > 1 file changed, 41 insertions(+), 32 deletions(-) Reviewed-by: Topi Pohjolainen > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp >

Re: [Mesa-dev] [PATCH] i965: Make exec_size 16 word/byte registers use exec_size halving again.

2016-05-13 Thread Connor Abbott
My understanding is that compression isn't necessary here, at least on newer gens (I don't know much about gen4/5). Could you explain why a <16,16,1>:w region is illegal? It would be nice to get a PRM citation in the comment below. On Fri, May 13, 2016 at 3:02 AM, Kenneth Graunke wrote: > In a5d7

  1   2   >