Re: [Mesa-dev] [PATCH] mesa: Fix multithreaded buffer object refcounting.

2011-10-19 Thread Mathias Fröhlich
Hi Brian, On Tuesday, October 18, 2011 17:05:53 Brian Paul wrote: This was brought up a few weeks ago by someone else. I had posted the start of a patch to fix it. I'm attaching an updated version that I think is pretty clean. But there's a few lines missing and it's totally untested.

Re: [Mesa-dev] [PATCH 2/2] glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.

2011-10-19 Thread Bryan Cain
Looks good to me. Bryan On 10/18/2011 05:20 PM, Kenneth Graunke wrote: Setting MaxIfDepth to UINT_MAX effectively means don't lower anything. Explicitly checking for this common case allows us to avoid walking the IR, computing nesting levels, and so on. Signed-off-by: Kenneth Graunke

[Mesa-dev] [PATCH] texgetimage: add missing return on error

2011-10-19 Thread nobled
Missed this back in the arb_robustness branch 6b329b9274b18c50f4177eef7ee087d50ebc1525. --- src/mesa/main/texgetimage.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index f911886..e6edb45 100644 ---

[Mesa-dev] [PATCH 1/4] mesa/image: delete dead store

2011-10-19 Thread nobled
The return value here is a) always zero, b) never used. --- src/mesa/main/image.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 7d95dd6..ca5771c 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@

[Mesa-dev] [PATCH 2/4] mesa/image: assert on bad format

2011-10-19 Thread nobled
NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example, _mesa_validate_pbo_access() does this. This also matches the code in the non-GL_BITMAP

[Mesa-dev] [PATCH 3/4] mesa: add _mesa_image_offset()

2011-10-19 Thread nobled
--- src/mesa/main/image.c | 67 src/mesa/main/image.h |7 + 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 3e0ca05..ba66c8a 100644 --- a/src/mesa/main/image.c +++

[Mesa-dev] [PATCH 4/4] mesa, intel: use _mesa_image_offset() for PBOs

2011-10-19 Thread nobled
This avoids forming invalid pointers needlessly, which even if never dereferenced is undefined behavior. It also makes _mesa_validate_pbo_access() more comprehensible. --- src/mesa/drivers/dri/intel/intel_pixel_read.c |5 +++-- src/mesa/main/pbo.c | 25

Re: [Mesa-dev] [PATCH] texgetimage: add missing return on error

2011-10-19 Thread Brian Paul
On 10/19/2011 05:54 AM, nobled wrote: Missed this back in the arb_robustness branch 6b329b9274b18c50f4177eef7ee087d50ebc1525. --- src/mesa/main/texgetimage.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c

Re: [Mesa-dev] [PATCH 2/4] mesa/image: assert on bad format

2011-10-19 Thread Brian Paul
On 10/19/2011 06:02 AM, nobled wrote: NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example, _mesa_validate_pbo_access() does this. This also

Re: [Mesa-dev] [PATCH 3/4] mesa: add _mesa_image_offset()

2011-10-19 Thread Brian Paul
On 10/19/2011 06:03 AM, nobled wrote: --- src/mesa/main/image.c | 67 src/mesa/main/image.h |7 + 2 files changed, 57 insertions(+), 17 deletions(-) Reviewed-by: Brian Paul bri...@vmware.com

Re: [Mesa-dev] [PATCH 4/4] mesa, intel: use _mesa_image_offset() for PBOs

2011-10-19 Thread Brian Paul
On 10/19/2011 06:03 AM, nobled wrote: This avoids forming invalid pointers needlessly, which even if never dereferenced is undefined behavior. It also makes _mesa_validate_pbo_access() more comprehensible. Reviewed-by: Brian Paul bri...@vmware.com BTW, be sure to test these changes with the

[Mesa-dev] [Bug 41999] New: GL_OES_mapbuffer is advertised but calling glMapBufferOES throws a warning

2011-10-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41999 Bug #: 41999 Summary: GL_OES_mapbuffer is advertised but calling glMapBufferOES throws a warning Classification: Unclassified Product: Mesa Version: git Platform:

[Mesa-dev] remove unused but set variables

2011-10-19 Thread Fabio Pedretti
from osmesa, radeon and r600 classic drivers.diff --git a/src/mesa/drivers/dri/r600/evergreen_fragprog.c b/src/mesa/drivers/dri/r600/evergreen_fragprog.c index cc584ca..10c88d7 100644 --- a/src/mesa/drivers/dri/r600/evergreen_fragprog.c +++ b/src/mesa/drivers/dri/r600/evergreen_fragprog.c @@

Re: [Mesa-dev] [PATCH] glsl-fs-normalmatrix: New test program for gl_NormalMatrix.

2011-10-19 Thread tom fogal
Not sure this needs it, but LGTM. You might want to add yourself to the Authors comment, but *shrug*. -tom On 10/18/2011 06:33 PM, Eric Anholt wrote: From: tom fogaltfo...@sci.utah.edu v2: lots of hacking by anholt to make it look more like a normal piglit test and make all results

Re: [Mesa-dev] r600g shader optimization

2011-10-19 Thread Vadim Girlin
On Wed, 2011-10-19 at 10:49 -0400, Tom Stellard wrote: On Fri, 2011-10-07 at 10:14 -0400, Vadim Girlin wrote: Hi, Recently I've been working on the shader optimization for r600g, and now I have the initial working implementation of simple alu scheduler and register allocator. It has no

Re: [Mesa-dev] [PATCH 1/3] i965: Fix incorrect dirty bit in gen6_prepare_wm_push_constants.

2011-10-19 Thread Eric Anholt
On Tue, 18 Oct 2011 17:05:28 -0700, Kenneth Graunke kenn...@whitecape.org wrote: We definitely want CACHE_NEW_WM_PROG, not CACHE_NEW_VS_PROG. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke kenn...@whitecape.org This series is Reviewed-by: Eric Anholt

[Mesa-dev] [PATCH] mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.

2011-10-19 Thread Eric Anholt
When there is no ARB_vertex_program program enabled, the Current pointer points at a default program, so we were always using VERTEX_PROGRAM_TWO_SIDE, even for fixed function lighting. Fixes piglit two-sided-lighting* --- src/mesa/main/state.c |2 +- 1 files changed, 1 insertions(+), 1

[Mesa-dev] [Bug 34401] glXGetScreenDriver doesn't report the same driver name as used in ~/.drirc

2011-10-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34401 Michal Suchanek hramr...@gmail.com changed: What|Removed |Added CC||hramr...@gmail.com

Re: [Mesa-dev] [PATCH] mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.

2011-10-19 Thread Brian Paul
On 10/19/2011 10:49 AM, Eric Anholt wrote: When there is no ARB_vertex_program program enabled, the Current pointer points at a default program, so we were always using VERTEX_PROGRAM_TWO_SIDE, even for fixed function lighting. Fixes piglit two-sided-lighting* --- src/mesa/main/state.c |2

Re: [Mesa-dev] [PATCH 4/5] intel: Add function intel_renderbuffer_hiz_alloc

2011-10-19 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/2011 03:51 PM, Eric Anholt wrote: On Mon, 17 Oct 2011 07:40:27 -0700, Chad Versace c...@chad-versace.us wrote: This function allocates the HiZ region and initializes the HiZ control state for a depthbuffer. It is wise to define the logic

Re: [Mesa-dev] [PATCH 5/5] intel: Remove intel_renderbuffer::hiz_region

2011-10-19 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/2011 03:57 PM, Eric Anholt wrote: On Mon, 17 Oct 2011 07:40:28 -0700, Chad Versace c...@chad-versace.us wrote: Replace it with intel_renderbuffer::region::hiz::region. Signed-off-by: Chad Versace c...@chad-versace.us ---

Re: [Mesa-dev] [PATCH] glsl: Fix gl_NormalMatrix swizzle setup to match i965's invariants.

2011-10-19 Thread Paul Berry
On 18 October 2011 17:33, Eric Anholt e...@anholt.net wrote: A driver trying to set up builtin uniforms is faced with a problem: How do I walk the ir_variable structure (representing an array of structs, or array of matrices, or struct, or whatever), and set up driver structures so that

Re: [Mesa-dev] [PATCH 1/2] i965: silence signed/unsigned comparison warning

2011-10-19 Thread Paul Berry
On 18 October 2011 18:07, Brian Paul brian.e.p...@gmail.com wrote: From: Brian Paul bri...@vmware.com --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

Re: [Mesa-dev] [PATCH 2/2] i965: use a cast to silence a signed/unsigned comparison warning

2011-10-19 Thread Paul Berry
On 18 October 2011 18:07, Brian Paul brian.e.p...@gmail.com wrote: From: Brian Paul bri...@vmware.com --- .../drivers/dri/i965/brw_vec4_reg_allocate.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp

Re: [Mesa-dev] [PATCH 2/2] i965: use a cast to silence a signed/unsigned comparison warning

2011-10-19 Thread Brian Paul
On 10/19/2011 01:53 PM, Paul Berry wrote: On 18 October 2011 18:07, Brian Paul brian.e.p...@gmail.com mailto:brian.e.p...@gmail.com wrote: From: Brian Paul bri...@vmware.com mailto:bri...@vmware.com --- .../drivers/dri/i965/brw_vec4_reg_allocate.cpp |2 +- 1 files

Re: [Mesa-dev] [PATCH] glsl-fs-normalmatrix: New test program for gl_NormalMatrix.

2011-10-19 Thread Paul Berry
On 18 October 2011 17:33, Eric Anholt e...@anholt.net wrote: From: tom fogal tfo...@sci.utah.edu v2: lots of hacking by anholt to make it look more like a normal piglit test and make all results visible at once. --- tests/all.tests |1 +

Re: [Mesa-dev] [PATCH 2/2] i965: use a cast to silence a signed/unsigned comparison warning

2011-10-19 Thread Paul Berry
On 19 October 2011 12:58, Brian Paul bri...@vmware.com wrote: On 10/19/2011 01:53 PM, Paul Berry wrote: On 18 October 2011 18:07, Brian Paul brian.e.p...@gmail.com mailto:brian.e.p...@gmail.com** wrote: From: Brian Paul bri...@vmware.com mailto:bri...@vmware.com ---

[Mesa-dev] [PATCH] Only use gcc visibility support with gcc4+.

2011-10-19 Thread Tom Fogal
I had a colleague hitting issues compiling with an old gcc3.2 system. These patches got them through. --- include/GL/gl.h |2 +- src/mesa/main/compiler.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/GL/gl.h b/include/GL/gl.h index

[Mesa-dev] [PATCH] gallium: implement WGL_ARB_create_context

2011-10-19 Thread morgan devel
--- src/gallium/state_trackers/wgl/SConscript |1 + src/gallium/state_trackers/wgl/stw_context.c | 39 ++-- .../state_trackers/wgl/stw_getprocaddress.c|3 ++ src/gallium/state_trackers/wgl/stw_icd.h |8 4 files changed, 48

Re: [Mesa-dev] [PATCH] gallium: implement WGL_ARB_create_context

2011-10-19 Thread Jose Fonseca
- Original Message - --- src/gallium/state_trackers/wgl/SConscript |1 + src/gallium/state_trackers/wgl/stw_context.c | 39 ++-- .../state_trackers/wgl/stw_getprocaddress.c|3 ++ src/gallium/state_trackers/wgl/stw_icd.h |

Re: [Mesa-dev] [PATCH] Only use gcc visibility support with gcc4+.

2011-10-19 Thread Alan Coopersmith
On 10/19/11 13:44, Tom Fogal wrote: I had a colleague hitting issues compiling with an old gcc3.2 system. These patches got them through. --- include/GL/gl.h |2 +- src/mesa/main/compiler.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-19 Thread nobled
NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example, _mesa_validate_pbo_access() does this. This also matches the code in the non-GL_BITMAP

[Mesa-dev] [PATCH 4/4 v2] mesa, intel: use _mesa_image_offset() for PBOs

2011-10-19 Thread nobled
This avoids forming invalid pointers needlessly, which even if never dereferenced is undefined behavior. It also makes _mesa_validate_pbo_access() more comprehensible. --- v2: Now rebased on top of the recent commit 9024d8af0ae. src/mesa/drivers/dri/intel/intel_pixel_read.c |5 ++-

[Mesa-dev] [PATCH 1/4 dri] st/dri: factor out software texbuffer code

2011-10-19 Thread nobled
--- src/gallium/state_trackers/dri/sw/dri_drawable.c | 72 -- 1 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/gallium/state_trackers/dri/sw/dri_drawable.c b/src/gallium/state_trackers/dri/sw/dri_drawable.c index 05c64b6..66997fb 100644 ---

[Mesa-dev] [PATCH 2/4 dri] st/dri: add copy_drawable() callback

2011-10-19 Thread nobled
This moves drisw-specific code into drisw.c, making it possible to eliminate the extra copy of dri_drawable.c. --- .../state_trackers/dri/common/dri_context.h|4 ++ src/gallium/state_trackers/dri/drm/dri2.c | 26 +- src/gallium/state_trackers/dri/sw/dri_drawable.c

[Mesa-dev] [PATCH 3/4 dri] st/dri: sync the sw/ changes to dri_drawable.c

2011-10-19 Thread nobled
The sw copy needs to go away. It's already missing several new patches to the original. --- .../state_trackers/dri/common/dri_drawable.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c

[Mesa-dev] [PATCH 4/4 dri] Revert Duplicate state_tracker/dri/sw/dri_drawable.c

2011-10-19 Thread nobled
This reverts commit 569bde1fa7d03fb7688d0d391b32e61e857ad44e. --- src/gallium/state_trackers/dri/sw/dri_drawable.c | 274 +- 1 files changed, 1 insertions(+), 273 deletions(-) mode change 100644 = 12 src/gallium/state_trackers/dri/sw/dri_drawable.c diff --git

Re: [Mesa-dev] [PATCH 2/2] i965: use a cast to silence a signed/unsigned comparison warning

2011-10-19 Thread Brian Paul
On 10/19/2011 02:24 PM, Paul Berry wrote: On 19 October 2011 12:58, Brian Paul bri...@vmware.com mailto:bri...@vmware.com wrote: On 10/19/2011 01:53 PM, Paul Berry wrote: On 18 October 2011 18:07, Brian Paul brian.e.p...@gmail.com mailto:brian.e.p...@gmail.com

Re: [Mesa-dev] [PATCH] mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.

2011-10-19 Thread Eric Anholt
On Wed, 19 Oct 2011 11:28:42 -0600, Brian Paul bri...@vmware.com wrote: On 10/19/2011 10:49 AM, Eric Anholt wrote: When there is no ARB_vertex_program program enabled, the Current pointer points at a default program, so we were always using VERTEX_PROGRAM_TWO_SIDE, even for fixed function

Re: [Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-19 Thread Brian Paul
On Wed, Oct 19, 2011 at 6:10 PM, nobled nob...@dreamwidth.org wrote: NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example,

Re: [Mesa-dev] [PATCH 4/4 v2] mesa, intel: use _mesa_image_offset() for PBOs

2011-10-19 Thread Brian Paul
On Wed, Oct 19, 2011 at 6:13 PM, nobled nob...@dreamwidth.org wrote: This avoids forming invalid pointers needlessly, which even if never dereferenced is undefined behavior. It also makes _mesa_validate_pbo_access() more comprehensible. --- v2: Now rebased on top of the recent commit

[Mesa-dev] [PATCH] Add solaris detection for PIPE_ARCH_LITTLE_ENDIAN/PIPE_ARCH_BIG_ENDIAN

2011-10-19 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- src/gallium/include/pipe/p_config.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index b3a7b33..7cd42c6 100644 ---

Re: [Mesa-dev] [PATCH 2/2] i965: Avoid generating MOVs for most ir_assignment handling.

2011-10-19 Thread Stéphane Marchesin
On Sat, Aug 27, 2011 at 03:23, Kenneth Graunke kenn...@whitecape.org wrote: This is a port of vec4_visitor::try_rewrite_rhs_to_dst to fs_visitor. Not only is this technique less invasive and more robust, it also generates better code.  Over and above the previous technique, this reduced