Re: [Mesa-dev] [PATCH] glsl: Fix type mismatch when incrementing or decrementing uint.

2011-10-31 Thread Kenneth Graunke
On 10/31/2011 08:34 PM, Paul Berry wrote: > When converting an expression like "++x" to GLSL IR we were failing to > account for the possibility that x might be an unsigned integral type. > As a result the user would receive a bogus error message "Could not > implicitly convert operands to arithmet

Re: [Mesa-dev] [PATCH 1/3] glsl: Refactor source lists to Makefile.sources

2011-10-31 Thread Chia-I Wu
On Mon, Oct 31, 2011 at 9:52 PM, Brian Paul wrote: > > [...] > > Maybe call this file sources.mak to match src/mesa/sources.mak It is already named Makefile.sources in several other places (that was me too...). To try to justify the inconsistency, the file differs from sources.mak in that it is o

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Chia-I Wu
On Mon, Oct 31, 2011 at 10:16 PM, Jakob Bornecrantz wrote: > - Original Message - >> From: Chia-I Wu >> >> Hi, >> >> This patch series adds support for the OpenGL ES specific >> GL_OES_EGL_image_external extension[1].  It is enabled in st/mesa. >> >> The extension adds a new texture targe

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Chia-I Wu
On Mon, Oct 31, 2011 at 11:46 PM, Eric Anholt wrote: > On Mon, 31 Oct 2011 03:07:26 +0800, Chia-I Wu wrote: >> From: Chia-I Wu >> >> Hi, >> >> This patch series adds support for the OpenGL ES specific >> GL_OES_EGL_image_external extension[1].  It is enabled in st/mesa. > >> The extension is wri

[Mesa-dev] [PATCH] glsl: Fix type mismatch when incrementing or decrementing uint.

2011-10-31 Thread Paul Berry
When converting an expression like "++x" to GLSL IR we were failing to account for the possibility that x might be an unsigned integral type. As a result the user would receive a bogus error message "Could not implicitly convert operands to arithmetic operator". Fixes piglit tests {vs,fs}-{increme

[Mesa-dev] [PATCH 4/4] linker: Check that initializers for global variables match

2011-10-31 Thread Ian Romanick
From: Ian Romanick This requires tracking a couple extra fields in ir_variable: * A flag to indicate that a variable had an initializer. * For non-const variables, a field to track the constant value of the variable's initializer. For variables non-constant initalizers, ir_variable::has_i

[Mesa-dev] [PATCH 1/4] linker: Fix the indentation of a block in cross_validate_globals

2011-10-31 Thread Ian Romanick
From: Ian Romanick I suspect the indentation got messed up during a code merge. Signed-off-by: Ian Romanick --- src/glsl/linker.cpp | 57 -- 1 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.

[Mesa-dev] [PATCH 3/4] glsl: Refactor generate_ARB_draw_buffers_variables to use add_builtin_constant

2011-10-31 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/glsl/ir_variable.cpp | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/glsl/ir_variable.cpp b/src/glsl/ir_variable.cpp index 1ee84d2..bea0b2b 100644 --- a/src/glsl/ir_variable.cpp +++ b/src/glsl/ir_varia

[Mesa-dev] [PATCH 2/4] glsl: Put all bitfields in ir_variable together for better packing

2011-10-31 Thread Ian Romanick
From: Ian Romanick The diff looks weird because ir_variable::depth_layout was between the last two bitfields in the structure. Signed-off-by: Ian Romanick --- src/glsl/ir.h | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/glsl/ir.h b/src/glsl/ir.h ind

[Mesa-dev] [PATCH 2/2] i965: Add support for integral vertex attributes.

2011-10-31 Thread Paul Berry
When a vertex shader input attribute is declared with an integral type (e.g. ivec4), we need to ensure that the generated vertex shader code addresses the vertex attribute register using the proper register type. (Previously, we assumed all vertex shader input attributes were floating-point). In

[Mesa-dev] [PATCH 1/2] mesa: Set the "Integer" field of gl_client_array properly.

2011-10-31 Thread Paul Berry
This patch ensures that gl_client_array::Integer is properly set to GL_TRUE for vertex attributes specified using glVertexAttribIPointer, and to GL_FALSE for vertex attributes specified using glVertexAttribPointer, so that the vertex attributes can be interpreted properly by driver back-ends. ---

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Ian Romanick
On 10/31/2011 07:16 AM, Jakob Bornecrantz wrote: - Original Message - From: Chia-I Wu Hi, This patch series adds support for the OpenGL ES specific GL_OES_EGL_image_external extension[1]. It is enabled in st/mesa. The extension adds a new texture target, GL_TEXTURE_EXTERNAL_OES. It

Re: [Mesa-dev] [RFC-PATCH 07/11] glsl: add support for GL_OES_EGL_image_external

2011-10-31 Thread Ian Romanick
On 10/30/2011 12:07 PM, Chia-I Wu wrote: From: Chia-I Wu This extension introduces a new sampler type: samplerExternalOES. texture2D (and texture2DProj) can be used to do a texture look up in an external texture. I haven't reviewed the rest of the series yet, but this patch is Reviewed-by: Ia

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Ian Romanick
On 10/30/2011 12:07 PM, Chia-I Wu wrote: From: Chia-I Wu Hi, This patch series adds support for the OpenGL ES specific GL_OES_EGL_image_external extension[1]. It is enabled in st/mesa. The extension adds a new texture target, GL_TEXTURE_EXTERNAL_OES. It can only be specified with an EGLImage

[Mesa-dev] [PATCH] llvmpipe: Use -1 instead of ~0 for "no slot".

2011-10-31 Thread jfonseca
From: José Fonseca As the value of unsigned ~0 depends on the bit-width. Fixes fdo 42411. --- src/gallium/drivers/llvmpipe/lp_state_derived.c | 12 ++-- src/gallium/drivers/llvmpipe/lp_state_setup.c | 16 +++- src/gallium/drivers/llvmpipe/lp_state_setup.h |8

[Mesa-dev] [PATCH] llvmpipe: Use -1 instead of ~0 for "no slot".

2011-10-31 Thread jfonseca
From: José Fonseca As the value of unsigned ~0 depends on the bit-width. Fixes fdo 42411. --- src/gallium/drivers/llvmpipe/lp_state_derived.c | 12 ++-- src/gallium/drivers/llvmpipe/lp_state_setup.c | 16 +++- src/gallium/drivers/llvmpipe/lp_state_setup.h |8

Re: [Mesa-dev] [PATCH] fix compilation of glsl_lexer.ll with msvc

2011-10-31 Thread Ian Romanick
On 10/29/2011 02:50 AM, Kenneth Graunke wrote: On 10/29/2011 01:42 AM, Morgan Armand wrote: strtoull is not supported on msvc (as there is no C99 support). --- src/glsl/glsl_lexer.ll |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl

Re: [Mesa-dev] [PATCH 18/20] mesa: Rewrite the way uniforms are tracked and handled

2011-10-31 Thread Ian Romanick
On 10/28/2011 02:45 PM, Eric Anholt wrote: On Fri, 28 Oct 2011 10:42:45 -0700, "Ian Romanick" wrote: From: Ian Romanick Switch all of the code in ir_to_mesa, st_glsl_to_tgsi, glUniform*, glGetUniform, glGetUniformLocation, and glGetActiveUniforms to use the gl_uniform_storage structures in the

Re: [Mesa-dev] [PATCH 12/20] linker: Track uniform locations to new tracking structures

2011-10-31 Thread Ian Romanick
On 10/28/2011 01:52 PM, Eric Anholt wrote: On Fri, 28 Oct 2011 10:42:39 -0700, "Ian Romanick" wrote: From: Ian Romanick This is just the infrastructure and the code. It's not used yet. Signed-off-by: Ian Romanick --- src/glsl/link_uniforms.cpp | 95 +++

Re: [Mesa-dev] [PATCH 17/20] i965: Move _mesa_ir_link_shader call before device-specific linking

2011-10-31 Thread Ian Romanick
On 10/28/2011 02:59 PM, Eric Anholt wrote: On Fri, 28 Oct 2011 10:42:44 -0700, "Ian Romanick" wrote: From: Ian Romanick _mesa_ir_link_shader needs to be called before cloning the IR tree so that the var->location field for uniforms is set. WARNING: This change breaks several integer division

Re: [Mesa-dev] [PATCH 06/20] mesa: Move {split, merge}_location_offset to uniforms.h

2011-10-31 Thread Ian Romanick
On 10/30/2011 10:47 PM, Kenneth Graunke wrote: On 10/28/2011 10:42 AM, Ian Romanick wrote: From: Ian Romanick Also prepend _mesa_uniform_ to the names. Signed-off-by: Ian Romanick ... -static void -merge_location_offset(GLint *location, GLint offset) -{ - *location = (*location<< 16) | of

Re: [Mesa-dev] [PATCH 05/20] glsl: Add new structures for tracking uniforms in linked shaders

2011-10-31 Thread Ian Romanick
On 10/31/2011 11:04 AM, Ian Romanick wrote: On 10/28/2011 02:28 PM, Eric Anholt wrote: On Fri, 28 Oct 2011 10:42:32 -0700, "Ian Romanick" wrote: From: Ian Romanick Signed-off-by: Ian Romanick --- src/glsl/ir_uniform.h | 128 + 1 files changed, 128

Re: [Mesa-dev] [PATCH 05/20] glsl: Add new structures for tracking uniforms in linked shaders

2011-10-31 Thread Ian Romanick
On 10/28/2011 02:28 PM, Eric Anholt wrote: On Fri, 28 Oct 2011 10:42:32 -0700, "Ian Romanick" wrote: From: Ian Romanick Signed-off-by: Ian Romanick --- src/glsl/ir_uniform.h | 128 + 1 files changed, 128 insertions(+), 0 deletions(-) create

[Mesa-dev] [PATCH 06/04] state_trackers/vdpau: Add support for VC-1 decoding

2011-10-31 Thread Maarten Lankhorst
Add a struct with all the fields. Signed-off-by: Maarten Lankhorst --- Just because vdpau state tracker supports it, doesn't mean anything uses it yet. Patience.. src/gallium/include/pipe/p_video_state.h | 34 +++ src/gallium/state_trackers/vdpau/decode.c| 65 +++

[Mesa-dev] [PATCH 05/04] state_trackers/vdpau: Add mpeg4 part2 to PipeToProfile and ProfileToPipe

2011-10-31 Thread Maarten Lankhorst
So it can actually be used when someone implements it. :) Signed-off-by: Maarten Lankhorst --- src/gallium/state_trackers/vdpau/vdpau_private.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_t

Re: [Mesa-dev] [PATCH 1/3] glsl: Refactor source lists to Makefile.sources

2011-10-31 Thread Chad Versace
On 10/30/2011 04:53 AM, Chia-I Wu wrote: > With the hope that Android.mk and SConscript can share the file to reduce > future breakage. > --- > src/glsl/Makefile | 82 --- > src/glsl/Makefile.sources | 104 > +

Re: [Mesa-dev] [PATCH 21/27] dri: Stop using driUpdateFramebufferSize() wrapper function

2011-10-31 Thread Kristian Høgsberg
On Mon, Oct 31, 2011 at 12:08 PM, Eric Anholt wrote: > On Fri, 28 Oct 2011 18:11:51 -0400, Kristian Høgsberg > wrote: >> --- >>  src/mesa/drivers/dri/intel/intel_context.c         |    3 +-- >>  .../drivers/dri/radeon/radeon_common_context.c     |   10 ++ >>  2 files changed, 7 insertion

Re: [Mesa-dev] DRI1 Cleanup

2011-10-31 Thread Eric Anholt
On Mon, 31 Oct 2011 10:58:13 -0400, Kristian Høgsberg wrote: > 2011/10/28 Kristian Høgsberg : > > Hello, > > > > Here's a follow-up series to Eric's removal of the last DRI1 driver. > > Now that all DRI drivers are DRI2-only, there's a lot of DRI1 driver > > infrastructure that we can remove. >

Re: [Mesa-dev] [PATCH 21/27] dri: Stop using driUpdateFramebufferSize() wrapper function

2011-10-31 Thread Eric Anholt
On Fri, 28 Oct 2011 18:11:51 -0400, Kristian Høgsberg wrote: > --- > src/mesa/drivers/dri/intel/intel_context.c |3 +-- > .../drivers/dri/radeon/radeon_common_context.c | 10 ++ > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/src/mesa/drivers/dri/in

Re: [Mesa-dev] DRI1 Cleanup

2011-10-31 Thread Jakob Bornecrantz
- Original Message - > 2011/10/28 Kristian Høgsberg : > > Hello, > > > > Here's a follow-up series to Eric's removal of the last DRI1 > > driver. Now that all DRI drivers are DRI2-only, there's a lot > > of DRI1 driver infrastructure that we can remove. > > I'll merge this in a day or two

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Eric Anholt
On Mon, 31 Oct 2011 03:07:26 +0800, Chia-I Wu wrote: > From: Chia-I Wu > > Hi, > > This patch series adds support for the OpenGL ES specific > GL_OES_EGL_image_external extension[1]. It is enabled in st/mesa. > The extension is written with YUV formats in mind. It describes two possible > wa

Re: [Mesa-dev] DRI1 Cleanup

2011-10-31 Thread Kristian Høgsberg
2011/10/28 Kristian Høgsberg : > Hello, > > Here's a follow-up series to Eric's removal of the last DRI1 driver. > Now that all DRI drivers are DRI2-only, there's a lot of DRI1 driver > infrastructure that we can remove. I'll merge this in a day or two if there are no objections. Some of the conc

Re: [Mesa-dev] [PATCH] mesa: Fix memory leak in out-of-memory path.

2011-10-31 Thread Brian Paul
On 10/27/2011 03:53 PM, Vinson Lee wrote: Fixes Coverity resource leak defect. --- src/mesa/main/pack.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index ecdeaf5..539a06c 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/m

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Jakob Bornecrantz
- Original Message - > From: Chia-I Wu > > Hi, > > This patch series adds support for the OpenGL ES specific > GL_OES_EGL_image_external extension[1]. It is enabled in st/mesa. > > The extension adds a new texture target, GL_TEXTURE_EXTERNAL_OES. It > can only be specified with an EGL

Re: [Mesa-dev] [PATCH 1/3] glsl: Refactor source lists to Makefile.sources

2011-10-31 Thread Brian Paul
On 10/30/2011 05:53 AM, Chia-I Wu wrote: With the hope that Android.mk and SConscript can share the file to reduce future breakage. --- src/glsl/Makefile | 82 --- src/glsl/Makefile.sources | 104 + 2 files

Re: [Mesa-dev] [RFC-PATCH 00/11] add support for GL_OES_EGL_image_external

2011-10-31 Thread Brian Paul
On 10/30/2011 01:07 PM, Chia-I Wu wrote: From: Chia-I Wu Hi, This patch series adds support for the OpenGL ES specific GL_OES_EGL_image_external extension[1]. It is enabled in st/mesa. The extension adds a new texture target, GL_TEXTURE_EXTERNAL_OES. It can only be specified with an EGLImage

[Mesa-dev] [PATCH 04/04] state_trackers/vdpau: Add support for MPEG4 Part 2

2011-10-31 Thread Maarten Lankhorst
Just the support patch, no decoder implements it currently. Signed-off-by: Maarten Lankhorst --- C König could you check if it doesn't break mpeg1? I can't confirm the visual because shaders seem bugged for me. src/gallium/include/pipe/p_video_state.h | 27 src/gallium/state_tracke

Re: [Mesa-dev] [PATCH 1/4] state_trackers/vdpau: Implement VdpGenerateCSCMatrix

2011-10-31 Thread Christian König
On 31.10.2011 10:23, Maarten Lankhorst wrote: With the smpte240 profile, which was missing. Signed-off-by: Maarten Lankhorst --- src/gallium/auxiliary/vl/vl_csc.c| 19 +++ src/gallium/auxiliary/vl/vl_csc.h|3 ++- src/gallium/state_trackers/vdpau/mixer.c

[Mesa-dev] [PATCH 03/04] state_trackers/vdpau: Test if profile is supported first before trying to create decoder

2011-10-31 Thread Maarten Lankhorst
So a nicer error message is returned. Signed-off-by: Maarten Lankhorst --- src/gallium/state_trackers/vdpau/decode.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 7

[Mesa-dev] [PATCH 02/04] state_trackers/vdpau: Add num_slices to mpeg12 picture structure

2011-10-31 Thread Maarten Lankhorst
Bitstream parsers might need that field. Signed-off-by: Maarten Lankhorst --- src/gallium/include/pipe/p_video_state.h |1 + src/gallium/state_trackers/vdpau/decode.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gal

[Mesa-dev] [PATCH 1/4] state_trackers/vdpau: Implement VdpGenerateCSCMatrix

2011-10-31 Thread Maarten Lankhorst
With the smpte240 profile, which was missing. Signed-off-by: Maarten Lankhorst --- src/gallium/auxiliary/vl/vl_csc.c| 19 +++ src/gallium/auxiliary/vl/vl_csc.h|3 ++- src/gallium/state_trackers/vdpau/mixer.c | 20 +++- 3 files changed, 40 i