Re: [Mesa-dev] [PATCH 7/9] i965/gs: Add opcodes needed for EndPrimitive().

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 08:20 AM, Paul Berry wrote: > --- > src/mesa/drivers/dri/i965/brw_defines.h | 21 > src/mesa/drivers/dri/i965/brw_shader.cpp| 4 ++ > src/mesa/drivers/dri/i965/brw_vec4.h| 2 + > src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 81 > ++

Re: [Mesa-dev] [PATCH] glsl: Add missing va_end in builtin_builder::add_function.

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 08:34 PM, Vinson Lee wrote: > Fixes "Missing varargs init or cleanup" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/glsl/builtin_functions.cpp | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functi

Re: [Mesa-dev] [PATCH] glsl: Initialize builtin_builder member variables.

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 08:48 PM, Vinson Lee wrote: > Fixes "Uninitialized pointer field" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/glsl/builtin_functions.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functio

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-09 Thread Chia-I Wu
On Tue, Sep 10, 2013 at 4:05 AM, Ian Romanick wrote: > On 09/05/2013 03:35 AM, Chia-I Wu wrote: >> sample_d is slower than the lowered version on gen7. For gen7, this improves >> Xonotic benchmark with Ultimate effects by as much as 25%: >> >> before the change: 40.06 fps >>

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-09 Thread Chia-I Wu
On Tue, Sep 10, 2013 at 4:01 AM, Ian Romanick wrote: > On 09/06/2013 05:05 AM, Chia-I Wu wrote: >> On Thu, Sep 5, 2013 at 9:57 PM, Chia-I Wu wrote: >>> On Thu, Sep 5, 2013 at 5:12 PM, Chris Forbes wrote: A possible explanation for the perf change is that Xonotic uses anisotropic filter

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-09 Thread Chia-I Wu
On Tue, Sep 10, 2013 at 3:48 AM, Ian Romanick wrote: > On 09/05/2013 08:57 AM, Chia-I Wu wrote: >> On Thu, Sep 5, 2013 at 5:12 PM, Chris Forbes wrote: >>> A possible explanation for the perf change is that Xonotic uses >>> anisotropic filtering at this quality level. Lowering to txl defeats >>> i

Re: [Mesa-dev] regression on nvc0 since floating point compare instructions

2013-09-09 Thread Dave Airlie
On Tue, Sep 10, 2013 at 12:04 PM, Dave Airlie wrote: > On Tue, Sep 10, 2013 at 11:59 AM, Dave Airlie wrote: >> Hey, >> >> so virgl stopped working on nouveau the other day and I bisected it to >> the enable of the floating point compare instructions in the state >> tracker, >> >> I've attached a

[Mesa-dev] [PATCH] glsl: Initialize builtin_builder member variables.

2013-09-09 Thread Vinson Lee
Fixes "Uninitialized pointer field" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/glsl/builtin_functions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 39127e6..ce78df1 100644 --- a/src/glsl/builti

[Mesa-dev] [PATCH] glsl: Add missing va_end in builtin_builder::add_function.

2013-09-09 Thread Vinson Lee
Fixes "Missing varargs init or cleanup" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/glsl/builtin_functions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 5d8f171..39127e6 100644 --- a/src/glsl/built

[Mesa-dev] [PATCH] radeonsi: Add parentheses around '|' operands.

2013-09-09 Thread Vinson Lee
Fixes GCC parentheses warning. r600_texture.c: In function 'si_texture_create': r600_texture.c:518:20: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] !(templ->bind & PIPE_BIND_CURSOR | PIPE_BIND_LINEAR)) { ^ Fixes "Wrong operator used"

Re: [Mesa-dev] regression on nvc0 since floating point compare instructions

2013-09-09 Thread Dave Airlie
On Tue, Sep 10, 2013 at 11:59 AM, Dave Airlie wrote: > Hey, > > so virgl stopped working on nouveau the other day and I bisected it to > the enable of the floating point compare instructions in the state > tracker, > > I've attached a shader runner file that makes it hang, As usual 5 secs after p

[Mesa-dev] regression on nvc0 since floating point compare instructions

2013-09-09 Thread Dave Airlie
Hey, so virgl stopped working on nouveau the other day and I bisected it to the enable of the floating point compare instructions in the state tracker, I've attached a shader runner file that makes it hang, Dave. nouveau-float-compare-regression.shader_test Description: Binary data ___

[Mesa-dev] [PATCH] mesa: Use correct enum conversion function.

2013-09-09 Thread Vinson Lee
Fixes "Mixing enum types" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/mesa/main/errors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index e1a9fe2..28357e0 100644 --- a/src/mesa/main/errors.c +++ b/src/mes

Re: [Mesa-dev] [PATCH 4/9] i965/gs: Set control data header size/format appropriately for EndPrimitive().

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 08:20 AM, Paul Berry wrote: > The gen7 geometry shader uses a "control data header" at the beginning > of the output URB entry to store either > > (a) flag bits (1 bit/vertex) indicating whether EndPrimitive() was > called after each vertex, or > > (b) stream ID bits (2 bits/ver

[Mesa-dev] [PATCH] mesa: Ensure gl_sync_object is fully initialized.

2013-09-09 Thread Vinson Lee
278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer field gl_sync_object:Label. A free of this pointer, added in commit 6d8dd59cf53d2f47b817d79204a52bb3a46e8c77, resulted in a crash. This patch fixes piglit ARB_sync regressions with swrast introduced by 6d8dd59cf53d2f47b817d79

Re: [Mesa-dev] [PATCH 2/2] glsl: fix variadic macro for MSVC

2013-09-09 Thread Brian Paul
On 09/09/2013 05:31 PM, Kenneth Graunke wrote: On 09/09/2013 04:03 PM, Brian Paul wrote: MSVC doesn't accept the rest... syntax. --- src/glsl/builtin_functions.cpp |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_func

Re: [Mesa-dev] [PATCH 3/9] glsl: During linking, record whether a GS uses EndPrimitive().

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 08:20 AM, Paul Berry wrote: > This information will be useful in the i965 back end, since we can > save some compilation effort if we know from the outset that the > shader never calls EndPrimitive(). > --- > src/glsl/linker.cpp | 31 +++ > src/mesa/

Re: [Mesa-dev] [PATCH 2/2] glsl: fix variadic macro for MSVC

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 04:03 PM, Brian Paul wrote: > MSVC doesn't accept the rest... syntax. > --- > src/glsl/builtin_functions.cpp |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp > index eca41aa..5d8f171 10064

Re: [Mesa-dev] [PATCH 2/9] i965/gs: Add a state atom to set up geometry shader state.

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 08:20 AM, Paul Berry wrote: > v2: Do not attempt to share the code that uploads > 3DSTATE_BINDING_TABLE_POINTERS_GS, 3DSTATE_SAMPLER_STATE_POINTERS_GS, > or 3DSTATE_GS with VS. > --- > src/mesa/drivers/dri/i965/Makefile.sources | 1 + > src/mesa/drivers/dri/i965/brw_defines.h

[Mesa-dev] [Bug 69148] configure does not accept --with-driver

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69148 --- Comment #2 from Matt Turner --- Patch sent. -- You are receiving this mail because: You are the QA Contact for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freede

[Mesa-dev] [PATCH] docs: Clean up autoconf.html.

2013-09-09 Thread Matt Turner
Remove long dead options and clarify some things. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69148 --- docs/autoconf.html | 37 ++--- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/docs/autoconf.html b/docs/autoconf.html index a07a3ee..

[Mesa-dev] [PATCH 2/2] glsl: fix variadic macro for MSVC

2013-09-09 Thread Brian Paul
MSVC doesn't accept the rest... syntax. --- src/glsl/builtin_functions.cpp |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index eca41aa..5d8f171 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/bu

[Mesa-dev] [PATCH] glsl: Implement MESA_shader_integer_mix extension.

2013-09-09 Thread Matt Turner
Because why doesn't GLSL allow you to do this already? Reviewed-by: Kenneth Graunke --- docs/specs/MESA_shader_integer_mix.spec | 135 src/glsl/builtin_functions.cpp | 39 +++-- src/glsl/glcpp/glcpp-parse.y| 3 + src/glsl/glsl_parser_e

[Mesa-dev] [PATCH 1/2] glsl: remove struct keyword from ir_variable declarations

2013-09-09 Thread Brian Paul
To silence MSVC warnings. --- src/glsl/opt_dead_builtin_varyings.cpp |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/glsl/opt_dead_builtin_varyings.cpp b/src/glsl/opt_dead_builtin_varyings.cpp index 6745d5c..3cdd130 100644 --- a/src/glsl/opt_dead_builtin_varying

[Mesa-dev] [PATCH 3/3] i965: Add an assertion that writemask != NULL for non-ARFs.

2013-09-09 Thread Kenneth Graunke
We've observed GPU hangs on Ivybridge from the following instruction: mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q }; There should be no reason to ever set the writemask on a destination register to zero, except for perhaps the ARF NULL register. This patch adds an assertion to enforce thi

[Mesa-dev] [PATCH 2/3] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Kenneth Graunke
Otherwise, coordinates with four components would result in a MOV with a destination writemask that has no channels enabled: mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q }; At best, this is stupid: we emit code that shouldn't do anything. Worse, it apparently causes GPU hangs (observable wi

[Mesa-dev] [PATCH 1/3] i965/vec4: Simplify the computation of coord_mask and zero_mask.

2013-09-09 Thread Kenneth Graunke
We can easily compute these without loops, resulting in simpler and shorter code. Signed-off-by: Kenneth Graunke Cc: Ian Romanick Cc: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/

Re: [Mesa-dev] [PATCH 2/3] r600g: add support for separately allocated CMASKs

2013-09-09 Thread Grigori Goronzy
On 09.09.2013 16:09, Marek Olšák wrote: /* Check colorbuffers. */ for (i = 0; i < rctx->framebuffer.state.nr_cbufs; i++) { + struct r600_texture *tex = + (struct r600_texture*)rctx->framebuffer.state.cbufs[i]->texture; + Please check if cbu

Re: [Mesa-dev] [PATCH] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 01:54 PM, Ian Romanick wrote: On 09/09/2013 03:35 PM, Ian Romanick wrote: On 09/09/2013 01:38 PM, Kenneth Graunke wrote: Otherwise, coordinates with four components would result in a MOV with a destination writemask that has no channels enabled: mov(8) g115<1>.F 0D { align16 WE_n

[Mesa-dev] [Bug 69148] configure does not accept --with-driver

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69148 Matt Turner changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|mesa-dev@lists

[Mesa-dev] [PATCH 0/5] Implement ldexp and frexp built-ins

2013-09-09 Thread Matt Turner
This is a respin of the previous series, rebased on Ken's built-in rewrite. The first four patches original versions have reviews by Paul and contain either trivial or no changes at all. Patch 5 is the third rewrite of the frexp() implementation (1st was the lowering pass; 2nd was an unpublished GL

[Mesa-dev] [PATCH 5/5] glsl: Add frexp signatures and implementation.

2013-09-09 Thread Matt Turner
I initially implemented frexp() as an IR opcode with a lowering pass, but since it returns a value and has an out-parameter, it would break assumptions our optimization passes make about ir_expressions being pure (i.e., having no side effects). For example, if opt_tree_grafting encounters this cod

[Mesa-dev] [PATCH 4/5] i965: Lower ldexp.

2013-09-09 Thread Matt Turner
v2: Drop frexp lowering. Reviewed-by: Paul Berry [v1] --- src/mesa/drivers/dri/i965/brw_shader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index e7dbdbe..abfa327 100644 --- a/src/mes

[Mesa-dev] [PATCH 3/5] glsl: Add ldexp_to_arith lowering pass.

2013-09-09 Thread Matt Turner
Reviewed-by: Paul Berry --- src/glsl/ir_optimization.h | 1 + src/glsl/lower_instructions.cpp | 128 2 files changed, 129 insertions(+) diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index b79c2b7..074686c 100644 --- a/src/gls

[Mesa-dev] [PATCH 2/5] glsl: Allow vectors to be created from ir_constant().

2013-09-09 Thread Matt Turner
Note the parameter name change in the int version of ir_constant, to avoid the conflict with the loop iterator. v2: Make analogous change to builtin_builder::imm(). Reviewed-by: Paul Berry [v1] --- src/glsl/builtin_functions.cpp | 18 - src/glsl/ir.cpp| 44 +++

[Mesa-dev] [PATCH 1/5] glsl: Add support for ldexp.

2013-09-09 Thread Matt Turner
v2: Drop frexp. Rebase on builtins rewrite. Reviewed-by: Paul Berry [v1] --- src/glsl/builtin_functions.cpp | 14 ++ src/glsl/ir.cpp | 2 ++ src/glsl/ir.h| 7 +++ src/g

Re: [Mesa-dev] [PATCH 4/9] i965/gs: Set control data header size/format appropriately for EndPrimitive().

2013-09-09 Thread Chris Forbes
In the commit message: > Fortunately, OpenGL only requires separate streams to be supported >when the output type is points, and EndPrimitive() only has an effect > when the input type is line_strip or triangle_strip, so it's not a... Shouldn't this say 'output type' ? -- Chris On Tue, Sep 10,

Re: [Mesa-dev] [PATCH] glsl: Correctly validate fma()'s types.

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 11:23 AM, Matt Turner wrote: lrp() can take a scalar as a third argument, and fma() cannot. --- src/glsl/ir_validate.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 105f615..4898211 100644 --- a/src/glsl/ir_v

[Mesa-dev] [PATCH] R600: add a test for SI.tbuffer.store

2013-09-09 Thread Marek Olšák
Signed-off-by: Marek Olšák --- test/CodeGen/R600/llvm.SI.tbuffer.store.ll | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 test/CodeGen/R600/llvm.SI.tbuffer.store.ll diff --git a/test/CodeGen/R600/llvm.SI.tbuffer.store.ll b/test/CodeGen/R600/llvm.SI.tbuf

Re: [Mesa-dev] [PATCH] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Ian Romanick
On 09/09/2013 01:38 PM, Kenneth Graunke wrote: > Otherwise, coordinates with four components would result in a MOV > with a destination writemask that has no channels enabled: > > mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q }; > > At best, this is stupid: we emit code that shouldn't do any

[Mesa-dev] [Bug 62647] Wrong rendering of Dota 2 on Wine (apitrace attached) - Intel IVB HD4000

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=62647 --- Comment #33 from Auke Kok --- (In reply to comment #31) > Can we have a new bug for issues in the native client? This is now confirmed fixed with mesa-9.1.6. -- You are receiving this mail because: You are on the CC list for the bug. _

Re: [Mesa-dev] [PATCH] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Ian Romanick
On 09/09/2013 03:35 PM, Ian Romanick wrote: > On 09/09/2013 01:38 PM, Kenneth Graunke wrote: >> Otherwise, coordinates with four components would result in a MOV >> with a destination writemask that has no channels enabled: >> >> mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q }; >> >> At best,

Re: [Mesa-dev] [PATCH 05/15] i965/sf: Consolidate common code for setting up gen6-7 attribute overrides.

2013-09-09 Thread Ian Romanick
On 09/03/2013 06:18 PM, Paul Berry wrote: > --- > src/mesa/drivers/dri/i965/brw_state.h | 9 +- > src/mesa/drivers/dri/i965/gen6_sf_state.c | 153 > +- > src/mesa/drivers/dri/i965/gen7_sf_state.c | 64 + > 3 files changed, 97 insertions(+), 129 delet

Re: [Mesa-dev] [PATCH 08/15] i965/gen6+: Remove VUE map dependency on userclip_active.

2013-09-09 Thread Ian Romanick
On 09/03/2013 06:18 PM, Paul Berry wrote: > Previously, on Gen6+, we laid out the vertex (or geometry) shader VUE > map differently depending whether user clipping was active. If it was > active, we put the clip distances in slots 2 and 3 (where the clipper > expects them); if it was inactive, we

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-09 Thread Ian Romanick
On 09/05/2013 03:35 AM, Chia-I Wu wrote: > sample_d is slower than the lowered version on gen7. For gen7, this improves > Xonotic benchmark with Ultimate effects by as much as 25%: > > before the change: 40.06 fps > after the change: 51.10 fps > after

Re: [Mesa-dev] [PATCH] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Chris Forbes
Thanks Ken -- I should have spotted this but was being blind. Does the GPU generally hang if the destination writemask has all channels disabled? That sounds like something that could be worth sanity-checking for in the backend. Confirmed this fixes the hangs in the textureGather vs tests. Revie

[Mesa-dev] [Bug 30279] corender broken on llvmpipe and swrast

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30279 David "okias" Heidelberger changed: What|Removed |Added Hardware|Other |x86-64 (AMD64)

[Mesa-dev] [Bug 30279] corender broken on llvmpipe and swrast

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30279 --- Comment #2 from David "okias" Heidelberger --- # LIBGL_ALWAYS_SOFTWARE=1 ./corender & sleep 1 ; ./corender dummy [2] 21231 (null)Waiting for connection from another 'corender' [1] Exit 1 LIBGL_ALWAYS_SOFTWARE=1 ./corender G

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-09 Thread Ian Romanick
On 09/06/2013 05:05 AM, Chia-I Wu wrote: > On Thu, Sep 5, 2013 at 9:57 PM, Chia-I Wu wrote: >> On Thu, Sep 5, 2013 at 5:12 PM, Chris Forbes wrote: >>> A possible explanation for the perf change is that Xonotic uses >>> anisotropic filtering at this quality level. Lowering to txl defeats >>> it. >

Re: [Mesa-dev] [PATCH 9/9] i965/gs: implement EndPrimitive() functionality in the visitor.

2013-09-09 Thread Paul Berry
On 9 September 2013 09:18, Ian Romanick wrote: > On 09/09/2013 10:20 AM, Paul Berry wrote: > > According to GLSL, the shader may call EndPrimitive() at any point > > during its execution, causing the line or triangle strip currently > > being output to be terminated and a new strip to be begun. >

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-09 Thread Ian Romanick
On 09/05/2013 08:57 AM, Chia-I Wu wrote: > On Thu, Sep 5, 2013 at 5:12 PM, Chris Forbes wrote: >> A possible explanation for the perf change is that Xonotic uses >> anisotropic filtering at this quality level. Lowering to txl defeats >> it. > I had a look at that. gl_sampler->MaxAnisotropy is nev

[Mesa-dev] [PATCH] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Kenneth Graunke
Otherwise, coordinates with four components would result in a MOV with a destination writemask that has no channels enabled: mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q }; At best, this is stupid: we emit code that shouldn't do anything. Worse, it apparently causes GPU hangs (observable wi

[Mesa-dev] [Bug 69148] New: configure does not accept --with-driver

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69148 Priority: medium Bug ID: 69148 Assignee: mesa-dev@lists.freedesktop.org Summary: configure does not accept --with-driver Severity: normal Classification: Unclassified OS: Lin

Re: [Mesa-dev] [PATCH 05/21] glsl: Pass _mesa_glsl_parse_state into matching_signature and such.

2013-09-09 Thread Paul Berry
On 8 September 2013 19:49, Kenneth Graunke wrote: > On 09/08/2013 08:48 AM, Paul Berry wrote: > >> On 4 September 2013 15:22, Kenneth Graunke > **> wrote: >> >> During compilation, we'll use this to determine built-in availability. >> All the prototypes will

Re: [Mesa-dev] [PATCH 4/5] glsl: Implement MESA_shader_integer_mix extension.

2013-09-09 Thread Ian Romanick
Two tiny edits, that just occurred to me, are below... On 09/06/2013 07:57 PM, Matt Turner wrote: > Because why doesn't GLSL allow you to do this already? > --- > docs/specs/MESA_shader_integer_mix.spec | 125 > > src/glsl/builtin_functions.cpp | 15 +++

Re: [Mesa-dev] [PATCH 10/15] i965: Allow immediates to be folded into logical and shift instructions.

2013-09-09 Thread Paul Berry
On 9 September 2013 11:23, Matt Turner wrote: > Can I assume this has your R-b? > Yes. Sorry about that :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 10/15] i965: Allow immediates to be folded into logical and shift instructions.

2013-09-09 Thread Matt Turner
Can I assume this has your R-b? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 18/21] glsl: Write a new built-in function module.

2013-09-09 Thread Kenneth Graunke
On 09/09/2013 10:39 AM, Matt Turner wrote: On Wed, Sep 4, 2013 at 3:22 PM, Kenneth Graunke wrote: +static bool +texture_query_lod(const _mesa_glsl_parse_state *state) +{ + return state->target == fragment_shader && + (state->is_version(400, 0) || state->ARB_texture_query_lod_enable);

[Mesa-dev] [PATCH] glsl: Correctly validate fma()'s types.

2013-09-09 Thread Matt Turner
lrp() can take a scalar as a third argument, and fma() cannot. --- src/glsl/ir_validate.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 105f615..4898211 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -

Re: [Mesa-dev] [PATCH 18/21] glsl: Write a new built-in function module.

2013-09-09 Thread Matt Turner
On Wed, Sep 4, 2013 at 3:22 PM, Kenneth Graunke wrote: > +static bool > +texture_query_lod(const _mesa_glsl_parse_state *state) > +{ > + return state->target == fragment_shader && > + (state->is_version(400, 0) || state->ARB_texture_query_lod_enable); > +} Reminder about the whole fias

Re: [Mesa-dev] [PATCH 00/15] i965/gen6+: Support 128 varying components.

2013-09-09 Thread Ian Romanick
On 09/03/2013 06:18 PM, Paul Berry wrote: > GL 3.2 requires us to support 128 varying components for geometry > shader outputs and fragment shader inputs, and 64 varying components > otherwise. But there's no hardware limitation that restricts us to 64 > varying components, and core Mesa doesn't c

Re: [Mesa-dev] [PATCH 3/3] i965: Use brw_stage_state for WM data as well.

2013-09-09 Thread Paul Berry
On 5 September 2013 16:40, Kenneth Graunke wrote: > This gets the VS, GS, and PS all using the same data structure. > > Signed-off-by: Kenneth Graunke > Series is: Reviewed-by: Paul Berry BTW, Once both this series and my series "i965/gen7 geometry shader support, series 4" have landed, we'l

Re: [Mesa-dev] [PATCH 00/15] i965/gen6+: Support 128 varying components.

2013-09-09 Thread Paul Berry
On 9 September 2013 09:51, Ian Romanick wrote: > On 09/03/2013 06:18 PM, Paul Berry wrote: > > GL 3.2 requires us to support 128 varying components for geometry > > shader outputs and fragment shader inputs, and 64 varying components > > otherwise. But there's no hardware limitation that restric

Re: [Mesa-dev] [PATCH 9/9] i965/gs: implement EndPrimitive() functionality in the visitor.

2013-09-09 Thread Ian Romanick
On 09/09/2013 11:31 AM, Paul Berry wrote: > On 9 September 2013 09:18, Ian Romanick > wrote: > > On 09/09/2013 10:20 AM, Paul Berry wrote: > > According to GLSL, the shader may call EndPrimitive() at any point > > during its execution, causing the line or

[Mesa-dev] [PATCH 6/9] i965/gen7: Add the ability to send URB_WRITE_OWORD messages.

2013-09-09 Thread Paul Berry
Previously, brw_urb_WRITE() would always generate a URB_WRITE_HWORD message, we always wanted to write data to the URB in pairs of varying slots or larger (an HWORD is 32 bytes, which is 2 varying slots). In order to support geometry shader EndPrimitive functionality, we'll need the ability to wri

Re: [Mesa-dev] [PATCH 9/9] i965/gs: implement EndPrimitive() functionality in the visitor.

2013-09-09 Thread Ian Romanick
On 09/09/2013 10:20 AM, Paul Berry wrote: > According to GLSL, the shader may call EndPrimitive() at any point > during its execution, causing the line or triangle strip currently > being output to be terminated and a new strip to be begun. > > This is implemented in gen7 hardware by using one con

[Mesa-dev] [PATCH 9/9] i965/gs: implement EndPrimitive() functionality in the visitor.

2013-09-09 Thread Paul Berry
According to GLSL, the shader may call EndPrimitive() at any point during its execution, causing the line or triangle strip currently being output to be terminated and a new strip to be begun. This is implemented in gen7 hardware by using one control data bit per vertex, to indicate whether EndPri

[Mesa-dev] [PATCH 7/9] i965/gs: Add opcodes needed for EndPrimitive().

2013-09-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_defines.h | 21 src/mesa/drivers/dri/i965/brw_shader.cpp| 4 ++ src/mesa/drivers/dri/i965/brw_vec4.h| 2 + src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 81 + 4 files changed, 108 insertions(+) diff --git a/s

[Mesa-dev] [PATCH 8/9] i965/vec4: Add the ability to emit opcodes with just a dst register.

2013-09-09 Thread Paul Berry
This is needed for GS_OPCODE_PREPARE_CHANNEL_MASKS. --- src/mesa/drivers/dri/i965/brw_vec4.h | 2 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ 2 files changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h inde

[Mesa-dev] [PATCH 4/9] i965/gs: Set control data header size/format appropriately for EndPrimitive().

2013-09-09 Thread Paul Berry
The gen7 geometry shader uses a "control data header" at the beginning of the output URB entry to store either (a) flag bits (1 bit/vertex) indicating whether EndPrimitive() was called after each vertex, or (b) stream ID bits (2 bits/vertex) indicating which stream each vertex should be s

[Mesa-dev] [PATCH 5/9] i965/gen7: Allow URB_WRITE channel masks to be used.

2013-09-09 Thread Paul Berry
Previously, brw_urb_WRITE() would unconditionally override the channel masks in the URB_WRITE message to 0xff (indicating that all channels should be written to the URB). In order to support geometry shader EndPrimitive functionality, we'll need the ability to set the channel masks programatically

[Mesa-dev] [PATCH 3/9] glsl: During linking, record whether a GS uses EndPrimitive().

2013-09-09 Thread Paul Berry
This information will be useful in the i965 back end, since we can save some compilation effort if we know from the outset that the shader never calls EndPrimitive(). --- src/glsl/linker.cpp | 31 +++ src/mesa/main/mtypes.h| 2 ++ src/mesa/main/shaderapi.c |

[Mesa-dev] [PATCH 2/9] i965/gs: Add a state atom to set up geometry shader state.

2013-09-09 Thread Paul Berry
v2: Do not attempt to share the code that uploads 3DSTATE_BINDING_TABLE_POINTERS_GS, 3DSTATE_SAMPLER_STATE_POINTERS_GS, or 3DSTATE_GS with VS. --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 7 ++ src/mesa/drivers/dri/i965/brw_state.h

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-09-09 Thread Roland Scheidegger
Ok I guess it makes sense to keep PIPE_CAP_MIXED_COLORBUFFER_FORMATS then in addition to the new cap bits (as at least r300 should be able to benefit from it). Roland Am 09.09.2013 15:01, schrieb Marek Olšák: > On r300, colorbuffers can have different pitches, therefore each of > them can be of a

[Mesa-dev] [PATCH 1/9] i965/gen7: Extract a function for setting up a shader stage's constants.

2013-09-09 Thread Paul Berry
This will allow us to reuse some code when setting up the geometry shader stage. --- src/mesa/drivers/dri/i965/brw_state.h | 6 +++ src/mesa/drivers/dri/i965/gen7_vs_state.c | 61 ++- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH 0/9] i965/gen7 geometry shader support, series 4

2013-09-09 Thread Paul Berry
This is the next installment of geometry shader support for i965 gen7. Patches 1-2 are a rewrite of patches 21-22 of series 3 (confusingly called "Initial geometry shader support, part 2" on the mailing list--sorry about that), modified according to Ken's comments. Once these two patches land, i96

Re: [Mesa-dev] [PATCH 3/3] r600g: fast color clears for single-sample buffers

2013-09-09 Thread Marek Olšák
On Mon, Sep 9, 2013 at 11:52 AM, Grigori Goronzy wrote: > Allocate a CMASK on demand and use it to fast clear single-sample > colorbuffers. Both FBOs and window system colorbuffers are fast > cleared. Expand as needed when colorbuffers are mapped or displayed > on screen. > --- > src/gallium/driv

Re: [Mesa-dev] [PATCH 2/2] R600/SI: Merge offset0 and offset1 fields for single address DS instructions v2

2013-09-09 Thread Michel Dänzer
On Fre, 2013-09-06 at 11:06 -0400, Tom Stellard wrote: > From: Tom Stellard > > Also remove unused data fields from the DS_Load_Helper class. > > v2: > - Merge fields for DS_WRITE [...] > -class DS_Store_Helper op, string asm, RegisterClass regClass> : DS < > +class DS_Store_Helper op, str

Re: [Mesa-dev] [PATCH 1/3] gallium: add flush_resource context function

2013-09-09 Thread Marek Olšák
On Mon, Sep 9, 2013 at 11:52 AM, Grigori Goronzy wrote: > From: Marek Olšák > > r600g needs explicit flushing before DRI2 buffers are presented on the screen. > > v2: add (stub) implementations for all drivers, fix frontbuffer flushing > --- > src/gallium/docs/source/context.rst

Re: [Mesa-dev] [PATCH 2/3] r600g: add support for separately allocated CMASKs

2013-09-09 Thread Marek Olšák
On Mon, Sep 9, 2013 at 11:52 AM, Grigori Goronzy wrote: > --- > src/gallium/drivers/r600/evergreen_state.c | 24 +++- > src/gallium/drivers/r600/r600_hw_context.c | 12 +--- > src/gallium/drivers/r600/r600_resource.h | 3 +++ > src/gallium/drivers/r600/r600_texture.

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-09-09 Thread Marek Olšák
On r300, colorbuffers can have different pitches, therefore each of them can be of arbitrary size. Other than that, there is a separate framebuffer width and height state, which applies to all colorbuffers (it's usually set to the minimum of all widths and heights as in OpenGL). r300 doesn't suppo

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-09-09 Thread Roland Scheidegger
Am 09.09.2013 13:55, schrieb Erik Faye-Lund: > On Mon, Sep 9, 2013 at 1:31 PM, Roland Scheidegger wrote: >> I'm not really convinced of this idea. >> There's already PIPE_CAP_MIXED_COLORBUFFER_FORMATS which is sort of >> similar - a "requirement" of ARB_fbo, but it isn't used to determine >> suppo

Re: [Mesa-dev] [PATCH] st/dri: do not create a new context for msaa copy

2013-09-09 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Mon, Sep 9, 2013 at 1:02 PM, Maarten Lankhorst wrote: > Commit b77316ad7594f > st/dri: always copy new DRI front and back buffers to corresponding MSAA > buffers > > introduced creating a pipe_context for every call to validate, which is not > required >

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-09-09 Thread Erik Faye-Lund
On Mon, Sep 9, 2013 at 1:31 PM, Roland Scheidegger wrote: > I'm not really convinced of this idea. > There's already PIPE_CAP_MIXED_COLORBUFFER_FORMATS which is sort of > similar - a "requirement" of ARB_fbo, but it isn't used to determine > support of ARB_fbo or not (my guess is drivers want to a

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-09-09 Thread Roland Scheidegger
I'm not really convinced of this idea. There's already PIPE_CAP_MIXED_COLORBUFFER_FORMATS which is sort of similar - a "requirement" of ARB_fbo, but it isn't used to determine support of ARB_fbo or not (my guess is drivers want to advertize ARB_fbo even if they can't do it, and ARB_fbo doesn't real

[Mesa-dev] [PATCH] st/dri: do not create a new context for msaa copy

2013-09-09 Thread Maarten Lankhorst
Commit b77316ad7594f st/dri: always copy new DRI front and back buffers to corresponding MSAA buffers introduced creating a pipe_context for every call to validate, which is not required because the callers have a context anyway. Only exception is egl_g3d_create_pbuffer_from_client_buffer,

[Mesa-dev] [PATCH 3/3] r600g: fast color clears for single-sample buffers

2013-09-09 Thread Grigori Goronzy
Allocate a CMASK on demand and use it to fast clear single-sample colorbuffers. Both FBOs and window system colorbuffers are fast cleared. Expand as needed when colorbuffers are mapped or displayed on screen. --- src/gallium/drivers/r600/evergreen_state.c | 11 + src/gallium/drivers/r600/r60

[Mesa-dev] [PATCH 2/3] r600g: add support for separately allocated CMASKs

2013-09-09 Thread Grigori Goronzy
--- src/gallium/drivers/r600/evergreen_state.c | 24 +++- src/gallium/drivers/r600/r600_hw_context.c | 12 +--- src/gallium/drivers/r600/r600_resource.h | 3 +++ src/gallium/drivers/r600/r600_texture.c| 25 - 4 files changed, 55 insertions

[Mesa-dev] [PATCH 1/3] gallium: add flush_resource context function

2013-09-09 Thread Grigori Goronzy
From: Marek Olšák r600g needs explicit flushing before DRI2 buffers are presented on the screen. v2: add (stub) implementations for all drivers, fix frontbuffer flushing --- src/gallium/docs/source/context.rst | 13 + src/gallium/drivers/freedreno/freedreno_resource.

[Mesa-dev] [Bug 69135] New: Make EGLUT-Wayland code catch up with latest stable Wayland (1.2)

2013-09-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69135 Priority: medium Bug ID: 69135 Assignee: mesa-dev@lists.freedesktop.org Summary: Make EGLUT-Wayland code catch up with latest stable Wayland (1.2) Severity: major Classif