[Mesa-dev] [PATCH] glsl: cleanup, remove duplicate assignment

2013-11-01 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/glsl/glsl_parser_extras.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index be17109..8f66d5f 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp

Re: [Mesa-dev] [v2 6/6] mesa: OES_get_program_binary functionality

2013-11-01 Thread Tapani Pälli
On 11/01/2013 12:21 PM, Erik Faye-Lund wrote: On Fri, Nov 1, 2013 at 10:16 AM, Tapani Pälli wrote: Signed-off-by: Tapani Pälli --- src/mesa/main/shaderapi.c | 46 +++--- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/src/mesa/main

Re: [Mesa-dev] [v2 6/6] mesa: OES_get_program_binary functionality

2013-11-01 Thread Tapani Pälli
On 11/01/2013 12:38 PM, Erik Faye-Lund wrote: On Fri, Nov 1, 2013 at 11:35 AM, Tapani Pälli wrote: On 11/01/2013 12:21 PM, Erik Faye-Lund wrote: On Fri, Nov 1, 2013 at 10:16 AM, Tapani Pälli wrote: Signed-off-by: Tapani Pälli --- src/mesa/main/shaderapi.c | 46

Re: [Mesa-dev] [v2 6/6] mesa: OES_get_program_binary functionality

2013-11-05 Thread Tapani Pälli
On 11/06/2013 12:14 AM, Paul Berry wrote: On 1 November 2013 05:08, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: On 11/01/2013 12:38 PM, Erik Faye-Lund wrote: On Fri, Nov 1, 2013 at 11:35 AM, Tapani Pälli mailto:tapani.pa...@intel.com>> wrote:

Re: [Mesa-dev] [v2 5/6] glsl: functions to serialize gl_shader and gl_shader_program

2013-11-06 Thread Tapani Pälli
On 11/06/2013 12:02 AM, Paul Berry wrote: On 1 November 2013 02:16, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: +static void +calc_item(const void *key, void *data, void *closure) How about "increment_count" for the name of this function? ok +{

Re: [Mesa-dev] [v2 4/6] glsl: ir_deserializer class for the shader cache

2013-11-08 Thread Tapani Pälli
On 11/05/2013 10:16 PM, Paul Berry wrote: On 1 November 2013 02:16, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: ir_deserializer can create a gl_shader structure out of binary data from ir_serializer, will be used by OES_get_program_binary implementation. Sign

[Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get

2013-11-19 Thread Tapani Pälli
Earlier comments suggest this was removed from GL core spec but it is still there. Enabling makes 'texture_lod_bias_getter' Khronos conformance tests pass, also removes some errors from Metro Last Light game which is using this API. Signed-off-by: Tapani Pälli --- src/mesa/main/texpa

[Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Tapani Pälli
10.0" Reviewed-by: Kenneth Graunke Reviewed-by: Ian Romanick Signed-off-by: Tapani Pälli --- src/mesa/main/texparam.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index d56b7d9..f77e7f6 100644

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Tapani Pälli
On 11/21/2013 12:04 AM, Kenneth Graunke wrote: On 11/20/2013 09:45 AM, Ian Romanick wrote: On 11/20/2013 09:08 AM, Kenneth Graunke wrote: On 11/20/2013 03:27 AM, Tapani Pälli wrote: Earlier comments suggest this was removed from GL core spec but it is still there. Enabling makes

[Mesa-dev] [PATCH] i965: use _mesa_align_malloc in intel_miptree_map_movntdqa

2014-06-04 Thread Tapani Pälli
This fixes case where we have 1x1 size buffer and misalignment is 0. Signed-off-by: Tapani Pälli Reviewed-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79616 --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[Mesa-dev] [PATCH v2] glsl: parser changes for GL_ARB_explicit_uniform_location

2014-06-04 Thread Tapani Pälli
ion (Ian) Signed-off-by: Tapani Pälli --- src/glsl/ast_to_hir.cpp | 36 src/glsl/glcpp/glcpp-parse.y | 3 +++ src/glsl/glsl_lexer.ll| 1 + src/glsl/glsl_parser_extras.h | 15 +++ 4 files changed, 55 insertions(+) diff --git a/src/g

Re: [Mesa-dev] [PATCH piglit] Test using glTexSubImage2D with packed depth-stencil textures

2014-06-06 Thread Tapani Pälli
with 2 small things (mentioned below) fixed; Reviewed-by: Tapani Pälli On 06/05/2014 03:57 PM, Neil Roberts wrote: > This adds a test for updating a sub-region of a texture created with > the GL_EXT_packed_depth_stencil extension. Currently this seems to > trigger a bug on the i9

[Mesa-dev] [PATCH] i965/fs: initialize src as reg_undef for texture opcodes

2014-06-09 Thread Tapani Pälli
Commit 07af0ab changed fs_inst to have 0 sources for texture opcodes in emit_texture_gen5 (Ironlake, Sandybrige) while fs_generator still uses a single source from brw_reg struct. Patch sets src as reg_undef which matches the behavior before the constructor got changed. Signed-off-by: Tapani

[Mesa-dev] [PATCH v2] Enable GL_ARB_explicit_uniform_location in the drivers.

2014-06-09 Thread Tapani Pälli
v2: enable also for i915 (Ian) Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i915/intel_extensions.c | 1 + src/mesa/drivers/dri/i965/intel_extensions.c | 1 + src/mesa/state_tracker/st_extensions.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i915

[Mesa-dev] [PATCH] glsl: type check between switch init-expression and case

2014-06-09 Thread Tapani Pälli
Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79724 --- src/glsl/ast_to_hir.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d1c77f1..131b25f 100644 --- a/src/glsl/ast_to_hir.cpp +++ b

Re: [Mesa-dev] [PATCH] i965/fs: initialize src as reg_undef for texture opcodes

2014-06-09 Thread Tapani Pälli
On 06/09/2014 05:34 PM, Robert Bragg wrote: > Hey Tapani, > > I came across this issue the other day too and can at least confirm > that I wrote an almost identical patch. > > I was a bit unsure whether this was the best place to fix this issue > since it seems a bit unobvio

Re: [Mesa-dev] [PATCH] glsl: type check between switch init-expression and case

2014-06-09 Thread Tapani Pälli
On 06/09/2014 09:40 PM, Matt Turner wrote: > On Mon, Jun 9, 2014 at 4:29 AM, Tapani Pälli wrote: >> Signed-off-by: Tapani Pälli >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79724 >> --- >> src/glsl/ast_to_hir.cpp | 9 + >> 1 file changed, 9

Re: [Mesa-dev] [PATCH] glsl: type check between switch init-expression and case

2014-06-09 Thread Tapani Pälli
On 06/10/2014 08:28 AM, Tapani Pälli wrote: > On 06/09/2014 09:40 PM, Matt Turner wrote: >> On Mon, Jun 9, 2014 at 4:29 AM, Tapani Pälli wrote: >>> Signed-off-by: Tapani Pälli >>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79724 >>>

Re: [Mesa-dev] [RFC 00/20] shader compiler cache

2014-06-11 Thread Tapani Pälli
Hi; On 06/02/2014 03:05 PM, Tapani Pälli wrote: > Hello; > > This series provides a disk cache for the shader compiler and is used > to 'skip glLinkProgram' like GL_ARB_get_program_binary does but under > the hood without api for the client. > > > With the ser

Re: [Mesa-dev] [PATCH v2] glsl: parser changes for GL_ARB_explicit_uniform_location

2014-06-11 Thread Tapani Pälli
On 06/12/2014 09:44 AM, Petri Latvala wrote: > On 06/05/2014 08:08 AM, Tapani Pälli wrote: >> Patch adds a preprocessor define for the extension and stores explicit >> location data for uniforms during AST->HIR conversion. It also sets >> layout token to be available when

[Mesa-dev] [PATCH v3] glsl: parser changes for GL_ARB_explicit_uniform_location

2014-06-12 Thread Tapani Pälli
ion (Ian) v3: fix the check and comment in AST->HIR (Petri) Signed-off-by: Tapani Pälli --- src/glsl/ast_to_hir.cpp | 35 +++ src/glsl/glcpp/glcpp-parse.y | 3 +++ src/glsl/glsl_lexer.ll| 1 + src/glsl/glsl_parser_extras.h | 15 +++ 4

[Mesa-dev] [PATCH v2] glsl: type check between switch init-expression and case

2014-06-12 Thread Tapani Pälli
Patch adds a type check between switch init-expression and case label and performs a implicit signed->unsigned type conversion when possible. v2: add GLSL spec reference, do implicit conversion if possible (Matt) Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi

Re: [Mesa-dev] [PATCH 04/15] glsl: Add preprocessor error condition for #else directive

2014-06-12 Thread Tapani Pälli
> +{HASH}else{HSPACE}*[^ \t\n]+ { I can't find exact specification for a 'new-line' from the spec, so IMO we should allow '\r' also here. > +glcpp_error(yylloc, yyextra, "illegal tokens after #else"); > +} > + > {HASH}endif { > yyextra->

Re: [Mesa-dev] [PATCH 01/13] glsl: Remove 'struct' from ir_variable declaration.

2014-06-15 Thread Tapani Pälli
This set (1..13) Reviewed-by: Tapani Pälli There's still some unused variables and one unused function (svga_draw.c:294) left but this set makes build much more silent. On 06/15/2014 08:15 PM, Matt Turner wrote: > --- > src/glsl/opt_dead_builtin_varyings.cpp | 2 +- > 1 f

Re: [Mesa-dev] [PATCH 01/13] glsl: Remove 'struct' from ir_variable declaration.

2014-06-15 Thread Tapani Pälli
On 06/16/2014 09:55 AM, Tapani Pälli wrote: > This set (1..13) > > Reviewed-by: Tapani Pälli > > There's still some unused variables and one unused function > (svga_draw.c:294) left but this set makes build much more silent. now I see that this func is for debugging so

[Mesa-dev] [PATCH] glsl: handle a switch where default is in the middle of cases

2014-06-19 Thread Tapani Pälli
No Piglit regressions. Signed-off-by: Tapani Pälli --- src/glsl/ast_to_hir.cpp | 88 +-- src/glsl/glsl_parser_extras.h | 3 ++ 2 files changed, 88 insertions(+), 3 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index

[Mesa-dev] [PATCH v2] glsl: handle a switch where default is in the middle of cases

2014-06-19 Thread Tapani Pälli
No Piglit regressions. v2: take away unnecessary ir_if, just use conditional assignment Signed-off-by: Tapani Pälli --- src/glsl/ast_to_hir.cpp | 84 +-- src/glsl/glsl_parser_extras.h | 3 ++ 2 files changed, 84 insertions(+), 3 deletions(-) diff

[Mesa-dev] [PATCH v3] glsl: handle a switch where default is in the middle of cases

2014-07-13 Thread Tapani Pälli
No Piglit regressions. v2: take away unnecessary ir_if, just use conditional assignment v3: use foreach_in_list instead of foreach_list Signed-off-by: Tapani Pälli Reviewed-by: Roland Scheidegger (v2) --- src/glsl/ast_to_hir.cpp | 83 +-- src/glsl

[Mesa-dev] [PATCH] glapi: add indexed blend functions (GL 4.0)

2014-07-14 Thread Tapani Pälli
This makes some of the UE4 engine demos (Stylized, Mobile Temple) render correctly, tested on Intel Haswell machine. Signed-off-by: Tapani Pälli --- src/mapi/glapi/gen/GL4x.xml | 26 ++ src/mesa/main/tests/dispatch_sanity.cpp | 10 +- 2 files changed

Re: [Mesa-dev] valgrind shows read after frees in GLSL compiler

2014-07-24 Thread Tapani Pälli
recompile(gl_context*, > gl_shader_program*) (brw_shader.cpp:79) > ==8650==by 0x65E9E94: brw_link_shader (brw_shader.cpp:275) These last lines here look familiar or at least hit the same area of code as: https://bugs.freedesktop.org/show_bug.cgi?id=81379 (this bug got fixed though) > _

[Mesa-dev] [PATCH] glsl: fix switch statement default case regressions

2014-07-24 Thread Tapani Pälli
This patch fixes regressions caused by commit 48deb4d. Regressions happened because 'run_default' var did not initialized when default case was the last one. Now all the switch tests in es3conform suite are passing. Signed-off-by: Tapani Pälli --- src/glsl/ast_to_hir.cpp | 12 +

[Mesa-dev] [PATCH] glapi: add indexed blend functions (GL 4.0)

2014-07-25 Thread Tapani Pälli
This makes some of the UE4 engine demos (Stylized, Mobile Temple) render correctly, tested on Intel Haswell machine. Signed-off-by: Tapani Pälli Acked-by: Anuj Phogat Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78716 --- src/mapi/glapi/gen/GL4x.xml | 26

Re: [Mesa-dev] [PATCH 10/13] glsl: Add a lowering pass for gl_VertexID

2014-07-29 Thread Tapani Pälli
On 06/21/2014 04:01 AM, Ian Romanick wrote: > From: Ian Romanick > > Converts gl_VertexID to (gl_VertexIDMESA + gl_BaseVertex). gl_VertexIDMESA > is backed by SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, and gl_BaseVertex is backed > by a built-in uniform from {STATE_INTERNAL, STATE_BASE_VERTEX}. > > NOTE: T

Re: [Mesa-dev] [PATCH 00/13] Fix gl_VertexID on i965

2014-07-29 Thread Tapani Pälli
Patches 5..10 Reviewed-by: Tapani Pälli Also tested that these fix the new Piglit tests and esconform3 test. I made a little proposal for patch 10 but not sure if this change would be worth the trouble. On 06/21/2014 04:00 AM, Ian Romanick wrote: > This patch series fixes bugs in the i

[Mesa-dev] [PATCH] glsl: support unsigned increment in ir_loop controls

2014-07-30 Thread Tapani Pälli
Current version can create ir_expression where operands have different base type, patch adds support for unsigned type. Signed-off-by: Tapani Pälli https://bugs.freedesktop.org/show_bug.cgi?id=80880 --- src/glsl/loop_controls.cpp | 18 +++--- 1 file changed, 15 insertions(+), 3

[Mesa-dev] [PATCH] glsl: disable ARB_texture_cube_map_array_enable keywords for glsl es

2013-07-25 Thread Tapani Pälli
Patch fixes a crash with Webgl 'shader-with-non-reserved-words' conformance test by ignoring desktop extension keywords on GLSL ES. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Tapani Pälli --- src/glsl/glsl_lexer.ll | 29 +--

Re: [Mesa-dev] [PATCH] glsl: disable ARB_texture_cube_map_array_enable keywords for glsl es

2013-07-26 Thread Tapani Pälli
On 07/26/2013 09:47 AM, Chris Forbes wrote: +samplerCubeArray KEYWORD_WITH_ALT(130, 0, 150, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY); +isamplerCubeArray KEYWORD_WITH_ALT(130, 0, 150, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY); +usamplerCubeArray

[Mesa-dev] [v2] glsl: disable ARB_texture_cube_map_array_enable keywords for glsl es

2013-07-26 Thread Tapani Pälli
Patch fixes a crash with Webgl 'shader-with-non-reserved-words' conformance test by ignoring desktop extension keywords on GLSL ES. v2: fix reserved and allowed desktop glsl versions (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Tapani Pälli R

[Mesa-dev] [PATCH 0/4] RFC: gl_shader cache

2013-09-20 Thread Tapani Pälli
he. Any comments greatly appreciated! Tapani Pälli (4): glsl: add ir_cache class for IR serialization (WIP) mesa: gl_shader_cache class (WIP) glsl: export populate_symbol_table glsl: use gl_shader_cache when compiling (WIP) src/glsl/Makefile.sources | 2 + src/glsl/glsl_parser_extras

[Mesa-dev] [PATCH 3/4] glsl: export populate_symbol_table

2013-09-20 Thread Tapani Pälli
will be used by compiler code when loading shaders from the cache Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 2 +- src/glsl/linker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 8a143fd..538676b 100644 --- a

[Mesa-dev] [PATCH 2/4] mesa: gl_shader_cache class (WIP)

2013-09-20 Thread Tapani Pälli
'move_push_constants_to_pull_constants', (int pull_constant_loc[this->uniforms];), something broken TODO - recursive cache directory generation - env variable to enable/disable cache - create new exec_list directly to the given shader (not having to copy it later as it takes extra time) Signed-off-by: Tapani Pälli

[Mesa-dev] [PATCH 4/4] glsl: use gl_shader_cache when compiling (WIP)

2013-09-20 Thread Tapani Pälli
Patch takes gl_shader_cache in to use. When compiling a shader, we first search the cache if it exists already and can be used from there. If cache did not exist, we attempt to cache the shader after compilation. Signed-off-by: Tapani Pälli --- src/glsl/glsl_parser_extras.cpp | 40

Re: [Mesa-dev] [PATCH 0/4] RFC: gl_shader cache

2013-09-22 Thread Tapani Pälli
On 09/20/2013 05:23 PM, Christoph Brill wrote: 2013/9/20 Tapani Pälli <mailto:tapani.pa...@intel.com>> Hello; On my SNB desktop machine shader-db takes ~2.4secs without cache, with cache it takes ~1.8secs (~2.7 when cache gets generated) (values are avg from 100

Re: [Mesa-dev] [PATCH] gles2: a stub implementation for GL_EXT_discard_framebuffer

2013-02-12 Thread Tapani Pälli
On 02/12/2013 08:45 PM, Eric Anholt wrote: Tapani Pälli writes: On 02/12/2013 12:38 AM, Eric Anholt wrote: Tapani Pälli writes: --- src/mapi/glapi/gen/es_EXT.xml | 13 + src/mesa/drivers/dri/intel/intel_extensions.c | 1 + src/mesa/main/dd.h

[Mesa-dev] [PATCH v2] gles2: a stub implementation for GL_EXT_discard_framebuffer

2013-02-13 Thread Tapani Pälli
This patch implements a stub for GL_EXT_discard_framebuffer with required checks listed by the extension specification. This extension is required by GLBenchmark 2.5 when compiled with OpenGL ES 2.0 as the rendering backend. Signed-off-by: Tapani Pälli --- src/mapi/glapi/gen/es_EXT.xml

Re: [Mesa-dev] [PATCH] gles2: a stub implementation for GL_EXT_discard_framebuffer

2013-02-13 Thread Tapani Pälli
On 02/13/2013 05:23 PM, Ian Romanick wrote: > On 02/12/2013 11:04 PM, Tapani Pälli wrote: >> On 02/12/2013 08:45 PM, Eric Anholt wrote: >>> Tapani Pälli writes: >>> >>>> On 02/12/2013 12:38 AM, Eric Anholt wrote: >>>>> Tapani Pälli writ

[Mesa-dev] [PATCH v3] gles2: a stub implementation for GL_EXT_discard_framebuffer

2013-02-17 Thread Tapani Pälli
This patch implements a stub for GL_EXT_discard_framebuffer with required checks listed by the extension specification. This extension is required by GLBenchmark 2.5 when compiled with OpenGL ES 2.0 as the rendering backend. Signed-off-by: Tapani Pälli --- src/mapi/glapi/gen/es_EXT.xml

[Mesa-dev] [PATCH 0/2] improve gles2 conformance on android

2013-02-20 Thread Tapani Pälli
Following changes improve gles2 conformance on android. There are additional failures related to sampling but those will be dealt later. Tapani Pälli (2): mesa: add missing case in _mesa_GetTexParameterfv() mesa/es: NULL check in EGLImageTargetTexture2DOES src/mesa/main/teximage.c | 6

[Mesa-dev] [PATCH 1/2] mesa: add missing case in _mesa_GetTexParameterfv()

2013-02-20 Thread Tapani Pälli
missing case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES is required by OES_EGL_image_external extension. Signed-off-by: Tapani Pälli --- src/mesa/main/texparam.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index b6afd35..bc66bb3 100644

[Mesa-dev] [PATCH 2/2] mesa/es: NULL check in EGLImageTargetTexture2DOES

2013-02-20 Thread Tapani Pälli
check that pointer passed is valid and return error if not. Signed-off-by: Tapani Pälli --- src/mesa/main/teximage.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index f8f517a..f0de0fb 100644 --- a/src/mesa/main/teximage.c +++ b

[Mesa-dev] [PATCH] mesa: fix type comparison error in sub-texture error checking code

2013-04-16 Thread Tapani Pälli
patch fixes a crash that happens if glTexSubImage2D is called with a negative xoffset. 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 784b389..ae053e8 100644

Re: [Mesa-dev] [PATCH] mesa: fix type comparison error in sub-texture error checking code

2013-04-17 Thread Tapani Pälli
On 04/17/2013 05:12 PM, Brian Paul wrote: On 04/17/2013 12:07 AM, Tapani Pälli wrote: patch fixes a crash that happens if glTexSubImage2D is called with a negative xoffset. Signed-off-by: Tapani Pälli --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Mesa-dev] [PATCH v2] mesa: fix type comparison errors in sub-texture error checking code

2013-04-17 Thread Tapani Pälli
patch fixes a crash that happens if glTexSubImage2D is called with a negative xoffset. NOTE: This is a candidate for stable branches. Signed-off-by: Tapani Pälli --- v2: corrected xoffset cast to happen before sign + added more checks src/mesa/main/teximage.c | 10 +- 1 file changed

[Mesa-dev] [PATCH] egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-11-29 Thread Tapani Pälli
-with-egl-platforms=x11' and running es2gears_x11 + glbenchmark2.7 successfully. v2: return true for dri2_auth if running without libdrm (Samuel) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72062 Signed-off-by: Tapani Pälli Cc: Samuel Thibault Cc: mesa-sta...@lists.freed

[Mesa-dev] [PATCH v3] egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-12-01 Thread Tapani Pälli
-with-egl-platforms=x11' and running es2gears_x11 + glbenchmark2.7 successfully. v2: return true for dri2_auth if running without libdrm (Samuel) v3: check libdrm when building EGL drm platform + AM_CFLAGS fix (Emil) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72062 Signed-off-

Re: [Mesa-dev] [Mesa-stable] [PATCH v3] egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-12-02 Thread Tapani Pälli
On 12/02/2013 11:06 PM, Chad Versace wrote: On 12/01/2013 01:53 AM, Tapani Pälli wrote: Commit a594cec broke EGL X11 backend by adding dependency between X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11. This patch fixes the issue by adding additional define for libdrm

[Mesa-dev] [PATCH 0/5] ir_variable data container

2013-12-04 Thread Tapani Pälli
s the starting point. Tapani Pälli (5): glsl: introduce data section to ir_variable glsl: move variables in to ir_variable::data, part I glsl: move variables in to ir_variable::data, part II glsl: move variables in to ir_variable::data, part III glsl: modify ir_clone to use memcpy src/glsl

[Mesa-dev] [PATCH 3/5] glsl: move variables in to ir_variable::data, part II

2013-12-04 Thread Tapani Pälli
This patch moves following bitfields in to the data structure: explicit_location, explicit_index, explicit_binding, has_initializer, is_unmatched_generic_inout, location_frac Signed-off-by: Tapani Pälli --- src/glsl/ast_to_hir.cpp | 12 ++--- src/glsl/builtin_variables.cpp

[Mesa-dev] [PATCH 1/5] glsl: introduce data section to ir_variable

2013-12-04 Thread Tapani Pälli
Data section helps serialization and cloning of a ir_variable. This patch includes the helper bits used for read only ir_variables. Signed-off-by: Tapani Pälli --- src/glsl/ast_function.cpp | 2 +- src/glsl/ast_to_hir.cpp | 28 ++-- src

[Mesa-dev] [PATCH 5/5] glsl: modify ir_clone to use memcpy

2013-12-04 Thread Tapani Pälli
Patch copies the whole data structure at once instead of assigning individual variables. Signed-off-by: Tapani Pälli --- src/glsl/ir_clone.cpp | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index d98ed95

[Mesa-dev] [0/2] fixes to ir_variable data container set

2013-12-05 Thread Tapani Pälli
eck, this time also with '--enable-debug' to catch assert errors: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=ir_changes Paul, as the set touches so many files I would appreciate if you can still verify that there are no further compilation issues. Tapani Pälli (2): glsl: introdu

[Mesa-dev] [v2 1/2] glsl: introduce data section to ir_variable

2013-12-05 Thread Tapani Pälli
Data section helps serialization and cloning of a ir_variable. This patch includes the helper bits used for read only ir_variables. Signed-off-by: Tapani Pälli Reviewed-by: Paul Berry --- src/glsl/ast_function.cpp | 2 +- src/glsl/ast_to_hir.cpp | 26

[Mesa-dev] [PATCH] mesa: fix a typo in glDetachShader error message

2013-12-10 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 1d9aac3..4f3be68 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -414,7 +414,7

[Mesa-dev] [PATCH] mesa: remove _mesa_symbol_table_iterator structure

2013-12-30 Thread Tapani Pälli
Nothing uses this structure, removal fixes Klocwork error about the possible oom condition in _mesa_symbol_table_iterator_ctor. Signed-off-by: Tapani Pälli --- src/mesa/program/symbol_table.c | 86 - src/mesa/program/symbol_table.h | 13 --- 2 files

[Mesa-dev] [wip 2/9] glsl: serialize methods for IR instructions

2014-01-02 Thread Tapani Pälli
Patch adds a new virtual function for ir_instruction base class which has to be implemented by each instruction. This data will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/Makefile.sources | 1 + src/glsl/ir.h | 45 ++ src/glsl

[Mesa-dev] [wip 1/9] glsl: memory_writer helper class for data serialization

2014-01-02 Thread Tapani Pälli
Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_writer.h | 147 +++ 1 file changed, 147 insertions(+) create mode 100644 src/glsl/memory_writer.h diff --git a/src/glsl/memory_writer.h b

[Mesa-dev] [wip 9/9] mesa: OES_get_program_binary extension functionality

2014-01-02 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/shaderapi.c | 44 ++-- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 57511e8..c07b226 100644 --- a/src/mesa/main/shaderapi.c +++ b

[Mesa-dev] [wip 3/9] glsl: memory_map helper class for data deserialization

2014-01-02 Thread Tapani Pälli
Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_map.h | 174 ++ 1 file changed, 174 insertions(+) create mode 100644 src/glsl/memory_map.h diff --git a/src/glsl/memory_map.h b/src

[Mesa-dev] [wip 7/9] mesa: iterate method for string_to_uint_map

2014-01-02 Thread Tapani Pälli
Shader binary cache requires this to be able to cache hash data from the gl_shader_program structure. Signed-off-by: Tapani Pälli --- src/mesa/program/hash_table.h | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h index

[Mesa-dev] [wip 8/9] glsl: functions to serialize gl_shader and gl_shader_program

2014-01-02 Thread Tapani Pälli
These utility functions can be used to (de)serialize gl_shader and gl_shader_program structures. This makes it possible to implement a shader compiler cache for individual shaders and functionality required by OES_get_program_binary extension. Signed-off-by: Tapani Pälli --- src/glsl

[Mesa-dev] [wip 5/9] glsl: export populate_symbol_table function

2014-01-02 Thread Tapani Pälli
Binary shader cache needs this to allocate and fill gl_shader symbol table. Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 2 +- src/glsl/linker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index a81e107..2b1d290

[Mesa-dev] [wip 0/9] GL_OES_get_program_binary extension

2014-01-02 Thread Tapani Pälli
keys but this is just test) I have also 'automatic' cache implementation here that can be used to verify the cache functionality with any application (without extension): http://cgit.freedesktop.org/~tpalli/mesa/log/?h=new_serialization Any comments appreciated; Tapani Päll

[Mesa-dev] [wip 4/9] glsl: add MESA_SHADER_CACHE_MAGIC string for shader binary cache

2014-01-02 Thread Tapani Pälli
Patch adds a string that can be used by binary cache to identify that shader binaries were generated with exact same Mesa library. Signed-off-by: Tapani Pälli --- src/glsl/shader_cache_magic.h | 36 1 file changed, 36 insertions(+) create mode 100644 src

[Mesa-dev] [wip 6/9] glsl: ir_deserializer class for the binary shader cache

2014-01-02 Thread Tapani Pälli
ir_deserializer can create a gl_shader structure out of binary data, this will be used by shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/Makefile.sources| 1 + src/glsl/ir_deserializer.cpp | 979 +++ src/glsl

[Mesa-dev] [PATCH] gl_uniform_storage data container

2014-01-02 Thread Tapani Pälli
this change in gl_shader_program serialization: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=oes_get_program_binary2 Plan is to continue making these kind of changes to minimize the code size introduced by binary shader cache and also make it more robust. Tapani Pälli (1): glsl: introduce

[Mesa-dev] [PATCH] glsl: introduce data section to gl_uniform_storage

2014-01-02 Thread Tapani Pälli
Data section helps serialization of gl_uniform_storage which is required for binary shader cache implementation, no functional changes. Signed-off-by: Tapani Pälli --- src/glsl/ir_uniform.h | 132 + src/glsl/link_atomics.cpp

[Mesa-dev] [PATCH] i965/fs: do SEL optimization only when src type for MOV matches

2014-01-07 Thread Tapani Pälli
Fixes a bug where then branch operates with ivec4 while else uses vec4. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72379 Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH 2/2] dri: set yInverted default to GL_TRUE

2014-01-08 Thread Tapani Pälli
=73371 Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/common/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 9c94832..3e35fe2 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers

[Mesa-dev] [PATCH 1/2] egl_dri2: call dri2_add_configs_for_visuals after extensions set

2014-01-08 Thread Tapani Pälli
dri2_add_config makes decisions based on NOK_texture_from_pixmap so it needs to be enabled before calling dri2_add_configs_for_visuals. Signed-off-by: Tapani Pälli --- src/egl/drivers/dri2/platform_x11.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/egl

Re: [Mesa-dev] [wip 1/9] glsl: memory_writer helper class for data serialization

2014-01-14 Thread Tapani Pälli
On 01/13/2014 08:27 PM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli mailto:tapani.pa...@intel.com>> --- src/glsl/memory

Re: [Mesa-dev] [wip 2/9] glsl: serialize methods for IR instructions

2014-01-14 Thread Tapani Pälli
On 01/13/2014 11:58 PM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: diff --git a/src/glsl/ir_serialize.cpp b/src/glsl/ir_serialize.cpp new file mode 100644 index 000..30ca018 --- /dev/null +++ b

Re: [Mesa-dev] [wip 3/9] glsl: memory_map helper class for data deserialization

2014-01-14 Thread Tapani Pälli
On 01/14/2014 12:30 AM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli mailto:tapani.pa...@intel.com>> --- src/glsl/mem

Re: [Mesa-dev] [wip 6/9] glsl: ir_deserializer class for the binary shader cache

2014-01-14 Thread Tapani Pälli
On 01/14/2014 01:24 AM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: + + +/** + * Reads header part of the binary blob. Main purpose of this header is to + * validate that cached shader was produced with same Me

Re: [Mesa-dev] [wip 1/9] glsl: memory_writer helper class for data serialization

2014-01-14 Thread Tapani Pälli
On 01/13/2014 08:29 PM, Ian Romanick wrote: On 01/02/2014 03:58 AM, Tapani Pälli wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_writer.h | 147 +++ 1 file changed, 147

Re: [Mesa-dev] [wip 9/9] mesa: OES_get_program_binary extension functionality

2014-01-16 Thread Tapani Pälli
On 01/15/2014 06:13 PM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli <mailto:tapani.pa...@intel.com>> wrote: Signed-off-by: Tapani Pälli mailto:tapani.pa...@intel.com>> --- src/mesa/main/shaderapi.c | 44 ++---

Re: [Mesa-dev] [PATCH demos] opengles2/es2tri: add precision qualifier to the fragment shader

2014-01-19 Thread Tapani Pälli
"varying vec4 v_color;\n" "void main() {\n" " gl_FragColor = v_color;\n" yep, varying declaration was missing precision qualifier. Reviewed-by: Tapani Pälli ___ mesa-dev mailing list mesa-dev@lists.free

[Mesa-dev] [PATCH 01/10] glsl: memory_writer helper class for data serialization

2014-01-29 Thread Tapani Pälli
Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_writer.h | 188 +++ 1 file changed, 188 insertions(+) create mode 100644 src/glsl/memory_writer.h diff --git a/src/glsl/memory_writer.h b

[Mesa-dev] [PATCH 05/10] glsl: export populate_symbol_table function

2014-01-29 Thread Tapani Pälli
Binary shader cache needs this to allocate and fill gl_shader symbol table. Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 2 +- src/glsl/linker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 93b4754..dfe431d

[Mesa-dev] [PATCH 04/10] glsl: add MESA_SHADER_CACHE_MAGIC string for shader binary cache

2014-01-29 Thread Tapani Pälli
Patch adds a string that can be used by binary cache to identify that shader binaries were generated with exact same Mesa library. Signed-off-by: Tapani Pälli --- src/glsl/shader_cache_magic.h | 36 1 file changed, 36 insertions(+) create mode 100644 src

[Mesa-dev] [PATCH 00/10] GL_OES_get_program_binary extension

2014-01-29 Thread Tapani Pälli
o make changes for Piglit shaderrunner to support cache so that Piglit could be used for the validation. I know that Paul is very busy ATM so I would appreciate if someone else has time to go through some of this, thanks! Tapani Pälli (10): glsl: memory_writer helper class for data serialization

[Mesa-dev] [PATCH 03/10] glsl: memory_map helper class for data deserialization

2014-01-29 Thread Tapani Pälli
Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_map.h | 171 ++ 1 file changed, 171 insertions(+) create mode 100644 src/glsl/memory_map.h diff --git a/src/glsl/memory_map.h b/src

[Mesa-dev] [PATCH 02/10] glsl: serialize methods for IR instructions

2014-01-29 Thread Tapani Pälli
Patch adds a new virtual function for ir_instruction base class which has to be implemented by each instruction. This data will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/Makefile.sources | 1 + src/glsl/ir.h | 45 + src/glsl

[Mesa-dev] [PATCH 06/10] glsl: add MAX_NUM_STATE_SLOTS and check against builtin uniform variables

2014-01-29 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/glsl/builtin_variables.cpp | 3 +++ src/mesa/main/config.h | 4 2 files changed, 7 insertions(+) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index d6bc3c0..3e660af 100644 --- a/src/glsl/builtin_variables.cpp +++ b

[Mesa-dev] [PATCH 09/10] glsl: functions to serialize gl_shader and gl_shader_program

2014-01-29 Thread Tapani Pälli
These utility functions can be used to (de)serialize gl_shader and gl_shader_program structures. This makes it possible to implement a shader compiler cache for individual shaders and functionality required by OES_get_program_binary and ARB_get_program_binary extensions. Signed-off-by: Tapani

[Mesa-dev] [PATCH 07/10] glsl: ir_deserializer class for the binary shader cache

2014-01-29 Thread Tapani Pälli
ir_deserializer fills existing gl_shader structure's ir exec_list from binary data, this will be used by shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/Makefile.sources| 1 + src/glsl/ir_deserializer.cpp | 910 +++

[Mesa-dev] [PATCH 08/10] mesa: iterate method for string_to_uint_map

2014-01-29 Thread Tapani Pälli
Shader binary cache requires this to be able to cache hash data from the gl_shader_program structure. Signed-off-by: Tapani Pälli --- src/mesa/program/hash_table.h | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h index

[Mesa-dev] [PATCH 10/10] mesa: OES_get_program_binary extension functionality

2014-01-29 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/shaderapi.c | 47 +-- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 61ac0e3..582dfe2 100644 --- a/src/mesa/main/shaderapi.c +++ b

[Mesa-dev] [PATCH] i965/vec4: do not trim dead channels on gen6 for math

2014-04-01 Thread Tapani Pälli
On GEN6 math operations require destination writemask to be WRITEMASK_XYZW. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76883 Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a

Re: [Mesa-dev] [PATCH] i965/vec4: do not trim dead channels on gen6 for math

2014-04-02 Thread Tapani Pälli
On 04/02/2014 09:45 AM, Matt Turner wrote: > On Tue, Apr 1, 2014 at 11:18 PM, Tapani Pälli wrote: >> On GEN6 math operations require destination writemask to be WRITEMASK_XYZW. > That's not really it. Gen6 doesn't support the math in align16 mode, > which is the mode requ

[Mesa-dev] [PATCH V2] i965/vec4: do not trim dead channels on gen6 for math

2014-04-02 Thread Tapani Pälli
Do not set a writemask on Gen6 for math instructions, those are executed using align1 mode that does not support a destination mask. v2: cleanups, better comment (Matt) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76883 Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i965

<    1   2   3   4   5   6   7   8   9   10   >