[Mesa-dev] [PATCH 3/6] glcpp: Test a non-function-like macro using the token paste operator

2011-09-30 Thread Carl Worth
Apparently we never implemented this, (but we've got a GLSL 1.30 test in piglit that is exercising this case). --- .../tests/097-paste-with-non-function-macro.c |3 +++ .../097-paste-with-non-function-macro.c.expected |4 2 files changed, 7 insertions(+), 0 deletions(-)

[Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Carl Worth
Eric recentl mentioned to me that when setting the following environment variables with current master mesa: MESA_GL_VERSION_OVERRIDE=3.0 MESA_GLSL_VERSION_OVERRIDE=130 that 8 piglit preprocessor tests start to fail. I've investigated all of these failures and am here attaching

[Mesa-dev] [PATCH 6/6] glcpp: Add a test for #elif with an undefined macro.

2011-09-30 Thread Carl Worth
As written, this test correctly raises an error for #elif being used with an undefined macro (and not as an argument to defined). If the preceding #if were '#if 1' then this diagnositc would correctly be hidden. That allows code such as the following to not raise an error: #ifndef

[Mesa-dev] [PATCH 5/6] glcpp: Raise error if defining any macro containing two consecutive underscores

2011-09-30 Thread Carl Worth
The specification reserves any macro name containing two consecutive underscores, (anywhere within the name). Previously, we only raised this error for macro names that started with two underscores. Fix the implementation to check for two underscores anywhere, and also update the corresponding

Re: [Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-30 Thread Kenneth Graunke
On 09/27/2011 11:05 AM, Paul Berry wrote: This patch implements proper support for gl_ClipVertex by causing the new VS backend to populate the clip distance VUE slots using VERT_RESULT_CLIP_VERTEX when appropriate, and by using the untransformed clip planes in ctx-Transform.EyeUserPlane rather

[Mesa-dev] [PATCH] mesa: Respect GL_RASTERIZER_DISCARD for various meta-type operations.

2011-09-30 Thread Eric Anholt
From the EXT_transform_feedback spec: Primitives can be optionally discarded before rasterization by calling Enable and Disable with RASTERIZER_DISCARD_EXT. When enabled, primitives are discared right before the rasterization stage, but after the optional transform feedback stage.

Re: [Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Kenneth Graunke
On 09/29/2011 11:00 PM, Carl Worth wrote: Eric recentl mentioned to me that when setting the following environment variables with current master mesa: MESA_GL_VERSION_OVERRIDE=3.0 MESA_GLSL_VERSION_OVERRIDE=130 that 8 piglit preprocessor tests start to fail. I've

Re: [Mesa-dev] [PATCH 5/6] glcpp: Raise error if defining any macro containing two consecutive underscores

2011-09-30 Thread Eric Anholt
On Thu, 29 Sep 2011 23:00:29 -0700, Carl Worth cwo...@cworth.org wrote: The specification reserves any macro name containing two consecutive underscores, (anywhere within the name). Previously, we only raised this error for macro names that started with two underscores. Fix the

Re: [Mesa-dev] [PATCH 2/4] st/mesa: implement AllocTextureImageBuffer() driver hook

2011-09-30 Thread Eric Anholt
On Thu, 29 Sep 2011 20:54:42 -0600, Brian Paul bri...@vmware.com wrote: On 09/29/2011 08:37 PM, Eric Anholt wrote: On Thu, 29 Sep 2011 14:24:46 -0600, Brian Paulbrian.e.p...@gmail.com wrote: From: Brian Paulbri...@vmware.com This hasn't been needed so far since none of the core Mesa

[Mesa-dev] [PATCH] i965: Enable faster workaround-free math on Ivybridge.

2011-09-30 Thread Kenneth Graunke
According to the documentation, Ivybridge's math instruction works in SIMD16 mode for the fragment shader, and no longer forbids align16 mode for the vertex shader. The documentation claims that SIMD16 mode isn't supported for INT DIV, but empirical evidence shows that it works fine. Presumably

Re: [Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-30 Thread Paul Berry
On 29 September 2011 23:16, Kenneth Graunke kenn...@whitecape.org wrote: On 09/27/2011 11:05 AM, Paul Berry wrote: This patch implements proper support for gl_ClipVertex by causing the new VS backend to populate the clip distance VUE slots using VERT_RESULT_CLIP_VERTEX when appropriate,

Re: [Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

2011-09-30 Thread Dan Nicholson
Hi Matt, On Sat, Sep 24, 2011 at 6:06 PM, Matt Turner matts...@gmail.com wrote: Signed-off-by: Matt Turner matts...@gmail.com --- The last discussion about using automake ([RFC] Convert mesa to automake/libtool) ended without anything happening, probably because the branch wasn't ready.

Re: [Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

2011-09-30 Thread Dan Nicholson
On Sat, Sep 24, 2011 at 6:06 PM, Matt Turner matts...@gmail.com wrote: Signed-off-by: Matt Turner matts...@gmail.com --- The last discussion about using automake ([RFC] Convert mesa to automake/libtool) ended without anything happening, probably because the branch wasn't ready. This patch

Re: [Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

2011-09-30 Thread Dan Nicholson
On Sun, Sep 25, 2011 at 12:06 PM, Gaetan Nadon mems...@videotron.ca wrote: On Sat, 2011-09-24 at 21:06 -0400, Matt Turner wrote: The patch has a few problems currently, and a few things that can possibly be done better: - Mainly, that building libmesa.a currently fails. -

Re: [Mesa-dev] [PATCH] mesa: add _NEW_CURRENT_ATTRIB in _mesa_program_state_flags()

2011-09-30 Thread Brian Paul
On 09/30/2011 12:51 AM, Eric Anholt wrote: On Thu, 29 Sep 2011 20:44:14 -0600, Brian Paulbrian.e.p...@gmail.com wrote: From: Brian Paulbri...@vmware.com If color material mode is enabled, constant buffer entries related to the material coefficients will depend on glColor. So add

Re: [Mesa-dev] [PATCH] mesa: Respect GL_RASTERIZER_DISCARD for various meta-type operations.

2011-09-30 Thread Brian Paul
On 09/30/2011 12:41 AM, Eric Anholt wrote: From the EXT_transform_feedback spec: Primitives can be optionally discarded before rasterization by calling Enable and Disable with RASTERIZER_DISCARD_EXT. When enabled, primitives are discared right before the rasterization stage, but

[Mesa-dev] [Bug 41263] [r600g] glCopyTexImage2D selects a texture format that involves fallback to software

2011-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 Marek Olšák mar...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

2011-09-30 Thread Jeremy Huddleston
So the original complaint, that he is forced to accept the GPLv3 to use autoconf seems a little confused. From the 2.62 release notes at http://lists.gnu.org/archive/html/autotools-announce/2008-04/msg2.html: Meanwhile, several source files within the Autoconf project are under

[Mesa-dev] [PATCH] mesa: Remove unused tnl items from dd_functions

2011-09-30 Thread Chad Versace
Remove NeedValidate and ValidateTnlModule. Signed-off-by: Chad Versace c...@chad-versace.us --- src/mesa/drivers/common/driverfuncs.c |2 -- src/mesa/main/dd.h| 19 --- 2 files changed, 0 insertions(+), 21 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] mesa: Remove unused tnl items from dd_functions

2011-09-30 Thread Eric Anholt
On Fri, 30 Sep 2011 10:45:27 -0700, Chad Versace c...@chad-versace.us wrote: Remove NeedValidate and ValidateTnlModule. Signed-off-by: Chad Versace c...@chad-versace.us Reviewed-by: Eric Anholt e...@anholt.net pgp9WRcTbtcJh.pgp Description: PGP signature

Re: [Mesa-dev] [PATCH] meta: fix GetTexImage() for compressed luminance, l/a, intensity formats

2011-09-30 Thread Eric Anholt
On Thu, 29 Sep 2011 20:22:28 -0600, Brian Paul brian.e.p...@gmail.com wrote: From: Brian Paul bri...@vmware.com The GL spec says that luminance values are returned as (l, 0, 0, 1), L/A values as (l, 0, 0, a) and intensity values as (i, 0, 0, 1). Use the pixel transfer scale controls to

Re: [Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Carl Worth
On Thu, 29 Sep 2011 23:43:49 -0700, Kenneth Graunke kenn...@whitecape.org wrote: For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Thanks for fixing these, Carl! No problem. Thanks to you (and Eric) for the review. I'll be glad to push changes to piglit to fix these

Re: [Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Ian Romanick
On 09/29/2011 11:00 PM, Carl Worth wrote: Eric recentl mentioned to me that when setting the following environment variables with current master mesa: MESA_GL_VERSION_OVERRIDE=3.0 MESA_GLSL_VERSION_OVERRIDE=130 that 8 piglit preprocessor tests start to fail. I've investigated

Re: [Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Ian Romanick
On 09/30/2011 12:18 PM, Ian Romanick wrote: On 09/29/2011 11:00 PM, Carl Worth wrote: 2. if/if-arg-must-be-defined-02.frag Neither this test nor if-arg-must-be-defined-01 produce the desired result on NVIDIA's blob or AMD's blob. I'd be curious to know what it does on Apple's implementation.

Re: [Mesa-dev] [PATCH] mesa: Remove unused tnl items from dd_functions

2011-09-30 Thread Ian Romanick
On 09/30/2011 10:45 AM, Chad Versace wrote: Remove NeedValidate and ValidateTnlModule. Signed-off-by: Chad Versacec...@chad-versace.us Reviewed-by: Ian Romanick ian.d.roman...@intel.com Hurray for not being locked into a fixed core/driver interface! ---

Re: [Mesa-dev] [PATCH 11/15] mesa: Make _mesa_GetActiveAttribARB use the attributes in the shader IR

2011-09-30 Thread Ian Romanick
On 09/29/2011 04:42 PM, Kenneth Graunke wrote: On 09/29/2011 10:52 AM, Ian Romanick wrote: From: Ian Romanickian.d.roman...@intel.com Instead of relying on the mirror in the Mesa IR assembly shader, just use the variables actually stored in the GLSL IR. This will be a bit slower, but nobody

Re: [Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Carl Worth
On Fri, 30 Sep 2011 12:32:13 -0700, Ian Romanick i...@freedesktop.org wrote: In any case, the test quotes specific language from the GLSL spec that explicitly forbids this behavior, so I'm somewhat reluctant to deviate from the spec'ed behavior. We're not deviating from what is specified.

[Mesa-dev] [PATCH] i965: Fix swizzle related assertion

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com As innocuous as it seemed, ebca47a basically broke the world (e.g., 200 piglit regressions). In vec4_visitor::emit_block_move, src-swizzle was expected to be BRW_SWIZZLE_NOOP before setting it to a swizzle that would replicate the existing channels of

[Mesa-dev] [PATCH 00/13] Clean up shader attribute handling v2

2011-09-30 Thread Ian Romanick
A couple of the patches from the original series have already been pushed. A bunch of the others earned some feedback, and these have been reworked. The primary changes in v2 are: - Fix some bad squash-merging related to patch 2. - Delete the post-link symbol table because it is full of lies

[Mesa-dev] [PATCH 01/13] glsl: Delete symbol table in post-link shaders

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com The symbol table in the linked shaders may contain references to variables that were removed (e.g., unused uniforms). Since it may contain junk, there is no possible valid use. Delete it and set the pointer to NULL. Signed-off-by: Ian Romanick

[Mesa-dev] [PATCH 02/13] mesa: Move _mesa_GetAttribLocationARB to shader_query.cpp

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com This allows querying the linked shader itself rather than the Mesa IR. This is the first step towards removing gl_program::Attributes. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/shader_query.cpp | 88

[Mesa-dev] [PATCH 03/13] mesa: Add hash_table_replace

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com hash_table_replace doesn't use get_node to avoid having to hash the key twice. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/program/hash_table.c | 25 +

[Mesa-dev] [PATCH 05/13] mesa: Move _mesa_BindAttribLocationARB to shader_query.cpp

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com This just folds bind_attrib_location into _mesa_BindAttribLocationARB and moves the resulting function function to the other source file. More changes are coming soon. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke

[Mesa-dev] [PATCH 04/13] mesa: Add string_to_uint_map facade class

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/program/hash_table.h | 79 ++- src/mesa/program/string_to_uint_map.cpp | 42 src/mesa/sources.mak|3 +-

[Mesa-dev] [PATCH 06/13] mesa: Add gl_shader_program::AttributeBindings

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com This currently mirrors the state tracking gl_shader_program::Attributes, but I'm working towards eliminating that. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/mtypes.h | 11 ++-

[Mesa-dev] [PATCH 07/13] linker: Use gl_shader_program::AttributeBindings for attrib locations

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/linker.cpp | 138 +++--- 1 files changed, 64 insertions(+), 74 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index

[Mesa-dev] [PATCH 08/13] mesa: Move _mesa_GetActiveAttribARB to shader_query.cpp

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com This just folds get_active_attrib into _mesa_GetActiveAttribARB and moves the resulting function function to the other source file. More changes are coming soon. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke

[Mesa-dev] [PATCH 09/13] mesa: Make _mesa_GetActiveAttribARB use the attributes in the shader IR

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Instead of relying on the mirror in the Mesa IR assembly shader, just use the variables actually stored in the GLSL IR. This will be a bit slower, but nobody cares about the performance of glGetActiveAttrib. Signed-off-by: Ian Romanick

[Mesa-dev] [PATCH 10/13] mesa: Remove unused gl_shader_program::Attributes

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/mtypes.h |1 - src/mesa/main/shader_query.cpp |9 ++--- src/mesa/main/shaderobj.c |6 -- 3 files

[Mesa-dev] [PATCH 13/13] mesa: Remove unused gl_program::Attributes

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/mtypes.h |5 - src/mesa/main/shader_query.cpp |4 src/mesa/program/ir_to_mesa.cpp

[Mesa-dev] [PATCH 12/13] mesa: Determine GL_ACTIVE_ATTRIBUTE_MAX_LENGTH by walking the GLSL IR.

2011-09-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/shader_query.cpp| 29 + src/mesa/main/shaderapi.c |8 +---

Re: [Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-30 Thread Eric Anholt
On Fri, 30 Sep 2011 01:09:32 -0700, Paul Berry stereotype...@gmail.com wrote: Non-text part: multipart/mixed Non-text part: multipart/alternative On 29 September 2011 23:16, Kenneth Graunke kenn...@whitecape.org wrote: On 09/27/2011 11:05 AM, Paul Berry wrote: So, we trade support for fixed

[Mesa-dev] [PATCH] r200/r300/r600: remove dangling radeon_tex_getimage.c symlinks.

2011-09-30 Thread Paul Berry
Commit d1fda903 (radeon: Drop mapping we were doing around glGetTexImage()) removed the common Radeon source file radeon_tex_getimage.c, and pulled it out of the r200, r300, r600, and radeon makefiles. But it left behind the symlinks that were being used to share that file among the four

Re: [Mesa-dev] [PATCH 00/13] Clean up shader attribute handling v2

2011-09-30 Thread Kenneth Graunke
On 09/30/2011 04:44 PM, Ian Romanick wrote: A couple of the patches from the original series have already been pushed. A bunch of the others earned some feedback, and these have been reworked. The primary changes in v2 are: - Fix some bad squash-merging related to patch 2. - Delete

[Mesa-dev] [PATCH] configure: replace pkg-config calls $(PKG_CONFIG) in the makefiles.

2011-09-30 Thread Stéphane Marchesin
Us poor souls who cross compile mesa want to be able to specify which pkg-config to pick, or at least just change one place. --- configs/default |1 + configs/freebsd-dri |4 ++-- configs/linux-dri | 16

Re: [Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-30 Thread Paul Berry
On 30 September 2011 10:04, Eric Anholt e...@anholt.net wrote: On Fri, 30 Sep 2011 01:09:32 -0700, Paul Berry stereotype...@gmail.com wrote: Non-text part: multipart/mixed Non-text part: multipart/alternative On 29 September 2011 23:16, Kenneth Graunke kenn...@whitecape.org wrote: On

Re: [Mesa-dev] [PATCH 0/9] Various patches to the g3dvl stack

2011-09-30 Thread Mike Lothian
Hi I'm always using the latest git I've raised https://bugs.freedesktop.org/show_bug.cgi?id=41375 I've attached the logs and a picture, if you'd like the video let me know it's 29MB to too big to attach to bugzilla me thinks Cheers Mike On 22 September 2011 20:11, ★ Emeric

[Mesa-dev] [PATCH 1/5] mesa: use loop in pop_texture_group() to restore 4 combiner terms

2011-09-30 Thread Brian Paul
From: Brian Paul bri...@vmware.com There's four combiner terms (not 3) with GL_NV_texture_env_combine4. Use a loop to make the code a little more compact. --- src/mesa/main/attrib.c | 37 + 1 files changed, 13 insertions(+), 24 deletions(-) diff --git

[Mesa-dev] [PATCH 2/5] mesa: use !! to simplify some _mesa_set_enable() calls in attrib.c

2011-09-30 Thread Brian Paul
From: Brian Paul bri...@vmware.com --- src/mesa/main/attrib.c | 68 +-- 1 files changed, 25 insertions(+), 43 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 82d7259..df7116e 100644 --- a/src/mesa/main/attrib.c +++

[Mesa-dev] [PATCH 3/5] r600: include version.h for _mesa_override_glsl_version() prototype

2011-09-30 Thread Brian Paul
From: Brian Paul bri...@vmware.com --- src/mesa/drivers/dri/r600/r600_context.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index c2f9cbd..19d69c6 100644 ---

[Mesa-dev] [PATCH v2 0/2] MapBufferRange improvements

2011-09-30 Thread Ben Widawsky
This patch is a respin of the mesa specific parts on the last non-blocking series. This goes on top of the libdrm and kernel changes and assumes that libdrm has some non-blocking style mapping. (There are also piglit tests for this in the last series). v2: removed error checks, though I'm a bit

[Mesa-dev] [PATCH v2 1/2] i965: Cleanup MapRangeBuffer

2011-09-30 Thread Ben Widawsky
Clean the code up, and always use a BO when creating a new buffer. I've not seen any regressions but haven't yet tried this on Gen6. Cc: Chad Versace c...@chad-versace.us Cc: Eric Anholt e...@anholt.net Signed-off-by: Ben Widawsky b...@bwidawsk.net ---

[Mesa-dev] [PATCH v2 2/2] i965: Add calls to nonblocking maps

2011-09-30 Thread Ben Widawsky
When mapping a range of a buffer that has the UNSYNCHRONIZED_BIT, and is only writable, we can take some shortcuts and let people shoot their feet. Cc: Eric Anholt e...@anholt.net Signed-off-by: Ben Widawsky b...@bwidawsk.net --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 34

Re: [Mesa-dev] [PATCH 1/5] mesa: use loop in pop_texture_group() to restore 4 combiner terms

2011-09-30 Thread Kenneth Graunke
On 09/30/2011 08:14 PM, Brian Paul wrote: From: Brian Paul bri...@vmware.com There's four combiner terms (not 3) with GL_NV_texture_env_combine4. Use a loop to make the code a little more compact. --- src/mesa/main/attrib.c | 37 + 1 files changed, 13