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

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 20:54:42 -0600, Brian Paul wrote: > On 09/29/2011 08:37 PM, Eric Anholt wrote: > > On Thu, 29 Sep 2011 14:24:46 -0600, Brian Paul > > wrote: > >> From: Brian Paul > >> > >> This hasn't been needed so far since none of the core Mesa code paths > >> that call ctx->Driver.AllocT

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

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 20:44:14 -0600, Brian Paul wrote: > From: Brian Paul > > If color material mode is enabled, constant buffer entries related > to the material coefficients will depend on glColor. So add > _NEW_CURRENT_ATTRIB to the bitset returned for material-related > constants in _mesa_pr

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

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 23:00:29 -0700, Carl Worth 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 implementation to check fo

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

2011-09-29 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 in

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

2011-09-29 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] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-29 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 ra

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

2011-09-29 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 086

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

2011-09-29 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 MAYBE_

[Mesa-dev] [PATCH 1/6] glcpp: Add a test for a macro that implements token pasting twice.

2011-09-29 Thread Carl Worth
This is something that piglit is exercising that currently fails. --- src/glsl/glcpp/tests/096-paste-twice.c |3 +++ src/glsl/glcpp/tests/096-paste-twice.c.expected |4 2 files changed, 7 insertions(+), 0 deletions(-) create mode 100644 src/glsl/glcpp/tests/096-paste-twice.c

[Mesa-dev] [PATCH 2/6] glcpp: Fix two (or more) successive applications of token pasting

2011-09-29 Thread Carl Worth
There was already a loop here to look for multiple token pastes, but it was mistakenly incrementing the iterator counter after performing one paste. Instead, leave the loop iterator in place to coalesce as many tokens as necessary into one. This fixes the recently add 096-paste-twice test as well

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

2011-09-29 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 a

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

2011-09-29 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(-) create

[Mesa-dev] [PATCH 4/6] glcpp: Implement token pasting for non-function-like macros

2011-09-29 Thread Carl Worth
This is as simple as abstracting one existing block of code into a function call and then adding a single call to that function for the case of a non-function-like macro. This fixes the recently-added 097-paste-with-non-function-macro test as well as the following piglit tests: spec/glsl-

Re: [Mesa-dev] [PATCH] mesa: Add missing glGetIntegerv() support for ARB_color_buffer_float tokens.

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 03:26 PM, Eric Anholt wrote: > Fixes piglit ARB_color_buffer_float/api-get For both the patch and the test: Reviewed-by: Kenneth Graunke ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo

Re: [Mesa-dev] [RFC][PATCH] vbo: do not restore all the arrayobj stuff if the bufobj is deleted

2011-09-29 Thread Yuanhan Liu
On Thu, Sep 29, 2011 at 09:58:18AM -0600, Brian Paul wrote: > On 09/29/2011 03:43 AM, Yuanhan Liu wrote: > >I hope I can find something from OpenGL spec to support this. Badly, I > >didn't make it with a simply searching. > > > >Basically, it's an issue that should we restore all the arrayobj stuff

Re: [Mesa-dev] GL_EXT_texture_array: mesa cleanups, and intel implementation

2011-09-29 Thread Brian Paul
On 09/29/2011 05:06 PM, Brian Paul wrote: On 09/29/2011 04:39 PM, Eric Anholt wrote: This patch series implements GL_EXT_texture_array for Intel, and partially cleans up Mesa core support for it in the process. It passes piglit here, plus some internal tests (except for the one that's broken and

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

2011-09-29 Thread Brian Paul
On 09/29/2011 08:37 PM, Eric Anholt wrote: On Thu, 29 Sep 2011 14:24:46 -0600, Brian Paul wrote: From: Brian Paul This hasn't been needed so far since none of the core Mesa code paths that call ctx->Driver.AllocTextureImageBuffer() are used with the state tracker. That will change in upcoming

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

2011-09-29 Thread Brian Paul
From: Brian Paul If color material mode is enabled, constant buffer entries related to the material coefficients will depend on glColor. So add _NEW_CURRENT_ATTRIB to the bitset returned for material-related constants in _mesa_program_state_flags(). This fixes a bug exercised by the new piglit

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

2011-09-29 Thread Brian Paul
On 09/29/2011 08:23 PM, Eric Anholt wrote: On Thu, 29 Sep 2011 14:24:48 -0600, Brian Paul wrote: From: Brian Paul If color material mode is enabled, constant buffer entries related to the lighting coefficients will depend on glColor. So add _NEW_CURRENT_ATTRIB to the bitset returned for light

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

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 14:24:46 -0600, Brian Paul wrote: > From: Brian Paul > > This hasn't been needed so far since none of the core Mesa code paths > that call ctx->Driver.AllocTextureImageBuffer() are used with the > state tracker. That will change in upcoming patches. > Note that this function

Re: [Mesa-dev] [PATCH 04/16] intel: Rely on Mesa core for glTexImage storage.

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 17:02:28 -0600, Brian Paul wrote: > On 09/29/2011 04:39 PM, Eric Anholt wrote: > > --- > > src/mesa/drivers/dri/intel/intel_tex_image.c | 59 > > -- > > 1 files changed, 8 insertions(+), 51 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/int

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

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 14:24:48 -0600, Brian Paul wrote: > From: Brian Paul > > If color material mode is enabled, constant buffer entries related > to the lighting coefficients will depend on glColor. So add > _NEW_CURRENT_ATTRIB to the bitset returned for lighting-related > constants in _mesa_pr

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

2011-09-29 Thread Brian Paul
From: Brian Paul 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 implement that. This fixes a few failures in the new piglit getteximage-formats test when getting a compr

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

2011-09-29 Thread Brian Paul
On 09/29/2011 08:06 PM, Eric Anholt wrote: On Thu, 29 Sep 2011 14:24:45 -0600, Brian Paul wrote: From: Brian Paul 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 imple

Re: [Mesa-dev] [PATCH 3/4] mesa: simplify parameters to GetTexImage() driver hook

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 14:24:47 -0600, Brian Paul wrote: > From: Brian Paul > > The target, level and texObj can be obtained through the texImage > parameter. We could make similar changes for the TexImage() hooks too. Reviewed-by: Eric Anholt pgpKu3BHTIoyF.pgp Description: PGP signature _

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

2011-09-29 Thread Eric Anholt
On Thu, 29 Sep 2011 14:24:45 -0600, Brian Paul wrote: > From: Brian Paul > > 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 implement that. > This fixes a few failu

Re: [Mesa-dev] [PATCH 16/16] i965: Add support for GL_EXT_texture_array and GL_MESA_texture_array.

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 03:40 PM, Eric Anholt wrote: > From: Kenneth Graunke "I didn't do it, honest!" :) I may have touched it at one point but 99%+ of this came from your original patch. git probably just kept my name when rebasing things. You probably want to --reset-author. __

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

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: > This series is the first block of cleans and refactors from my idr-work branch > (note: the tail of that branch is kind of a mess right now). This is working > towards a fairly significant refactor of the way shaders (GLSL and assembly) > are tracked a

Re: [Mesa-dev] [PATCH 14/15] mesa: Determine GL_ACTIVE_ATTRIBUTE_MAX_LENGTH by walking the GLSL IR.

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:52 AM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/mesa/main/shader_query.cpp| 29 + > src/mesa/main/shaderapi.c |8 +--- > src/mesa/main/shaderapi.h |2 ++ > src/mesa/program

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

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:52 AM, Ian Romanick wrote: > From: Ian Romanick > > 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

Re: [Mesa-dev] GL_EXT_texture_array: mesa cleanups, and intel implementation

2011-09-29 Thread Brian Paul
On 09/29/2011 04:39 PM, Eric Anholt wrote: This patch series implements GL_EXT_texture_array for Intel, and partially cleans up Mesa core support for it in the process. It passes piglit here, plus some internal tests (except for the one that's broken and ignores the minimum maximum layers). The

Re: [Mesa-dev] [PATCH 04/16] intel: Rely on Mesa core for glTexImage storage.

2011-09-29 Thread Brian Paul
On 09/29/2011 04:39 PM, Eric Anholt wrote: --- src/mesa/drivers/dri/intel/intel_tex_image.c | 59 -- 1 files changed, 8 insertions(+), 51 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index c0f6

Re: [Mesa-dev] [PATCH 08/15] mesa: Add gl_shader_program::AttributeBindings

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: > From: Ian Romanick > > This currently mirrors the state tracking > gl_shader_program::Attributes, but I'm working towards eliminating > that. > > Signed-off-by: Ian Romanick > --- > src/mesa/main/mtypes.h | 11 ++- > src/mesa/main

Re: [Mesa-dev] [PATCH] mesa: Add missing glGetIntegerv() support for ARB_color_buffer_float tokens.

2011-09-29 Thread Brian Paul
On 09/29/2011 04:26 PM, Eric Anholt wrote: Fixes piglit ARB_color_buffer_float/api-get --- src/mesa/main/get.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 9c1771e..0342ff6 100644 --- a/src/mesa/main/get.c +++ b/s

[Mesa-dev] [PATCH 16/16] i965: Add support for GL_EXT_texture_array and GL_MESA_texture_array.

2011-09-29 Thread Eric Anholt
From: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c |5 + src/mesa/drivers/dri/i965/brw_tex_layout.c |5 + src/mesa/drivers/dri/i965/brw_wm_emit.c |2 ++ src/mesa/drivers/dri/i965/brw_wm_pass1.c |2 ++ src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 15/16] intel: Add a safety check for mapping 1D texture arrays.

2011-09-29 Thread Eric Anholt
So easy to screw up with the crazy way GL manages them. --- src/mesa/drivers/dri/intel/intel_tex.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index 4ab618a..83ba50e 100644 --- a/src/me

[Mesa-dev] [PATCH 11/16] mesa: Reuse existing make_2d_mipmap for 2D array generation.

2011-09-29 Thread Eric Anholt
--- src/mesa/main/mipmap.c | 104 ++- 1 files changed, 5 insertions(+), 99 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 9b167f0..69781d3 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1652,100 +1

[Mesa-dev] [PATCH 14/16] intel: Add debug output to intel_map_texture_image.

2011-09-29 Thread Eric Anholt
--- src/mesa/drivers/dri/intel/intel_tex.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index 2b4047f..4ab618a 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/driv

[Mesa-dev] [PATCH 13/16] intel: Add a helper function for getting miptree size from a texture image.

2011-09-29 Thread Eric Anholt
With 1D array textures, we no longer agree between the GL information about width/height/depth of a texture and how we lay out a miptree. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |9 -- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |9 -- src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH 12/16] i965: Refactor out the cube map setup for general texture array setup.

2011-09-29 Thread Eric Anholt
This is just moving the code out with s/6/slices/. --- src/mesa/drivers/dri/i965/brw_tex_layout.c | 66 +++ 1 files changed, 37 insertions(+), 29 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 8369

[Mesa-dev] [PATCH 09/16] mesa: When storing texture data for a 1D array, map each slice separately.

2011-09-29 Thread Eric Anholt
--- src/mesa/main/texstore.c | 68 +++--- 1 files changed, 52 insertions(+), 16 deletions(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index cbed26c..2aaff0d 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -4

[Mesa-dev] [PATCH 07/16] intel: Consolidate texture validation copy code, and reuse it correctly.

2011-09-29 Thread Eric Anholt
The path for ->Data was failing to be called for the FBO draw offset fallback, and also had mismatched compressed texture support code. This drops the intel_prepare_render() in the blit path. We aren't copying to/from a GL_FRONT buffer, so it doesn't matter. --- src/mesa/drivers/dri/intel/intel_

[Mesa-dev] [PATCH 08/16] swrast: When asked to map a slice of a 1D array, give back that slice.

2011-09-29 Thread Eric Anholt
Until now, we've been treating 1D arrays as a single slice, and each array slice is actually just a row of the 2D texture. While swrast still stores them this way, hardware drivers think that 1D arrays have actual separate slices not stored as contiguous rows. --- src/mesa/swrast/s_texture.c |

[Mesa-dev] [PATCH 06/16] intel: Clean up the function chain for mapping texture images for swrast.

2011-09-29 Thread Eric Anholt
Too many separate functions each called from one location (in different files). This code should all die soon when swrast starts using MapTextureImage. --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 57 src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 12 --- src/mesa/dri

[Mesa-dev] [PATCH 05/16] intel: Make PBO TexImage use AllocTextureImageBuffer like non-PBO does.

2011-09-29 Thread Eric Anholt
Now that whole block that also lives in AllocTextureImageBuffer can go away. --- src/mesa/drivers/dri/intel/intel_tex.c |6 ++ src/mesa/drivers/dri/intel/intel_tex_image.c | 68 + 2 files changed, 20 insertions(+), 54 deletions(-) diff --git a/src/mesa/drivers/

[Mesa-dev] [PATCH 10/16] mesa: Make the uncompressed sw mipmap gen path do a Map per 1D array slice.

2011-09-29 Thread Eric Anholt
This also fixes what was probably a bug in 1D arrays with border. --- src/mesa/main/mipmap.c | 61 +-- 1 files changed, 17 insertions(+), 44 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 4c8ab23..9b167f0 100644 --- a/

[Mesa-dev] [PATCH 01/16] mesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.

2011-09-29 Thread Eric Anholt
From: Brian Paul Now that we can zero-copy generate the mipmaps into brand new glTexImage()-generated storage using MapTextureImage(), we no longer need to allocate image->Data in mipmap generate. This requires deleting the drivers' old overrides of the miptree tracking after calling _mesa_gener

[Mesa-dev] [PATCH 02/16] intel: Add an AllocTextureImageBuffer() implementation using miptrees.

2011-09-29 Thread Eric Anholt
Now we can rely on Mesa core for uploads of data without introducing an extra copy at validate time. --- src/mesa/drivers/dri/intel/intel_tex.c | 43 ++ src/mesa/drivers/dri/intel/intel_tex.h |6 +++ src/mesa/drivers/dri/intel/intel_tex_image.c |2 +-

[Mesa-dev] [PATCH 04/16] intel: Rely on Mesa core for glTexImage storage.

2011-09-29 Thread Eric Anholt
--- src/mesa/drivers/dri/intel/intel_tex_image.c | 59 -- 1 files changed, 8 insertions(+), 51 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index c0f609f..8c87a25 100644 --- a/src/mesa/drivers/dri/

[Mesa-dev] GL_EXT_texture_array: mesa cleanups, and intel implementation

2011-09-29 Thread Eric Anholt
This patch series implements GL_EXT_texture_array for Intel, and partially cleans up Mesa core support for it in the process. It passes piglit here, plus some internal tests (except for the one that's broken and ignores the minimum maximum layers). The first patch you've seen before. I'm just no

[Mesa-dev] [PATCH 03/16] intel: Allocate s8z24 separate renderbuffers from AllocTextureImageBuffer().

2011-09-29 Thread Eric Anholt
Before, we were only allocating these from our TexImage, so if the texture image was set up in any other way (non-accelerated glGenerateMipmaps()), they'd be missing or wrong. --- src/mesa/drivers/dri/intel/intel_tex.c |5 + src/mesa/drivers/dri/intel/intel_tex.h |3 +++ sr

[Mesa-dev] [PATCH] ARB_color_buffer_float/api-get: New test for glGetIntegerv() support.

2011-09-29 Thread Eric Anholt
--- tests/all.tests|2 +- .../spec/arb_color_buffer_float/CMakeLists.gl.txt |1 + tests/spec/arb_color_buffer_float/api-get.c| 90 3 files changed, 92 insertions(+), 1 deletions(-) create mode 100644 tests/spec/arb_color_

[Mesa-dev] [PATCH] mesa: Add missing glGetIntegerv() support for ARB_color_buffer_float tokens.

2011-09-29 Thread Eric Anholt
Fixes piglit ARB_color_buffer_float/api-get --- src/mesa/main/get.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 9c1771e..0342ff6 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -326,6 +326,7 @@ EXTRA_EX

Re: [Mesa-dev] [PATCH 06/15] mesa: Add hash_table_replace

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/mesa/program/hash_table.c | 25 + > src/mesa/program/hash_table.h | 15 +++ > 2 files changed, 40 insertions(+), 0 deletions(-) > > diff --git a/

Re: [Mesa-dev] [PATCH 03/15] mesa: Move _mesa_GetAttribLocationARB to shader_query.cpp

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: > From: Ian Romanick > > 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 NAK. Comments below. > --- > src/mesa/main/shader_que

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

2011-09-29 Thread Brian Paul
From: Brian Paul If color material mode is enabled, constant buffer entries related to the lighting coefficients will depend on glColor. So add _NEW_CURRENT_ATTRIB to the bitset returned for lighting-related constants in _mesa_program_state_flags(). This fixes a bug exercised by the new piglit

[Mesa-dev] [PATCH 3/4] mesa: simplify parameters to GetTexImage() driver hook

2011-09-29 Thread Brian Paul
From: Brian Paul The target, level and texObj can be obtained through the texImage parameter. We could make similar changes for the TexImage() hooks too. --- src/mesa/drivers/common/meta.c |7 +++ src/mesa/drivers/common/meta.h |3 +-- src/mesa/main/dd.h

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

2011-09-29 Thread Brian Paul
From: Brian Paul This hasn't been needed so far since none of the core Mesa code paths that call ctx->Driver.AllocTextureImageBuffer() are used with the state tracker. That will change in upcoming patches. Note that this function duplicates some code seen in the st_TexImage() function. That can

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

2011-09-29 Thread Brian Paul
From: Brian Paul 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 implement that. This fixes a few failures in the new piglit getteximage-formats test when getting a compr

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

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/mtypes.h |5 - src/mesa/main/shader_query.cpp |4 src/mesa/program/ir_to_mesa.cpp|9 - src/mesa/program/program.c |5 - src/mesa/stat

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

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/shader_query.cpp| 29 + src/mesa/main/shaderapi.c |8 +--- src/mesa/main/shaderapi.h |2 ++ src/mesa/program/prog_parameter.c | 22 -- src/mesa/pr

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

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/shader_query.cpp | 27 +++ src/mesa/main/shaderapi.c |2 +- src/mesa/main/shaderapi.h |2 ++ 3 files changed, 30 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/shader_query.cp

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

2011-09-29 Thread Ian Romanick
From: Ian Romanick 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 --- src/glsl/program.h |

[Mesa-dev] [PATCH 12/15] mesa: Remove unused gl_shader_program::Attributes

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/mtypes.h |1 - src/mesa/main/shader_query.cpp |9 ++--- src/mesa/main/shaderobj.c |6 -- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtype

[Mesa-dev] [PATCH 09/15] linker: Use gl_shader_program::AttributeBindings for attrib locations

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- 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 d802a0a..b4c8545 100644 --- a/src/glsl/linker.cpp ++

[Mesa-dev] [PATCH 10/15] mesa: Move _mesa_GetActiveAttribARB to shader_query.cpp

2011-09-29 Thread Ian Romanick
From: Ian Romanick 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 --- src/mesa/main/shader_query.cpp | 33 +++ src/mesa/m

[Mesa-dev] [PATCH 02/15] mesa: Remove unused field gl_program::Varying

2011-09-29 Thread Ian Romanick
From: Ian Romanick Lots of things set and copy this field around, but nothing uses it. Signed-off-by: Ian Romanick --- src/mesa/main/mtypes.h |2 -- src/mesa/program/ir_to_mesa.cpp|2 -- src/mesa/program/program.c |5 - src/mesa/s

[Mesa-dev] [PATCH 08/15] mesa: Add gl_shader_program::AttributeBindings

2011-09-29 Thread Ian Romanick
From: Ian Romanick This currently mirrors the state tracking gl_shader_program::Attributes, but I'm working towards eliminating that. Signed-off-by: Ian Romanick --- src/mesa/main/mtypes.h | 11 ++- src/mesa/main/shader_query.cpp |7 +++ src/mesa/main/shaderobj.c

[Mesa-dev] [PATCH 06/15] mesa: Add hash_table_replace

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/program/hash_table.c | 25 + src/mesa/program/hash_table.h | 15 +++ 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/src/mesa/program/hash_table.c b/src/mesa/program/hash_table.c

[Mesa-dev] [PATCH 07/15] mesa: Move _mesa_BindAttribLocationARB to shader_query.cpp

2011-09-29 Thread Ian Romanick
From: Ian Romanick 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 --- src/mesa/main/shader_query.cpp | 44 + sr

[Mesa-dev] [PATCH 05/15] mesa: Refactor hash_table_{find, remove} to share some code

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/program/hash_table.c | 32 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/mesa/program/hash_table.c b/src/mesa/program/hash_table.c index 877a9e2..2b09462 100644 --- a/src/mesa/p

[Mesa-dev] [PATCH 04/15] mesa: Document an odd side-effect of hash_table_insert

2011-09-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/program/hash_table.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h index e715bb1..746939c 100644 --- a/src/mesa/program/hash_table.h +++ b/src

[Mesa-dev] [PATCH 03/15] mesa: Move _mesa_GetAttribLocationARB to shader_query.cpp

2011-09-29 Thread Ian Romanick
From: Ian Romanick 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 --- src/mesa/main/shader_query.cpp | 78 src/mesa/main/shaderapi.c

[Mesa-dev] [PATCH 01/15] mesa: Use Add linker_error instead of fail_link

2011-09-29 Thread Ian Romanick
From: Ian Romanick See also 8aadd89. Signed-off-by: Ian Romanick --- src/mesa/program/sampler.cpp | 17 +++-- 1 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp index e8d34c6..3b459d5 100644 --- a/src/mesa/p

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

2011-09-29 Thread Ian Romanick
This series is the first block of cleans and refactors from my idr-work branch (note: the tail of that branch is kind of a mess right now). This is working towards a fairly significant refactor of the way shaders (GLSL and assembly) are tracked and handled in Mesa. The end goal is to remove as mu

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

2011-09-29 Thread Jeremy Huddleston
On Sep 28, 2011, at 23:28, Miles Bader wrote: > 2011/9/29 Alan Coopersmith : >>> _Why_ is the GPLv3 "not acceptable", when the GPLv2 was? >> >> Note his employer, which is well known as not accepting the GPLv3, >> possibly due to it being a mobile phone manufacturer, and the GPLv3's >> free pate

Re: [Mesa-dev] [RFC][PATCH] vbo: do not restore all the arrayobj stuff if the bufobj is deleted

2011-09-29 Thread Brian Paul
On 09/29/2011 03:43 AM, Yuanhan Liu wrote: I hope I can find something from OpenGL spec to support this. Badly, I didn't make it with a simply searching. Basically, it's an issue that should we restore all the arrayobj stuff if the bufobj is deleted? Say, in a following case: glGenBuffersA

Re: [Mesa-dev] [PATCH] gallium: Set renderbuffer's InternalFormat when rendering to texture

2011-09-29 Thread Brian Paul
On 09/29/2011 07:51 AM, Simon Farnsworth wrote: When an FBO is rendering to a texture (rather than a renderbuffer), Gallium sets up an internal renderbuffer to handle the rendering, and copies over enough texture state to make this work. InternalFormat was missed out, causing glTexCopyImage to t

Re: [Mesa-dev] [PATCH 1/3] gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS

2011-09-29 Thread Marek Olšák
On Thu, Sep 29, 2011 at 4:37 PM, Brian Paul wrote: > On 09/28/2011 05:39 PM, Marek Olšák wrote: >> >> This removes: >> - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS >> - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS >> in favor of the that new per-shader cap. >> --- >>  src/gallium/auxiliary/tgsi/tgsi_exec.h            

[Mesa-dev] [PATCH] gallium: Set renderbuffer's InternalFormat when rendering to texture

2011-09-29 Thread Simon Farnsworth
When an FBO is rendering to a texture (rather than a renderbuffer), Gallium sets up an internal renderbuffer to handle the rendering, and copies over enough texture state to make this work. InternalFormat was missed out, causing glTexCopyImage to take a slow path unnecessarily. Fixes https://bugs

Re: [Mesa-dev] [PATCH 1/3] gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS

2011-09-29 Thread Brian Paul
On 09/28/2011 05:39 PM, Marek Olšák wrote: This removes: - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS in favor of the that new per-shader cap. --- src/gallium/auxiliary/tgsi/tgsi_exec.h |2 + src/gallium/drivers/cell/ppu/cell_screen.c |9 ++

Re: [Mesa-dev] Removal of winsys/r600 and other cleanups

2011-09-29 Thread Alex Deucher
On Wed, Sep 28, 2011 at 8:47 PM, Marek Olšák wrote: > Hi everyone, > > I plan on moving all files from winsys/r600 into drivers/r600. The > r600 winsys sits between drivers/r600 and winsys/radeon and has had no > longer access to the DRM file descriptor, so it's pretty much a > non-winsys. > > Wha

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

2011-09-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 --- Comment #10 from Marek Olšák 2011-09-29 06:47:20 PDT --- Thanks. Please send the patch to mesa-dev@lists.freedesktop.org -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because:

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

2011-09-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 --- Comment #9 from Simon Farnsworth 2011-09-29 03:16:20 PDT --- Created an attachment (id=51747) View: https://bugs.freedesktop.org/attachment.cgi?id=51747 Review: https://bugs.freedesktop.org/review?bug=41263&attachment=51747 git patch that

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

2011-09-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 --- Comment #8 from Simon Farnsworth 2011-09-29 03:10:04 PDT --- That indeed appeared to be the problem. Patch will be attached shortly. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this

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

2011-09-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 --- Comment #7 from Simon Farnsworth 2011-09-29 03:07:17 PDT --- I'm now looking at st_render_texture in st_cb_fbo.c:336. I don't see how InternalFormat is set in that function - I could of course be simply missing a function it's calling that s

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

2011-09-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 --- Comment #6 from Simon Farnsworth 2011-09-29 02:44:17 PDT --- I enabled DEBUG_FALLBACK, and got the following extra information: 2011-09-29T10:42:53+01:00 layout[6969] info: compatible_src_dst_formats failed for src GL_FALSE, dst GL_RGB I

[Mesa-dev] [RFC][PATCH] vbo: do not restore all the arrayobj stuff if the bufobj is deleted

2011-09-29 Thread Yuanhan Liu
I hope I can find something from OpenGL spec to support this. Badly, I didn't make it with a simply searching. Basically, it's an issue that should we restore all the arrayobj stuff if the bufobj is deleted? Say, in a following case: glGenBuffersARB(2, bufname); glBindBufferARB(GL_ARRAY_

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

2011-09-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41263 --- Comment #5 from Simon Farnsworth 2011-09-29 02:21:41 PDT --- I've now updated mesa to git revision e112287474e225969fb10e6bc744d9c48a853fc6 I added the following to that file, to clue me in when software fallbacks happen (with apologies for