Re: [Mesa-dev] [PATCH] glsl: add stage references for UBO uniforms

2015-05-12 Thread Tapani Pälli
On 05/13/2015 08:02 AM, Samuel Iglesias Gonsálvez wrote: Thanks Tapani! Reviewed-by: Samuel Iglesias Gonsalvez Can you add a test to piglit to check this case? I was hoping you had some test that hit this? :) I'll take a look if existing tests can be modified easily to cover this

Re: [Mesa-dev] [PATCH] glsl: add stage references for UBO uniforms

2015-05-13 Thread Tapani Pälli
On 05/13/2015 10:35 AM, Samuel Iglesias Gonsálvez wrote: On 13/05/15 07:28, Tapani Pälli wrote: On 05/13/2015 08:02 AM, Samuel Iglesias Gonsálvez wrote: Thanks Tapani! Reviewed-by: Samuel Iglesias Gonsalvez Can you add a test to piglit to check this case? I was hoping you had some

[Mesa-dev] [PATCH 0/2] sampler array indexing fixes

2015-05-19 Thread Tapani Pälli
=84225 which currently happens with three different WebGL cases. No Piglit regressions observed, following 2 tests explicitly test this: glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag glsl-es-1.00/linker/glsl-sampler-array-dynamic-index.shader_test (just sent) Tapani Pä

[Mesa-dev] [PATCH 2/2] glsl: validate sampler array indexing for 'constant-index-expression'

2015-05-19 Thread Tapani Pälli
Desktop GLSL < 130 and GLSL ES < 300 allow sampler array indexing where index can contain a loop induction variable. This extra check makes sure that all these indexes turn in to constant expressions during compilation/linking. Signed-off-by: Tapani Pälli Cc: "10.5" and "

[Mesa-dev] [PATCH 1/2] glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00

2015-05-19 Thread Tapani Pälli
r-array-index.frag' parser test in Piglit pass + fishgl.com works when running Chrome on OpenGL ES 2.0 backend v2: small change and some more commit message (Tapani) v3: refactor checks to make it more readable (Ian Romanick) Signed-off-by: Tapani Pälli Signed-off-by: Kalyan Kondapally Cc: &quo

Re: [Mesa-dev] [PATCH 1/2] glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00

2015-05-19 Thread Tapani Pälli
On 05/19/2015 04:20 PM, Francisco Jerez wrote: Tapani Pälli writes: Dynamic indexing of sampler arrays is prohibited by GLSL ES 3.00. Earlier versions allow 'constant-index-expression' indexing, where index can contain a loop induction variable. Patch allows dynamic indexing f

Re: [Mesa-dev] [PATCH 2/2] glsl: validate sampler array indexing for 'constant-index-expression'

2015-05-26 Thread Tapani Pälli
not really be checking anything but here I'm offering undefined behavior as extra linker check allowed by the last clause. Any opinions appreciated; // Tapani On 05/19/2015 03:01 PM, Tapani Pälli wrote: Desktop GLSL < 130 and GLSL ES < 300 allow sampler array indexing where inde

Re: [Mesa-dev] [PATCH 1/2] configure.ac: enable building GLES1 and GLES2 by default

2015-05-26 Thread Tapani Pälli
On 05/26/2015 01:57 PM, Marek Olšák wrote: From: Marek Olšák No particular reason other than most people should always build this. Is there really a reason for most people to build gles1 support? IIRC SurfaceFlinger uses it but haven't seen much other users. Maybe it should be enabled by d

[Mesa-dev] [PATCH] mesa: fix program resource queries for builtin variables

2015-06-02 Thread Tapani Pälli
Patch fixes special cases with gl_VertexID and sets all builtin variables locations as '-1' as specified by the extension spec. Fixes ES 3.1 conformance test failure: ES31-CTS.program_interface_query.input-built-in Signed-off-by: Tapani Pälli --- src/mesa/main/shader_quer

[Mesa-dev] [PATCH] mesa: set override_version per api version override

2015-06-04 Thread Tapani Pälli
Before 9b5e92f get_gl_override was called only once, but now it is called for multiple APIs (GLES2, GL), version needs to be set always. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90797 --- src/mesa/main/version.c | 36

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00

2015-06-05 Thread Tapani Pälli
On 06/03/2015 02:10 PM, Emil Velikov wrote: Hi Tapani, On 19 May 2015 at 13:01, Tapani Pälli wrote: Dynamic indexing of sampler arrays is prohibited by GLSL ES 3.00. Earlier versions allow 'constant-index-expression' indexing, where index can contain a loop induction variable. Pa

[Mesa-dev] [PATCH 0/2] OES_texture_float + EXT_texture_rg

2015-06-08 Thread Tapani Pälli
that EXT_texture_rg exists. Tapani Pälli (2): mesa: add GL_RED, GL_RG support for floating point textures mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float src/mesa/main/glformats.c | 123 -- 1 file changed, 109 insertions(+

[Mesa-dev] [PATCH 2/2] mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float

2015-06-08 Thread Tapani Pälli
Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index edc4918..aa36cbb 100644 --- a/src/mesa/main/glformats.c +++ b

[Mesa-dev] [PATCH 1/2] mesa: add GL_RED, GL_RG support for floating point textures

2015-06-08 Thread Tapani Pälli
adjusted by adjust_for_oes_float_texture after these checks. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 119 -- 1 file changed, 105 insertions(+), 14 deletions(-) diff --git a/src

Re: [Mesa-dev] [PATCH 2/2] mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float

2015-06-08 Thread Tapani Pälli
On 06/08/2015 11:14 AM, Tapani Pälli wrote: Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index edc4918

Re: [Mesa-dev] [PATCH] glsl: fix constructing a vector from a matrix

2015-06-08 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 05/26/2015 03:32 PM, Martin Peres wrote: Without this patch, the following constructs (not an extensive list) would crash mesa: - mat2 foo = mat2(1); vec4 bar = vec4(foo); - mat3 foo = mat3(1); vec4 bar = vec4(foo); - mat3 foo = mat3(1); ivec4 bar = ivec4(foo

[Mesa-dev] [PATCH v2] mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float

2015-06-08 Thread Tapani Pälli
v2: && -> ||, we enable on gles3 or if ARB_texture_rg is enabled Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/

[Mesa-dev] [PATCH v2] mesa: add GL_RED, GL_RG support for floating point textures

2015-06-08 Thread Tapani Pälli
adjusted by adjust_for_oes_float_texture after these checks. v2: simplify to check vs supported enums Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 43 +++ 1 file changed, 35 insertions

Re: [Mesa-dev] [PATCH] glsl: remove restriction on unsized arrays in GLSL ES 3.10

2015-06-09 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 06/09/2015 10:03 AM, Timothy Arceri wrote: --- src/glsl/ast_to_hir.cpp | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index dfe106b..350f6ed 100644 --- a/src/glsl/ast_to_hir.cpp

[Mesa-dev] [PATCH] glsl: remove cross validation of interpolation qualifier with GLSL 4.40

2015-06-09 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/glsl/link_varyings.cpp | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 7b2d4bd..a19ee39 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp

Re: [Mesa-dev] [PATCH v2] mesa: add GL_RED, GL_RG support for floating point textures

2015-06-09 Thread Tapani Pälli
On 06/09/2015 11:25 AM, Kenneth Graunke wrote: On Tuesday, June 09, 2015 09:53:42 AM Tapani Pälli wrote: Mesa supports EXT_texture_rg and OES_texture_float. This patch adds support for using unsized enums GL_RED and GL_RG for floating point targets and writes proper checks for internalformat

[Mesa-dev] [PATCH v3] mesa: add GL_RED, GL_RG support for floating point textures

2015-06-09 Thread Tapani Pälli
adjusted by adjust_for_oes_float_texture after these checks. v2: simplify to check vs supported enums v3: follow the style and break out if internalFormat ok (Kenneth) Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 37

[Mesa-dev] [PATCH 0/4] sampler array indexing fixes v2

2015-06-09 Thread Tapani Pälli
Here's a series of patches to tackle bug 84225. Previous series was discussed in this thread: http://lists.freedesktop.org/archives/mesa-dev/2015-May/084604.html Thanks; Tapani Pälli (4): glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00 mesa/glsl: new compile

[Mesa-dev] [PATCH 1/4] glsl: Allow dynamic sampler array indexing with GLSL ES < 3.00

2015-06-09 Thread Tapani Pälli
r-array-index.frag' parser test in Piglit pass + fishgl.com works when running Chrome on OpenGL ES 2.0 backend v2: small change and some more commit message (Tapani) v3: refactor checks to make it more readable (Ian Romanick) v4: change warning comment in GLSL ES case (Curro) Signed-off-by: Tapa

[Mesa-dev] [PATCH 2/4] mesa/glsl: new compiler option UnrollSamplerArrayDynamicIndexing

2015-06-09 Thread Tapani Pälli
instructions. This would not work without dynamic indexing support. Signed-off-by: Tapani Pälli --- src/glsl/loop_unroll.cpp | 10 ++ src/mesa/main/mtypes.h | 6 ++ 2 files changed, 16 insertions(+) diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp index 635e1dd..b9de51d

[Mesa-dev] [PATCH 3/4] i965: use UnrollSamplerArrayDynamicIndexing for gen < 7

2015-06-09 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i965/brw_context.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 652d9a3..38c6f72 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src

[Mesa-dev] [PATCH 4/4] glsl: validate sampler array indexing for 'constant-index-expression'

2015-06-09 Thread Tapani Pälli
enable UnrollSamplerArrayDynamicIndexing option (have dynamic indexing) Signed-off-by: Tapani Pälli Cc: "10.5" and "10.6" --- src/glsl/linker.cpp | 77 + 1 file changed, 77 insertions(+) diff --git a/src/glsl/linker.cpp b

Re: [Mesa-dev] [PATCH v3] mesa: add GL_RED, GL_RG support for floating point textures

2015-06-09 Thread Tapani Pälli
On 06/09/2015 08:51 PM, Kenneth Graunke wrote: On Tuesday, June 09, 2015 12:26:48 PM Tapani Pälli wrote: Mesa supports EXT_texture_rg and OES_texture_float. This patch adds support for using unsized enums GL_RED and GL_RG for floating point targets and writes proper checks for internalformat

Re: [Mesa-dev] [PATCH] mesa: Remove duplicate _mesa_{init, free}_shader_state prototypes.

2014-09-22 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 09/21/2014 09:39 PM, Matt Turner wrote: > --- > src/mesa/main/shaderobj.h | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h > index fae8be8..d72919c 100644 > --- a/src/mesa/mai

[Mesa-dev] [PATCH] glsl: Structures must have same name to be considered same type.

2014-09-22 Thread Tapani Pälli
'shaders-with-uniform-structs' when running Chrome on OpenGL ES. v2: Do not force name comparison with unnamed types (Tapani) Signed-off-by: Kalyan Kondapally Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83934 --- src/glsl/glsl_types.cpp | 14 +

[Mesa-dev] [PATCH] glsl: remove unused link_assign_uniform_block_offsets

2014-09-24 Thread Tapani Pälli
ubo offsets are assigned by link_uniform_blocks since 514f8c7e Signed-off-by: Tapani Pälli --- src/glsl/link_uniforms.cpp | 34 -- src/glsl/linker.h | 3 --- 2 files changed, 37 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl

Re: [Mesa-dev] [PATCH] glsl: Structures must have same name to be considered same type.

2014-09-25 Thread Tapani Pälli
On 09/26/2014 04:25 AM, kalyan kondapally wrote: > On Wed, Sep 24, 2014 at 11:45 AM, Anuj Phogat wrote: >> On Mon, Sep 22, 2014 at 5:11 AM, Tapani Pälli wrote: >>> From: Kalyan Kondapally >>> >>> According to GLSL(4.2) and GLSL-ES (1.0, 3.0) spec, Structur

[Mesa-dev] [PATCH] egl: setup screen iterator before using it

2014-09-29 Thread Tapani Pälli
commit 4ed23fd broke creation of pbuffer surfaces, patch fixes the failure, noticed when running chrome with '--use-gl=egl'. Signed-off-by: Tapani Pälli --- src/egl/drivers/dri2/platform_x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/pl

[Mesa-dev] [PATCH] mesa: relax draw api validation on ES2

2014-09-30 Thread Tapani Pälli
Patch fixes failing test in WebGL conformance test 'point-no-attributes' when running Chrome on OpenGL ES. (Shader program may draw points using constant data in shader.) No Piglit regressions. Signed-off-by: Tapani Pälli --- src/mesa/main/api_validate.c | 5 ++--- 1 file changed, 2

[Mesa-dev] [PATCH] mesa: fix error reported on gTexSubImage2D when level not valid

2014-10-07 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 647d28a..c0298af 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2449,7 +2449,7

Re: [Mesa-dev] [PATCH] mesa: Make _mesa_print_arrays use stderr.

2014-10-08 Thread Tapani Pälli
in uniform and texture code), not sure if you want all of these to be changed (?) Reviewed-by: Tapani Pälli > Signed-off-by: Kenneth Graunke > --- > src/mesa/main/varray.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/main/varray.c

[Mesa-dev] [PATCH] mesa: validate sampler uniforms during gluniform calls

2014-10-14 Thread Tapani Pälli
d to cache validation state. Signed-off-by: Tapani Pälli --- src/mesa/main/context.c | 11 +++ src/mesa/main/mtypes.h | 1 + src/mesa/main/uniform_query.cpp | 44 + src/mesa/main/uniforms.c| 14 + 4 files c

[Mesa-dev] [PATCH v2] sampler validation

2014-10-15 Thread Tapani Pälli
e_program_pipeline throws GL_INVALID_OPERATION which is not read by Piglit's 'program_pipeline_check_status' or test app before it switch to 'valid configuration' and renders again. Tapani Pälli (1): mesa: validate sampler uniforms during gluniform calls src/mesa/main

[Mesa-dev] [PATCH v2] mesa: validate sampler uniforms during gluniform calls

2014-10-15 Thread Tapani Pälli
sk. A new boolean variable is introduced to cache validation state. v2: take into account case where 2 uniforms use same unit (curro) also do the check only when SSO is not in use, SSO has own path for sampler validation. Signed-off-by: Tapani Pälli --- src/mesa/main/context.c

[Mesa-dev] [PATCH] mesa: cleanup _mesa_valid_to_render code

2014-10-24 Thread Tapani Pälli
Patch moves shader_linked_or_absent functionality as part of _mesa_valid_to_render function. Function contained code marked as "not normally enabled" which would not work any more and removing that made it small enough to justify the move. Signed-off-by: Tapani Pälli --- src/mesa/main

[Mesa-dev] [PATCH] glsl: throw error when using invariant(all) in a fragment shader

2014-11-04 Thread Tapani Pälli
Note that some of the GLSL specifications explicitly state this as compile error, some simply state that 'it is an error'. Signed-off-by: Tapani Pälli --- src/glsl/glsl_parser.yy | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/glsl/glsl_parser.yy

[Mesa-dev] [PATCH] glsl: validate invariance between builtin variables

2014-11-07 Thread Tapani Pälli
Patch adds additional validation for GLSL ES 1.00 that specifies cross stage variance requirements for a set of specified builtins. Fixes failures in WebGL conformance test 'shaders-with-invariance'. Signed-off-by: Tapani Pälli --- src/glsl/linke

[Mesa-dev] [PATCH] mesa/glsl/glapi: enable GL_EXT_draw_buffers extension

2014-11-25 Thread Tapani Pälli
Patch enables ES2 extension that utilizes existing ES3 functionality. Changes make all the subtests to run and pass in WebGL conformance test 'webgl-draw-buffers' when running Chrome on OpenGL ES. Signed-off-by: Tapani Pälli --- src/glsl/glcpp/glcpp-parse.y| 2 ++

[Mesa-dev] [PATCH v2] mesa/glsl/glapi: enable GL_EXT_draw_buffers extension

2014-11-25 Thread Tapani Pälli
Patch enables ES2 extension that utilizes existing ES3 functionality. Changes make all the subtests to run and pass in WebGL conformance test 'webgl-draw-buffers' when running Chrome on OpenGL ES. v2: remove unused boolean (Ilia Mirkin) Signed-off-by: Tapani Pälli --- src/glsl/g

[Mesa-dev] [PATCH 04/23] mesa: glGetProgramResourceIndex

2015-03-13 Thread Tapani Pälli
Patch adds required helper functions to shaderapi.h and the actual implementation. corresponding Piglit test: arb_program_interface_query-resource-index Signed-off-by: Tapani Pälli --- src/mesa/main/program_resource.c | 91 +++- src/mesa/main

[Mesa-dev] [PATCH 00/23] ARB_program_interface_query

2015-03-13 Thread Tapani Pälli
s/ARB/program_interface_query.txt Git branch with all the patches: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=piq Tapani Pälli (23): glapi: add GL_ARB_program_interface_query skeleton mesa/glsl: build list of program resources during linking mesa: glGetProgramInterfaceiv

[Mesa-dev] [PATCH 18/23] mesa: refactor GetActiveUniformName

2015-03-13 Thread Tapani Pälli
Use _mesa_get_program_resource_name to get name. Signed-off-by: Tapani Pälli --- src/mesa/main/uniforms.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index dc9b5a0..69f8a3f 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 07/23] mesa: glGetProgramResourceLocationIndex

2015-03-13 Thread Tapani Pälli
Patch adds required helper functions to shaderapi.h and the actual implementation. The added functionality can be tested by tests for following functions that are refactored by later patches: GetFragDataIndex Signed-off-by: Tapani Pälli --- src/mesa/main/program_resource.c | 25

[Mesa-dev] [PATCH 22/23] mesa: refactor GetUniformIndices

2015-03-13 Thread Tapani Pälli
Use _mesa_program_resource_index to get indices. Signed-off-by: Tapani Pälli --- src/mesa/main/uniforms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 0c16641..f4de1df 100644 --- a/src/mesa/main/uniforms.c

[Mesa-dev] [PATCH 02/23] mesa/glsl: build list of program resources during linking

2015-03-13 Thread Tapani Pälli
the older shader program query APIs. Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 175 ++ src/mesa/main/mtypes.h| 14 src/mesa/main/shaderobj.c | 6 ++ 3 files changed, 195 insertions(+) diff --git a/src/glsl/linker.cpp b/src

[Mesa-dev] [PATCH 21/23] mesa: refactor GetUniformLocation

2015-03-13 Thread Tapani Pälli
Use _mesa_program_resource_location to get location. Signed-off-by: Tapani Pälli --- src/mesa/main/uniforms.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 8872344..0c16641 100644 --- a/src/mesa

[Mesa-dev] [PATCH 06/23] mesa: glGetProgramResourceLocation

2015-03-13 Thread Tapani Pälli
GetUniformLocation GetFragDataLocation Signed-off-by: Tapani Pälli --- src/mesa/main/program_resource.c | 81 +++- src/mesa/main/shader_query.cpp | 64 +++ src/mesa/main/shaderapi.h| 4 ++ 3 files changed, 148 insertions

[Mesa-dev] [PATCH 17/23] mesa: refactor GetActiveUniform

2015-03-13 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/uniform_query.cpp | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 217473a..3a2caa2 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 20/23] mesa: refactor GetActiveUniformBlockName

2015-03-13 Thread Tapani Pälli
Use _mesa_get_program_resource_name to get name. Signed-off-by: Tapani Pälli --- src/mesa/main/uniforms.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 078e433..8872344 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 01/23] glapi: add GL_ARB_program_interface_query skeleton

2015-03-13 Thread Tapani Pälli
v2: update dispatch_sanity test (Jason Ekstrand) + small code cleanups Signed-off-by: Tapani Pälli --- src/mapi/glapi/gen/ARB_program_interface_query.xml | 109 + src/mapi/glapi/gen/gl_API.xml | 2 + src/mapi/glapi/gen/gl_genexec.py

[Mesa-dev] [PATCH 23/23] mesa: refactor GetUniformBlockIndex

2015-03-13 Thread Tapani Pälli
Use _mesa_program_resource_index to get index. Signed-off-by: Tapani Pälli --- src/mesa/main/uniforms.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index f4de1df..5548d1d 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 13/23] mesa: refactor GetFragDataIndex

2015-03-13 Thread Tapani Pälli
Use _mesa_program_resource_location_index to fetch index. Signed-off-by: Tapani Pälli --- src/mesa/main/shader_query.cpp | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index f576972

[Mesa-dev] [PATCH 11/23] mesa: refactor GetAttribLocation

2015-03-13 Thread Tapani Pälli
Use program_resource_location to fetch location. Signed-off-by: Tapani Pälli --- src/mesa/main/shader_query.cpp | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 8134d4b

[Mesa-dev] [PATCH 19/23] mesa: remove unused _mesa_get_uniform_name

2015-03-13 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/uniforms.c | 39 --- src/mesa/main/uniforms.h | 5 - 2 files changed, 44 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 69f8a3f..078e433 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 16/23] mesa: refactor GetTransformFeedbackVarying

2015-03-13 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/transformfeedback.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index a3e23ce..cf4de33 100644 --- a/src/mesa/main/transformfeedback.c

[Mesa-dev] [PATCH 15/23] mesa: refactor GetActiveUniformsiv, use _mesa_program_resource_prop

2015-03-13 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/uniform_query.cpp | 107 ++-- 1 file changed, 38 insertions(+), 69 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 9f82de9..217473a 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 05/23] mesa: glGetProgramResourceName

2015-03-13 Thread Tapani Pälli
s that are refactored by later patches: GetActiveUniformName GetActiveUniformBlockName Signed-off-by: Tapani Pälli --- src/mesa/main/program_resource.c | 22 + src/mesa/main/shader_query.cpp | 96 src/mesa/main/shaderapi.h| 10

[Mesa-dev] [PATCH 12/23] mesa: refactor GetFragDataLocation

2015-03-13 Thread Tapani Pälli
Use program_resource_location to fetch location. Signed-off-by: Tapani Pälli --- src/mesa/main/shader_query.cpp | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 7e8cf9c

[Mesa-dev] [PATCH 08/23] mesa: implementation of glGetProgramResourceiv

2015-03-13 Thread Tapani Pälli
-off-by: Tapani Pälli --- src/mesa/main/program_resource.c | 23 src/mesa/main/shader_query.cpp | 258 +++ src/mesa/main/shaderapi.h| 12 ++ 3 files changed, 293 insertions(+) diff --git a/src/mesa/main/program_resource.c b/src/mesa/main

[Mesa-dev] [PATCH 10/23] mesa: refactor GetActiveAttrib

2015-03-13 Thread Tapani Pälli
Instead of iterating IR, retrieve required information through the new program resource functions. Signed-off-by: Tapani Pälli --- src/mesa/main/shader_query.cpp | 58 -- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 14/23] mesa: mesa_bufferiv utility function for buffer objects

2015-03-13 Thread Tapani Pälli
Patch adds new function 'mesa_bufferiv' and refactors existing GetActiveUniformBlockiv and GetActiveAtomicCounterBufferiv to use it. corresponding Piglit tests: arb_uniform_buffer_object* arb_shader_atomic_counters* (Many tests hit the corresponding queries.) Signed-off-by: Ta

[Mesa-dev] [PATCH 09/23] mesa: enable GL_ARB_program_interface_query extension

2015-03-13 Thread Tapani Pälli
(and mark it as DONE in docs/GL3.txt) Signed-off-by: Tapani Pälli --- docs/GL3.txt | 4 ++-- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 43bbf85..eedbf0d 100644

[Mesa-dev] [PATCH 03/23] mesa: glGetProgramInterfaceiv

2015-03-13 Thread Tapani Pälli
Patch adds required helper functions to shaderapi.h and the actual implementation. corresponding Piglit test: arb_program_interface_query-getprograminterfaceiv Signed-off-by: Tapani Pälli --- src/mesa/main/program_resource.c | 79 src/mesa/main

[Mesa-dev] [PATCH] i965: in MAD->MUL, switch last argument to be immediate

2015-03-13 Thread Tapani Pälli
ame opt_algebraic pass on later run. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89569 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp in

Re: [Mesa-dev] [PATCH 1/2] i965/fs: Force promotion of src0 immediates.

2015-03-15 Thread Tapani Pälli
On 03/14/2015 02:46 AM, Kenneth Graunke wrote: On Friday, March 13, 2015 04:40:17 PM Matt Turner wrote: On Fri, Mar 13, 2015 at 4:16 PM, Kenneth Graunke wrote: Commit 36bc5f06dd22 began allowing immediates in MAD and LRP sources, in any position. One unforeseen consequence is that opt_algeb

Re: [Mesa-dev] [PATCH 01/23] glapi: add GL_ARB_program_interface_query skeleton

2015-03-15 Thread Tapani Pälli
On 03/14/2015 01:19 AM, Matt Turner wrote: On Fri, Mar 13, 2015 at 1:37 AM, Tapani Pälli wrote: v2: update dispatch_sanity test (Jason Ekstrand) + small code cleanups Signed-off-by: Tapani Pälli --- src/mapi/glapi/gen/ARB_program_interface_query.xml | 109 + src

Re: [Mesa-dev] [PATCH 03/23] mesa: glGetProgramInterfaceiv

2015-03-15 Thread Tapani Pälli
On 03/13/2015 09:57 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds required helper functions to shaderapi.h and the actual implementation. corresponding Piglit test: arb_program_interface_query-getprograminterfaceiv Signed-off-by: Tapani Pälli

Re: [Mesa-dev] [PATCH 04/23] mesa: glGetProgramResourceIndex

2015-03-15 Thread Tapani Pälli
On 03/13/2015 10:18 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds required helper functions to shaderapi.h and the actual implementation. corresponding Piglit test: arb_program_interface_query-resource-index Signed-off-by: Tapani Pälli

[Mesa-dev] [PATCH v2] i965/fs: in MAD optimizations, switch last argument to be immediate

2015-03-16 Thread Tapani Pälli
immediates, this is taken care of by the same opt_algebraic pass on later run. v2: Fix for all cases, use temporary fs_reg (Matt, Kenneth) Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89569 Reviewed-by: Francisco Jerez (v1) --- src/mesa/drivers/dri/i965/brw_fs.cpp

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Emit better b2f of an expression on GEN4 and GEN5

2015-03-16 Thread Tapani Pälli
tructions in affected programs: 33269 -> 33096 (-0.52%) helped:121 Iron Lake (0x0046): total instructions in shared programs: 4993327 -> 4993146 (-0.00%) instructions in affected programs: 34199 -> 34018 (-0.53%) helped:129 No c

Re: [Mesa-dev] [PATCH 02/23] mesa/glsl: build list of program resources during linking

2015-03-16 Thread Tapani Pälli
On 03/13/2015 06:16 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds ProgramResourceList to gl_shader_program structure. List contains references to active program resources and is constructed during linking phase. This list will be used by follow-up

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Emit better b2f of an expression on GEN4 and GEN5

2015-03-16 Thread Tapani Pälli
On 03/16/2015 06:37 PM, Matt Turner wrote: On Mon, Mar 16, 2015 at 4:54 AM, Tapani Pälli wrote: Is there some particular Piglit test case that hits this path and is it possible with gen>5 (by removing gen check)? I've tried this with handicrafted shader_test and also shader-db and ca

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Emit better b2f of an expression on GEN4 and GEN5

2015-03-16 Thread Tapani Pälli
On 03/17/2015 07:42 AM, Tapani Pälli wrote: On 03/16/2015 06:37 PM, Matt Turner wrote: On Mon, Mar 16, 2015 at 4:54 AM, Tapani Pälli wrote: Is there some particular Piglit test case that hits this path and is it possible with gen>5 (by removing gen check)? I've tried this with hand

Re: [Mesa-dev] [PATCH 11/23] mesa: refactor GetAttribLocation

2015-03-16 Thread Tapani Pälli
On 03/17/2015 12:30 AM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Use program_resource_location to fetch location. Signed-off-by: Tapani Pälli --- src/mesa/main/shader_query.cpp | 33 ++--- 1 file changed, 10 insertions(+), 23

Re: [Mesa-dev] [PATCH 05/23] mesa: glGetProgramResourceName

2015-03-17 Thread Tapani Pälli
On 03/16/2015 07:16 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds required helper functions to shaderapi.h and the actual implementation. Name generation copied from '_mesa_get_uniform_name' which can be removed later by refactoring functi

Re: [Mesa-dev] [PATCH 06/23] mesa: glGetProgramResourceLocation

2015-03-17 Thread Tapani Pälli
On 03/16/2015 07:08 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds required helper functions to shaderapi.h and the actual implementation. corresponding Piglit test: arb_program_interface_query-resource-location The added functionality can be

Re: [Mesa-dev] [PATCH 07/23] mesa: glGetProgramResourceLocationIndex

2015-03-17 Thread Tapani Pälli
On 03/16/2015 08:08 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds required helper functions to shaderapi.h and the actual implementation. The added functionality can be tested by tests for following functions that are refactored by later patches

Re: [Mesa-dev] [PATCH 15/23] mesa: refactor GetActiveUniformsiv, use _mesa_program_resource_prop

2015-03-17 Thread Tapani Pälli
On 03/17/2015 12:38 AM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:38 AM, Tapani Pälli wrote: Signed-off-by: Tapani Pälli --- src/mesa/main/uniform_query.cpp | 107 ++-- 1 file changed, 38 insertions(+), 69 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH] linker: fix varying linking if SSO program has only gs and fs

2015-03-17 Thread Tapani Pälli
oming GetProgramInterfaceiv Piglit test which passes with the patch, no Piglit regressions. Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 0c

Re: [Mesa-dev] [PATCH 07/23] mesa: glGetProgramResourceLocationIndex

2015-03-17 Thread Tapani Pälli
On 03/17/2015 04:20 PM, Ilia Mirkin wrote: On Tue, Mar 17, 2015 at 5:13 AM, Tapani Pälli wrote: On 03/16/2015 08:08 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: +/** + * Returns output index for dual source blending. + */ GLint GLAPIENTRY

Re: [Mesa-dev] [PATCH 08/23] mesa: implementation of glGetProgramResourceiv

2015-03-18 Thread Tapani Pälli
On 03/16/2015 08:30 PM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: Patch adds required helper functions to shaderapi.h and the actual implementation. The property query functionality can be tested with tests for following functions that are refactored by later

Re: [Mesa-dev] [PATCH 09/23] mesa: enable GL_ARB_program_interface_query extension

2015-03-18 Thread Tapani Pälli
On 03/17/2015 12:22 AM, Ilia Mirkin wrote: On Fri, Mar 13, 2015 at 4:37 AM, Tapani Pälli wrote: (and mark it as DONE in docs/GL3.txt) And add to relnotes? ok, sure Signed-off-by: Tapani Pälli --- docs/GL3.txt | 4 ++-- src/mesa/main/extensions.c | 1 + src/mesa/main

[Mesa-dev] [PATCH] glsl: fix names in lower_constant_arrays_to_uniforms

2015-03-19 Thread Tapani Pälli
Patch adds a counter around the lowering pass so that arrays from different stages cannot end up having same name for uniform. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89590 Cc: 10.5 10.4 --- src/glsl/ir_optimization.h | 2 +- src

Re: [Mesa-dev] [PATCH] glsl: fix names in lower_constant_arrays_to_uniforms

2015-03-19 Thread Tapani Pälli
On 03/19/2015 11:39 PM, Kenneth Graunke wrote: On Thursday, March 19, 2015 11:59:50 AM Tapani Pälli wrote: Patch adds a counter around the lowering pass so that arrays from different stages cannot end up having same name for uniform. Signed-off-by: Tapani Pälli Bugzilla: https

[Mesa-dev] [PATCH v2] glsl: fix names in lower_constant_arrays_to_uniforms

2015-03-23 Thread Tapani Pälli
Patch changes lowering pass to use unique name for each uniform so that arrays from different stages cannot end up having same name. v2: instead of global counter, use pointer to achieve unique name (Kenneth Graunke) Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org

Re: [Mesa-dev] [PATCH] mesa: add OES_EGL_image_external_essl3 support

2015-03-23 Thread Tapani Pälli
On 03/22/2015 12:07 AM, Ilia Mirkin wrote: Signed-off-by: Ilia Mirkin --- Not sure what kind of testing is needed here... thought I'd just send this out though, as the extension is simple enough. Wasn't sure whether mesa already handles the requirements re marking the texture as incomplete if

Re: [Mesa-dev] [Mesa-stable] [PATCH v2] glsl: fix names in lower_constant_arrays_to_uniforms

2015-03-23 Thread Tapani Pälli
On 03/23/2015 09:17 AM, Chris Forbes wrote: -LIBDRM_INTEL_REQUIRED=2.4.60 +LIBDRM_INTEL_REQUIRED=2.4.59 Hang on, what's this hunk doing here? urgh sorry, that was temporary hack by lazy developer and should be removed. // Tapani ___ mes

Re: [Mesa-dev] [Mesa-stable] [PATCH v2] glsl: fix names in lower_constant_arrays_to_uniforms

2015-03-23 Thread Tapani Pälli
, Mar 23, 2015 at 8:12 PM, Tapani Pälli wrote: Patch changes lowering pass to use unique name for each uniform so that arrays from different stages cannot end up having same name. v2: instead of global counter, use pointer to achieve unique name (Kenneth Graunke) Signed-off-by: Tapani Pälli

Re: [Mesa-dev] [PATCH] mesa: add OES_EGL_image_external_essl3 support

2015-03-23 Thread Tapani Pälli
On 03/23/2015 01:43 PM, Ilia Mirkin wrote: On Mon, Mar 23, 2015 at 3:20 AM, Tapani Pälli wrote: On 03/22/2015 12:07 AM, Ilia Mirkin wrote: Signed-off-by: Ilia Mirkin --- Not sure what kind of testing is needed here... thought I'd just send this out though, as the extension is s

Re: [Mesa-dev] [PATCH] mesa: add OES_EGL_image_external_essl3 support

2015-03-23 Thread Tapani Pälli
On 03/23/2015 02:41 PM, Ilia Mirkin wrote: On Mon, Mar 23, 2015 at 8:06 AM, Tapani Pälli wrote: On 03/23/2015 01:43 PM, Ilia Mirkin wrote: On Mon, Mar 23, 2015 at 3:20 AM, Tapani Pälli wrote: On 03/22/2015 12:07 AM, Ilia Mirkin wrote: Signed-off-by: Ilia Mirkin --- Not sure

Re: [Mesa-dev] [PATCH] glsl: avoid calling base_alignment when samplers are involved

2015-03-24 Thread Tapani Pälli
Reviewed-by: Tapani Palli On 03/23/2015 02:00 PM, Ilia Mirkin wrote: Earlier commit 53bf7c8fd2e changed the logic to always call base_alignment on structs. 1ec715ce8b12 hacked the function to return 0 for sampler fields, but didn't handle sampler arrays. Instead of extending the hack,

Re: [Mesa-dev] [PATCH 04/23] i965/fs: Don't emit dumb SEL

2015-03-24 Thread Tapani Pälli
e are no shader-db changes now, but this prevents a large number of regressions from a later commit (glsl: Optimize certain if-statements to ir_triop_csel). Signed-off-by: Ian Romanick Cc: Tapani Pälli --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 9 + 1 file changed, 9 insertions(+)

[Mesa-dev] [PATCH] glsl: fix unreachable(!"") to unreachable("")

2015-03-29 Thread Tapani Pälli
Correct error with commit 151fb1e where assert was renamed to unreachable without removing ! from string argument. Signed-off-by: Tapani Pälli --- src/glsl/loop_controls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/loop_controls.cpp b/src/glsl

[Mesa-dev] [PATCH v2 00/24] ARB_program_interface_query

2015-04-01 Thread Tapani Pälli
ves/piglit/2015-April/015457.html Extension specification: https://www.opengl.org/registry/specs/ARB/program_interface_query.txt Git branch with all the patches: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=piq Thanks; Tapani Pälli (24): linker: fix varying linking if SSO program has only

[Mesa-dev] [PATCH v2 01/24] linker: fix varying linking if SSO program has only gs and fs

2015-04-01 Thread Tapani Pälli
oming GetProgramInterfaceiv Piglit test which passes with the patch, no Piglit regressions. Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 85

<    5   6   7   8   9   10   11   12   13   14   >