Re: [Mesa-dev] [v2 PATCH 0/5] Fix implicit type conversion errors

2011-07-29 Thread Kenneth Graunke
On 07/29/2011 06:58 PM, Chad Versace wrote: > Fix implicit type conversion errors > > Fixes Piglit tests: > spec/glsl-1.20/compiler/built-in-functions/outerProduct-bvec*.vert > > spec/glsl-1.20/compiler/structure-and-array-operations/array-ctor-implicit-conversion-bool-float.vert >

[Mesa-dev] [PATCH v4] r600g: use backend mask for occlusion queries

2011-07-29 Thread Vadim Girlin
Use backend_map kernel query if supported, otherwise analyze ZPASS_DONE results to get the mask. Fixes lockups with predicated rendering due to incorrect query buffer initialization on some cards. Signed-off-by: Vadim Girlin --- v4: Added backend_map_valid flag to "struct radeon" to determine i

[Mesa-dev] [PATCH 5/5] glsl: Clarify ir_function::matching_sigature()

2011-07-29 Thread Chad Versace
The function used a variable named 'score', which was an outright lie. A signature matches or it doesn't; there is no fuzzy scoring. Change the return type of parameter_lists_match() to an enum, and let ir_function::matching_sigature() switch on that enum. CC: Ian Romanick CC: Kenneth Graunke S

[Mesa-dev] [PATCH 4/5] glsl: Fix conversions in array constructors

2011-07-29 Thread Chad Versace
Array constructors obey narrower conversion rules than other constructors [1] --- they use the implicit conversion rules [2] instead of the scalar constructor conversions [3]. But process_array_constructor() was incorrectly applying the broader rules. [1] GLSL 1.50 spec, Section 5.4.4 Array Const

[Mesa-dev] [PATCH 3/5] glsl: Remove ir_function.cpp:type_compare()

2011-07-29 Thread Chad Versace
The function is no longer used and has been replaced by glsl_type::can_implicitly_convert_to(). Note: This is a candidate for the 7.10 and 7.11 branches. CC: Ian Romanick CC: Kenneth Graunke Signed-off-by: Chad Versace --- src/glsl/ir_function.cpp | 61 ---

[Mesa-dev] [PATCH 2/5] glsl: Fix implicit conversions in non-constructor function calls

2011-07-29 Thread Chad Versace
Context --- In ast_function_expression::hir(), parameter_lists_match() checks if the function call's actual parameter list matches the signature's parameter list, where the match may require implicit conversion of some arguments. To check if an implicit conversion exists between individual argu

Re: [Mesa-dev] [PATCH 0/5] Fix implicit type conversion errors

2011-07-29 Thread Chad Versace
On 07/27/2011 10:55 PM, Chad Versace wrote: > Fixes Piglit tests: > spec/glsl-1.20/compiler/built-in-functions/outerProduct-bvec*.vert > > spec/glsl-1.20/compiler/structure-and-array-operations/array-ctor-implicit-conversion-bool-float.vert > > spec/glsl-1.20/compiler/structure-and-ar

[Mesa-dev] [PATCH 1/5] glsl: Add method glsl_type::can_implicitly_convert_to()

2011-07-29 Thread Chad Versace
This method checks if a source type is identical to or can be implicitly converted to a target type according to the GLSL 1.20 spec, Section 4.1.10 Implicit Conversions. The following commits use the method for a bugfix: glsl: Fix implicit conversions in non-constructor function calls glsl

[Mesa-dev] [v2 PATCH 0/5] Fix implicit type conversion errors

2011-07-29 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fix implicit type conversion errors Fixes Piglit tests: spec/glsl-1.20/compiler/built-in-functions/outerProduct-bvec*.vert spec/glsl-1.20/compiler/structure-and-array-operations/array-ctor-implicit-conversion-bool-float.vert spec/gls

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Younes Manton
On Fri, Jul 29, 2011 at 8:15 PM, Maarten Lankhorst wrote: > On 07/30/2011 01:57 AM, Younes Manton wrote: >> On Fri, Jul 29, 2011 at 7:45 PM, Maarten Lankhorst >> wrote: >>> On 07/30/2011 01:05 AM, Younes Manton wrote: On Fri, Jul 29, 2011 at 6:46 PM, Maarten Lankhorst wrote: >> 2nd

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Maarten Lankhorst
On 07/30/2011 01:57 AM, Younes Manton wrote: > On Fri, Jul 29, 2011 at 7:45 PM, Maarten Lankhorst > wrote: >> On 07/30/2011 01:05 AM, Younes Manton wrote: >>> On Fri, Jul 29, 2011 at 6:46 PM, Maarten Lankhorst >>> wrote: > 2nd patch isn't needed. You shouldn't call vl_video_buffer_create_ex,

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Younes Manton
On Fri, Jul 29, 2011 at 7:45 PM, Maarten Lankhorst wrote: > On 07/30/2011 01:05 AM, Younes Manton wrote: >> On Fri, Jul 29, 2011 at 6:46 PM, Maarten Lankhorst >> wrote: 2nd patch isn't needed. You shouldn't call vl_video_buffer_create_ex, you should override the create_buffer hook yours

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Maarten Lankhorst
On 07/30/2011 01:05 AM, Younes Manton wrote: > On Fri, Jul 29, 2011 at 6:46 PM, Maarten Lankhorst > wrote: >>> 2nd patch isn't needed. You shouldn't call vl_video_buffer_create_ex, >>> you should override the create_buffer hook yourself and do what you >>> want. I'll push the 1st one later. >> Wha

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Maarten Lankhorst
On 07/30/2011 12:48 AM, Jimmy Rentz wrote: > On Fri, 29 Jul 2011 15:37:19 +0200 > Maarten Lankhorst wrote: > >> Hi guys, >> >> With some help from the nouveau team I managed to get video >> acceleration working for my nv96 card. The video buffer api works >> well enough for nouveau, I added flags

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Younes Manton
On Fri, Jul 29, 2011 at 6:46 PM, Maarten Lankhorst wrote: >> 2nd patch isn't needed. You shouldn't call vl_video_buffer_create_ex, >> you should override the create_buffer hook yourself and do what you >> want. I'll push the 1st one later. > What create_buffer hook do you mean? If you mean > pipe_

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Maarten Lankhorst
On 07/30/2011 12:23 AM, Younes Manton wrote: > On Fri, Jul 29, 2011 at 9:37 AM, Maarten Lankhorst > wrote: >> Hi guys, >> >> With some help from the nouveau team I managed to get video acceleration >> working for my nv96 card. The video buffer api works well enough for nouveau, >> I added flags to

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Younes Manton
On Fri, Jul 29, 2011 at 9:37 AM, Maarten Lankhorst wrote: > Hi guys, > > With some help from the nouveau team I managed to get video acceleration > working for my nv96 card. The video buffer api works well enough for nouveau, > I added flags to vl_video_buffer_create_ex so I could force a linear s

Re: [Mesa-dev] [PATCH 5/5] glsl: Clarify ir_function::matching_sigature()

2011-07-29 Thread Kenneth Graunke
On 07/27/2011 10:55 PM, Chad Versace wrote: > The function used a variable named 'score', which was an outright lie. > A signature matches or it doesn't; there is no fuzzy scoring. > > CC: Ian Romanick > CC: Kenneth Graunke > Signed-off-by: Chad Versace > --- > src/glsl/ir_function.cpp | 19

Re: [Mesa-dev] [PATCH 2/5] glsl: Fix implicit conversions in non-constructor function calls

2011-07-29 Thread Kenneth Graunke
On 07/27/2011 10:55 PM, Chad Versace wrote: > Context > --- > In ast_function_expression::hir(), parameter_lists_match() checks if the > function call's actual parameter list matches the signature's parameter > list, where the match may require implicit conversion of some arguments. > To check

Re: [Mesa-dev] [PATCH 4/5] glsl: Fix conversions in array constructors

2011-07-29 Thread Chad Versace
On 07/29/2011 01:57 PM, Kenneth Graunke wrote: > On 07/27/2011 10:55 PM, Chad Versace wrote: >> Array constructors obey narrower conversion rules than other constructors >> [1] --- they use the implicit conversion rules [2] instead of the scalar >> constructor conversions [3]. But process_array_co

Re: [Mesa-dev] [PATCH 4/5] glsl: Fix conversions in array constructors

2011-07-29 Thread Kenneth Graunke
On 07/27/2011 10:55 PM, Chad Versace wrote: > Array constructors obey narrower conversion rules than other constructors > [1] --- they use the implicit conversion rules [2] instead of the scalar > constructor conversions [3]. But process_array_constructor() was > incorrectly applying the broader r

[Mesa-dev] [PATCH 5/6] prog_optimize: Add support for saturates to _mesa_merge_mov_into_inst.

2011-07-29 Thread Eric Anholt
This fixes the remaining regression from ff_fragment_shader in Mesa IR instruction count, to now being a 1.9% win overall. --- src/mesa/program/prog_optimize.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_o

[Mesa-dev] [PATCH 6/6] ir_to_mesa: Try to avoid emitting a MOV_SAT to saturate an expression tree.

2011-07-29 Thread Eric Anholt
Fixes a regression in codegen quality for ff_fragment_shader conversion to GLSL -- glean texCombine produces 7.5% fewer Mesa IR instructions. --- src/mesa/program/ir_to_mesa.cpp | 28 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/mesa/program/ir

[Mesa-dev] [PATCH 1/6] i965/fs: Don't allocate the old backend's compile structs for our compile.

2011-07-29 Thread Eric Anholt
This saves some 35MB when the program only uses GLSL shaders. --- src/mesa/drivers/dri/i965/brw_wm.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index b0dfdd5..d13ac61 100644 --- a/src/m

[Mesa-dev] [PATCH 2/6] i965/fs: Don't upload unused uniform components.

2011-07-29 Thread Eric Anholt
This saves both register space and upload bandwidth for unused values. Note that previously we were relying on the visitor not initially generating references to different sets of uniforms between the 8-wide and 16-wide code generation, and now we're relying on them dead-code eliminating the same

[Mesa-dev] ff_fragment_shader prep work

2011-07-29 Thread Eric Anholt
Here's a patch series of the remaining prep work I have on hand for the ff_fragment_shader conversion to GLSL IR. At this point, ff_fragment_shader is generating fewer Mesa IR instructions for glean texCombine than it was before, and the multitexturing openarena shader is generating 2/3 fewer inst

[Mesa-dev] [PATCH 3/6] mesa: Remove dead "MemPool" field of gl_shader_state.

2011-07-29 Thread Eric Anholt
--- src/mesa/main/mtypes.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b881183..2d5f44c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2252,8 +2252,6 @@ struct gl_shader_state */ stru

[Mesa-dev] [PATCH 4/6] i965: Add dumping for gen6 WM constants too.

2011-07-29 Thread Eric Anholt
This looks just like the VS dump for now. --- src/mesa/drivers/dri/i965/brw_context.h|1 + src/mesa/drivers/dri/i965/brw_state_dump.c | 20 src/mesa/drivers/dri/i965/gen6_wm_state.c |2 +- 3 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/mesa/

[Mesa-dev] [PATCH] st/xorg: Advertise support for XvMC

2011-07-29 Thread Maarten Lankhorst
Formats were based on a patch sent to xf86-video-nouveau by Bryan Cain Signed-off-by: Maarten Lankhorst --- src/gallium/state_trackers/xorg/xorg_tracker.h |7 ++ src/gallium/state_trackers/xorg/xorg_xv.c |2 + src/gallium/state_trackers/xorg/xorg_xvmc.c| 119 +++

Re: [Mesa-dev] Implementing an HW accelerated GL_SELECT

2011-07-29 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/29/2011 06:19 AM, Micael wrote: > Hi > > There has been some work towards having GL_SELECT hardware accelerated > accelerated on [1] and it's possible I may have some time to rewrite > this code in order to be able to switch between the current

[Mesa-dev] [Bug 39645] Mesa crashes when trying to run an OpenGL ES 2 app

2011-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39645 --- Comment #10 from Ian Romanick 2011-07-29 10:09:10 PDT --- (In reply to comment #9) > As mentioned before, this is a configuration problem. > > Currently we cannot automatically decide which egl backend should be used from > of a EGLNativeDi

Re: [Mesa-dev] [PATCH] r600g: fix vs export count

2011-07-29 Thread Alex Deucher
On Fri, Jul 29, 2011 at 10:04 AM, Alex Deucher wrote: > On Fri, Jul 29, 2011 at 7:51 AM, Dave Airlie wrote: >> On Fri, Jul 29, 2011 at 12:41 PM, Vadim Girlin wrote: >>> On Fri, 2011-07-29 at 12:20 +0100, Dave Airlie wrote: On Thu, Jul 28, 2011 at 9:33 PM, Vadim Girlin wrote: > F

[Mesa-dev] Implementing an HW accelerated GL_SELECT

2011-07-29 Thread Micael
Hi There has been some work towards having GL_SELECT hardware accelerated accelerated on [1] and it's possible I may have some time to rewrite this code in order to be able to switch between the current behavior and the new HW accelerated behavior using a runtime command line option. However, bef

Re: [Mesa-dev] [PATCH] r600g: fix vs export count

2011-07-29 Thread Alex Deucher
On Fri, Jul 29, 2011 at 7:51 AM, Dave Airlie wrote: > On Fri, Jul 29, 2011 at 12:41 PM, Vadim Girlin wrote: >> On Fri, 2011-07-29 at 12:20 +0100, Dave Airlie wrote: >>> On Thu, Jul 28, 2011 at 9:33 PM, Vadim Girlin wrote: >>> > Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39572 >>> >>> Hi

[Mesa-dev] hardware xvmc video decoding with nouveau

2011-07-29 Thread Maarten Lankhorst
Hi guys, With some help from the nouveau team I managed to get video acceleration working for my nv96 card. The video buffer api works well enough for nouveau, I added flags to vl_video_buffer_create_ex so I could force a linear surface with a nouveau specific resource flag, which I only specified

Re: [Mesa-dev] [PATCH] r600g: fix vs export count

2011-07-29 Thread Dave Airlie
On Fri, Jul 29, 2011 at 12:41 PM, Vadim Girlin wrote: > On Fri, 2011-07-29 at 12:20 +0100, Dave Airlie wrote: >> On Thu, Jul 28, 2011 at 9:33 PM, Vadim Girlin wrote: >> > Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39572 >> >> Hi Vadim, >> >> has this passed a full piglit run without regre

Re: [Mesa-dev] [PATCH] r600g: fix vs export count

2011-07-29 Thread Vadim Girlin
On Fri, 2011-07-29 at 12:20 +0100, Dave Airlie wrote: > On Thu, Jul 28, 2011 at 9:33 PM, Vadim Girlin wrote: > > Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39572 > > Hi Vadim, > > has this passed a full piglit run without regression? > > Dave. Hi Dave. I've tested this patch with r600

Re: [Mesa-dev] [PATCH] r600g: fix vs export count

2011-07-29 Thread Dave Airlie
On Thu, Jul 28, 2011 at 9:33 PM, Vadim Girlin wrote: > Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39572 Hi Vadim, has this passed a full piglit run without regression? Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists

[Mesa-dev] [Bug 39645] Mesa crashes when trying to run an OpenGL ES 2 app

2011-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39645 Benjamin Franzke changed: What|Removed |Added Status|NEW |RESOLVED Resolution|