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

2012-11-30 Thread Vinson Lee
Fixes a memory leak defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- 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

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

2012-11-30 Thread Dave Airlie
the critical error would use driverName. Found by internal RH coverity scan. Signed-off-by: Dave Airlie airl...@redhat.com --- src/glx/dri_glx.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index de777fb..f42db79 100644 ---

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

2012-11-30 Thread groleo
From: Adrian Marius Negreanu adrian.m.negre...@intel.com 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

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

2012-11-30 Thread Dave Airlie
Reported by coverity scan. v2: fix second case Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/ir_validate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index af0b576..ad57a31 100644 ---

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

2012-11-30 Thread Dave Airlie
Reported by coverity scan. Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/ir_validate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index af0b576..5ac0ad3 100644 --- a/src/glsl/ir_validate.cpp +++

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

2012-11-30 Thread Matt Turner
On Fri, Nov 30, 2012 at 12:34 AM, Dave Airlie airl...@gmail.com wrote: Reported by coverity scan. v2: fix second case Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/ir_validate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

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

2012-11-30 Thread Tapani Pälli
On 11/30/2012 09:52 AM, gro...@gmail.com wrote: From: Adrian Marius Negreanu adrian.m.negre...@intel.com 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

[Mesa-dev] suspect rcp code in llvmpipe

2012-11-30 Thread Dave Airlie
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 == 8))){ const unsigned num_iterations = 0;

[Mesa-dev] leak in loop_analysis

2012-11-30 Thread Dave Airlie
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. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

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

2012-11-30 Thread Dave Airlie
coverity pointed out this field was being used uninitialised. Signed-off-by: Dave Airlie airl...@redhat.com --- 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_propagation.cpp index

[Mesa-dev] [PATCH 2/2] glsl: fix uninitialised variable from constructor

2012-11-30 Thread Dave Airlie
Coverity pointed out this uninitialised class member. Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/ir_function_detect_recursion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/ir_function_detect_recursion.cpp b/src/glsl/ir_function_detect_recursion.cpp index

Re: [Mesa-dev] No luck with tstellar/llvm on HD4890

2012-11-30 Thread Andy Furniss
Andy Furniss wrote: Andy Furniss wrote: Tom Stellard wrote: On Wed, Nov 07, 2012 at 09:24:13PM +, Andy Furniss wrote: Vincent Lejeune wrote: git seems to have trouble sending my patch to ML atm, can you manually apply it ? It fixes lock up here diff --git

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

2012-11-30 Thread Dave Airlie
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 airl...@redhat.com --- src/gallium/drivers/svga/svga_sampler_view.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 1/2] radeon/llvm: switch instructions matching fmul and int_AMDGPU_mul

2012-11-30 Thread Michel Dänzer
On Don, 2012-11-29 at 21:58 +0100, Vincent Lejeune wrote: diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td index b0c1628..9259680 100644 --- a/lib/Target/AMDGPU/R600Instructions.td +++ b/lib/Target/AMDGPU/R600Instructions.td @@ -553,8 +553,8 @@ let

Re: [Mesa-dev] [PATCH] radeonsi: Bitcast result of packf16 intrinsic to float for export intrinsic.

2012-11-30 Thread Michel Dänzer
On Don, 2012-11-29 at 08:45 -0800, Tom Stellard wrote: On Tue, Nov 27, 2012 at 07:55:05PM +0100, Michel Dänzer wrote: diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index d6e37ac..d5d56c4 100644 ---

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

2012-11-30 Thread Benoit Jacob
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 Mesa's bugzilla? Benoit I support this. It seems a sensible proposal for

Re: [Mesa-dev] [PATCH] r300g: fix comparison of hyperz flush time.

2012-11-30 Thread Marek Olšák
Hi Dave, thanks for pointing it out. The conditional should be: else if (r300-hyperz_time_of_last_flush 200) { With that, this is: Reviewed-by: Marek Olšák mar...@gmail.com Marek On Fri, Nov 30, 2012 at 9:28 AM, Dave Airlie airl...@gmail.com wrote: I haven't confirmed this is doing the

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

2012-11-30 Thread Marek Olšák
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 bja...@mozilla.com wrote: On 12-11-23 02:21 PM, Benoit Jacob wrote: On 12-11-21 12:48 PM, Chad

[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

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 bja...@mozilla.com wrote: On

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 airl...@gmail.com wrote: the critical error would use driverName. Found by internal RH coverity scan. Signed-off-by: Dave Airlie airl...@redhat.com Reviewed-by: Alex Deucher alexander.deuc...@amd.com --- src/glx/dri_glx.c | 5 - 1 file

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 Airlieairl...@gmail.com wrote: the critical error would use driverName. Found by internal RH coverity scan. Signed-off-by: Dave Airlieairl...@redhat.com Reviewed-by: Alex Deucheralexander.deuc...@amd.com

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 Airlieairl...@redhat.com --- src/gallium/drivers/svga/svga_sampler_view.c | 1 -

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 == 8))){

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 Airlieairl...@redhat.com --- src/glsl/opt_constant_propagation.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/opt_constant_propagation.cpp

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 Leev...@freedesktop.org --- src/mesa/drivers/dri/radeon/radeon_screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

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) ||

[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

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

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 thomas.stell...@amd.com diff --git

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

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 thomas.stell...@amd.com diff --git

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

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

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 100644

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 bja...@mozilla.com 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

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 mic...@daenzer.net: 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: [...] -

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

2012-11-30 Thread jfonseca
From: José Fonseca jfons...@vmware.com 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. ---

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

2012-11-30 Thread jfonseca
From: José Fonseca jfons...@vmware.com 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

[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 i...@freedesktop.org --- (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

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 airl...@redhat.com This should also go into stable branches. It should only affect debug builds. Reviewed-by: Ian Romanick ian.d.roman...@intel.com ---

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 adrian.m.negre...@intel.com 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

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 i...@freedesktop.org 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

[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 stereotype...@gmail.com 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 ian.d.roman...@intel.com --- src/glsl/glsl_parser.yy | 6

[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 stereotype...@gmail.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- 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 +++--

[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 stereotype...@gmail.com 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

[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 stereotype...@gmail.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

[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 stereotype...@gmail.com 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.

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

[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 stereotype...@gmail.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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 stereotype...@gmail.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com ---

[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 stereotype...@gmail.com 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

[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 stereotype...@gmail.com 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 ian.d.roman...@intel.com --- src/glsl/linker.cpp| 1 + src/mesa/main/mtypes.h | 1 + 2 files

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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-dev] [PATCH 18/26] glsl: Fix linker checks for GLSL ES 3.00.

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

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

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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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 ian.d.roman...@intel.com --- src/glsl/builtin_variables.cpp | 193

[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 stereotype...@gmail.com 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

[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 stereotype...@gmail.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/builtins/profiles/100.frag | 6 - src/glsl/builtins/profiles/100.glsl | 296 --- src/glsl/builtins/profiles/100.vert | 6 -

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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 ian.d.roman...@intel.com --- src/glsl/builtins/glsl/determinant.glsl | 70

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

2012-11-30 Thread Ian Romanick
From: Kenneth Graunke kenn...@whitecape.org Fixes es3conform's explicit_attrib_location_integer_constants. Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Eric Anholt e...@anholt.net --- src/glsl/glsl_parser.yy | 1 + 1 file changed, 1 insertion(+) diff --git

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

2012-11-30 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com 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 ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org ---

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

2012-11-30 Thread jfonseca
From: José Fonseca jfons...@vmware.com 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

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?

[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

[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

[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

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 jfons...@vmware.com 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. ---

[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] 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 jfons...@vmware.com 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(-)

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.

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 jfons...@vmware.com 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 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. ---

[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(

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 matts...@gmail.com 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 ---

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

2012-11-30 Thread sroland
From: Roland Scheidegger srol...@vmware.com 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

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

2012-11-30 Thread Ian Romanick
From: Paul Berry stereotype...@gmail.com 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.

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 +++

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

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 bja...@mozilla.com 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

[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 +++

[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. ---

[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

[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

[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 +

[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

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, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com 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.

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 i...@freedesktop.org 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

[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

[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 dar...@chaosreigns.com changed: What|Removed |Added CC||dar...@chaosreigns.com

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 i...@freedesktop.org wrote: From: Paul Berry stereotype...@gmail.com 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

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

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

  1   2   >