[Mesa-dev] [PATCH] mesa: handle errors in _mesa_unpack_image instead in unpack_image

2011-09-14 Thread Yuanhan Liu
Handle errors in _mesa_unpack_image instead in unpack_image. This would make the error message more detailed and specified. This patch does: 1. trigger a GL_INVALID_VALUE if (width < 0 || height < 0 || depth < 0) 2. do not trigger an error if (width == 0 || height == 0 || depth == 0) the o

[Mesa-dev] [PATCH] gallivm: fix build with LLVM 3.0svn

2011-09-14 Thread Tobias Droste
LLVM 3.0svn added SubtargetInfo as additional parameter to createMCDisassembler() and createMCInstPrinter(). See revision 139237 of LLVM. Signed-off-by: Tobias Droste --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --

[Mesa-dev] [PATCH] nouveau: Fix typos of ParseSourceList in SConscript files.

2011-09-14 Thread Vinson Lee
--- src/gallium/drivers/nouveau/SConscript |2 +- src/gallium/drivers/nv50/SConscript|2 +- src/gallium/drivers/nvc0/SConscript|2 +- src/gallium/drivers/nvfx/SConscript|2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/SCo

Re: [Mesa-dev] [PATCH 1/5] mesa: Update clipping code to use ctx->Const.MaxClipPlanes.

2011-09-14 Thread Brian Paul
On 09/14/2011 01:49 PM, Paul Berry wrote: To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8. To avoid breaking drivers that do not yet support 8 clip planes, this patch modifies the Mesa core code that pertains to clipping to use ctx->Const.MaxClipPlanes rather than MAX_CLIP_PLA

Re: [Mesa-dev] [PATCH v2 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-14 Thread Marek Olšák
On Wed, Sep 14, 2011 at 8:44 PM, Bryan Cain wrote: > I don't see any reason why this patch would make a difference, but since > it apparently does, I'll take a look at it and fix it.  What program is > that? Nevermind. I guess it's a bug in r600g, because softpipe and nouveau pass. The registers

Re: [Mesa-dev] [PATCH 3/5] Make sure that Gallium code always uses its own MAX_CLIPPED_VERTICES.

2011-09-14 Thread Brian Paul
On 09/14/2011 01:49 PM, Paul Berry wrote: To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8, and as a side effect this will increase the value of MAX_CLIPPED_VERTICES defined in src/mesa/main/config.h. Gallium has its own value of MAX_CLIPPED_VERTICES, defined in draw_pipe_clip

[Mesa-dev] [PATCH 5/5] Increase MAX_CLIP_PLANES to 8

2011-09-14 Thread Paul Berry
This will allow drivers to increase ctx->Const.MaxClipPlanes to 8, which is required for GLSL-1.30 compliance. No driver behavior should be affected. However, many data structures use MAX_CLIP_PLANES as an array size, so these arrays will get slightly larger. --- src/mesa/main/config.h |2 +-

[Mesa-dev] [PATCH 4/5] Hardcode the default value of ctx->Const.MaxClipPlanes to 6.

2011-09-14 Thread Paul Berry
Previously this value was set to MAX_CLIP_PLANES, which is defined to be 6. But MAX_CLIP_PLANES needs to be increased to 8 to support GLSL-1.30-compliant drivers. This patch hard-codes the default value of ctx->Const.MaxClipPlanes to 6, so that when MAX_CLIP_PLANES is increased, it won't affect d

[Mesa-dev] [PATCH 3/5] Make sure that Gallium code always uses its own MAX_CLIPPED_VERTICES.

2011-09-14 Thread Paul Berry
To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8, and as a side effect this will increase the value of MAX_CLIPPED_VERTICES defined in src/mesa/main/config.h. Gallium has its own value of MAX_CLIPPED_VERTICES, defined in draw_pipe_clip.c, but this value only takes effect if MAX_

[Mesa-dev] [PATCH 2/5] i965: Remove bogus assertion on MAX_CLIP_PLANES.

2011-09-14 Thread Paul Berry
This patch removes the assertion "MAX_CLIP_PLANES == 6" from the i965 driver. This assertion is unnecessary; nothing in the driver requires MAX_CLIP_PLANES to be 6. --- src/mesa/drivers/dri/i965/brw_curbe.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/

[Mesa-dev] [PATCH 1/5] mesa: Update clipping code to use ctx->Const.MaxClipPlanes.

2011-09-14 Thread Paul Berry
To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8. To avoid breaking drivers that do not yet support 8 clip planes, this patch modifies the Mesa core code that pertains to clipping to use ctx->Const.MaxClipPlanes rather than MAX_CLIP_PLANES, since ctx->Const.MaxClipPlanes will rem

Re: [Mesa-dev] EXT_gpu_shader4 glsl

2011-09-14 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/14/2011 12:18 PM, Dave Airlie wrote: >>> Hi guys, >>> >>> So I've been noticing there are a number of inconsistencies >>> between EXT_gpu_shader4 and GLSL1.30, are you planning on >>> implementing EXT_gpu_shader4? >>> >>> EXT_gpu_shader4 appe

Re: [Mesa-dev] [PATCH v2 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-14 Thread Bryan Cain
I don't see any reason why this patch would make a difference, but since it apparently does, I'll take a look at it and fix it. What program is that? Bryan On 09/14/2011 07:01 AM, Marek Olšák wrote: > Bryan, > > This commit causes hardlocks on r600g (integers disabled). > > Maybe you can see bet

[Mesa-dev] [Bug 40437] libGL should give some indication when DRI2 fails

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=40437 Michel Dänzer changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

Re: [Mesa-dev] [PATCH] st/mesa: Finalize texture on render-to-texture.

2011-09-14 Thread Brian Paul
On 09/14/2011 11:16 AM, Michel Dänzer wrote: From: Michel Dänzer This makes sure that stObj->pt exists and is up to date. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39193 . Signed-off-by: Michel Dänzer --- src/mesa/state_tracker/st_cb_fbo.c |9 ++--- 1 files changed, 6 inser

Re: [Mesa-dev] EXT_gpu_shader4 glsl

2011-09-14 Thread Dave Airlie
>> Hi guys, >> >> So I've been noticing there are a number of inconsistencies >> between EXT_gpu_shader4 and GLSL1.30, are you planning on >> implementing EXT_gpu_shader4? >> >> EXT_gpu_shader4 appears to define "unsigned" and can also use >> texture2D to sample from integer samplers. > > There are

[Mesa-dev] [PATCH] st/mesa: Finalize texture on render-to-texture.

2011-09-14 Thread Michel Dänzer
From: Michel Dänzer This makes sure that stObj->pt exists and is up to date. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39193 . Signed-off-by: Michel Dänzer --- src/mesa/state_tracker/st_cb_fbo.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa

[Mesa-dev] [Bug 40860] [bisected] piglit "spec/OES_compressed_paletted_texture/invalid formats" fails

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=40860 Ian Romanick changed: What|Removed |Added Severity|major |normal Priority|high

Re: [Mesa-dev] EXT_gpu_shader4 glsl

2011-09-14 Thread Kenneth Graunke
On 09/14/2011 06:16 AM, Dave Airlie wrote: Hi guys, So I've been noticing there are a number of inconsistencies between EXT_gpu_shader4 and GLSL1.30, are you planning on implementing EXT_gpu_shader4? I'm not super interested in it, though it seems like a nice thing to have once GL3 and GLSL 1

Re: [Mesa-dev] [PATCH] glsl: Remove field array_lvalue from ir_variable.

2011-09-14 Thread Kenneth Graunke
On 09/12/2011 06:20 PM, Paul Berry wrote: The array_lvalue field was attempting to enforce the restriction that whole arrays can't be used on the left-hand side of an assignment in GLSL 1.10 or GLSL ES, and can't be used as out or inout parameters in GLSL 1.10. However, it was buggy (it didn't w

Re: [Mesa-dev] [PATCH 1/2] util: add util_format_is_luminance/intensity/rgb(), etc

2011-09-14 Thread Jose Fonseca
- Original Message - > >> +util_format_is_rgb(enum pipe_format format) > >> +{ > >> + const struct util_format_description *desc = > >> + util_format_description(format); > > > > For callers that call these helpers a lot, all these internal calls > > to util_format_description() wi

Re: [Mesa-dev] [PATCH] mesa: introduce a clear color union to be used for int/unsigned buffers

2011-09-14 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/13/2011 08:47 AM, Brian Paul wrote: > On 09/13/2011 04:54 AM, Dave Airlie wrote: >> From: Dave Airlie >> >> This introduces a new gl_clear_color union and moves the current >> ClearColorUnclamped to use it, it removes ClearColor completely >> a

Re: [Mesa-dev] [PATCH] [RFC] uniforms: accept all int/unsigned int sampler types in uniform checks.

2011-09-14 Thread Kenneth Graunke
On 09/14/2011 06:09 AM, Dave Airlie wrote: From: Dave Airlie I'm not 100% sure about this, it may need a version check or it might be completely wrong. Signed-off-by: Dave Airlie --- src/mesa/main/uniforms.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --g

Re: [Mesa-dev] EXT_gpu_shader4 glsl

2011-09-14 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/14/2011 06:16 AM, Dave Airlie wrote: > Hi guys, > > So I've been noticing there are a number of inconsistencies > between EXT_gpu_shader4 and GLSL1.30, are you planning on > implementing EXT_gpu_shader4? > > EXT_gpu_shader4 appears to define "u

Re: [Mesa-dev] [PATCH 1/2] util: add util_format_is_luminance/intensity/rgb(), etc

2011-09-14 Thread Brian Paul
Thanks for taking a look at this, Jose. Comments/questions below... On 09/14/2011 09:19 AM, Jose Fonseca wrote: Hi Brian, - Original Message - From: Brian Paul --- src/gallium/auxiliary/util/u_format.c | 77 + src/gallium/auxiliary/util/u_format

Re: [Mesa-dev] Cleaning up Python scripts

2011-09-14 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/14/2011 11:02 AM, Jose Fonseca wrote: > - Original Message - >> What are people's opinions on this? Is it worth spending some >> time to clean up some of this code? > > It's hard to say... > > A lot of this code is disjoint anyway, so i

[Mesa-dev] [Bug 30124] Mesa 7.9 release tracker

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30124 Bug 30124 depends on bug 29626, which changed state. Bug 29626 Summary: [swrast] glean glsl1 texture2D() regression https://bugs.freedesktop.org/show_bug.cgi?id=29626 What|Old Value |New Value ---

Re: [Mesa-dev] Cleaning up Python scripts

2011-09-14 Thread Jose Fonseca
- Original Message - > Hi, > > I've talked about it a bit before, but I feel that it's getting out > of > hand, so it's time to talk about cleaning up some of the Python > that's > used to generate/build Mesa. > > First, the biggest problem is that our Python's completely untested > and

[Mesa-dev] [Bug 30124] Mesa 7.9 release tracker

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30124 Kenneth Graunke changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

Re: [Mesa-dev] Cleaning up Python scripts

2011-09-14 Thread Paul Berry
On 14 September 2011 08:26, Corbin Simpson wrote: > Hi, > > I've talked about it a bit before, but I feel that it's getting out of > hand, so it's time to talk about cleaning up some of the Python that's > used to generate/build Mesa. > > First, the biggest problem is that our Python's completely

[Mesa-dev] Cleaning up Python scripts

2011-09-14 Thread Corbin Simpson
Hi, I've talked about it a bit before, but I feel that it's getting out of hand, so it's time to talk about cleaning up some of the Python that's used to generate/build Mesa. First, the biggest problem is that our Python's completely untested and unstructured. It's very ad-hoc. This might be alri

Re: [Mesa-dev] [PATCH 1/2] util: add util_format_is_luminance/intensity/rgb(), etc

2011-09-14 Thread Jose Fonseca
Hi Brian, - Original Message - > From: Brian Paul > > --- > src/gallium/auxiliary/util/u_format.c | 77 > + > src/gallium/auxiliary/util/u_format.h | 16 +++ > 2 files changed, 93 insertions(+), 0 deletions(-) > > diff --git a/src/gallium/auxili

[Mesa-dev] [PATCH 2/2] softpipe: fix blending for luminance/intensity surfaces

2011-09-14 Thread Brian Paul
From: Brian Paul If we're drawing to a luminance, luminance/alpha or intensity surface we have to adjust (rebase) the fragment/quad colors before writing them to the tile cache. The tile cache always stores RGBA colors but if we're caching a L/A surface (for example) we need to be sure that R=G=

[Mesa-dev] [PATCH 1/2] util: add util_format_is_luminance/intensity/rgb(), etc

2011-09-14 Thread Brian Paul
From: Brian Paul --- src/gallium/auxiliary/util/u_format.c | 77 + src/gallium/auxiliary/util/u_format.h | 16 +++ 2 files changed, 93 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.

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

2011-09-14 Thread Christian König
Am Montag, den 12.09.2011, 23:39 +0200 schrieb Emeric Grange: > Hi, > Here is a series of small patches to the g3dvl video decoding stack. > Most of these are extracted from my GSoC 2011 work and are not related > to VP8 decoding (http://cgit.freedesktop.org/~emericg/mesa-vp8/). > > The third an

Re: [Mesa-dev] [PATCH 1/7] mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_is_compressed_format

2011-09-14 Thread Brian Paul
On 09/13/2011 04:40 PM, Ian Romanick wrote: From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/image.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 3e75e7c..da8eaff 100644 --- a/src/mesa

[Mesa-dev] [Bug 29133] Mesa 7.8.1 implementation error: bad format in do_row()

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=29133 Brian Paul changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Mesa-dev] [Bug 29832] regarding the execution of Mesa demo programs.. plz help me....

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=29832 Corbin Simpson changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Mesa-dev] [Bug 29133] Mesa 7.8.1 implementation error: bad format in do_row()

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=29133 Corbin Simpson changed: What|Removed |Added Version|unspecified |7.8 Component|Drivers/DRI/nouv

Re: [Mesa-dev] [PATCH v2 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-14 Thread Marek Olšák
Bryan, This commit causes hardlocks on r600g (integers disabled). Maybe you can see better than me what's wrong. This is a side-by-side diff of the failing TGSI shader. The right-hand one is from Mesa master. The left-hand one is with the commit reverted. http://pastebin.com/raw.php?i=QXB3SZAE

[Mesa-dev] [Bug 28657] Mesa 7.8.2 fails to compile

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28657 Corbin Simpson changed: What|Removed |Added Version|unspecified |7.8 Status|NEW

[Mesa-dev] [PATCH] [RFC] uniforms: accept all int/unsigned int sampler types in uniform checks.

2011-09-14 Thread Dave Airlie
From: Dave Airlie I'm not 100% sure about this, it may need a version check or it might be completely wrong. Signed-off-by: Dave Airlie --- src/mesa/main/uniforms.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main

[Mesa-dev] EXT_gpu_shader4 glsl

2011-09-14 Thread Dave Airlie
Hi guys, So I've been noticing there are a number of inconsistencies between EXT_gpu_shader4 and GLSL1.30, are you planning on implementing EXT_gpu_shader4? EXT_gpu_shader4 appears to define "unsigned" and can also use texture2D to sample from integer samplers. My main worry is we end up needing

[Mesa-dev] [Bug 19303] Mesa 6.2.1 implementation error: Trying to enable unknown extension: GL_ATI_fragment_shader

2011-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=19303 Corbin Simpson changed: What|Removed |Added Version|unspecified |6.2.1 Component|Other

Re: [Mesa-dev] [PATCH] mesa: introduce a clear color union to be used for int/unsigned buffers

2011-09-14 Thread Dave Airlie
> Looks pretty good, Dave. > > Reviewed-by: Brian Paul > > I'd be OK with committing as-is, but I'd suggest a few minor things: Pushed with edits: comments below: > > 1. Do we really need to call the field ClearColorUnclamped?  I think we > could keep it as ClearColor and just add a comment that

Re: [Mesa-dev] gallium scaled types

2011-09-14 Thread Christoph Bumiller
On 14.09.2011 11:30, Jose Fonseca wrote: > - Original Message - >> On 14.09.2011 09:36, Jose Fonseca wrote: >>> Original Message - > On the contrary, I think that putting norm and scaled/int in the > same sack is talking apples and oranges... Normalization, like > fix

[Mesa-dev] [PATCH] i965: make sure _NEW_POLYGONSTIPPLE state is set

2011-09-14 Thread Yuanhan Liu
Make sure _NEW_POLYGONSTIPPLE state is set. A simple call case like the following: glEnable(GL_POLYGON_STIPPLE); glPolygonStipple(pattern); glClear(GL_COLOR_BUFFER_BIT); /* <---!!---> */ glRectf(...); glFlush(); would simply make the polygon stipple fail. The glClear would fire a draw

Re: [Mesa-dev] gallium scaled types

2011-09-14 Thread Jose Fonseca
- Original Message - > On 14.09.2011 09:36, Jose Fonseca wrote: > > Original Message - > >>> On the contrary, I think that putting norm and scaled/int in the > >>> same sack is talking apples and oranges... Normalization, like > >>> fixed-point integers, affects the interpretatio

Re: [Mesa-dev] gallium scaled types

2011-09-14 Thread Christoph Bumiller
On 14.09.2011 09:36, Jose Fonseca wrote: > Original Message - >>> On the contrary, I think that putting norm and scaled/int in the >>> same sack is talking apples and oranges... Normalization, like >>> fixed-point integers, affects the interpretation of the 32bit >>> integer in memory, n

Re: [Mesa-dev] gallium scaled types

2011-09-14 Thread Jose Fonseca
Original Message - > > > > On the contrary, I think that putting norm and scaled/int in the > > same sack is talking apples and oranges...   Normalization, like > > fixed-point integers, affects the interpretation of the 32bit > > integer in memory, namely the scale factor that it should b