Re: [Mesa-dev] [PATCH 18/26] glsl: Fix linker checks for GLSL ES 3.00.

2012-11-30 Thread Eric Anholt
Ian Romanick writes: > From: Paul Berry Other than comments, I've reviewed from here to the end of the series. (I started from the end because I figure other people will start near the beginning and get tired around the middle). pgp6Mo2ohhL5j.pgp Description: PGP signature ___

Re: [Mesa-dev] [PATCH 17/26] glsl: Record in gl_shader_program whether the program uses GLSL ES.

2012-11-30 Thread Eric Anholt
Ian Romanick writes: > From: Paul Berry > > Previously we recorded just the GLSL version (or the max version, if > GLSL 1.10 and GLSL 1.20 programs were linked together). > > Reviewed-by: Ian Romanick > --- > src/glsl/linker.cpp| 1 + > src/mesa/main/mtypes.h | 1 + > 2 files changed, 2 in

Re: [Mesa-dev] [PATCH] glcpp: Rewrite line-continuation support to act globally.

2012-11-30 Thread Carl Worth
Kenneth Graunke writes: > Other than than, looks good to me...thanks Carl! > > Reviewed-by: Kenneth Graunke Thanks, Ken. Pushed now. > Someday we may want to use ralloc's rewrite_tail functions to avoid the > extra strlen() overhead. But that can be done separately. I took a look at this now

Re: [Mesa-dev] [PATCH 20/26] glsl: Populate built-in types correctly for GLSL 3.00 ES.

2012-11-30 Thread Eric Anholt
Ian Romanick writes: > From: Paul Berry > > This patch implements all of the built-in types for GLSL 3.00 ES. > This is almost exactly the same as the set of built-in types for GLSL > 1.30, except ate 1D samplers are skipped, and samplerCubeShadow is ^ something ate your commit m

Re: [Mesa-dev] [PATCH 05/26] glsl: Add GLSL version query functions.

2012-11-30 Thread Kenneth Graunke
On 11/30/2012 10:07 AM, Ian Romanick wrote: From: Paul Berry With the advent of GLSL 3.00 ES, the version checks we perform in the GLSL compiler (to determine which language features are present) will become more complicated. To reduce the complexity, this patch adds functions check_version()

[Mesa-dev] [PATCH] mesa: Return INVALID_ENUM for glReadPixels(..., GL_DEPTH_*, ...) on ES 3

2012-11-30 Thread Matt Turner
I'm not sure if this is the correct fix. The _mesa_es_error_check_format_and_type function (used above in the ES 1 and 2 cases) was originally added for glTexImage checking and allows GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8 combinations. Using it in ES 3 causes other tests to regress. Fixes es3confo

[Mesa-dev] [PATCH 1/2] mesa: Return INVALID_OPERATION when type is known but not allowed

2012-11-30 Thread Matt Turner
INVALID_ENUM is for when the type is simply not known. Fixes part of es3conform's packed_depth_stencil_error test. --- src/mesa/main/glformats.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index cf8879b

[Mesa-dev] [PATCH 9.0 branch] gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM >= 3.2.

2012-11-30 Thread Johannes Obermayr
Note: This is a candidate for the stable branches. --- src/gallium/auxiliary/Makefile |5 + 1 Datei geändert, 5 Zeilen hinzugefügt(+) diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile index 3ba3f9c..72208f1 100644 --- a/src/gallium/auxiliary/Makefile +++ b/src/g

Re: [Mesa-dev] [PATCH 21/26] glsl: Add builtin variables for GLSL 3.00 ES.

2012-11-30 Thread Eric Anholt
Ian Romanick writes: > From: Paul Berry > > This patch also adds assertions so that when we add new GLSL versions, > we'll notice that we need to update the builtin variables. > > Reviewed-by: Ian Romanick > +static void > +generate_300ES_uniforms(exec_list *instructions, > +

Re: [Mesa-dev] [PATCH 26/26] glsl: Support unsigned integer constants in layout qualifiers.

2012-11-30 Thread Kenneth Graunke
On 11/30/2012 02:52 PM, Ian Romanick wrote: On 11/30/2012 02:49 PM, Eric Anholt wrote: Ian Romanick writes: From: Kenneth Graunke Fixes es3conform's explicit_attrib_location_integer_constants. Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt --- src/glsl/glsl_parser.yy | 1 + 1 file

Re: [Mesa-dev] [PATCH 6/6] i965: Add a debug flag for counting cycles spent in each compiled shader.

2012-11-30 Thread Kenneth Graunke
On 11/30/2012 01:24 PM, Eric Anholt wrote: This can be used for two purposes: Using hand-coded shaders to determine per-instruction timings, or figuring out which shader to optimize in a whole application. On the psychonauts trace, we see: type ID cycles spent % of tota

Re: [Mesa-dev] [PATCH 23/26] glsl: add determinant() functions.

2012-11-30 Thread Eric Anholt
Ian Romanick writes: > From: Paul Berry > > These functions are defined in GLSL 1.50 and GLES 3.00 ES. > > The formulas have been extracted from the existing implementation of > inverse(). I've added a note to make piglit tests for this to my copy of the taskjuggler, assuming that it'll be brok

[Mesa-dev] [PATCH] gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM >= 3.2.

2012-11-30 Thread Johannes Obermayr
Also remove the recently added and overloaded LLVM_CXXFLAGS from CXXFLAGS. Note: This is a candidate for the stable branches. --- src/gallium/auxiliary/Makefile |6 +- 1 Datei geändert, 5 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/src/gallium/auxiliary/Makefile b/src/gallium

Re: [Mesa-dev] [PATCH 26/26] glsl: Support unsigned integer constants in layout qualifiers.

2012-11-30 Thread Ian Romanick
On 11/30/2012 02:49 PM, Eric Anholt wrote: Ian Romanick writes: From: Kenneth Graunke Fixes es3conform's explicit_attrib_location_integer_constants. Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt --- src/glsl/glsl_parser.yy | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl

Re: [Mesa-dev] [PATCH 26/26] glsl: Support unsigned integer constants in layout qualifiers.

2012-11-30 Thread Eric Anholt
Ian Romanick writes: > From: Kenneth Graunke > > Fixes es3conform's explicit_attrib_location_integer_constants. > > Reviewed-by: Ian Romanick > Reviewed-by: Eric Anholt > --- > src/glsl/glsl_parser.yy | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/glsl/glsl_parser.yy b/src/glsl/

Re: [Mesa-dev] [PATCH 01/26] mesa: Add ARB_ES3_compatibility flag.

2012-11-30 Thread Carl Worth
Ian Romanick writes: > I have also pushed this branch to the gles3 branch of my personal GIT > repo on fd.o. Could people working on the gles3 branch take a look to > make sure no work got lost? I'd like to force-push this to origin/gles3 > today. I haven't reviewed every change on the branc

Re: [Mesa-dev] [PATCH] glcpp: Rewrite line-continuation support to act globally.

2012-11-30 Thread Ian Romanick
On 11/30/2012 02:29 PM, Kenneth Graunke wrote: On 11/29/2012 03:44 PM, Carl Worth wrote: Previously, we were only supporting line-continuation backslash characters within lines of pre-processor directives, (as per the specification). With OpenGL 4.3, line continuations are now supported anywhere

Re: [Mesa-dev] [PATCH 2/4] glx/dri2: add and use new driver hook flush_with_flags

2012-11-30 Thread Eric Anholt
The mixing of the factoring out of the protocol bits with the flush change in this commit is irritating, but I'm fine with the overall flush interface of this series for the current loader implementation. Long term, I think for what you're working towards you'll want the dispatch threading that Pa

Re: [Mesa-dev] [PATCH] glcpp: Rewrite line-continuation support to act globally.

2012-11-30 Thread Kenneth Graunke
On 11/29/2012 03:44 PM, Carl Worth wrote: Previously, we were only supporting line-continuation backslash characters within lines of pre-processor directives, (as per the specification). With OpenGL 4.3, line continuations are now supported anywhere within a shader. OpenGL 4.2, actually. I'm a

Re: [Mesa-dev] [PATCH] glsl/parser: Handle "#version 300 es" directive.

2012-11-30 Thread Paul Berry
On 30 November 2012 11:52, Ian Romanick wrote: > From: Paul Berry > > Note that GLSL 1.00 is selected using "#version 100", so "#version 100 > es" is prohibited. > > v2: Check for GLES3 before allowing '#version 300 es' > > v3: Make sure a correct language_version is set in > _mesa_glsl_parse_st

[Mesa-dev] [Bug 57746] build test failure: nouveau_fbo.c:198:3: error: too few arguments to function 'nouveau_renderbuffer_del'

2012-11-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=57746 Darxus changed: What|Removed |Added CC||dar...@chaosreigns.com -- You are receiving th

[Mesa-dev] [Bug 57746] New: build test failure: nouveau_fbo.c:198:3: error: too few arguments to function 'nouveau_renderbuffer_del'

2012-11-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=57746 Priority: medium Bug ID: 57746 Assignee: mesa-dev@lists.freedesktop.org Summary: build test failure: nouveau_fbo.c:198:3: error: too few arguments to function 'nouveau_renderbuffer_de

Re: [Mesa-dev] [PATCH 01/26] mesa: Add ARB_ES3_compatibility flag.

2012-11-30 Thread Paul Berry
On 30 November 2012 12:11, Ian Romanick wrote: > This represents a rebase of the gles3 branch that moves the completed GLSL > to be first. I'd like to get these bits merged to master sooner rather > than later. Once these bits land, I'll rebase and send out the next > logical block. > > I have

Re: [Mesa-dev] [PATCH 1/2] llvmpipe: Recompute the fs shader key when framebuffer varies.

2012-11-30 Thread Dave Airlie
On Sat, Dec 1, 2012 at 3:43 AM, wrote: > From: José Fonseca > > The fs shader now depends on the color buffer formats. The shader key was > extended to accommodate this, but llvmpipe_update_derived needs to be > updated to check the framebuffer dirty flag. > > This fixes bug 57674. Looks good t

[Mesa-dev] [PATCH 6/6] i965: Add a debug flag for counting cycles spent in each compiled shader.

2012-11-30 Thread Eric Anholt
This can be used for two purposes: Using hand-coded shaders to determine per-instruction timings, or figuring out which shader to optimize in a whole application. On the psychonauts trace, we see: type ID cycles spent % of total ... fs16 543: 339343898369 ( 339.34 Gc

[Mesa-dev] [PATCH 5/6] i965: Add a flag for instructions with normal writemasking disabled.

2012-11-30 Thread Eric Anholt
For getting values from the new timestamp register, the channels we load have nothing to do with the pixels dispatched. --- src/mesa/drivers/dri/i965/brw_fs.h |1 + src/mesa/drivers/dri/i965/brw_fs_emit.cpp |1 + src/mesa/drivers/dri/i965/brw_vec4.h|1 + src/mesa/dri

[Mesa-dev] [PATCH 4/6] i965: Include codegen time in the INTEL_DEBUG=perf stall detection.

2012-11-30 Thread Eric Anholt
In the VS case, we were missing the entire compile time in the stall detection! --- src/mesa/drivers/dri/i965/brw_fs.cpp |9 ++--- src/mesa/drivers/dri/i965/brw_vec4.cpp | 21 - 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 2/6] i965/vp: Fix crashes with INTEL_DEBUG=vs.

2012-11-30 Thread Eric Anholt
The VP generation doesn't set up the output reg strings, so if you didn't happen to get these values as 0 on the stack, you'd lose. --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/d

[Mesa-dev] [PATCH 3/6] i965: Don't leak the IR annotation into later instructions.

2012-11-30 Thread Eric Anholt
After walking our IR instructions (Mesa or GLSL), we don't want to also mark the start of the FB/URB writes or whatever as being that IR. This can end up being misleading when the end of the IR visit got copy propagated out to a later instruction in the URB writes. --- src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH 1/6] i965/vs: Fix uninitialized shader pointer used in debug output.

2012-11-30 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp index 12694e2..5637b22 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp +++ b/src/mesa/drivers

Re: [Mesa-dev] Proposal: allow hidden security bugs on Mesa's Bugzilla

2012-11-30 Thread Benoit Jacob
On 12-11-30 12:13 PM, Jerome Glisse wrote: > On Fri, Nov 30, 2012 at 7:43 AM, Benoit Jacob wrote: >> On 12-11-23 02:21 PM, Benoit Jacob wrote: >>> On 12-11-21 12:48 PM, Chad Versace wrote: On 11/20/2012 09:29 AM, Benoit Jacob wrote: > Any questions? > Do you support or oppose me

Re: [Mesa-dev] [PATCH 01/26] mesa: Add ARB_ES3_compatibility flag.

2012-11-30 Thread Ian Romanick
This represents a rebase of the gles3 branch that moves the completed GLSL to be first. I'd like to get these bits merged to master sooner rather than later. Once these bits land, I'll rebase and send out the next logical block. I have also pushed this branch to the gles3 branch of my person

Re: [Mesa-dev] [PATCH] mesa: Use _mesa_lookup_enum_by_nr in tex*_error_check

2012-11-30 Thread Brian Paul
On 11/30/2012 12:26 PM, Matt Turner wrote: --- src/mesa/main/teximage.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 347b3e2..6401824 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage

Re: [Mesa-dev] [PATCH 2/2] llvmpipe: Improve color buffer loads/stores alignment.

2012-11-30 Thread Roland Scheidegger
Am 30.11.2012 19:51, schrieb Jose Fonseca: > > > - Original Message - >> Am 30.11.2012 18:43, schrieb jfons...@vmware.com: >>> From: José Fonseca >>> >>> Tell LLVM the exact alignment we can guarantee, based on the fs >>> block >>> dimensions, pixel format, and the alignment of the resou

[Mesa-dev] [PATCH] glsl/parser: Handle "#version 300 es" directive.

2012-11-30 Thread Ian Romanick
From: Paul Berry Note that GLSL 1.00 is selected using "#version 100", so "#version 100 es" is prohibited. v2: Check for GLES3 before allowing '#version 300 es' v3: Make sure a correct language_version is set in _mesa_glsl_parse_state::process_version_directive. Signed-off-by: Paul Berry Sign

[Mesa-dev] [PATCH] gallivm: drop border wrap clamping code

2012-11-30 Thread sroland
From: Roland Scheidegger The border clamping code is unnecessary, since we don't care if a wrapped coord value is -1 or <-1 (same for length vs. >length), in either case the border handling code will mask out the offset and replace the texel value with the border color. Note that technically this

Re: [Mesa-dev] [PATCH] mesa: Use _mesa_lookup_enum_by_nr in tex*_error_check

2012-11-30 Thread Matt Turner
On Fri, Nov 30, 2012 at 11:26 AM, Matt Turner wrote: > --- > src/mesa/main/teximage.c |9 ++--- > 1 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c > index 347b3e2..6401824 100644 > --- a/src/mesa/main/teximage.c > +++ b/

[Mesa-dev] [PATCH] mesa: Use _mesa_lookup_enum_by_nr in tex*_error_check

2012-11-30 Thread Matt Turner
--- src/mesa/main/teximage.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 347b3e2..6401824 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1949,7 +1949,8 @@ texture_error_check( s

Re: [Mesa-dev] [PATCH 3/3] st/mesa: fix context use-after-free problem in st_renderbuffer_delete()

2012-11-30 Thread Jose Fonseca
Series looks good to me. Jose - Original Message - > The use-after-free happened when the renderbuffer was shared by > multiple > contexts and we tried to delete the renderbuffer using a context > which > was previously deleted. > > Note: this is a candidate for the stable branches. > --

Re: [Mesa-dev] [PATCH 2/2] llvmpipe: Improve color buffer loads/stores alignment.

2012-11-30 Thread Jose Fonseca
- Original Message - > Am 30.11.2012 18:43, schrieb jfons...@vmware.com: > > From: José Fonseca > > > > Tell LLVM the exact alignment we can guarantee, based on the fs > > block > > dimensions, pixel format, and the alignment of the resource base > > pointer > > and stride. > > --- > >

Re: [Mesa-dev] [PATCH mesa] egl/wayland: Don't invalidate drawable on swap buffers

2012-11-30 Thread Kristian Høgsberg
On Fri, Nov 30, 2012 at 11:07:09AM -0500, Kristian Høgsberg wrote: > On Fri, Nov 30, 2012 at 05:41:02PM +0200, Ander Conselvan de Oliveira wrote: > > We used to invalidate the drawable after a call to eglSwapBuffers(), > > so that a wl_egl_window_resize() would take effect for the next frame. > > H

Re: [Mesa-dev] [PATCH] llvmpipe: Refactor convert_to/from_blend_type to convert in place.

2012-11-30 Thread Roland Scheidegger
Am 30.11.2012 19:08, schrieb jfons...@vmware.com: > From: José Fonseca > > This fixes the "Source and destination overlap in memcpy" valgrind > warnings. > --- > src/gallium/drivers/llvmpipe/lp_state_fs.c | 20 > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff -

[Mesa-dev] [PATCH] glcpp: Add support to #line for a filnename, not just a source string number

2012-11-30 Thread Carl Worth
Such as: #line 23 "foo.c" Having a filename here is quite useful and many other OpenGL implementations allow this. Note that for GLES we take the hard line and insist on a numeric source string number as per the specification and which glcpp has always supported: #line 23 3 ---

Re: [Mesa-dev] [PATCH 2/2] llvmpipe: Improve color buffer loads/stores alignment.

2012-11-30 Thread Roland Scheidegger
Am 30.11.2012 18:43, schrieb jfons...@vmware.com: > From: José Fonseca > > Tell LLVM the exact alignment we can guarantee, based on the fs block > dimensions, pixel format, and the alignment of the resource base pointer > and stride. > --- > src/gallium/drivers/llvmpipe/lp_state_fs.c | 31 > +

[Mesa-dev] [PATCH 3/3] st/mesa: fix context use-after-free problem in st_renderbuffer_delete()

2012-11-30 Thread Brian Paul
The use-after-free happened when the renderbuffer was shared by multiple contexts and we tried to delete the renderbuffer using a context which was previously deleted. Note: this is a candidate for the stable branches. --- src/mesa/state_tracker/st_cb_fbo.c |8 +--- 1 files changed, 5 ins

[Mesa-dev] [PATCH 2/3] util: added pipe_surface_release() function

2012-11-30 Thread Brian Paul
To fix a pipe_context::surface_destroy() use-after-free problem. We previously added pipe_sampler_view_release() for similar reasons. Note: this is a candidate for the stable branches. --- src/gallium/auxiliary/util/u_inlines.h | 16 1 files changed, 16 insertions(+), 0 deletio

[Mesa-dev] [PATCH 1/3] mesa: pass context parameter to gl_renderbuffer::Delete()

2012-11-30 Thread Brian Paul
We sometimes need a rendering context when deleting renderbuffers. Pass it explicitly instead of trying to grab a current context (which might be NULL). The next patch will make use of this. Note: this is a candidate for the stable branches. --- src/mesa/drivers/dri/intel/intel_fbo.c |4

Re: [Mesa-dev] leak in loop_analysis

2012-11-30 Thread Ian Romanick
On 11/30/2012 02:20 AM, Dave Airlie wrote: Coverity pointed out src/glsl/loop_analysis.cpp loop_analysis::loop_analysis() { this->loops = new loop_state; This loops is never freed anywhere, probably need a destructor. Aw crap. Could you submit a bug for that, and assign it to me? Dave

[Mesa-dev] [PATCH] llvmpipe: Refactor convert_to/from_blend_type to convert in place.

2012-11-30 Thread jfonseca
From: José Fonseca This fixes the "Source and destination overlap in memcpy" valgrind warnings. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/dri

[Mesa-dev] [PATCH 25/26] glsl: Allow layout qualifiers in GLSL 3.00 ES

2012-11-30 Thread Ian Romanick
From: Ian Romanick Note that while 'packed' is a reserved word in GLSL ES, row_major is not. This means that we have to use the string-based matching for that. Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/glsl/glsl_lexer.ll | 2 +- src/glsl/glsl_parser.yy

[Mesa-dev] [PATCH 26/26] glsl: Support unsigned integer constants in layout qualifiers.

2012-11-30 Thread Ian Romanick
From: Kenneth Graunke Fixes es3conform's explicit_attrib_location_integer_constants. Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt --- src/glsl/glsl_parser.yy | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index f123368..d849466 1006

[Mesa-dev] [PATCH 23/26] glsl: add determinant() functions.

2012-11-30 Thread Ian Romanick
From: Paul Berry These functions are defined in GLSL 1.50 and GLES 3.00 ES. The formulas have been extracted from the existing implementation of inverse(). Reviewed-by: Ian Romanick --- src/glsl/builtins/glsl/determinant.glsl | 70 + 1 file changed, 70 insertio

[Mesa-dev] [PATCH 24/26] glsl: Create builtin function profiles for GLSL 3.00 ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry Nearly all of the builtin functions in GLSL 3.00 ES are already implemented in Mesa; this patch enables them. A few functions are not implemented yet; those have been commented out, with a FIXME comment to act as a reminder of what still needs to be implemented. Here is the com

[Mesa-dev] [PATCH 22/26] glsl: Make builtin function profiles for GLSL ES use "es" in the filename.

2012-11-30 Thread Ian Romanick
From: Paul Berry Reviewed-by: Ian Romanick --- src/glsl/builtins/profiles/100.frag | 6 - src/glsl/builtins/profiles/100.glsl | 296 --- src/glsl/builtins/profiles/100.vert | 6 - src/glsl/builtins/profiles/100es.frag| 6 + src/gl

[Mesa-dev] [PATCH 20/26] glsl: Populate built-in types correctly for GLSL 3.00 ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry This patch implements all of the built-in types for GLSL 3.00 ES. This is almost exactly the same as the set of built-in types for GLSL 1.30, except ate 1D samplers are skipped, and samplerCubeShadow is added. This patch also addes an assertion so that when we add new GLSL versi

[Mesa-dev] [PATCH 21/26] glsl: Add builtin variables for GLSL 3.00 ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry This patch also adds assertions so that when we add new GLSL versions, we'll notice that we need to update the builtin variables. Reviewed-by: Ian Romanick --- src/glsl/builtin_variables.cpp | 193 - 1 file changed, 151 insertions(+), 42

[Mesa-dev] [PATCH 19/26] glsl: Make {Min, Max}ProgramTexelOffset available to compiler.

2012-11-30 Thread Ian Romanick
From: Paul Berry These constants need to be made available to shaders in GLSL 3.00 ES. Reviewed-by: Ian Romanick --- src/glsl/glsl_parser_extras.cpp | 2 ++ src/glsl/glsl_parser_extras.h | 4 2 files changed, 6 insertions(+) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_

[Mesa-dev] [PATCH 18/26] glsl: Fix linker checks for GLSL ES 3.00.

2012-11-30 Thread Ian Romanick
From: Paul Berry This patch updates the following linker checks to do the right thing in GLSL 3.00 ES: - Failing to write to gl_Position is allowed in GLSL 1.40+ as well as GLSL 3.00 ES. - It is an error to write to both gl_ClipVertex and gl_ClipDistance in GLSL 1.30+. This does not apply

[Mesa-dev] [PATCH 05/26] glsl: Add GLSL version query functions.

2012-11-30 Thread Ian Romanick
From: Paul Berry With the advent of GLSL 3.00 ES, the version checks we perform in the GLSL compiler (to determine which language features are present) will become more complicated. To reduce the complexity, this patch adds functions check_version() and is_version() to _mesa_glsl_parse_state. Th

[Mesa-dev] [PATCH 17/26] glsl: Record in gl_shader_program whether the program uses GLSL ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry Previously we recorded just the GLSL version (or the max version, if GLSL 1.10 and GLSL 1.20 programs were linked together). Reviewed-by: Ian Romanick --- src/glsl/linker.cpp| 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/glsl/linker

[Mesa-dev] [PATCH 16/26] glsl: Clean up shading language mixing check for GLSL 3.00 ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry Previously, we prohibited mixing of shading language versions if min_version == 100 or max_version >= 130. This was technically correct (since desktop GLSL 1.30 and beyond prohibit mixing of shading language versions, as does GLSL 1.00 ES), but it was confusing. Also, we assert

[Mesa-dev] [PATCH 14/26] glsl/parser: Handle "#version 300 es" directive.

2012-11-30 Thread Ian Romanick
From: Paul Berry Note that GLSL 1.00 is selected using "#version 100", so "#version 100 es" is prohibited. v2: Check for GLES3 before allowing '#version 300 es' Signed-off-by: Paul Berry Signed-off-by: Ian Romanick --- src/glsl/glsl_parser.yy | 6 ++- src/glsl/glsl_parser_extras.cpp

[Mesa-dev] [PATCH 15/26] glsl: Record in gl_shader whether the shader uses GLSL ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry Previously we recorded just the GLSL version, with the knowledge that 100 means GLSL 1.00 ES. With the advent of GLSL 3.00 ES, this is going to get more complex, and eventually will probably become ambiguous (GLSL 4.00 already exists, and GLSL 4.00 ES is likely to be created som

[Mesa-dev] [PATCH 13/26] glsl/parser: Extract version directive processing into a function.

2012-11-30 Thread Ian Romanick
From: Paul Berry Version directive handling is going to have to be used within two parser rules, one for desktop-style version directives (e.g. "#version 130") and one for the new ES-style version directive (e.g. "#version 300 es"), so this patch moves it to a function that can be called from bot

[Mesa-dev] [PATCH 12/26] glsl/preprocessor: Handle "#version 300 es" directive.

2012-11-30 Thread Ian Romanick
From: Paul Berry Reviewed-by: Ian Romanick --- src/glsl/glcpp/glcpp-parse.y | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index f021c73..f62cbe4 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++

[Mesa-dev] [PATCH 10/26] glsl: Enable GLSL ES 3.00 features inherited from desktop GLSL.

2012-11-30 Thread Ian Romanick
From: Paul Berry This patch turns on the following features for GLSL ES 3.00: - Array constructors, whole array assignment, and array comparisons. - Second and third operands of ?: may be arrays. - Use of "in" and "out" qualifiers on globals. - Bitwise and modulus operators. - Integral vertex sh

[Mesa-dev] [PATCH 11/26] glsl/preprocessor: Extract version directive processing into a function.

2012-11-30 Thread Ian Romanick
From: Paul Berry Version directive handling is going to have to be used within two parser rules, one for desktop-style version directives (e.g. "#version 130") and one for the new ES-style version directive (e.g. "#version 300 es"), so this patch moves it to a function that can be called from bot

[Mesa-dev] [PATCH 09/26] glsl: parse GLSL ES 3.00 keywords correctly.

2012-11-30 Thread Ian Romanick
From: Paul Berry GLSL ES 3.00 adds the following keywords over GLSL 1.00: uint, uvec[2-4], matNxM, centroid, flat, smooth, various samplers, layout, switch, default, and case. Additionally, it reserves a large number of keywords, some of which were already reserved in versions of desktop GL that

[Mesa-dev] [PATCH 08/26] glsl: Rework lexer keyword handling in preparation for GLSL 3.00 ES.

2012-11-30 Thread Ian Romanick
From: Paul Berry This patch expands the lexer KEYWORD macro to take two additional arguments: the GLSL ES versions in which the given keyword was first reserved, and supported, respectively. This will allow us to trivially add support for GLSL 3.00 ES keywords, even though the set of GLSL 3.00 E

[Mesa-dev] [PATCH 07/26] glsl: Make use of new _mesa_glsl_parse_state::check_version() function.

2012-11-30 Thread Ian Romanick
From: Paul Berry Previous to this patch, we were not very consistent about the errors we generate when a shader tried to use a feature that is prohibited in the current GLSL version. Some error messages failed to mention the GLSL version currently in use (or did so inaccurately), and some error

[Mesa-dev] [PATCH 06/26] glsl: Make use of new _mesa_glsl_parse_state::is_version() function.

2012-11-30 Thread Ian Romanick
From: Paul Berry Reviewed-by: Ian Romanick --- src/glsl/ast_function.cpp | 2 +- src/glsl/ast_to_hir.cpp | 40 ++-- src/glsl/glsl_lexer.ll| 4 ++-- src/glsl/glsl_parser.yy | 5 +++-- src/glsl/glsl_types.cpp | 8 +--- 5 files changed, 33 inse

[Mesa-dev] [PATCH 03/26] glsl: Make a function to express a GLSL version ir human-readable form.

2012-11-30 Thread Ian Romanick
From: Paul Berry This will be useful in generating more helpful error messages, especially with the addition of GLSL 3.00 ES support. [v2, idr]: Rename ctx parameter to mem_ctx Signed-off-by: Ian Romanick --- src/glsl/glsl_parser.yy | 6 ++ src/glsl/glsl_parser_extras.cpp | 10 ++

[Mesa-dev] [PATCH 04/26] glsl: Compute version_string on the fly.

2012-11-30 Thread Ian Romanick
From: Paul Berry Fixes a bug where version_string would be left uninitialized if no GLSL "#version" directive was used. --- src/glsl/ast_to_hir.cpp | 6 +++--- src/glsl/glsl_parser.yy | 13 + src/glsl/glsl_parser_extras.h | 11 ++- 3 files changed, 18 insertions(

[Mesa-dev] [PATCH 02/26] glsl: Simplify symbol table version checking.

2012-11-30 Thread Ian Romanick
From: Paul Berry Previously, we stored the GLSL language version in the glsl_symbol_table struct. But this was unnecessary--all glsl_symbol_table needs to know is whether functions and variables have separate namespaces (they do in GLSL 1.10 only). Reviewed-by: Ian Romanick --- src/glsl/ast_f

[Mesa-dev] [PATCH 01/26] mesa: Add ARB_ES3_compatibility flag.

2012-11-30 Thread Ian Romanick
From: Paul Berry Adding this now makes it easier to develop and test GLES3 features, since we can do initial development and testing using desktop GL. Later GLSL compiler patches check for either ctx->Extensions.ARB_ES3_compatibility or _mesa_is_gles3 to allow certain features (i.e., "#version 3

Re: [Mesa-dev] [PATCH] mesa: move some helper functions from fboobject.c to glformats.c

2012-11-30 Thread Ian Romanick
On 11/28/2012 04:32 PM, Marek Olšák wrote: On Thu, Nov 29, 2012 at 1:23 AM, Ian Romanick wrote: On 11/28/2012 10:07 AM, Marek Olšák wrote: It looks reasonable enough, but... why? Is there a follow-up patch that uses it them in some other file? Brian suggested it just in case somebody else n

Re: [Mesa-dev] [PATCH] android: fix bison warning of conflicting outputs to file

2012-11-30 Thread Ian Romanick
On 11/29/2012 11:52 PM, gro...@gmail.com wrote: From: Adrian Marius Negreanu Bison -o parameter expects a .c file. The corresponding .h filename is obtained by removing the extension of the initial .c. This was breaking compilation on Ubuntu 12.04 libmesa_dricore_intermediates/libmesa_dricore

Re: [Mesa-dev] [PATCH] glsl: fix cut-n-paste error in error handling. (v2)

2012-11-30 Thread Ian Romanick
On 11/30/2012 12:34 AM, Dave Airlie wrote: Reported by coverity scan. v2: fix second case Signed-off-by: Dave Airlie This should also go into stable branches. It should only affect debug builds. Reviewed-by: Ian Romanick --- src/glsl/ir_validate.cpp | 4 ++-- 1 file changed, 2 inse

[Mesa-dev] [Bug 57241] Gallium drivers should support forward-compatible contexts

2012-11-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=57241 --- Comment #8 from Ian Romanick --- (In reply to comment #7) > This is not a bug. Failing to create a forward compatible context is allowed > by the specification. Right... which is why I changed the subject and changed the severity to "enhance

[Mesa-dev] [PATCH 2/2] llvmpipe: Improve color buffer loads/stores alignment.

2012-11-30 Thread jfonseca
From: José Fonseca Tell LLVM the exact alignment we can guarantee, based on the fs block dimensions, pixel format, and the alignment of the resource base pointer and stride. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 31 +++- 1 file changed, 21 insertions(+), 10 d

[Mesa-dev] [PATCH 1/2] llvmpipe: Recompute the fs shader key when framebuffer varies.

2012-11-30 Thread jfonseca
From: José Fonseca The fs shader now depends on the color buffer formats. The shader key was extended to accommodate this, but llvmpipe_update_derived needs to be updated to check the framebuffer dirty flag. This fixes bug 57674. --- src/gallium/drivers/llvmpipe/lp_state_derived.c |1 + 1 f

Re: [Mesa-dev] Please test the automake-gallium4 branch

2012-11-30 Thread Tom Stellard
On Wed, Nov 28, 2012 at 07:50:02PM +0100, Andreas Boll wrote: > 2012/11/28 Michel Dänzer : > > On Fre, 2012-11-23 at 22:23 +0100, Andreas Boll wrote: > >> > >> Please help Matt and me to test the automake-gallium4 branch [1] ! > >> > >> Here you have a list of things you could test: > > [...] > >>

Re: [Mesa-dev] Proposal: allow hidden security bugs on Mesa's Bugzilla

2012-11-30 Thread Jerome Glisse
On Fri, Nov 30, 2012 at 7:43 AM, Benoit Jacob wrote: > On 12-11-23 02:21 PM, Benoit Jacob wrote: >> On 12-11-21 12:48 PM, Chad Versace wrote: >>> On 11/20/2012 09:29 AM, Benoit Jacob wrote: >>> Any questions? Do you support or oppose me asking FD.o admins to allow hidden bugs on Mes

Re: [Mesa-dev] [PATCH 2/2] radeon/llvm: replace int_AMDGPU_rcp by fdiv (1.0, x) in RECIP pattern

2012-11-30 Thread Tom Stellard
On Thu, Nov 29, 2012 at 09:58:40PM +0100, Vincent Lejeune wrote: > --- > lib/Target/AMDGPU/R600Instructions.td | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/Target/AMDGPU/R600Instructions.td > b/lib/Target/AMDGPU/R600Instructions.td > index 9259680..d75c32e 100

Re: [Mesa-dev] [PATCH 2/2] r600g: use default action for min/max opcode in tgsi to llvm

2012-11-30 Thread Tom Stellard
On Thu, Nov 29, 2012 at 11:51:33PM +0100, Vincent Lejeune wrote: > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 4 > 1 file changed, 4 deletions(-) > I think it would be good to replace the MIN/MAX patterns in {R600,SI}Instructions.td to match LLVM IR rather than the old intri

Re: [Mesa-dev] [PATCH 1/2] gallivm: Have a default emit function for min/max opcode

2012-11-30 Thread Tom Stellard
On Thu, Nov 29, 2012 at 11:51:32PM +0100, Vincent Lejeune wrote: > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 31 > ++ > 1 file changed, 31 insertions(+) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c > b/src/gallium/auxiliary/gallivm/lp_

Re: [Mesa-dev] [PATCH 2/2] r600g: use default action for fdiv/rcp opcode

2012-11-30 Thread Tom Stellard
On Thu, Nov 29, 2012 at 11:50:23PM +0100, Vincent Lejeune wrote: > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > Reviewed-by: Tom Stellard > diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c > b/src/gal

Re: [Mesa-dev] [PATCH 1/2] gallivm: have a default emit function for fdiv/rcp

2012-11-30 Thread Tom Stellard
On Thu, Nov 29, 2012 at 11:50:22PM +0100, Vincent Lejeune wrote: > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 24 > ++ > 1 file changed, 24 insertions(+) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c > b/src/gallium/auxiliary/gallivm/lp_b

Re: [Mesa-dev] [PATCH] r600g: Use default mul/mad function for tgsi-to-llvm

2012-11-30 Thread Tom Stellard
On Thu, Nov 29, 2012 at 11:48:39PM +0100, Vincent Lejeune wrote: > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > Reviewed-by: Tom Stellard > diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c > b/

Re: [Mesa-dev] [PATCH mesa] egl/wayland: Don't invalidate drawable on swap buffers

2012-11-30 Thread Kristian Høgsberg
On Fri, Nov 30, 2012 at 05:41:02PM +0200, Ander Conselvan de Oliveira wrote: > We used to invalidate the drawable after a call to eglSwapBuffers(), > so that a wl_egl_window_resize() would take effect for the next frame. > However, that leads to calling dri2_get_buffers() when eglMakeCurrent() > is

[Mesa-dev] [PATCH mesa] egl/wayland: Don't invalidate drawable on swap buffers

2012-11-30 Thread Ander Conselvan de Oliveira
We used to invalidate the drawable after a call to eglSwapBuffers(), so that a wl_egl_window_resize() would take effect for the next frame. However, that leads to calling dri2_get_buffers() when eglMakeCurrent() is called with the current context and surface, and a later call to wl_egl_window_resiz

Re: [Mesa-dev] suspect rcp code in llvmpipe

2012-11-30 Thread Jose Fonseca
- Original Message - > On 11/30/2012 03:10 AM, Dave Airlie wrote: > > coverity pointed out the below as suspect, since num_iterations = > > 0, > > and we do a loop from 0..0 > > > > Dave. > > > > if (FALSE&& ((util_cpu_caps.has_sse&& type.width == 32&& > > type.length == 4) || > >

Re: [Mesa-dev] [PATCH] radeon: Fix memory leak in radeonCreateScreen2.

2012-11-30 Thread Brian Paul
On 11/30/2012 12:25 AM, Vinson Lee wrote: Fixes a memory leak defect reported by Coverity. Signed-off-by: Vinson Lee --- src/mesa/drivers/dri/radeon/radeon_screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/d

Re: [Mesa-dev] [PATCH 1/2] glsl: initialise killed_all field.

2012-11-30 Thread Brian Paul
On 11/30/2012 03:25 AM, Dave Airlie wrote: coverity pointed out this field was being used uninitialised. Signed-off-by: Dave Airlie --- src/glsl/opt_constant_propagation.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_prop

Re: [Mesa-dev] suspect rcp code in llvmpipe

2012-11-30 Thread Brian Paul
On 11/30/2012 03:10 AM, Dave Airlie wrote: coverity pointed out the below as suspect, since num_iterations = 0, and we do a loop from 0..0 Dave. if (FALSE&& ((util_cpu_caps.has_sse&& type.width == 32&& type.length == 4) || (util_cpu_caps.has_avx&& type.width == 32&& type.length

Re: [Mesa-dev] [PATCH] svga: remove pointless assert on unsigned >= 0

2012-11-30 Thread Brian Paul
On 11/30/2012 03:05 AM, Dave Airlie wrote: all unsigneds are>= 0 :-) There may be an argument for leaving this in, in case someone changes min_lod to an integer, so feel free to apply or drop. Signed-off-by: Dave Airlie --- src/gallium/drivers/svga/svga_sampler_view.c | 1 - 1 file changed,

Re: [Mesa-dev] [PATCH] dri_glx: fix use after free report

2012-11-30 Thread Brian Paul
On 11/30/2012 07:21 AM, Alex Deucher wrote: On Fri, Nov 30, 2012 at 2:48 AM, Dave Airlie wrote: the critical error would use driverName. Found by internal RH coverity scan. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Candidate for stable branches? -Brian ___

Re: [Mesa-dev] [PATCH] dri_glx: fix use after free report

2012-11-30 Thread Alex Deucher
On Fri, Nov 30, 2012 at 2:48 AM, Dave Airlie wrote: > the critical error would use driverName. > > Found by internal RH coverity scan. > > Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher > --- > src/glx/dri_glx.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git

Re: [Mesa-dev] Proposal: allow hidden security bugs on Mesa's Bugzilla

2012-11-30 Thread Benoit Jacob
Aaargh On 12-11-30 07:55 AM, Marek Olšák wrote: > I can see that the security test bug is assigned to mesa-dev by > default, so all comments go to the mailing list. I don't thínk that's > desirable. > > Marek > > On Fri, Nov 30, 2012 at 1:43 PM, Benoit Jacob wrote: >> On 12-11-23 02:21 PM

[Mesa-dev] [Bug 57733] New: read-after-free with llvmpipe in try_update_scene_state

2012-11-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=57733 Priority: medium Group: Mesa Security Bug ID: 57733 CC: bri...@vmware.com, jfons...@vmware.com Assignee: mesa-dev@lists.freedesktop.org Summary: read-after-free with llvmpipe

  1   2   >