[Mesa-dev] [PATCH] mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.

2012-06-09 Thread Kenneth Graunke
Fixes oglconform's tbo/basic.buffer.delete test. Signed-off-by: Kenneth Graunke --- src/mesa/main/bufferobj.c |4 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 846260d..332af3d 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/m

[Mesa-dev] [PATCH] r600g: cache shader variants instead of rebuilding v2

2012-06-09 Thread Vadim Girlin
Shader variants are stored in the list, the key for lookup is based on the states that require different hw shaders - currently it's rctx->two_side (all gpus) and rctx->nr_cbufs (evergreen/cayman, when writes_all property is set). v2: - use simple list instead of keymap as suggested by Marek on i

[Mesa-dev] [PATCH] mesa: Make glPrimitiveRestartIndex execute immediately in display lists.

2012-06-09 Thread Kenneth Graunke
>From the GL_NV_primitive_restart spec: "PrimitiveRestartIndexNV is not compiled into display lists, but is executed immediately." Prior to this patch, calls to glPrimitiveRestartIndex would hit the noop dispatch stub. +2 oglconforms. Signed-off-by: Kenneth Graunke --- src/mesa/main/dlist.c |

[Mesa-dev] [PATCH] i915g: Fix depth/stencil glClear

2012-06-09 Thread Michael Karcher
This patch fixes a copy/paste error and masking of depth/stencil (stencil is in the top 8 bits), and makes glean/readPixSanity happy. Both the stencil and the depth buffer piglit test also pass if glClear(DEPTH | STENCIL) is executed instead of glClear(DEPTH)/glClear(STENCIL). --- src/gallium/dri

[Mesa-dev] [PATCH 1/3] glsl: glcpp: Rename and document _glcpp_parser_expand_if

2012-06-09 Thread Carl Worth
This function is currently used only in the expansion of #if lines, but we will soon be using it more generally (for the expansion of (_glcpp_parser_expand_and_lex_from) and some more documentation. --- > What I'd like to see is the preprocessor interpreting the #line > directives (for its own not

[Mesa-dev] [PATCH 3/3] glsl: glcpp: Extend testing of #line directives

2012-06-09 Thread Carl Worth
The most recent commit adds support for comments and macro expansion on #line directives. Add testing to verify the new features. --- src/glsl/glcpp/tests/091-hash-line.c |6 ++ src/glsl/glcpp/tests/091-hash-line.c.expected |6 ++ 2 files changed, 12 insertions(+) diff --

[Mesa-dev] [PATCH 2/3] glsl: glcpp: Move handling of #line directives from lexer to parser.

2012-06-09 Thread Carl Worth
The GLSL specification requires that #line directives be interpreted after macro expansion. Our existing implementation of #line macros in the lexer prevents conformance on this point. Moving the handling of #line from the lexer to the parser gives us the macro expansion we need. An additional ben

Re: [Mesa-dev] [PATCH] glcpp: Pass through #line directives.

2012-06-09 Thread Carl Worth
Kenneth Graunke writes: > One bad thing about this patch is that it breaks 091-hash-line.c in glcpp's > unit test suite. I'm not sure what to do about that. I could update the > output, but the new output doesn't make much sense anymore...it gives you > lovely messages like: > > 0:4(1): prep

Re: [Mesa-dev] [PATCH] glsl: Consistently use length-based ralloc string functions for info_log.

2012-06-09 Thread Kenneth Graunke
On 06/09/2012 09:54 AM, Carl Worth wrote: > Commit b823b99ec0f13af257dcd885f436a4d294c6222a switched from using > functions such as ralloc_asprintf and ralloc_strcat to > ralloc_asprintf_rewrite_tail. This change maintains the string's > length as a aparamter that is updated by the ralloc functions

[Mesa-dev] [PATCH] glsl: Consistently use length-based ralloc string functions for info_log.

2012-06-09 Thread Carl Worth
Commit b823b99ec0f13af257dcd885f436a4d294c6222a switched from using functions such as ralloc_asprintf and ralloc_strcat to ralloc_asprintf_rewrite_tail. This change maintains the string's length as a aparamter that is updated by the ralloc functions (rather than recomputing it with strlen over and

Re: [Mesa-dev] [PATCH] mesa: Check for a negative "size" parameter in glCopyBufferSubData().

2012-06-09 Thread Brian Paul
On Fri, Jun 8, 2012 at 11:18 PM, Kenneth Graunke wrote: > From the GL_ARB_copy_buffer spec: > "An INVALID_VALUE error is generated if any of readoffset, writeoffset, >  or size are negative [...]" > > Fixes oglconform's copybuffer/negative.CNNegativeValues test. > > Signed-off-by: Kenneth Graunke

[Mesa-dev] [PATCH] [RFC] r600g: cache shader variants instead of rebuilding

2012-06-09 Thread Vadim Girlin
Shader variants are stored in the keymap, the key is based on the states that require different hw shaders - currently it's rctx->two_side (all gpus) and rctx->nr_cbufs (evergreen/cayman, when writes_all property is set). Improves performance for some apps, e.g. FlightGear - see https://bugs.freed

[Mesa-dev] [PATCH 3/3] i965: Support MESA_FORMAT_SIGNED_RGBA_16.

2012-06-09 Thread Kenneth Graunke
The hardware supports this format with no known quirks, so we may as well enable it. Alpha blending is not supported until Sandybridge, but as far as I can tell, OpenGL doesn't require alpha blending on SNORM formats. Plus, we already expose R8G8B8A8_SNORM which has a similar restriction. +10 og

[Mesa-dev] [PATCH 2/3] i965: Re-enable rendering to SNORM formats.

2012-06-09 Thread Kenneth Graunke
The previous patch fixed the cause of the Piglit failure with ARB_color_buffer_float fragment clamp modes. Now that it's fixed, there's no reason to leave it disabled. Cc: Eric Anholt Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |7 +-- 1 file cha

[Mesa-dev] [PATCH 1/3] meta: Don't alter fragment color clamp in DrawPixels().

2012-06-09 Thread Kenneth Graunke
DrawPixels uses the MESA_META_CLAMP_FRAGMENT_COLOR flag to save/restore the fragment color clamp mode. This is unnecessary since it never alters it. It's also harmful: when the clamp mode is GL_FIXED_ONLY, setting this flag causes _mesa_meta_begin to force it to GL_FALSE, breaking clamping on SNO