[Mesa-dev] [PATCH] mesa: fix errors when reading depth with glReadPixels

2015-09-15 Thread Tapani Pälli
OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for internal format is checked by is_float_depth(). Fix regression caused by 81d2fd9 in following CTS test: ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels Test uses G

Re: [Mesa-dev] [PATCH 04/11] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Iago Toral
On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > src/glsl/nir/nir_print.c | 73 > ++-- > 1 file changed, 59 insertions(+), 14 deletions(-) > > diff --git a/src/glsl/nir/nir_print.c b/src/glsl

Re: [Mesa-dev] [PATCH] mesa: fix errors when reading depth with glReadPixels

2015-09-15 Thread Samuel Iglesias Gonsálvez
Reviewed-by: Samuel Iglesias Gonsálvez On 15/09/15 09:13, Tapani Pälli wrote: > OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies > DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for > internal format is checked by is_float_depth(). > > Fix regression caused by 81d2f

[Mesa-dev] [PATCH V4 1/6] glsl: order indices for samplers inside a struct array

2015-09-15 Thread Timothy Arceri
This allows the correct offset to be easily calculated for indirect indexing when a struct array contains multiple samplers, or any crazy nesting. The indices for the folling struct will now look like this: Sampler index: 0 Name: s[0].tex Sampler index: 1 Name: s[1].tex Sampler index: 2 Name: s[0]

[Mesa-dev] [PATCH V4 5/6] glsl: add helper for calculating offsets for struct members

2015-09-15 Thread Timothy Arceri
From: Timothy Cc: Jason Ekstrand --- src/glsl/glsl_types.cpp | 20 src/glsl/glsl_types.h | 7 +++ 2 files changed, 27 insertions(+) diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index 755618a..38b1660 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/g

[Mesa-dev] [PATCH V4 2/6] glsl: assign hidden uniforms their slot id earlier

2015-09-15 Thread Timothy Arceri
This is required so that the next patch can safely assign the slot id to the var. The ids are now assigned in the order we want before allocating storage so there is no need to sort the storage array and move things around. V2: rename variable to make code easier to follow as suggested by Jason

[Mesa-dev] [PATCH V4 6/6] nir: support indirect indexing samplers in struct arrays

2015-09-15 Thread Timothy Arceri
As a bonus we get indirect support for arrays of arrays for free. V4: fix struct member location caclulation, use nir_ssa_def rather than nir_src for the indirect as suggested by Jason V3: Use nir_instr_rewrite_src() with empty src rather then clearing the use_link list directly for the old indir

[Mesa-dev] [PATCH V4 3/6] glsl: store uniform slot id in var location field

2015-09-15 Thread Timothy Arceri
This will allow us to access the uniform later on without resorting to building a name string and looking it up in UniformHash. V3: remove line wrap change from this patch V2: store slot number for all non-UBO uniforms to make code more consitent, renamed explicit_binding to explicit_location and

[Mesa-dev] [PATCH V4 4/6] glsl: make variables private

2015-09-15 Thread Timothy Arceri
Reviewed-by: Jason Ekstrand --- src/glsl/link_uniforms.cpp | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 201c088..8c84e13 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_unifor

Re: [Mesa-dev] [PATCH v4 3/3] mesa: Use the effective internal format instead for validation

2015-09-15 Thread Eduardo Lima Mitev
On 09/14/2015 08:47 PM, Jason Ekstrand wrote: > Actually, a couple of comments... > > On Fri, Sep 4, 2015 at 7:21 AM, Eduardo Lima Mitev wrote: >> When validating format+type+internalFormat for texture pixel operations >> on GLES3, the effective internal format should be used if the one >> specif

Re: [Mesa-dev] i965: Turn UBOs as push constants

2015-09-15 Thread Abdiel Janulgue
Here's a more comprehensive shader-db run: total instructions in shared programs: 6394485 -> 6374865 (-0.31%) instructions in affected programs: 261322 -> 241702 (-7.51%) helped:3210 HURT: 0 GAINED:

Re: [Mesa-dev] [PATCH v5 11/70] glsl: Add parser/compiler support for unsized array's length()

2015-09-15 Thread Tapani Pälli
On 09/10/2015 04:35 PM, Iago Toral Quiroga wrote: From: Samuel Iglesias Gonsalvez The unsized array length is computed with the following formula: array.length() = max((buffer_object_size - offset_of_array) / stride_of_array, 0) Of these, only the buffer size needs to be provided by the

Re: [Mesa-dev] [PATCH v5 61/70] glsl: Do not allow assignments to read-only buffer variables

2015-09-15 Thread Tapani Pälli
Patches 61 and 62 Reviewed-by: Tapani Pälli On 09/10/2015 04:36 PM, Iago Toral Quiroga wrote: v2: - Merge the error check for the readonly qualifier with the already existing check for variables flagged as readonly (Timothy). - Limit the check to buffer variables, image variables ha

[Mesa-dev] [PATCH] i965/vec4/nir: add nir_intrinsic_memory_barrier support

2015-09-15 Thread Samuel Iglesias Gonsalvez
Fix OpenGL ES 3.1 conformance tests: advanced-readWrite-case1-vsfs and advanced-matrix-vsfs. Signed-off-by: Samuel Iglesias Gonsalvez Tested-by: Tapani Pälli Cc: Francisco Jerez --- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/mesa

Re: [Mesa-dev] [PATCH v5 09/70] glsl: return error if unsized arrays are found in OpenGL ES

2015-09-15 Thread Tapani Pälli
On 09/10/2015 04:35 PM, Iago Toral Quiroga wrote: From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ast_to_hir.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 72c6459..b67

Re: [Mesa-dev] [PATCH v5 09/70] glsl: return error if unsized arrays are found in OpenGL ES

2015-09-15 Thread Samuel Iglesias Gonsálvez
On 15/09/15 12:01, Tapani Pälli wrote: > > > On 09/10/2015 04:35 PM, Iago Toral Quiroga wrote: >> From: Samuel Iglesias Gonsalvez >> >> Signed-off-by: Samuel Iglesias Gonsalvez >> --- >> src/glsl/ast_to_hir.cpp | 16 >> 1 file changed, 16 insertions(+) >> >> diff --git a/s

Re: [Mesa-dev] [PATCH v5 56/70] mesa: Add queries for GL_SHADER_STORAGE_BUFFER

2015-09-15 Thread Tapani Pälli
As what Ilia said .. please move the extension checks first and then check for the value. There is no reason to repeat mistakes done in the past, also there are already getters with correct behavior with image_load_store and shader_atomic_counters in this same function. Otherwise looks good to

Re: [Mesa-dev] [PATCH v5 09/70] glsl: return error if unsized arrays are found in OpenGL ES

2015-09-15 Thread Samuel Iglesias Gonsálvez
On 15/09/15 12:14, Samuel Iglesias Gonsálvez wrote: > > > On 15/09/15 12:01, Tapani Pälli wrote: >> >> >> On 09/10/2015 04:35 PM, Iago Toral Quiroga wrote: >>> From: Samuel Iglesias Gonsalvez >>> >>> Signed-off-by: Samuel Iglesias Gonsalvez >>> --- >>> src/glsl/ast_to_hir.cpp | 16 +

Re: [Mesa-dev] [PATCH v5 11/70] glsl: Add parser/compiler support for unsized array's length()

2015-09-15 Thread Samuel Iglesias Gonsálvez
On 15/09/15 11:38, Tapani Pälli wrote: > > > On 09/10/2015 04:35 PM, Iago Toral Quiroga wrote: >> From: Samuel Iglesias Gonsalvez >> >> The unsized array length is computed with the following formula: >> >> array.length() = >> max((buffer_object_size - offset_of_array) / stride_of_array, 0

Re: [Mesa-dev] [PATCH v5 09/70] glsl: return error if unsized arrays are found in OpenGL ES

2015-09-15 Thread Tapani Pälli
On 09/15/2015 01:23 PM, Samuel Iglesias Gonsálvez wrote: On 15/09/15 12:14, Samuel Iglesias Gonsálvez wrote: On 15/09/15 12:01, Tapani Pälli wrote: On 09/10/2015 04:35 PM, Iago Toral Quiroga wrote: From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/g

Re: [Mesa-dev] [PATCH v5 56/70] mesa: Add queries for GL_SHADER_STORAGE_BUFFER

2015-09-15 Thread Samuel Iglesias Gonsálvez
On 15/09/15 12:20, Tapani Pälli wrote: > As what Ilia said .. please move the extension checks first and then > check for the value. There is no reason to repeat mistakes done in the > past, also there are already getters with correct behavior with > image_load_store and shader_atomic_counters in

[Mesa-dev] [Bug 91840] Expose GL_KHR_debug to ES contexts

2015-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91840 --- Comment #4 from Daniel Stone --- Updated: http://lists.freedesktop.org/archives/mesa-dev/2015-September/thread.html#94378 -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.

Re: [Mesa-dev] [PATCH 3/4] main/get: make KHR_debug enums available everywhere

2015-09-15 Thread Emil Velikov
On 14 September 2015 at 19:11, Ilia Mirkin wrote: > On Mon, Sep 14, 2015 at 1:56 PM, Emil Velikov > wrote: >> On 14 September 2015 at 18:39, Ilia Mirkin wrote: >>> On Mon, Sep 14, 2015 at 1:35 PM, Emil Velikov >>> wrote: From: Matthew Waters Although GL_CONTEXT_FLAGS is not ex

Re: [Mesa-dev] [PATCH v5 64/70] main/tests: add ARB_shader_storage_buffer_object tokens to enum_strings

2015-09-15 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 09/10/2015 04:36 PM, Iago Toral Quiroga wrote: From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/tests/enum_strings.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/tests/enum_strin

Re: [Mesa-dev] [PATCH v2] gbm: convert gbm bo format to fourcc format on dma-buf import

2015-09-15 Thread Emil Velikov
Hello Ray, On 12 September 2015 at 20:25, Ray Strode wrote: > Hi Emil, > > Is this still on your radar? > Yes it still is. The bugreport mentioned does cover at least three distinct topics, one of which prodded me to complete a libdrm helper or two. With those done, and another pair of eyes check

[Mesa-dev] [PATCH 1/2] mesa: Use the effective internal format instead for validation

2015-09-15 Thread Eduardo Lima Mitev
When validating format+type+internalFormat for texture pixel operations on GLES3, the effective internal format should be used if the one specified is an unsized internal format. Page 127, section "3.8 Texturing" of the GLES 3.0.4 spec says: "if internalformat is a base internal format, the ef

[Mesa-dev] [PATCH 2/2] mesa: Moves up error check for subtexture dimensions

2015-09-15 Thread Eduardo Lima Mitev
For consistency and efficiency, the (sub)texture dimension error check should go before the validation of format, type and internal format. --- src/mesa/main/teximage.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximag

Re: [Mesa-dev] [PATCH 03/11] glsl: shader-enum to name debug fxns

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 2:55 AM, Iago Toral wrote: > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> src/Makefile.am | 1 + >> src/glsl/shader_enums.c | 202 >> ++ >> src/g

Re: [Mesa-dev] [PATCH 04/11] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 3:18 AM, Iago Toral wrote: > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/nir/nir_print.c | 73 >> ++-- >> 1 file changed, 59 insertions(+), 14 deleti

Re: [Mesa-dev] [PATCH v2 06/11] nir/lower_vec_to_movs: Pass the shader around directly

2015-09-15 Thread Eduardo Lima Mitev
Reviewed-by: Eduardo Lima Mitev On 09/11/2015 05:52 PM, Jason Ekstrand wrote: > Previously, we were passing the shader around, we were just calling it > "mem_ctx". However, the nir_shader is (and must be for the purposes of > mark-and-sweep) the mem_ctx so we might as well pass it around explici

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #24 from Albert Freeman --- Yep, you are absolutely right, I just walked through every single gl call in the application (skipping redundant frames and shader compilation). The entire UI is drawn outside the apitrace capture and just

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #25 from Albert Freeman --- Correction: I didn't walk through every call in the application, only util I realised what was happening with the UI. -- You are receiving this mail because: You are the QA Contact for the bug. You are th

Re: [Mesa-dev] [PATCH 15/24] t_dd_dmatmp.h: Indentation and formatting fixes after HAVE_TRI_STRIPS change

2015-09-15 Thread Predut, Marius
> -Original Message- > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of > Ian Romanick > Sent: Tuesday, September 15, 2015 3:01 AM > To: mesa-dev@lists.freedesktop.org > Cc: Romanick, Ian D > Subject: [Mesa-dev] [PATCH 15/24] t_dd_dmatmp.h: Indentation and forma

[Mesa-dev] [PATCH] mesa: Fix texture compression on big-endian systems

2015-09-15 Thread Ulrich Weigand
Various pieces of code to create compressed textures will first generate an uncompressed RGBA texture into a temporary buffer, and then read from that buffer while creating the final compressed texture in the requested format. The code reading from the temporary buffer assumes the buffer is forma

Re: [Mesa-dev] [PATCH 1/4] egl: rework handling EGL_CONTEXT_FLAGS

2015-09-15 Thread Boyan Ding
2015-09-15 1:35 GMT+08:00 Emil Velikov : > From: Matthew Waters > > As of version 15 of the EGL_KHR_create_context spec, debug contexts > are allowed for ES contexts. We should allow creation instead of > erroring. > > While we're here provide a more comprehensive checking for the other two > fla

Re: [Mesa-dev] [PATCH 3/4] i965/fs_surface_builder: Only apply predicate to components that exist

2015-09-15 Thread Francisco Jerez
Jason Ekstrand writes: > In certain conditions, we have to do bounds-checking in the shader for > image_load_store. The way this works for image loads is that we do the > load anyway and then emit a series of slecects, one per component, that Strictly speaking the load is predicated so it's not

Re: [Mesa-dev] [PATCH 03/11] glsl: shader-enum to name debug fxns

2015-09-15 Thread Iago Toral
On Tue, 2015-09-15 at 08:07 -0400, Rob Clark wrote: > On Tue, Sep 15, 2015 at 2:55 AM, Iago Toral wrote: > > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: > >> From: Rob Clark > >> > >> Signed-off-by: Rob Clark > >> --- > >> src/Makefile.am | 1 + > >> src/glsl/shader_enums.c

Re: [Mesa-dev] [PATCH 15/24] t_dd_dmatmp.h: Indentation and formatting fixes after HAVE_TRI_STRIPS change

2015-09-15 Thread Ian Romanick
On 09/15/2015 06:18 AM, Predut, Marius wrote: > > >> -Original Message- >> From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of >> Ian Romanick >> Sent: Tuesday, September 15, 2015 3:01 AM >> To: mesa-dev@lists.freedesktop.org >> Cc: Romanick, Ian D >> Subject: [Mes

Re: [Mesa-dev] [PATCH 10/11] nir/lower_vec_to_movs: Coalesce movs on-the-fly when possible

2015-09-15 Thread Eduardo Lima Mitev
On 09/10/2015 02:50 AM, Jason Ekstrand wrote: > The old pass blindly inserted a bunch of moves into the shader with no > concern for whether or not it was really needed. This adds code to try and > coalesce into the destination of the instruction providing the value. > > Shader-db results for vec

Re: [Mesa-dev] [PATCH 00/24] Massive clean up in t_dd_dmatmp.h

2015-09-15 Thread Ian Romanick
On 09/14/2015 07:04 PM, Brian Paul wrote: > On 09/14/2015 07:01 PM, Ian Romanick wrote: >> I looked at t_dd_dmatmp.h after the previous discussions about fixing >> the "count" problem. It was a mess. The first 5 patches fix the bug. >> The remaining 19 patches delete dead code and make the file a

Re: [Mesa-dev] [PATCH 10/24] t_dd_dmatmp.h: Indentation and formatting fixes after HAVE_LINES change

2015-09-15 Thread Ian Romanick
On 09/14/2015 07:04 PM, Brian Paul wrote: > On 09/14/2015 07:01 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> Signed-off-by: Ian Romanick >> --- >> src/mesa/tnl_dd/t_dd_dmatmp.h | 92 >> +-- >> 1 file changed, 46 insertions(+), 46 deletions(-) >> >

Re: [Mesa-dev] [PATCH v2 07/13] nir/lower_vec_to_movs: Handle partially SSA shaders

2015-09-15 Thread Eduardo Lima Mitev
Reviewed-by: Eduardo Lima Mitev On 09/11/2015 05:52 PM, Jason Ekstrand wrote: > v2 (Jason Ekstrand): > - Use nir_instr_rewrite_dest > - Pass impl directly into lower_vec_to_movs > --- > src/glsl/nir/nir_lower_vec_to_movs.c | 21 +++-- > 1 file changed, 15 insertions(+), 6 deleti

[Mesa-dev] [PATCH 15/29 v2] t_dd_dmatmp.h: Indentation and formatting fixes after HAVE_TRI_STRIPS change

2015-09-15 Thread Ian Romanick
From: Ian Romanick v2: Fix '- nr' typo noticed by Marius. Signed-off-by: Ian Romanick --- src/mesa/tnl_dd/t_dd_dmatmp.h | 198 -- 1 file changed, 95 insertions(+), 103 deletions(-) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp

[Mesa-dev] [PATCH] egl_dri2: Expose EGL_KHR_image_base unconditionally

2015-09-15 Thread Boyan Ding
EGL_KHR_image_base only creates the mechanism about EGLimage without providing real functionality, so it is safe to expose unconditionally since egl/main should handle it well. It also saves some platforms from manually exposing it. Signed-off-by: Boyan Ding --- src/egl/drivers/dri2/egl_dri2.c

Re: [Mesa-dev] [PATCH 04/11] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Iago Toral
On Tue, 2015-09-15 at 08:27 -0400, Rob Clark wrote: > On Tue, Sep 15, 2015 at 3:18 AM, Iago Toral wrote: > > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: > >> From: Rob Clark > >> > >> Signed-off-by: Rob Clark > >> --- > >> src/glsl/nir/nir_print.c | 73 > >>

Re: [Mesa-dev] [PATCH 3/4] i965/fs_surface_builder: Only apply predicate to components that exist

2015-09-15 Thread Jason Ekstrand
On Sep 15, 2015 6:39 AM, "Francisco Jerez" wrote: > > Jason Ekstrand writes: > > > In certain conditions, we have to do bounds-checking in the shader for > > image_load_store. The way this works for image loads is that we do the > > load anyway and then emit a series of slecects, one per compone

Re: [Mesa-dev] [PATCH 2/2] egl/dri2: enable EGL_KHR_gl_colorspace for swrast

2015-09-15 Thread Boyan Ding
2015-09-15 1:35 GMT+08:00 Emil Velikov : > No driver changes needed for softpipe/llvmpipe - things just work. > > Signed-off-by: Emil Velikov > --- > docs/relnotes/11.1.0.html | 1 + > src/egl/drivers/dri2/platform_drm.c | 12 ++-- > src/egl/drivers/dri2/platform_waylan

Re: [Mesa-dev] [PATCH 04/11] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Connor Abbott
On Sun, Sep 13, 2015 at 11:51 AM, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > src/glsl/nir/nir_print.c | 73 > ++-- > 1 file changed, 59 insertions(+), 14 deletions(-) > > diff --git a/src/glsl/nir/nir_print.c b/src/glsl/n

Re: [Mesa-dev] [PATCH] mesa: fix errors when reading depth with glReadPixels

2015-09-15 Thread Anuj Phogat
On Tue, Sep 15, 2015 at 12:13 AM, Tapani Pälli wrote: > OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies > DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for > internal format is checked by is_float_depth(). > > Fix regression caused by 81d2fd9 in following CTS test:

Re: [Mesa-dev] [PATCH] mesa: fix errors when reading depth with glReadPixels

2015-09-15 Thread Emil Velikov
Hi Tapani, On 15 September 2015 at 08:13, Tapani Pälli wrote: > OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies > DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for > internal format is checked by is_float_depth(). > > Fix regression caused by 81d2fd9 in following C

Re: [Mesa-dev] [PATCH] dri/common: use sysconfdir when looking for drirc

2015-09-15 Thread Emil Velikov
On 14 September 2015 at 22:33, Marcin Ślusarz wrote: > On Mon, Sep 14, 2015 at 06:33:16PM +0100, Emil Velikov wrote: >> Hi Marcin, >> >> On 13 September 2015 at 17:55, Marcin Ślusarz >> wrote: >> > Useful when locally installed mesa has more quirks than the system one. >> > --- >> > src/mesa/dr

[Mesa-dev] [PATCH v2] egl/dri2: enable EGL_KHR_gl_colorspace for swrast

2015-09-15 Thread Emil Velikov
No driver changes needed for softpipe/llvmpipe - things just work. v2: Whitespace fixes. Signed-off-by: Emil Velikov Reviewed-by: Boyan Ding --- docs/relnotes/11.1.0.html | 1 + src/egl/drivers/dri2/platform_drm.c | 14 +++--- src/egl/drivers/dri2/platform_wayland.c

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Erik Faye-Lund
On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: > On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: >> From: Rob Clark >> >> The vertex shader lowering adds calculation for CLIPDIST, if needed >> (ie. user-clip-planes), and the frag shader lowering adds conditional >> kills based on CLIP

Re: [Mesa-dev] [PATCH 03/11] glsl: shader-enum to name debug fxns

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 9:52 AM, Iago Toral wrote: > On Tue, 2015-09-15 at 08:07 -0400, Rob Clark wrote: >> On Tue, Sep 15, 2015 at 2:55 AM, Iago Toral wrote: >> > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: >> >> From: Rob Clark >> >> >> >> Signed-off-by: Rob Clark >> >> --- >> >> src

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Ilia Mirkin
On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: > On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: >>> From: Rob Clark >>> >>> The vertex shader lowering adds calculation for CLIPDIST, if needed >>> (ie. user-clip-planes), and

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: > On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: >>> From: Rob Clark >>> >>> The vertex shader lowering adds calculation for CLIPDIST, if needed >>> (ie. user-clip-planes), and

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 12:49 PM, Rob Clark wrote: > On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: >> On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >>> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: From: Rob Clark The vertex shader lowering adds calculati

Re: [Mesa-dev] [PATCH 1/4] egl: rework handling EGL_CONTEXT_FLAGS

2015-09-15 Thread Emil Velikov
On 15 September 2015 at 14:27, Boyan Ding wrote: > 2015-09-15 1:35 GMT+08:00 Emil Velikov : >> From: Matthew Waters >> >> As of version 15 of the EGL_KHR_create_context spec, debug contexts >> are allowed for ES contexts. We should allow creation instead of >> erroring. >> >> While we're here pr

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Erik Faye-Lund
On Tue, Sep 15, 2015 at 6:49 PM, Ilia Mirkin wrote: > However having a piglit test that covers this would be neat... I guess > you could clip a pixel in half and make sure that the resolved result > is some in-between color? Lots of implementation-dependent stuff going > on in there though. I thi

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Erik Faye-Lund
On Tue, Sep 15, 2015 at 6:49 PM, Rob Clark wrote: > On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: >> On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >>> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: From: Rob Clark The vertex shader lowering adds calculatio

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Ilia Mirkin
On Tue, Sep 15, 2015 at 1:09 PM, Erik Faye-Lund wrote: > On Tue, Sep 15, 2015 at 6:49 PM, Ilia Mirkin wrote: >> However having a piglit test that covers this would be neat... I guess >> you could clip a pixel in half and make sure that the resolved result >> is some in-between color? Lots of impl

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Erik Faye-Lund
On Tue, Sep 15, 2015 at 6:49 PM, Ilia Mirkin wrote: > On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: >> On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >>> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: From: Rob Clark The vertex shader lowering adds calculat

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Erik Faye-Lund
On Tue, Sep 15, 2015 at 7:12 PM, Ilia Mirkin wrote: > On Tue, Sep 15, 2015 at 1:09 PM, Erik Faye-Lund wrote: >> On Tue, Sep 15, 2015 at 6:49 PM, Ilia Mirkin wrote: >>> However having a piglit test that covers this would be neat... I guess >>> you could clip a pixel in half and make sure that the

[Mesa-dev] mesa: Reduce libGL.so binary size by about 15%

2015-09-15 Thread Arlie Davis
Hello! I noticed an inefficiency in libGL.so, so I thought I'd take a stab at fixing it. This is my first patch submitted to mesa-dev, so if I'm doing anything dumb, let me know. I can't use git send-email, but I've formatted the patch using git format-patch, which should hopefully produce simi

Re: [Mesa-dev] [PATCH 1/4] i965/fs: Set output_components for lowered clip distance outputs

2015-09-15 Thread Kristian Høgsberg
On Mon, Sep 14, 2015 at 4:35 PM, Jason Ekstrand wrote: > Cc: Kristian Høgsberg Reviewed-by: Kristian Høgsberg > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > b/src/mesa/drivers/dri/

Re: [Mesa-dev] [PATCH V2 1/8] i965: Add a helper function intel_get_tile_dims()

2015-09-15 Thread Anuj Phogat
On Thu, Sep 10, 2015 at 2:38 PM, Ville Syrjälä < ville.syrj...@linux.intel.com> wrote: > On Thu, Sep 10, 2015 at 12:20:10PM -0700, Chad Versace wrote: > > On Wed 19 Aug 2015, Anuj Phogat wrote: > > > V2: > > > - Do the tile width/height computations in the new helper > > > function and use it la

Re: [Mesa-dev] [PATCH 2/4] i965/fs: Only read output_components many components when writing an output

2015-09-15 Thread Kristian Høgsberg
On Mon, Sep 14, 2015 at 4:35 PM, Jason Ekstrand wrote: > Cc: Kristian Høgsberg Reviewed-by: Kristian Høgsberg > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > b/src/

Re: [Mesa-dev] i965: Turn UBOs as push constants

2015-09-15 Thread Ben Widawsky
On Tue, Sep 15, 2015 at 12:24:00PM +0300, Abdiel Janulgue wrote: > Here's a more comprehensive shader-db run: > > total instructions in shared programs: 6394485 -> 6374865 (-0.31%) > instructions in affected programs: 261322 -> 241702 (-7.51%) > helped:3210 > HU

Re: [Mesa-dev] [PATCH 3/4] i965/fs_surface_builder: Only apply predicate to components that exist

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 6:39 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> In certain conditions, we have to do bounds-checking in the shader for >> image_load_store. The way this works for image loads is that we do the >> load anyway and then emit a series of slecects, one per compon

Re: [Mesa-dev] [PATCH V4 1/6] glsl: order indices for samplers inside a struct array

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 12:51 AM, Timothy Arceri wrote: > This allows the correct offset to be easily calculated for indirect > indexing when a struct array contains multiple samplers, or any crazy > nesting. > > The indices for the folling struct will now look like this: > Sampler index: 0 Name:

Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-15 Thread Kristian Høgsberg
On Fri, Sep 11, 2015 at 08:12:13AM +0200, Iago Toral wrote: > On Thu, 2015-09-10 at 15:17 -0400, Ilia Mirkin wrote: > > On Thu, Sep 10, 2015 at 2:52 PM, Ian Romanick wrote: > > > On 09/10/2015 10:45 AM, Ilia Mirkin wrote: > > >> On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga > > >> wrote: >

Re: [Mesa-dev] [PATCH v5 02/70] i965: Use 16-byte offset alignment for shader storage buffers

2015-09-15 Thread Kristian Høgsberg
On Thu, Sep 10, 2015 at 03:35:18PM +0200, Iago Toral Quiroga wrote: > This is the same we do for other things like uniforms because it ensures > optimal performance. > > Reviewed-by: Jordan Justen > --- > src/mesa/drivers/dri/i965/brw_context.c | 1 + > 1 file changed, 1 insertion(+) > > diff -

Re: [Mesa-dev] [PATCH V4 5/6] glsl: add helper for calculating offsets for struct members

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 12:51 AM, Timothy Arceri wrote: > From: Timothy > > Cc: Jason Ekstrand > --- > src/glsl/glsl_types.cpp | 20 > src/glsl/glsl_types.h | 7 +++ > 2 files changed, 27 insertions(+) > > diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cp

Re: [Mesa-dev] [PATCH V4 6/6] nir: support indirect indexing samplers in struct arrays

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 12:51 AM, Timothy Arceri wrote: > As a bonus we get indirect support for arrays of arrays for free. > > V4: fix struct member location caclulation, use nir_ssa_def rather than > nir_src for the indirect as suggested by Jason > > V3: Use nir_instr_rewrite_src() with empty sr

Re: [Mesa-dev] [PATCH v2 11/11] nir/lower_vec_to_movs: Coalesce into destinations of fdot instructions

2015-09-15 Thread Eduardo Lima Mitev
Patch 10.1, 10.2 and this one are: Reviewed-by: Eduardo Lima Mitev In the case of patch 10.1 and 10.2, though they look good to me, I would let Connor Abbott give his OK, since he is in CC for those, and also my experience with NIR constant expressions is rather limited. Eduardo On 09/11/2015

Re: [Mesa-dev] [PATCH v5 25/70] glsl: Add std430 related member functions to glsl_type class

2015-09-15 Thread Jordan Justen
On 2015-09-10 22:48:55, Samuel Iglesias Gonsálvez wrote: > On 10/09/15 20:13, Jordan Justen wrote: > > On 2015-09-10 06:35:41, Iago Toral Quiroga wrote: > >> From: Samuel Iglesias Gonsalvez > >> > >> They are used to calculate size, base alignment and array stride values > >> for a glsl_type follo

Re: [Mesa-dev] [PATCH v2 11/11] nir/lower_vec_to_movs: Coalesce into destinations of fdot instructions

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 12:02 PM, Eduardo Lima Mitev wrote: > Patch 10.1, 10.2 and this one are: > > Reviewed-by: Eduardo Lima Mitev > > In the case of patch 10.1 and 10.2, though they look good to me, I would > let Connor Abbott give his OK, since he is in CC for those, and also my > experience

Re: [Mesa-dev] [PATCH 2/2] mesa: Moves up error check for subtexture dimensions

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 4:47 AM, Eduardo Lima Mitev wrote: > For consistency and efficiency, the (sub)texture dimension error check > should go before the validation of format, type and internal format. You mentioned in another patch that this fixes a bug or, at the very least, prevents one. Wha

[Mesa-dev] [PATCH] nir/builder: Use a normal temporary array in nir_channel

2015-09-15 Thread Jason Ekstrand
C++ gets cranky if we take references of temporaries. This isn't a problem yet in master because nir_builder is never used from C++. However, it will be in the future so we should fix it now. Cc: Rob Clark --- src/glsl/nir/nir_builder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH v2] mesa/glformats: refactor compressed format support function

2015-09-15 Thread Anuj Phogat
On Mon, Sep 14, 2015 at 11:17 AM, Nanley Chery wrote: > From: Nanley Chery > > Instead of case statements, use _mesa_get_format_layout() to > determine if a GL format is part of a family of compressed formats. > > v2. restrict LATC formats to API_OPENGL_COMPAT (Ilia). > rename the variable m

[Mesa-dev] [PATCH v2 1/4] nir: Add a generic instruction index

2015-09-15 Thread Jason Ekstrand
Reviewed-by: Kenneth Graunke --- src/glsl/nir/nir.c | 18 ++ src/glsl/nir/nir.h | 4 2 files changed, 22 insertions(+) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 96cf94c..1ff8f21 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -1435,6 +1435,24 @@

[Mesa-dev] [PATCH v2 3/4] nir: Add a pass to rewrite uses of vecN sources to the vecN destination

2015-09-15 Thread Jason Ekstrand
v2 (Jason Ekstrand): - Handle non-SSA sources and destinations --- src/glsl/Makefile.sources| 1 + src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_move_vec_src_uses_to_dest.c | 189 +++ 3 files changed, 191 insertions(+) create

[Mesa-dev] [PATCH v2 2/4] nir: Add comments to nir_index_instrs and nir_index_ssa_defs

2015-09-15 Thread Jason Ekstrand
The provided indices have the very nice property that if A dominates B then A->index <= B->index. We should document that somewhere. Reviewed-by: Kenneth Graunke --- src/glsl/nir/nir.c | 8 1 file changed, 8 insertions(+) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 1ff8

[Mesa-dev] [PATCH v2 4/4] i965/vec4: Use nir_move_vec_src_uses_to_dest

2015-09-15 Thread Jason Ekstrand
The idea here is not that it gives register coalescing a little bit of a helping hand. It doesn't actually fix the coalescing problems, but it seems to help a good bit. Shader-db results for vec4 programs on Haswell: total instructions in shared programs: 1746280 -> 1683959 (-3.57%) instru

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 1:10 PM, Erik Faye-Lund wrote: >> I guess I'd care about it more once I supported MSAA ;-) >> >> (and tbh, all this effort was mostly just to get neverball to render >> correctly :-P) > > Oh, I just meant that it might be neat to add to the commit message. I > wouldn't go a

Re: [Mesa-dev] [PATCH V4 6/6] nir: support indirect indexing samplers in struct arrays

2015-09-15 Thread Jason Ekstrand
On Tue, Sep 15, 2015 at 11:52 AM, Jason Ekstrand wrote: > On Tue, Sep 15, 2015 at 12:51 AM, Timothy Arceri > wrote: >> As a bonus we get indirect support for arrays of arrays for free. >> >> V4: fix struct member location caclulation, use nir_ssa_def rather than >> nir_src for the indirect as su

[Mesa-dev] [PATCH] nir: add lowering for ffract

2015-09-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h| 3 +++ src/glsl/nir/nir_opt_algebraic.py | 1 + 2 files changed, 4 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index f0acd75..284fccd 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h

[Mesa-dev] [PATCH] i965/fs: The barrier send uses only 1 payload register

2015-09-15 Thread Jordan Justen
When preparing the barrier payload, the instructions should operate in simd8 mode since we only use 1 payload register. fs_inst::regs_read is also updated to indicate that it only reads one register for SHADER_OPCODE_BARRIER. These issues were flagged by: commit cadd7dd384b33a779d46bd664f456bed4

Re: [Mesa-dev] [PATCH 6/6] mesa/teximage: reuse compressed format utility functions for base_format

2015-09-15 Thread Anuj Phogat
On Fri, Aug 28, 2015 at 7:50 AM, Nanley Chery wrote: > From: Nanley Chery > > Reuse utility functions instead of reimplementing the same logic. > > * _mesa_is_compressed_format() performs the required checking to > determine format support in the current context. > * _mesa_gl_compressed_format

Re: [Mesa-dev] [PATCH 2/2] mesa: Moves up error check for subtexture dimensions

2015-09-15 Thread Eduardo Lima Mitev
On 09/15/2015 09:23 PM, Jason Ekstrand wrote: > On Tue, Sep 15, 2015 at 4:47 AM, Eduardo Lima Mitev wrote: >> For consistency and efficiency, the (sub)texture dimension error check >> should go before the validation of format, type and internal format. > > You mentioned in another patch that this

Re: [Mesa-dev] [PATCH 5/6] mesa/texcompress: add compressed formats to base format utility function

2015-09-15 Thread Anuj Phogat
On Fri, Aug 28, 2015 at 7:50 AM, Nanley Chery wrote: > From: Nanley Chery > > Adds S3TC and PALETTE formats. > > Signed-off-by: Nanley Chery > --- > src/mesa/main/texcompress.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/

Re: [Mesa-dev] [PATCH] i965/fs: The barrier send uses only 1 payload register

2015-09-15 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Tue, Sep 15, 2015 at 2:48 PM, Jordan Justen wrote: > When preparing the barrier payload, the instructions should operate in > simd8 mode since we only use 1 payload register. > > fs_inst::regs_read is also updated to indicate that it only reads one > register for S

[Mesa-dev] [PATCH] i965/nir/vec4: fill the type of the dst and src when loading an uniform

2015-09-15 Thread Alejandro Piñeiro
Until know, nir_intrinsic_load_uniform was using a default type. This caused some type mismatch between movs and alu operations, so copy propagation optimization was not applied to remove unneeded movs if negate modifier was involved. This was first detected on minus (negate+add) operations with un

[Mesa-dev] [PATCH] st/mesa: avoid integer overflows with buffers >= 512MB

2015-09-15 Thread Ilia Mirkin
This fixes failures with the newly-submitted max-size texture buffer piglit test for GPUs exposing >= 128M max texels. Signed-off-by: Ilia Mirkin Cc: "10.6 11.0" --- src/mesa/state_tracker/st_atom_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_track

[Mesa-dev] [PATCH 3/3] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Rob Clark
From: Rob Clark v2: split out moving of FILE *fp into state structure into it's own (more complete patch) to reduce the noise in this one Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 45 ++--- 1 file changed, 42 insertions(+), 3 deletions(-)

[Mesa-dev] [PATCH 1/3] glsl: shader-enum to name debug fxns

2015-09-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/Makefile.am | 1 + src/glsl/shader_enums.c | 204 ++ src/glsl/shader_enums.h | 53 src/mesa/Makefile.sources | 4 +- 4 files changed, 261 insertions(+), 1 deletion(-) cr

[Mesa-dev] [PATCH 0/3] shader-enum to name helpers

2015-09-15 Thread Rob Clark
From: Rob Clark Extracted out from previous patchset, rebased, and updated the nir-print to split out the print_state refactoring (which is now a bit more complete) from the use of shader_enum-to-name helpers. Rob Clark (3): glsl: shader-enum to name debug fxns nir/print: bit of state refact

[Mesa-dev] [PATCH 2/3] nir/print: bit of state refactoring

2015-09-15 Thread Rob Clark
From: Rob Clark Rename print_var_state to print_state, and stuff FILE ptr into the state object. This avoids passing around an extra parameter everywhere. Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 95 +++- 1 file changed, 54 insertions

[Mesa-dev] [PATCH] nv50, nvc0: fix max texture buffer size to 128M elements

2015-09-15 Thread Ilia Mirkin
This is what the hardware supports, there never was any sort of 64K limit. Signed-off-by: Ilia Mirkin Cc: "10.6 11.0" --- Need to double-check this one on nv50, but online sources suggest that it's a 128M element limit there as well. src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 +- src/

Re: [Mesa-dev] [PATCH] st/mesa: avoid integer overflows with buffers >= 512MB

2015-09-15 Thread Glenn Kennard
On Wed, 16 Sep 2015 01:32:10 +0200, Ilia Mirkin wrote: This fixes failures with the newly-submitted max-size texture buffer piglit test for GPUs exposing >= 128M max texels. Signed-off-by: Ilia Mirkin Cc: "10.6 11.0" --- src/mesa/state_tracker/st_atom_texture.c | 2 +- 1 file changed, 1 i

  1   2   >