Re: [Mesa-dev] [PATCH 09/10] main/glsles: return two minor digits for SHADING_LANGUAGE_VERSION

2014-12-01 Thread Samuel Iglesias Gonsálvez
On Monday, December 01, 2014 09:29:13 AM Brian Paul wrote: > I'd change the subject to "main: return two minor digits for ES shading > language version" > We'll do that. Thanks! Sam > On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: > > From: Samuel Iglesias Gonsalvez > > > > For OpenGL ES

Re: [Mesa-dev] [Patch v3] Mesa: Add support for GL_OES_texture_*float* extensions.

2014-12-01 Thread Tapani Pälli
Tested-by: Tapani Pälli This makes Kevin's Piglit test to pass, conformance tests that use extension pass + enables some cool WebGL deferred rendering demos together with the GL_EXT_draw_buffers patch I've sent. On 11/28/2014 11:08 PM, Kalyan Kondapally wrote: This patch adds support for f

Re: [Mesa-dev] [PATCH v2 13/23] mesa: Autogenerate most of format_pack.c

2014-12-01 Thread Samuel Iglesias Gonsálvez
On 01/12/14 20:00, Jason Ekstrand wrote: > On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga > wrote: > >> From: Jason Ekstrand >> >> We were auto-generating it before. The problem was that the autogeneration >> tool we were using was called "copy, paste, and edit". Let's use a more >> sens

Re: [Mesa-dev] [PATCH] gallium: add include path to fix building of pipe-loader code

2014-12-01 Thread Jose Fonseca
Reviewed-by: Jose Fonseca On 01/12/14 20:37, Brian Paul wrote: The pipe-loader code wasn't finding util/u_atomic.h --- src/gallium/auxiliary/pipe-loader/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe

Re: [Mesa-dev] [PATCH v2 08/23] mesa: Fix _mesa_swizzle_and_convert integer conversions to clamp properly

2014-12-01 Thread Samuel Iglesias Gonsálvez
On Monday, December 01, 2014 10:16:35 AM Jason Ekstrand wrote: > This looks much better. Two comments though. First, I think we need to > tweak the float_to_uint function to clamp above. I don't know that it > properly handles values larger than MAX_UINT right now. Second, I think we > may want

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 08:23:32 PM Neil Roberts wrote: > When submitting the vertex buffers the i965 driver will try to recognise when > multiple attributes are using the same buffer so that it can submit a single > relocation for it and set a different offset in the attribute. Previously > h

Re: [Mesa-dev] [PATCH 00/10] i965/state: Merge cache and brw flags.

2014-12-01 Thread Kenneth Graunke
On Tuesday, November 25, 2014 09:25:35 AM Kristian Høgsberg wrote: > On Tue, Nov 25, 2014 at 4:43 AM, Kenneth Graunke > wrote: > > Hello, > > > > This series does some longstanding cleaning I've been meaning to do > > in the i965 state upload code. The distinction between BRW_NEW_* and > > CACHE

Re: [Mesa-dev] [PATCH] i965: Make validate_reg tables constant

2014-12-01 Thread Ben Widawsky
On Mon, Dec 01, 2014 at 10:23:31AM -0800, Matt Turner wrote: > On Mon, Dec 1, 2014 at 4:59 AM, Juha-Pekka Heikkila > wrote: > > Declare local tables constant. Also added extra '32' at end of > > "width_for_reg" to be future proof, cvt function which give > > indexes to access here could already gi

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Ben Widawsky
On Mon, Dec 01, 2014 at 05:37:27PM -0800, Eric Anholt wrote: > Neil Roberts writes: > > > When submitting the vertex buffers the i965 driver will try to recognise > > when > > multiple attributes are using the same buffer so that it can submit a single > > relocation for it and set a different o

Re: [Mesa-dev] [PATCH] i965: Remove tabs from instruction scheduler.

2014-12-01 Thread Ben Widawsky
An easy one :D Reviewed-by: Ben Widawsky ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Francisco Jerez
Eric Anholt writes: > Matt Turner writes: > >> On Mon, Dec 1, 2014 at 12:47 PM, Brian Paul wrote: >>> We need parenthesis around the expression which computes the number of >>> blocks per row. >>> >>> Cc: "10.3 10.4" >>> --- >>> src/mesa/main/texstore.c | 2 +- >>> 1 file changed, 1 insertion

Re: [Mesa-dev] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Eric Anholt
Matt Turner writes: > On Mon, Dec 1, 2014 at 12:47 PM, Brian Paul wrote: >> We need parenthesis around the expression which computes the number of >> blocks per row. >> >> Cc: "10.3 10.4" >> --- >> src/mesa/main/texstore.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --g

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Eric Anholt
Neil Roberts writes: > When submitting the vertex buffers the i965 driver will try to recognise when > multiple attributes are using the same buffer so that it can submit a single > relocation for it and set a different offset in the attribute. Previously > however if the application happens to h

[Mesa-dev] [PATCH 2/4] draw: use correct output prim for non-adjacent topologies in prim assembler.

2014-12-01 Thread sroland
From: Roland Scheidegger The decomposition done in the prim assembler will turn tri fans into tris, but this wasn't reflected in the output prim type. Meaning with a tri fan with 6 verts input, the output was a tri fan with 12 vertices instead of a tri list with 12 vertices (not as bad as it soun

[Mesa-dev] [PATCH 1/4] draw: kill off unneded prim assembler code for handling adjacency verts

2014-12-01 Thread sroland
From: Roland Scheidegger The default macros when the adjacency macros aren't defined will already exactly do that (that is, drop the adjacent vertices and call the non-adjacent macro). --- src/gallium/auxiliary/draw/draw_prim_assembler.c | 58 -- .../auxiliary/draw/draw_pri

[Mesa-dev] [PATCH 3/4] draw: simplify prim id insertion in prim assembler

2014-12-01 Thread sroland
From: Roland Scheidegger Because all topologies are reduced to basic primitives (i.e. no strips, fans) and the vertices involved are all copied, there's no need for any elaborate decisions where to insert the prim id. This looked especially broken for tri strips with last provoking vertex, where

[Mesa-dev] [PATCH 4/4] draw: use the prim type from prim_info not emit in passthrough emit

2014-12-01 Thread sroland
From: Roland Scheidegger The prim assembler may change the prim type when injecting prim ids now, which isn't reflected by what's stored in emit. This looks brittle and potentially dangerous (it is not obvious if such prim type changes are really supported by pt emit, the prim type is actually al

Re: [Mesa-dev] [PATCH 1/2] linker: Wrap access of producer_var with a NULL check

2014-12-01 Thread Jordan Justen
On 2014-12-01 15:46:10, Ian Romanick wrote: > From: Ian Romanick > > producer_var could be NULL if consumer_var is not NULL and > consumer_is_fs is false. This will occur when the procuder is NULL and typo: procuder Series Reviewed-by: Jordan Justen > the consumer is the geometry shader for

Re: [Mesa-dev] [PATCH 1/1] r600, llvm: Fix mem leak

2014-12-01 Thread Aaron Watry
I like it, but one thing I'd like to request... Can you check to make sure that radeon_shader_binary.global_symbol_offsets isn't also leaked? If so, let's fix that as well. If that's not getting leaked, then it looks good to me. --Aaron On Mon, Dec 1, 2014 at 5:33 PM, Jan Vesely wrote: > ping >

Re: [Mesa-dev] [PATCH v2 16/16] i965: Generate vs code using scalar backend for BDW+

2014-12-01 Thread Kristian Høgsberg
On Fri, Nov 14, 2014 at 3:22 PM, Kenneth Graunke wrote: > On Thursday, November 13, 2014 04:28:22 PM Kristian Høgsberg wrote: >> With everything in place, we can now use the scalar backend compiler for >> vertex shaders on BDW+. We make scalar vertex shaders the default on >> BDW+ but add a new v

[Mesa-dev] [PATCH 1/2] linker: Wrap access of producer_var with a NULL check

2014-12-01 Thread Ian Romanick
From: Ian Romanick producer_var could be NULL if consumer_var is not NULL and consumer_is_fs is false. This will occur when the procuder is NULL and the consumer is the geometry shader for a program that contains only a geometry shader. This will occur starting with the next patch. Signed-off-

[Mesa-dev] [PATCH 2/2] linker: Assign varying locations geometry shader inputs for SSO

2014-12-01 Thread Ian Romanick
From: Ian Romanick Previously only geometry shader outputs would be assigned locations if the geometry shader was the only stage in the linked program. Signed-off-by: Ian Romanick Cc: pa...@klacansky.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 --- src/glsl/linker.cpp | 15

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Brian Paul
On 12/01/2014 03:16 PM, Matt Turner wrote: On Mon, Dec 1, 2014 at 12:47 PM, Brian Paul wrote: We need parenthesis around the expression which computes the number of blocks per row. Cc: "10.3 10.4" --- src/mesa/main/texstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [Mesa-dev] [PATCH 1/1] r600, llvm: Fix mem leak

2014-12-01 Thread Jan Vesely
ping On Mon, 2014-11-03 at 20:29 -0500, Jan Vesely wrote: > Signed-off-by: Jan Vesely > --- > src/gallium/drivers/r600/r600_llvm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/drivers/r600/r600_llvm.c > b/src/gallium/drivers/r600/r600_llvm.c > index c19693a..5f74bf7 100

Re: [Mesa-dev] [PATCH 4/5] mesa: some improvements for print_list()

2014-12-01 Thread Brian Paul
On 12/01/2014 03:59 PM, Kenneth Graunke wrote: On Monday, December 01, 2014 01:44:22 PM Brian Paul wrote: Add a filename parameter to print_list() so that a display list can be printed to a file. --- src/mesa/main/dlist.c | 150 src/mesa/main

Re: [Mesa-dev] [PATCH 4/5] mesa: some improvements for print_list()

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 01:44:22 PM Brian Paul wrote: > Add a filename parameter to print_list() so that a display list can > be printed to a file. > --- > src/mesa/main/dlist.c | 150 > > src/mesa/main/dlist.h | 2 +- > src/mesa/vbo

Re: [Mesa-dev] [PATCH v2 14/16] i965: Add fs_visitor::run_vs() to generate scalar vertex shader code

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 12:02:01 PM Kristian Høgsberg wrote: > On Fri, Nov 14, 2014 at 4:21 PM, Kenneth Graunke > wrote: > > On Thursday, November 13, 2014 04:28:20 PM Kristian Høgsberg wrote: > >> This patch uses the previous refactoring to add a new run_vs() method > >> that generates vert

Re: [Mesa-dev] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 12:47 PM, Brian Paul wrote: > We need parenthesis around the expression which computes the number of > blocks per row. > > Cc: "10.3 10.4" > --- > src/mesa/main/texstore.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/main/texstore.c b/s

Re: [Mesa-dev] [PATCH] gallium: add include path to fix building of pipe-loader code

2014-12-01 Thread Matt Turner
Dang. I thought I found them all. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] i965: Remove tabs from instruction scheduler.

2014-12-01 Thread Matt Turner
--- .../drivers/dri/i965/brw_schedule_instructions.cpp | 196 ++--- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp index f0d941f..b552cf8 100644 --- a

[Mesa-dev] [PATCH] i965: Add var->location != -1 assertions.

2014-12-01 Thread Kenneth Graunke
We shouldn't receive variables with invalid locations set - adding these assertions should help catch problems before they cause crashes later. Inspired by similar code in st_glsl_to_tgsi. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 + src/mesa/drivers/

Re: [Mesa-dev] [PATCH 2/5] i965: Drop use of GL types in program keys.

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 12:00 PM, Kenneth Graunke wrote: > On Monday, December 01, 2014 10:46:30 AM Matt Turner wrote: >> On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke >> wrote: >> > This is really far removed from the API; we should just use C types. >> > >> > Signed-off-by: Kenneth Graunke >

[Mesa-dev] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Brian Paul
We need parenthesis around the expression which computes the number of blocks per row. Cc: "10.3 10.4" --- src/mesa/main/texstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f858cef..50aa1fd 100644 --- a/src/mesa

[Mesa-dev] [PATCH 1/5] mesa: remove unused functions in prog_execute.c

2014-12-01 Thread Brian Paul
--- src/mesa/program/prog_execute.c | 74 - 1 file changed, 74 deletions(-) diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 650c40f..33c1751 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execut

[Mesa-dev] [PATCH 3/5] mesa: inline/remove _mesa_polygon_stipple()

2014-12-01 Thread Brian Paul
Was not called from any other place. --- src/mesa/main/polygon.c | 38 ++ src/mesa/main/polygon.h | 4 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index 76d6019..cdaa244 100644 --- a/sr

[Mesa-dev] [PATCH 5/5] vbo: also print buffer object pointer in vbo_print_vertex_list()

2014-12-01 Thread Brian Paul
--- src/mesa/vbo/vbo_save_api.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 4a6c436..5055c22 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1527,10 +1527,14 @@ vbo_print_

[Mesa-dev] [PATCH 2/5] svga: fix comment typo

2014-12-01 Thread Brian Paul
--- src/gallium/drivers/svga/svga_resource_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index c975a19..64fd245 100644 --- a/src/gallium/drivers/svga/svga_resource_t

[Mesa-dev] [PATCH 4/5] mesa: some improvements for print_list()

2014-12-01 Thread Brian Paul
Add a filename parameter to print_list() so that a display list can be printed to a file. --- src/mesa/main/dlist.c | 150 src/mesa/main/dlist.h | 2 +- src/mesa/vbo/vbo_save_api.c | 8 +-- 3 files changed, 87 insertions(+), 73 deletions

[Mesa-dev] [PATCH] mesa: update glext.h to version 20141118

2014-12-01 Thread Brian Paul
--- include/GL/glext.h | 213 + 1 file changed, 181 insertions(+), 32 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 256ad35..d3cfbb5 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -33,7 +33,7 @@ extern "C"

[Mesa-dev] [PATCH] gallium: add include path to fix building of pipe-loader code

2014-12-01 Thread Brian Paul
The pipe-loader code wasn't finding util/u_atomic.h --- src/gallium/auxiliary/pipe-loader/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am index 44917f3..cb6035d 100644 --- a/src/gallium/a

[Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Neil Roberts
When submitting the vertex buffers the i965 driver will try to recognise when multiple attributes are using the same buffer so that it can submit a single relocation for it and set a different offset in the attribute. Previously however if the application happens to have the attributes in a struct

Re: [Mesa-dev] [PATCH v2 14/16] i965: Add fs_visitor::run_vs() to generate scalar vertex shader code

2014-12-01 Thread Kristian Høgsberg
On Fri, Nov 14, 2014 at 4:21 PM, Kenneth Graunke wrote: > On Thursday, November 13, 2014 04:28:20 PM Kristian Høgsberg wrote: >> This patch uses the previous refactoring to add a new run_vs() method >> that generates vertex shader code using the scalar visitor and >> optimizer. >> >> Signed-off-by

Re: [Mesa-dev] [PATCH 2/5] i965: Drop use of GL types in program keys.

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 10:46:30 AM Matt Turner wrote: > On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke wrote: > > This is really far removed from the API; we should just use C types. > > > > Signed-off-by: Kenneth Graunke > > Can we fix the type of the gen6_gather_wa field while we're at

Re: [Mesa-dev] [PATCH 1/5] i965: Move program key structures to brw_program.h.

2014-12-01 Thread Chris Forbes
For the series: Reviewed-by: Chris Forbes On Mon, Dec 1, 2014 at 11:00 PM, Kenneth Graunke wrote: > With fs_visitor/fs_generator being reused for SIMD8 VS/GS programs, > we're running into weird #include patterns, where scalar code #includes > brw_vec4.h and such. > > Program keys aren't really

Re: [Mesa-dev] [PATCH v2 6/7] i915: Don't emit saturate for vertex shaders

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 10:50 AM, Matt Turner wrote: > I think i915's vertex shaders can use saturate. I don't think this is needed. > > The code you were modifying (in Gallium) in the original patch doesn't > affect this driver. Actually, i915 doesn't do hardware vertex shaders, so I don't know w

Re: [Mesa-dev] [PATCH v2 00/23] auto-generate pack/unpack functions

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > This is the first of two series that aim to address: > https://bugs.freedesktop.org/show_bug.cgi?id=84566 > > A branch with this series is available here: > https://github.com/Igalia/mesa/tree/itoral-autogen-packing-review-v2 > > Link to

Re: [Mesa-dev] [PATCH v2 17/23] mesa: Add non-normalized formats support for ubyte packing functions

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > From: Samuel Iglesias Gonsalvez > > Signed-off-by: Samuel Iglesias Gonsalvez > --- > src/mesa/main/format_pack.c.mako | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/main/format_pack.c.mako > b/src

Re: [Mesa-dev] [PATCH v2 16/23] mesa: Add _mesa_pack_uint_rgba_row() format conversion function

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > From: Samuel Iglesias Gonsalvez > > We will use this later on to handle uint conversion scenarios in a master > convert function. > > v2: > - Modify pack_uint_*() function generation to use c.datatype() and > f.datatype(). > - Remove

Re: [Mesa-dev] [PATCH 02/10] mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 5:04 AM, Eduardo Lima Mitev wrote: > GL_RGB and GL_RGBA are valid internal formats on a GLES3 profile. See > "Table 1. Unsized Internal Formats" at > https://www.khronos.org/opengles/sdk/docs/man3/html/glTexImage2D.xhtml. > > Fixes 2 dEQP tests: > - dEQP-GLES3.functional.sta

Re: [Mesa-dev] [PATCH 01/10] mesa: Considers GL_DEPTH_STENCIL_ATTACHMENT a valid argument for FBO invalidation under GLES3

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 5:04 AM, Eduardo Lima Mitev wrote: > In OpenGL and OpenGL-Es 3+, GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment > point for the family of functions > that invalidate a framebuffer object (e.g, glInvalidateFramebuffer, > glInvalidateSubFramebuffer, etc). > Currently, a G

Re: [Mesa-dev] [PATCH v2 6/7] i915: Don't emit saturate for vertex shaders

2014-12-01 Thread Matt Turner
I think i915's vertex shaders can use saturate. I don't think this is needed. The code you were modifying (in Gallium) in the original patch doesn't affect this driver. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH v2 7/7] i965: Don't emit saturate for vertex shaders

2014-12-01 Thread Matt Turner
i965's vertex shaders can use saturate. This isn't needed. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965: Remove "disable_derivative_optimization" driconf option.

2014-12-01 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/5] i965: Drop use of GL types in program keys.

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke wrote: > This is really far removed from the API; we should just use C types. > > Signed-off-by: Kenneth Graunke Can we fix the type of the gen6_gather_wa field while we're at it? We can mark the gen6_gather_sampler_wa as PACKED to keep the 1-byte

Re: [Mesa-dev] [PATCH 5/5] i965/vs: Set brw_vs_prog_key::clamp_vertex_color to 0 when irrelevant.

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke wrote: > Vertex color clamping is only relevant if the shader writes to > the built-in gl_[Secondary]{Front,Back}Color varyings. Otherwise, > brw_vs_prog_key::clamp_vertex_color is never used, so we can simply > leave it set to 0. > > This enables u

Re: [Mesa-dev] [PATCH v2 06/23] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-01 Thread Ilia Mirkin
On Mon, Dec 1, 2014 at 6:04 AM, Iago Toral Quiroga wrote: > _BaseFormat is a GLenum (unsigned int) so testing if its value is > greater than 0 to detect the cases where _mesa_base_tex_format > returns -1 doesn't work. > > Fixing the assertion breaks the arb_texture_view-lifetime-format > piglit te

Re: [Mesa-dev] [PATCH] i965: Make validate_reg tables constant

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 4:59 AM, Juha-Pekka Heikkila wrote: > Declare local tables constant. Also added extra '32' at end of > "width_for_reg" to be future proof, cvt function which give > indexes to access here could already give index to reach place > number five now containing '32'. I don't see

Re: [Mesa-dev] [PATCH v2 11/23] mesa: Let _mesa_get_format_base_format also handle mesa_array_format.

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > If we need the base format for a mesa_array_format we have to find the > matching mesa_format first. This is expensive because it requires > to loop through all existing mesa formats until we find the right match. > > We can resolve the

Re: [Mesa-dev] [PATCH v2 06/23] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > _BaseFormat is a GLenum (unsigned int) so testing if its value is > greater than 0 to detect the cases where _mesa_base_tex_format > returns -1 doesn't work. > > Fixing the assertion breaks the arb_texture_view-lifetime-format > piglit t

Re: [Mesa-dev] [PATCH v2 08/23] mesa: Fix _mesa_swizzle_and_convert integer conversions to clamp properly

2014-12-01 Thread Jason Ekstrand
This looks much better. Two comments though. First, I think we need to tweak the float_to_uint function to clamp above. I don't know that it properly handles values larger than MAX_UINT right now. Second, I think we may want a MIN_INT macro for this. In particular, I don't know that this is we

[Mesa-dev] [PATCH 2/2] i965/fs: Treat the FB_WRITE as predicated if we're discarding.

2014-12-01 Thread Matt Turner
Pre-Haswell hardware couldn't actually predicate it, but it's easier to pretend as if it's predicated in the visitor since it will generate a MOV from f0.1. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 4 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- 2 files changed, 5 insert

[Mesa-dev] [PATCH 1/2] i965: Don't treat IF or WHILE with cmod as writing the flag.

2014-12-01 Thread Matt Turner
--- These are a couple of fixes from a Jenkins run of my flagdce branch. src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++- src/mesa/drivers/dri/i965/brw_vec4.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH 2/2] st/nine: Fix vertex declarations for non-standard (usage/index)

2014-12-01 Thread Ilia Mirkin
On Thu, Nov 27, 2014 at 5:13 AM, Axel Davy wrote: > Nine code to match vertex declaration to vs inputs was limiting > the number of possible combinations. > > Some sm3 games have issues with that, because arbitrary (usage/index) > can be used. > > This patch does the following changes to fix the p

Re: [Mesa-dev] [Patch v2] Mesa: Add support for GL_OES_texture_*float* extensions.

2014-12-01 Thread kalyan kondapally
>>I think this would be nicer as: >> if (ctx->API == API_OPENGLES2) { >> ctx->Extensions.OES_texture_fl >> The indentation of the new lines there looks inconsistent. I sent v3 which already has the fixes. On Mon, Dec 1, 2014 at 7:34 AM, Brian Paul wrote: > Thanks for the updates. A fe

Re: [Mesa-dev] [PATCH 00/10] Various fixes for dEQP failing tests

2014-12-01 Thread Brian Paul
On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: This set of (unrelated) patches fixes over 230 tests from the dEQP test suite [1]. While the tests failures were gathered on i965 (gen8) against 10.3.3, there are several driver and version agnostic fixes. There is one piglit regression brought

Re: [Mesa-dev] [PATCH 09/10] main/glsles: return two minor digits for SHADING_LANGUAGE_VERSION

2014-12-01 Thread Brian Paul
I'd change the subject to "main: return two minor digits for ES shading language version" On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: From: Samuel Iglesias Gonsalvez For OpenGL ES 3.0 spec, the minor number for SHADING_LANGUAGE_VERSION is always two digits, matching the OpenGL ES Shadi

Re: [Mesa-dev] [PATCH 04/10] mesa: Recompute LegalTypesMask if the GL API has changed

2014-12-01 Thread Brian Paul
On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: From: Iago Toral Quiroga The current code computes ctx->Array.LegalTypesMask just once, however, computing this needs to consider ctx->API so we need to make sure that the API for that context has not changed if we intend to reuse the result. T

Re: [Mesa-dev] [PATCH v2 09/29] mesa: Add _mesa_swap2_copy and _mesa_swap4_copy

2014-12-01 Thread Brian Paul
On 12/01/2014 04:05 AM, Iago Toral Quiroga wrote: We have _mesa_swap{2,4} but these do in-place byte-swapping only. The new functions receive an extra parameter so we can swap bytes on a source input array and store the results in a (possibly different) destination array. This is useful to imple

Re: [Mesa-dev] [PATCH 05/10] glsl: Don't allow gl_FragData[i], with i>0 in GLES shaders

2014-12-01 Thread Matteo Bruni
2014-12-01 14:04 GMT+01:00 Eduardo Lima Mitev : > The OpenGL ES Shading Language specification describes the > values that may be output by a fragment shader. These are > gl_FragColor and gl_FragData[0]. Multiple render targets > are not supported in GLES. > > Fixes dEQP test: > * dEQP-GLES3.func

Re: [Mesa-dev] [PATCH 03/13] mesa/main: Don't go freeing texture data which was never allocated

2014-12-01 Thread Brian Paul
On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote: Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/texstate.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index e0f0852..7f29208 100644 --- a/src/mesa

Re: [Mesa-dev] [PATCH 13/13] mesa/main: Verify context creation on progress

2014-12-01 Thread Brian Paul
On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote: Stop context creation if something failed. If something errored during context creation we'd segfault. Now will clean up and return error. Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/shared.c | 66

Re: [Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized

2014-12-01 Thread Brian Paul
On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote: Signed-off-by: Juha-Pekka Heikkila --- src/mesa/drivers/common/meta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 87532c1..fab360d 100644 --- a/src/mesa/drivers/

Re: [Mesa-dev] [Patch v2] Mesa: Add support for GL_OES_texture_*float* extensions.

2014-12-01 Thread Brian Paul
Thanks for the updates. A few more nitpicks... On 11/27/2014 11:56 AM, Kalyan Kondapally wrote: This patch adds support for following GLES2 Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear. Support

[Mesa-dev] [PATCH] mesa: removed reference to unused header

2014-12-01 Thread Albert Freeman
Removed reference to unused header file to reduce src/mesa/main dependency on src/mesa/drivers. Signed-off-by: Albert Freeman --- I do not have commit access! No regressions with piglit (tests/quick.py). src/mesa/main/enable.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH v2 7/7] i965: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/i965/brw_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 8b0f391..660e856 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src

[Mesa-dev] [PATCH v2 5/7] st/mesa: For vertex shaders, don't emit saturate when SM 3.0 is unsupported

2014-12-01 Thread Abdiel Janulgue
There is a bug in the current lowering pass implementation where we lower saturate to clamp only for vertex shaders on drivers supporting SM 3.0. The correct behavior is to actually lower to clamp only when we don't support saturate which happens on drivers that don't support SM 3.0 Signed-off-b

[Mesa-dev] [PATCH v2 2/7] glsl: Don't optimize min/max into saturate when EmitNoSat is set

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/glsl/opt_algebraic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 430f5cb..89fc0de 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@ -679,7 +67

[Mesa-dev] [PATCH v2 1/7] ir_to_mesa: Only lower saturate to clamp when EmitNoSat is set

2014-12-01 Thread Abdiel Janulgue
Fixes an infinite loop in swrast where the lowering pass unpacks saturate into clamp but the opt_algebraic pass tries to do the opposite. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83463 Signed-off-by: Abdiel Janulgue --- src/mesa/main/mtypes.h | 1 + src/mesa/program/ir_to

[Mesa-dev] [PATCH v2 4/7] dri/radeon: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/r200/r200_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 931f437..8533123 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b

[Mesa-dev] [PATCH v2 6/7] i915: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/i915/i915_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 42ea54e..847105a 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b

[Mesa-dev] [PATCH v2 3/7] swrast: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/swrast/swrast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index e8a2c12..5bd8a9b 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/driver

Re: [Mesa-dev] [PATCH] ir_to_mesa: Don't optimize clamp into saturate when target is GL_VERTEX_PROGRAM_ARB

2014-12-01 Thread Abdiel Janulgue
On 11/29/2014 12:10 PM, Kenneth Graunke wrote: > On Thursday, November 27, 2014 10:45:00 AM Abdiel Janulgue wrote: >> Add the the same restriction as in the previous try_emit_sat when trying >> to optimize clamp. Fixes an infinite loop in swrast where the lowering >> pass unpacks saturate into cl

[Mesa-dev] [PATCH 10/10] glsl: fail when a shader's input var has not an equivalent out var in previous

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez GLSL ES 3.00 spec, 4.3.10 (Linking of Vertex Outputs and Fragment Inputs), page 45 says the following: "The type of vertex outputs and fragment input with the same name must match, otherwise the link command will fail. The precision does not need to match. Only th

[Mesa-dev] [PATCH 09/10] main/glsles: return two minor digits for SHADING_LANGUAGE_VERSION

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez For OpenGL ES 3.0 spec, the minor number for SHADING_LANGUAGE_VERSION is always two digits, matching the OpenGL ES Shading Language Specification release number. For example, this query might return the string "3.00". This patch fixes the following dEQP test:

[Mesa-dev] [PATCH 07/10] glsl: don't allow invariant qualifiers for interface blocks in GLSL ES

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez From GLSL ES 3.0, chapter 4.3.7 "Interface Blocks", page 38: "GLSL ES 3.0 does not support interface blocks for shader inputs or outputs." and from GLSL ES 3.0, chapter 4.6.1 "The invariant qualifier", page 52. "Only variables output from a shader can be candida

[Mesa-dev] [PATCH 00/10] Various fixes for dEQP failing tests

2014-12-01 Thread Eduardo Lima Mitev
This set of (unrelated) patches fixes over 230 tests from the dEQP test suite [1]. While the tests failures were gathered on i965 (gen8) against 10.3.3, there are several driver and version agnostic fixes. There is one piglit regression brought by patch 10 , specifically in test: bin/glslparser

[Mesa-dev] [PATCH 08/10] glsl: A shader cannot redefine or overload built-in functions in GLSL ES 3.00

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez Create a new search function to look for matching built-in functions by name and use it for built-in function redefinition or overload in GLSL ES 3.00. GLSL ES 3.0 spec, chapter 6.1 "Function Definitions", page 71 "A shader cannot redefine or overload built-in fu

[Mesa-dev] [PATCH 01/10] mesa: Considers GL_DEPTH_STENCIL_ATTACHMENT a valid argument for FBO invalidation under GLES3

2014-12-01 Thread Eduardo Lima Mitev
In OpenGL and OpenGL-Es 3+, GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment point for the family of functions that invalidate a framebuffer object (e.g, glInvalidateFramebuffer, glInvalidateSubFramebuffer, etc). Currently, a GL_INVALID_ENUM error is emitted for this attachment point. Fixes 21

[Mesa-dev] [PATCH 02/10] mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0

2014-12-01 Thread Eduardo Lima Mitev
GL_RGB and GL_RGBA are valid internal formats on a GLES3 profile. See "Table 1. Unsized Internal Formats" at https://www.khronos.org/opengles/sdk/docs/man3/html/glTexImage2D.xhtml. Fixes 2 dEQP tests: - dEQP-GLES3.functional.state_query.internal_format.rgb_samples - dEQP-GLES3.functional.state_que

[Mesa-dev] [PATCH 06/10] glsl: invariant qualifier is not valid for shader inputs in GLSL ES 3.00

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez GLSL ES 3.00 spec, chapter 4.6.1 "The Invariant Qualifier", Only variables output from a shader can be candidates for invariance. This includes user-defined output variables and the built-in output variables. As only outputs can be declared as invarian

[Mesa-dev] [PATCH 04/10] mesa: Recompute LegalTypesMask if the GL API has changed

2014-12-01 Thread Eduardo Lima Mitev
From: Iago Toral Quiroga The current code computes ctx->Array.LegalTypesMask just once, however, computing this needs to consider ctx->API so we need to make sure that the API for that context has not changed if we intend to reuse the result. The context API can change, at least, if we go throug

[Mesa-dev] [PATCH 05/10] glsl: Don't allow gl_FragData[i], with i>0 in GLES shaders

2014-12-01 Thread Eduardo Lima Mitev
The OpenGL ES Shading Language specification describes the values that may be output by a fragment shader. These are gl_FragColor and gl_FragData[0]. Multiple render targets are not supported in GLES. Fixes dEQP test: * dEQP-GLES3.functional.shaders.fragdata.invalid_assign_to_1 --- src/glsl/ast

[Mesa-dev] [PATCH 03/10] mesa: Returns zero samples when querying GL_NUM_SAMPLE_COUNTS when internal format is integer

2014-12-01 Thread Eduardo Lima Mitev
In GLES3, multisampling is not supported for signed and unsigned integer internal formats. See https://www.khronos.org/opengles/sdk/docs/man3/docbook4/xhtml/glGetInternalformativ.xml. Fixes 19 dEQP tests under 'dEQP-GLES3.functional.state_query.internal_format.*'. --- src/mesa/main/formatquery.c

[Mesa-dev] [PATCH] i965: Make validate_reg tables constant

2014-12-01 Thread Juha-Pekka Heikkila
Declare local tables constant. Also added extra '32' at end of "width_for_reg" to be future proof, cvt function which give indexes to access here could already give index to reach place number five now containing '32'. Signed-off-by: Juha-Pekka Heikkila --- src/mesa/drivers/dri/i965/brw_eu_emit.

Re: [Mesa-dev] sampler types in tgsi

2014-12-01 Thread Marek Olšák
I've got no problem with that if somebody wants to do it. Marek On Mon, Dec 1, 2014 at 1:18 PM, Roland Scheidegger wrote: > IIRC there were some brief plans to actually deprecate the tex opcodes > at some point and just use the sample ones, which would clean up tgsi a > bit (having both isn't t

Re: [Mesa-dev] sampler types in tgsi

2014-12-01 Thread Roland Scheidegger
IIRC there were some brief plans to actually deprecate the tex opcodes at some point and just use the sample ones, which would clean up tgsi a bit (having both isn't terribly nice, you can't actually mix them in the same shader etc.). But I think that idea was quickly dropped and not really seriou

[Mesa-dev] [PATCH v2 24/29] mesa: Remove _mesa_unpack_color_span_float

2014-12-01 Thread Iago Toral Quiroga
And various helper functions that went unused after removing it. --- src/mesa/main/pack.c | 1033 -- src/mesa/main/pack.h |9 - 2 files changed, 1042 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 6a32820..6baa36e 10

[Mesa-dev] [PATCH v2 14/29] mesa: use _mesa_format_convert to implement get_tex_rgba_uncompressed.

2014-12-01 Thread Iago Toral Quiroga
--- src/mesa/main/texgetimage.c | 250 +++- 1 file changed, 133 insertions(+), 117 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index cb5f793..024fb4d 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texget

[Mesa-dev] [PATCH v2 26/29] mesa: Remove _mesa_(un)pack_index_span

2014-12-01 Thread Iago Toral Quiroga
These are not used anywhere. --- src/mesa/main/pack.c | 219 --- src/mesa/main/pack.h | 15 2 files changed, 234 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index b46a6fb..cb0956c 100644 --- a/src/mesa/main/pack.c +++

[Mesa-dev] [PATCH v2 18/29] mesa: Replace _mesa_unpack_bitmap with _mesa_unpack_image()

2014-12-01 Thread Iago Toral Quiroga
From: Eduardo Lima Mitev _mesa_unpack_bitmap() was introduced by commit 02b801c to handle the case when data is stored in PBO by display lists, in the context of this bug: Incorrect pixels read back if draw bitmap texture through Display list https://bugs.freedesktop.org/show_bug.cgi?id=10370 S

  1   2   >