[Mesa-dev] [PATCH] Obvious fixes in relational operator constant expression evaluation.

2012-05-08 Thread Olivier Galibert
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index baf23b6..61c0ae6 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -641,13 +641,13 @@ ir_expression::constant_expression_value(struct hash_table *variable_conte

[Mesa-dev] [PATCH] Ensure that acos(1)==0.

2012-05-08 Thread Olivier Galibert
The apparent cost of the calibration is eaten by the constant propagation optimization pass. Signed-off-by: Olivier Galibert diff --git a/src/glsl/builtins/ir/acos.ir b/src/glsl/builtins/ir/acos.ir index f0078f8..d321057 100644 --- a/src/glsl/builtins/ir/acos.ir +++ b/src/glsl/builtins/ir/ac

Re: [Mesa-dev] [PATCH 0/6] Constants through builtins evaluation rewrite

2012-05-08 Thread Olivier Galibert
On Wed, May 02, 2012 at 11:11:36PM +0200, Olivier Galibert wrote: > What's missing is a piglit run, which I currently have technical > problems with. Thanks to very pertinent advice by ajax and anholt I've been able to do a piglit run. With three additional bugfix patches I've sent independently

Re: [Mesa-dev] [PATCH v3 01/13] gallium: Basic compute interface.

2012-05-08 Thread Francisco Jerez
Tom Stellard writes: > Hi, > > I've been testing these updated compute patches all week and they look > good to me. I don't think there are any outstanding complaints, so I'll > give my ACK for merging these into master. > > Very nice work! > > -Tom Stellard > > Thanks for your comments. Does a

Re: [Mesa-dev] gallium-userbuf branch (was: Re: [PATCH 3/9] st/mesa: make user index buffers optional)

2012-05-08 Thread Marek Olšák
Hi, I'd like to merge this branch soon. Does friday May 11 sound good or should I wait more? Marek On Mon, Apr 30, 2012 at 1:38 AM, Marek Olšák wrote: > Hi, > > I pushed the branch in the main Mesa repository. r600g, softpipe and > llvmpipe should work without regressions. I'll test r300g later

Re: [Mesa-dev] shader_test for glsl-to-tgsi ceil bug

2012-05-08 Thread Ian Romanick
On 05/07/2012 04:16 PM, Christoph Bumiller wrote: On 05/07/2012 08:34 PM, Eric Anholt wrote: On Sat, 05 May 2012 14:43:44 +0200, Christoph Bumiller wrote: Test case for the "glsl_to_tgsi: use TGSI_OPCODE_CEIL for ir_unop_ceil" patch attached. This wasn't caught by the generated test for cei

Re: [Mesa-dev] [PATCH] Ensure that acos(1)==0.

2012-05-08 Thread Ian Romanick
On 05/08/2012 02:51 AM, Olivier Galibert wrote: The apparent cost of the calibration is eaten by the constant propagation optimization pass. Is the underlying problem that the constant in the acos implementation just didn't have enough precision? Would adding more digits to the literal const

Re: [Mesa-dev] [PATCH] Obvious fixes in relational operator constant expression evaluation.

2012-05-08 Thread Ian Romanick
On 05/08/2012 01:55 AM, Olivier Galibert wrote: Holy crap sandwich. I guess I'm not sure how we didn't catch this before. Since this only happens when both sides of the relational operation are constant, I guess it's not that common. Ugh. Reviewed-by: Ian Romanick diff --git a/src/glsl/

Re: [Mesa-dev] [PATCH 06/10] i965: Parameterize HiZ code to prepare for adding blitting.

2012-05-08 Thread Paul Berry
On 7 May 2012 15:05, Chad Versace wrote: > On 05/02/2012 01:52 PM, Paul Berry wrote: > > This patch groups together the parameters used by the HiZ functions > > into a new data structure, brw_hiz_resolve_params, rather than passing > > each parameter individually between the HiZ functions. This

[Mesa-dev] [Bug 49504] [Bisected] Mesa master compilation broke when built with --with-llvm-shared-libs

2012-05-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49504 --- Comment #1 from Iaroslav 2012-05-08 10:34:03 PDT --- I have the same problem. The problem in llvmpipe driver. mklib: Making Linux static library: libllvmpipe.a ar: creating libllvmpipe.a g++ -L/usr/lib -lpthread -ldl -lm lp_test_format

Re: [Mesa-dev] [PATCH] Ensure that acos(1)==0.

2012-05-08 Thread Olivier Galibert
On Tue, May 08, 2012 at 08:40:03AM -0700, Ian Romanick wrote: > On 05/08/2012 02:51 AM, Olivier Galibert wrote: > > The apparent cost of the calibration is eaten by the constant > > propagation optimization pass. > > Is the underlying problem that the constant in the acos implementation > just di

Re: [Mesa-dev] [PATCH] Obvious fixes in relational operator constant expression evaluation.

2012-05-08 Thread Olivier Galibert
On Tue, May 08, 2012 at 08:45:21AM -0700, Ian Romanick wrote: > On 05/08/2012 01:55 AM, Olivier Galibert wrote: > > Holy crap sandwich. I guess I'm not sure how we didn't catch this > before. Since this only happens when both sides of the relational > operation are constant, I guess it's not t

Re: [Mesa-dev] [PATCH 07/10] i965: split gen{6, 7}_blorp_exec functions into manageable chunks.

2012-05-08 Thread Paul Berry
On 7 May 2012 15:05, Chad Versace wrote: > On 05/02/2012 01:52 PM, Paul Berry wrote: > > This patch splits up the gen6_blorp_exec and gen7_blorp_exec > > functions, which were very long, into simple component functions. > > With a few exceptions, there is one function per state packet. > > > > Th

[Mesa-dev] [PATCH] Add bin/compile to .gitignore

2012-05-08 Thread Paul Berry
--- bin/.gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index 04c0a1c..2ee67a6 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -4,3 +4,4 @@ install-sh /depcomp /missing ylwrap +compile -- 1.7.7.6 _

[Mesa-dev] [PATCH 0/6] ARB_shader_bit_encoding support

2012-05-08 Thread Olivier Galibert
Hi, Here is the second and hopefully last version of the bit encoding support. I think I took all reviews into account (dropping mesa ir, activating at the end, and style). piglit says nothing changed, which is expected given that the associated test hasn't been included yet. Best, OG. __

[Mesa-dev] [PATCH 1/6] New unary opcodes for ARB_shader_bit_encoding support.

2012-05-08 Thread Olivier Galibert
The opcodes are bitcast_f2u, bitcast_f2i, bitcast_i2f and bitcast_u2f. Signed-off-by: Olivier Galibert --- src/glsl/builtins/ir/floatBitsToInt.ir | 21 src/glsl/builtins/ir/floatBitsToUint.ir| 21 src/glsl/builtins/ir/intBitsToFloat.i

[Mesa-dev] [PATCH 2/6] Bitwise conversion operator support in ir_expression.

2012-05-08 Thread Olivier Galibert
Signed-off-by: Olivier Galibert --- src/glsl/ir.cpp |4 1 file changed, 4 insertions(+) diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index d83af50..e90936d 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -273,6 +273,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0) c

[Mesa-dev] [PATCH 3/6] Bitwise conversion operator support in ir_validate.

2012-05-08 Thread Olivier Galibert
Signed-off-by: Olivier Galibert --- src/glsl/ir_validate.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 7efb434..5721717 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -288,6 +288,22 @@

[Mesa-dev] [PATCH 4/6] Bitwise conversion operator support in ir_constant_expression.

2012-05-08 Thread Olivier Galibert
This patch expects to be applied after the "Constants through builtins evaluation rewrite" for two reasons: - a line of that patch appears in the context - the ir_function side changes that the old method would need are not present (and they would conflict) At that point a "test_out = floatBitsT

[Mesa-dev] [PATCH 5/6] Bitwise conversion operator support in the software renderers.

2012-05-08 Thread Olivier Galibert
TGSI doesn't need an opcode, since registers are untyped (but beware once doubles come into the scene). Mesa IR doesn't handle native integers, so trying to handle them there is worthless, the case entries are only added for warning reasons. It was only tested with softpipe, since llvmpipe doesn'

[Mesa-dev] [PATCH 6/6] Finally activate the ARB_shader_bit_encoding extension.

2012-05-08 Thread Olivier Galibert
Signed-off-by: Olivier Galibert --- src/mesa/state_tracker/st_extensions.c |4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 1b4bca6..0cfe962 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/s

Re: [Mesa-dev] gallium-userbuf branch

2012-05-08 Thread Brian Paul
On 05/08/2012 08:34 AM, Marek Olšák wrote: Hi, I'd like to merge this branch soon. Does friday May 11 sound good or should I wait more? Sounds OK to me. The vmware driver seemed to be fine after my "svga: check for and skip null vertex buffer pointers" patch. -Brian ___

[Mesa-dev] [PATCH 1/2] mesa: fix/add error check in _mesa_ColorMaterial()

2012-05-08 Thread Brian Paul
_mesa_material_bitmask() will record a GL error and return 0 if face or mode are illegal. Return early in that case. NOTE: This is a candidate for the 8.0 branch. --- src/mesa/main/light.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/light.c b/src/mesa/

[Mesa-dev] [PATCH 2/2] mesa: fix glMaterial / dlist bug

2012-05-08 Thread Brian Paul
When glColorMaterial() is used to latch glColor commands to a material attribute, glMaterial calls to change that material should become no-ops. This failed to work properly when the glMaterial call was inside a display list. This removes the Material function from the vbo_attrib_tmp.h template fi

Re: [Mesa-dev] [PATCH] Obvious fixes in relational operator constant expression evaluation.

2012-05-08 Thread Kenneth Graunke
On 05/08/2012 01:55 AM, Olivier Galibert wrote: diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index baf23b6..61c0ae6 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -641,13 +641,13 @@ ir_expression::constant_e

Re: [Mesa-dev] [PATCH 0/6] Constants through builtins evaluation rewrite

2012-05-08 Thread Kenneth Graunke
On 05/02/2012 02:11 PM, Olivier Galibert wrote: Hello, Here is the second version of that patch series. It's fundamentally the same thing with a number of changes: - respect the coding style a little better - index the hash table on the variable object pointer and not the name - handle funct

Re: [Mesa-dev] [PATCH] Add bin/compile to .gitignore

2012-05-08 Thread Kenneth Graunke
On 05/08/2012 11:03 AM, Paul Berry wrote: --- bin/.gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index 04c0a1c..2ee67a6 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -4,3 +4,4 @@ install-sh /depcomp /missing ylwra

Re: [Mesa-dev] [PATCH 0/6] Constants through builtins evaluation rewrite

2012-05-08 Thread Olivier Galibert
On Tue, May 08, 2012 at 01:09:25PM -0700, Kenneth Graunke wrote: > These look great! I've gone ahead and pushed them with a few tiny changes: > > 1. I updated a comment in patch 2, which still said the hash_table > mapped using variable names/strings. > 2. I changed the for (exec_node ...) loop

Re: [Mesa-dev] shader_test for glsl-to-tgsi ceil bug

2012-05-08 Thread Christoph Bumiller
On 05/08/2012 05:33 PM, Ian Romanick wrote: > On 05/07/2012 04:16 PM, Christoph Bumiller wrote: >> On 05/07/2012 08:34 PM, Eric Anholt wrote: >>> On Sat, 05 May 2012 14:43:44 +0200, Christoph Bumiller >>> wrote: Test case for the "glsl_to_tgsi: use TGSI_OPCODE_CEIL for ir_unop_ceil" pat

Re: [Mesa-dev] [PATCH 1/2] i965: Implement guardband clipping on Sandybridge.

2012-05-08 Thread Eric Anholt
On Fri, 4 May 2012 17:06:38 -0700, Kenneth Graunke wrote: > - vp->xmin = -1.0; > - vp->xmax = 1.0; > - vp->ymin = -1.0; > - vp->ymax = 1.0; > + /* According to the Sandybridge PRM, Volume 2, Part 1, Section 6.3.8 > +* "Vertex X,Y Clamping and Quantization", the screen-aligned 2D >

[Mesa-dev] i965 optimizations and one for core GLSL

2012-05-08 Thread Eric Anholt
I came up with a patch to improve Lightsmark performance 0.9% by using "MRF"s round-robin. But that's just layering hacks on hacks, so I decided to convert texturing to using GRFs on gen7. That resulted in a big regression due to the lame register coalescing, which led to fixing that, which led t

[Mesa-dev] [PATCH 1/5] i965/fs: When doing no work for live interval calculation, do no allocation.

2012-05-08 Thread Eric Anholt
When I had a bug causing the backend to never finish optimizing, it also sent me deep into swap. This avoids extra memory allocation per trip through optimization, and thus may reduce the peak memory allocation of the driver even in the success case. --- src/mesa/drivers/dri/i965/brw_fs_live_vari

[Mesa-dev] [PATCH 3/5] i965/fs: Remove the requirement of no dead code for interference checks.

2012-05-08 Thread Eric Anholt
This will be convenient when I want to comment out optimization code to see the raw program being optimized, but more importantly will let the interference check be used during optimization. --- .../drivers/dri/i965/brw_fs_live_variables.cpp | 24 ++-- 1 file changed, 12 inse

[Mesa-dev] [PATCH 2/5] i965/fs: Add support for copy propagation.

2012-05-08 Thread Eric Anholt
We could do more by handling abs/negate and non-GRF sources, but this is a good start. Total instructions: 208032 -> 207184 60/1246 programs affected (4.8%) 23286 -> 22438 instructions in affected programs (3.6% reduction) --- src/mesa/drivers/dri/i965/Makefile.sources |1 + src/mesa/

[Mesa-dev] [PATCH 5/5] glsl: Improve the local dead code optimization to eliminate unused channels.

2012-05-08 Thread Eric Anholt
Total instructions: 261582 -> 261316 135/2147 programs affected (6.3%) 36752 -> 36486 instructions in affected programs (0.7% reduction) This excludes a tropics shader that now gets 16-wide mode and throws off the numbers. 5 shaders are hurt: two extra MOVs in 4 tropics shaders it looks like beca

[Mesa-dev] [PATCH 4/5] i965/fs: Do more register coalescing by using the interference graph.

2012-05-08 Thread Eric Anholt
By using the live variables code for determining interference, we can handle coalescing in the presence of control flow, which the other register coalescing path couldn't. Total instructions: 207184 -> 206990 74/1246 programs affected (5.9%) 33993 -> 33799 instructions in affected programs (0.6% r

Re: [Mesa-dev] [PATCH 2/3] glsl: Implement the GLSL 1.30+ discard control flow rule in GLSL IR.

2012-05-08 Thread Kenneth Graunke
On 05/04/2012 01:58 PM, Eric Anholt wrote: Previously, I tried implementing this in the i965 driver, but did so in a way that violated the intent of the spec, and broke Tropics. --- src/glsl/Makefile.sources |1 + src/glsl/ir_optimization.h |1 + src/glsl/linker.cpp

[Mesa-dev] [PATCH 0.3] llvmpipe iabs/isgn support

2012-05-08 Thread Olivier Galibert
Hi, These three patches make integer abs and sign work for llvmpipe. Best, OG. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/3] llvmpipe: Handle IABS.

2012-05-08 Thread Olivier Galibert
Signed-off-by: Olivier Galibert --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index 7f01156..0a43445 100644 --- a/

[Mesa-dev] [PATCH 2/3] lp_bld_arit: Fix lp_build_sgn.

2012-05-08 Thread Olivier Galibert
Signed-off-by: Olivier Galibert --- src/gallium/auxiliary/gallivm/lp_bld_arit.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 4ba4aa5..77497ad 100644 --- a/src/gallium/auxilia

[Mesa-dev] [PATCH 3/3] llvmpipe: Handle ISSG.

2012-05-08 Thread Olivier Galibert
Signed-off-by: Olivier Galibert --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index 0a43445..34f6c58 100644 --- a/