Re: [Mesa-dev] [PATCH 3/8] i965: Store the atoms directly in the context

2014-12-21 Thread Kenneth Graunke
On Sunday, December 21, 2014 09:19:53 PM Jason Ekstrand wrote: > On Sun, Dec 21, 2014 at 9:11 PM, Kenneth Graunke > wrote: > > > > On Friday, December 19, 2014 02:20:54 PM Ian Romanick wrote: > > > From: Ian Romanick > > > > > > Instead of having an extra pointer indirection in one of the hottest

Re: [Mesa-dev] [PATCH 1/8] meta: Put _mesa_meta_in_progress in the header file

2014-12-21 Thread Kenneth Graunke
On Friday, December 19, 2014 02:20:52 PM Ian Romanick wrote: > From: Ian Romanick > > ...so that it can be inlined in the two places that call it. > > On Bay Trail-D using Fedora 20 compile flags (-m64 -O2 -mtune=generic > for 64-bit and -m32 -march=i686 -mtune=atom for 32-bit), affects > Gl32Ba

Re: [Mesa-dev] [PATCH 8/8] mesa: Micro-optimize _mesa_is_valid_prim_mode

2014-12-21 Thread Kenneth Graunke
On Friday, December 19, 2014 02:20:59 PM Ian Romanick wrote: > From: Ian Romanick > > You would not believe the mess GCC 4.8.3 generated for the old > switch-statement. > > On Bay Trail-D using Fedora 20 compile flags (-m64 -O2 -mtune=generic > for 64-bit and -m32 -march=i686 -mtune=atom for 32-

Re: [Mesa-dev] [PATCH 4/8] mesa: Only validate shaders that can exist in the context

2014-12-21 Thread Kenneth Graunke
On Friday, December 19, 2014 02:20:55 PM Ian Romanick wrote: > From: Ian Romanick > > On Bay Trail-D using Fedora 20 compile flags (-m64 -O2 -mtune=generic > for 64-bit and -m32 -march=i686 -mtune=atom for 32-bit), affects > Gl32Batch7: > > 32-bit: Difference at 95.0% confidence 0.495267% +/- 0.

Re: [Mesa-dev] [PATCH 3/8] i965: Store the atoms directly in the context

2014-12-21 Thread Jason Ekstrand
On Sun, Dec 21, 2014 at 9:11 PM, Kenneth Graunke wrote: > > On Friday, December 19, 2014 02:20:54 PM Ian Romanick wrote: > > From: Ian Romanick > > > > Instead of having an extra pointer indirection in one of the hottest > > loops in the driver. > > > > On Bay Trail-D using Fedora 20 compile flag

Re: [Mesa-dev] [PATCH 3/8] i965: Store the atoms directly in the context

2014-12-21 Thread Kenneth Graunke
On Friday, December 19, 2014 02:20:54 PM Ian Romanick wrote: > From: Ian Romanick > > Instead of having an extra pointer indirection in one of the hottest > loops in the driver. > > On Bay Trail-D using Fedora 20 compile flags (-m64 -O2 -mtune=generic > for 64-bit and -m32 -march=i686 -mtune=ato

Re: [Mesa-dev] [PATCH] i965: Consider SEL.{GE, L} to be commutative operations.

2014-12-21 Thread Matt Turner
On Sun, Dec 21, 2014 at 7:50 PM, Kenneth Graunke wrote: > On Sunday, December 21, 2014 03:37:25 PM Matt Turner wrote: >> --- >> No shader-db changes, unfortunately. > > Unsurprising :) This patch doesn't implement what you meant. > > 1. instructions_match() checks a->conditional_mod == b->conditio

Re: [Mesa-dev] [PATCH 2/8] i965: Micro-optimize brw_get_index_type

2014-12-21 Thread Kenneth Graunke
On Friday, December 19, 2014 02:20:53 PM Ian Romanick wrote: [snip] > diff --git a/src/mesa/drivers/dri/i965/brw_context.h > b/src/mesa/drivers/dri/i965/brw_context.h > index a63c483..92eb022 100644 > --- a/src/mesa/drivers/dri/i965/brw_context.h > +++ b/src/mesa/drivers/dri/i965/brw_context.h > @

Re: [Mesa-dev] [PATCH] i965: Consider SEL.{GE, L} to be commutative operations.

2014-12-21 Thread Kenneth Graunke
On Sunday, December 21, 2014 03:37:25 PM Matt Turner wrote: > --- > No shader-db changes, unfortunately. Unsurprising :) This patch doesn't implement what you meant. 1. instructions_match() checks a->conditional_mod == b->conditional_mod. So you won't ever see mixed conditional mods in operand

[Mesa-dev] [PATCH] i965: Consider SEL.{GE, L} to be commutative operations.

2014-12-21 Thread Matt Turner
--- No shader-db changes, unfortunately. src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 14 ++ src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 18 -- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/driver

[Mesa-dev] [PATCH 8/8] i965/vec4: Do copy before constant propagation after opt_vector_float().

2014-12-21 Thread Matt Turner
total instructions in shared programs: 5877012 -> 5876617 (-0.01%) instructions in affected programs: 33140 -> 32745 (-1.19%) From before the commit that allows VF constant propagation (which hurt some programs) to here, the results are: total instructions in shared programs: 5877951 -> 58766

[Mesa-dev] [PATCH 2/8] i965: Add support for saturating immediates.

2014-12-21 Thread Matt Turner
I don't feel great about unreachable("unimplemented: ...") but these cases do only seem possible under some currently impossible circumstances. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 16 +++ src/mesa/drivers/dri/i965/brw_shader.cpp | 47 src/mesa/dr

[Mesa-dev] [PATCH 7/8] i965/vec4: Allow constant propagation of VF immediates.

2014-12-21 Thread Matt Turner
total instructions in shared programs: 5877951 -> 5877012 (-0.02%) instructions in affected programs: 155923 -> 154984 (-0.60%) Helps 1233, hurts 156 shaders. The hurt shaders are addressed in the next commit. --- .../drivers/dri/i965/brw_vec4_copy_propagation.cpp | 28 +-

[Mesa-dev] [PATCH 6/8] i965/vec4: Add parameter to skip doing constant propagation.

2014-12-21 Thread Matt Turner
After CSEing some MOV ..., VF instructions we have code like mov tmp, [1F, 2F, 3F, 4F]VF mov r10, tmp mov r11, tmp ... use r10 use r11 We want to copy propagate tmp into the uses of r10 and r11, but *not* constant propagate the VF immediate into the uses of tmp. --- src/mesa/dr

[Mesa-dev] [PATCH 5/8] i965/vec4: Do CSE, copy propagation, and DCE after opt_vector_float().

2014-12-21 Thread Matt Turner
total instructions in shared programs: 5869005 -> 5868220 (-0.01%) instructions in affected programs: 70208 -> 69423 (-1.12%) --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/d

[Mesa-dev] [PATCH 3/8] i965/vec4: Add pass to gather constants into a vector-float MOV.

2014-12-21 Thread Matt Turner
Currently only handles consecutive instructions with the same destination that collectively write all channels. total instructions in shared programs: 5879798 -> 5869011 (-0.18%) instructions in affected programs: 465236 -> 454449 (-2.32%) --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 61 +

[Mesa-dev] [PATCH 4/8] i965/vec4: Perform CSE on MOV ..., VF instructions.

2014-12-21 Thread Matt Turner
Port of commit a28ad9d4 from the fs backend. No shader-db changes since we don't emit MOV ..., VF instructions yet. --- src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/sr

[Mesa-dev] [PATCH 1/8] i965: Add fs_reg/src_reg constructors that take vf[4].

2014-12-21 Thread Matt Turner
Sometimes it's easier to generate 4x values into an array, and the memcpy is 1 instruction, rather than 11 to piece 4 arguments together. I'd forgotten to remove the prototype from fs_reg from a previous patch, so it's already there for us here. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9

[Mesa-dev] [PATCH 0/8] i965/vec4: Use Vector-float immediates.

2014-12-21 Thread Matt Turner
This series adds support to i965's vec4 backend for using vector-float immediates. The shader-db results are pretty nice: total instructions in shared programs: 5889529 -> 5876617 (-0.22%) instructions in affected programs: 465347 -> 452435 (-2.77%) and there's still room for improvement. It

[Mesa-dev] [Bug 87516] glProgramBinary violates spec

2014-12-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87516 --- Comment #4 from Leith Bade --- Looks good. Are you able to send feedback upstream to the GL ARB about the vagueness around having no support binaryFormats in the spec? -- You are receiving this mail because: You are the QA Contact for the

[Mesa-dev] [Bug 87516] glProgramBinary violates spec

2014-12-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87516 --- Comment #3 from Ian Romanick --- I sent some patches to the mesa-dev mailing list: http://lists.freedesktop.org/archives/mesa-dev/2014-December/073210.html http://lists.freedesktop.org/archives/mesa-dev/2014-December/073212.html http://lists

Re: [Mesa-dev] [PATCH 2/8] i965: Micro-optimize brw_get_index_type

2014-12-21 Thread Matt Turner
On Sun, Dec 21, 2014 at 11:40 AM, Ian Romanick wrote: >>> diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c >>> b/src/mesa/drivers/dri/i965/brw_draw_upload.c >>> index 6e0cf3e..e46c54b 100644 >>> --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c >>> +++ b/src/mesa/drivers/dri/i965/brw_draw

[Mesa-dev] [PATCH 2/3] mesa: Add a missing error check in _mesa_GetProgramBinary

2014-12-21 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87516 --- src/mesa/main/shaderapi.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 1

[Mesa-dev] [PATCH 1/3] mesa: Add missing error checks in _mesa_ProgramBinary

2014-12-21 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87516 --- src/mesa/main/shaderapi.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index

[Mesa-dev] [PATCH 3/3] mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary

2014-12-21 Thread Ian Romanick
From: Ian Romanick There are no binary formats supported, so what are you doing? At least this gives the application developer some feedback about what's going on. The spec gives no guidance about what to do in this scenario. Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/

Re: [Mesa-dev] [PATCH] mesa: Add mesa SHA-1 functions

2014-12-21 Thread Emil Velikov
On 20 December 2014 at 14:21, Olivier Galibert wrote: > Here is an implementation I've written myself, so no license issues. > Thanks OG, Afaics the main issue is not the lack of implementation, but that no-one wants to step up to "maintain" it. Even adding code that is x2 the size is considered

Re: [Mesa-dev] [PATCH 2/8] i965: Micro-optimize brw_get_index_type

2014-12-21 Thread Ian Romanick
On 12/19/2014 06:22 PM, Matt Turner wrote: > On Fri, Dec 19, 2014 at 2:20 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> With the switch-statement, GCC 4.8.3 produces a small pile of code with >> a branch. >> >> : >> 00: 8b 54 24 04 mov0x4(%esp),%edx >>

Re: [Mesa-dev] [PATCH 1/8] meta: Put _mesa_meta_in_progress in the header file

2014-12-21 Thread Ian Romanick
On 12/19/2014 06:10 PM, Matt Turner wrote: > On Fri, Dec 19, 2014 at 2:20 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> ...so that it can be inlined in the two places that call it. > >if (brw->meta_in_progress != _mesa_meta_in_progress(ctx)) { > brw->meta_in_progress = _mesa_meta

Re: [Mesa-dev] [PATCH 1/8] meta: Put _mesa_meta_in_progress in the header file

2014-12-21 Thread Ian Romanick
Jason asked on IRC what the overall results were for the series. Here is that data. n=50 for all four. Gl32Batch7 Gl32Multithread 32-bit 4.11846% +/- 0.216796% 1.97044% +/- 0.161024% 64-bit 5.48027% +/- 0.368804% 2.46053% +/- 0.19554% On 12/19/2014 02:22 PM, Ian Romanic

Re: [Mesa-dev] [PATCH] r600: fix texture gradients instruction emission (v2)

2014-12-21 Thread Emil Velikov
Hello guys, Can anyone backport the following patches for 10.3 and let me know if we should drop them. They have a bunch of non-trivial conflicts, thus i would rather avoid butchering things up. 38ec1844193570486bf35e25a7a4339a00da127e r600: fix texture gradients instruction emission (v2) c883856

[Mesa-dev] [Bug 85380] FTBFS in Clover: /usr/lib/llvm-3.6/include/llvm/Config/Targets.def:26: undefined reference to `LLVMInitialize*Target'

2014-12-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85380 Niels Ole Salscheider changed: What|Removed |Added CC||niels_ole@salscheider-onlin

Re: [Mesa-dev] [PATCH] tgsi: lowering support for alpha test

2014-12-21 Thread Eric Anholt
Rob Clark writes: > Eric, > > we've managed to find the alpha-ref bitfield on a4xx, so suddenly I > don't actually need this anymore.. > > I've pushed a slightly updated version where I'd fixed a few more > things (and was passing the fbo-alphatest-formats tests for me) to my > github tree, in ca