Re: [Mesa-dev] [PATCH v4 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Jason Ekstrand
On Jan 23, 2015 10:37 PM, "Connor Abbott" wrote: > > Other than the one comment fix below, > > Reviewed-by: Connor Abbott > > On Fri, Jan 23, 2015 at 7:17 PM, Jason Ekstrand wrote: > > Add a required field to the Opcode class, const_expr, that contains an > > expression or statement that compute

Re: [Mesa-dev] [PATCH v4 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Connor Abbott
Other than the one comment fix below, Reviewed-by: Connor Abbott On Fri, Jan 23, 2015 at 7:17 PM, Jason Ekstrand wrote: > Add a required field to the Opcode class, const_expr, that contains an > expression or statement that computes the result of the opcode given known > constant inputs. Then t

[Mesa-dev] [PATCH 2/3] nir/search: Add support for matching unknown constants

2015-01-23 Thread Jason Ekstrand
There are some algebraic transformations that we want to do but only if certain things are constants. For instance, we may want to replace a * (b + c) with (a * b) + (a * c) as long as a and either b or c is constant. While this generates more instructions, some of it will get constant folded. Th

[Mesa-dev] [PATCH 3/3] nir: Add some more optimizations for handling constants in bcsel

2015-01-23 Thread Jason Ekstrand
shader-db results based on my scalarizing patches: total instructions in shared programs: 6077319 -> 6076895 (-0.01%) instructions in affected programs: 63509 -> 63085 (-0.67%) helped:306 HURT: 0 GAINED:

[Mesa-dev] [PATCH 1/3] nir/search: Use nir_alu_src_copy

2015-01-23 Thread Jason Ekstrand
Before we were doing this confusing thing where we copied structures and then did a nir_src_copy in case there was an indirect. Now, we just call the new nir_alu_src_copy function instead. --- src/glsl/nir/nir_search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl

[Mesa-dev] [PATCH v2 3/3] i965/fs_nir: Get rid of get_alu_src

2015-01-23 Thread Jason Ekstrand
Originally, get_alu_src was supposed to handle resolving swizzles and things like that. However, now that basically every instruction we have only takes scalar sources, we don't really need it anymore. The only case where it's still marginally useful is for the mov and vecN operations that are le

[Mesa-dev] [PATCH v2 0/3] i965/fs: Use the NIR scalarizer

2015-01-23 Thread Jason Ekstrand
This is a second version of my scalarizing series. It uses the scalarizing pass pushed by Eric Anholt earlier today instead of the one used in the previous series. Also, after this series, we no longer use the vec_to_movs pass. Jason Ekstrand (3): nir: Add a pass to lower vector phi nodes to s

[Mesa-dev] [PATCH v2 1/3] nir: Add a pass to lower vector phi nodes to scalar phi nodes

2015-01-23 Thread Jason Ekstrand
--- src/glsl/Makefile.sources | 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_lower_phis_to_scalar.c | 238 3 files changed, 241 insertions(+) create mode 100644 src/glsl/nir/nir_lower_phis_to_scalar.c diff --git a/src/gls

[Mesa-dev] [PATCH v2 2/3] i965/fs: Use NIR's scalarizing abilities and stop handling vectors

2015-01-23 Thread Jason Ekstrand
Now that we can scalarize with NIR, there's no need for all this code anymore. Let's get rid of it and just do scalar operations. --- src/mesa/drivers/dri/i965/brw_fs.h | 15 - src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 487 ++- 2 files changed, 156 insertions(+

[Mesa-dev] [Bug 88766] codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std'

2015-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88766 --- Comment #4 from Ilia Mirkin --- (In reply to Vinson Lee from comment #3) > Created attachment 112757 [details] [review] > Remove tr1 namespace. That would require C++11 support, which I feel a lot worse about requiring than having nouveau no

[Mesa-dev] [Bug 88766] codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std'

2015-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88766 --- Comment #3 from Vinson Lee --- Created attachment 112757 --> https://bugs.freedesktop.org/attachment.cgi?id=112757&action=edit Remove tr1 namespace. -- You are receiving this mail because: You are the QA Contact for the bug. You are the a

[Mesa-dev] [Bug 88766] codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std'

2015-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88766 --- Comment #2 from Vinson Lee --- The error was seen on FreeBSD 10 with clang 3.4. Removing the tr1 namespace fixes the build errors. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug

[Mesa-dev] [Bug 88766] codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std'

2015-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88766 --- Comment #1 from Ilia Mirkin --- Is this a really old compiler? tr1 has been in gcc for quite a while. In any case, there's no nouveau kernel support on FreeBSD ATM, so this isn't a huge issue. -- You are receiving this mail because: You are

[Mesa-dev] [Bug 88766] codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std'

2015-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88766 Bug ID: 88766 Summary: codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std' Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Free

[Mesa-dev] [PATCH] glapi: Do not use backtrace on FreeBSD.

2015-01-23 Thread Vinson Lee
Fix build error. CCLD libGL.la libglapi.a(glapi_libglapi_la-glapi_gentable.o): In function `__glapi_gentable_NoOp': glapi_gentable.c:76: undefined reference to `backtrace' Signed-off-by: Vinson Lee --- src/mapi/glapi/gen/gl_gentable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [Mesa-dev] [PATCH] radeonsi: Enable VGPR spilling for all shader types v3

2015-01-23 Thread Michel Dänzer
On 24.01.2015 11:56, Tom Stellard wrote: > On Thu, Jan 22, 2015 at 11:27:32AM +0900, Michel Dänzer wrote: >> >> Tom, for now I suggest this solution, summarized from Marek's previous >> descriptions: >> >> (At least) for shaders which have relocations, keep a copy of the >> machine code in malloced

Re: [Mesa-dev] [PATCH] radeonsi: Enable VGPR spilling for all shader types v3

2015-01-23 Thread Tom Stellard
On Thu, Jan 22, 2015 at 11:27:32AM +0900, Michel Dänzer wrote: > On 21.01.2015 21:12, Marek Olšák wrote: > > We also had a case when the CPU accidentally corrupted shaders, > > because the shaders were mapped after textures and a CPU texture > > upload overflowed and overwrote shaders. I suppose we

[Mesa-dev] videos of X, DRM, & Mesa talks from LCA2015

2015-01-23 Thread Alan Coopersmith
The amazing 2015 linux.conf.au video team has already posted all the videos from the talks at this years conference - you can find them on their YouTube channel at https://www.youtube.com/user/linuxconfau2015 or via the links on http://lca2015.linux.org.au/ Talks of particular relevance to Xorg,

Re: [Mesa-dev] [PATCH] i965/fs: Allow SIMD16 on pre-SNB when try_replace_with_sel is successful

2015-01-23 Thread Kenneth Graunke
On Friday, January 23, 2015 02:32:53 PM Ian Romanick wrote: > From: Ian Romanick > > If try_replace_with_sel is able to replace the flow control with a SEL > instruction, then there is no flow control... failing SIMD16 because > of nonexistent flow control is wrong. > > No piglit regressions on

[Mesa-dev] [PATCH] nir: Use pointers for nir_src_copy and nir_dest_copy

2015-01-23 Thread Jason Ekstrand
This avoids the overhead of copying structures and better matches the newly added nir_alu_src_copy and nir_alu_dest_copy. --- This should be obvious, but this applies on top of Eric Anholt's patch to add nir_alu_src_copy and nir_alu_dest_copy src/glsl/nir/nir.c | 56

Re: [Mesa-dev] [PATCH 2/2] nir: Expose nir_print_instr() for debug prints

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Fri, Jan 23, 2015 at 4:35 PM, Eric Anholt wrote: > It's nice to have this present in your default cases so you can see what > instruction is triggering an abort. > > v2: Just pass a NULL state, now that it won't crash when you do. > --- > src/glsl/nir/nir.h

Re: [Mesa-dev] [PATCH 1/2] nir: When asked to print with a NULL state, just us bare variable names.

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Fri, Jan 23, 2015 at 4:35 PM, Eric Anholt wrote: > --- > src/glsl/nir/nir_print.c | 22 -- > 1 file changed, 16 insertions(+), 6 deletions(-) > > diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c > index 1a50ae9..2ef55ed 100644

[Mesa-dev] [PATCH 2/2] nir: Expose nir_print_instr() for debug prints

2015-01-23 Thread Eric Anholt
It's nice to have this present in your default cases so you can see what instruction is triggering an abort. v2: Just pass a NULL state, now that it won't crash when you do. --- src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_print.c | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-

[Mesa-dev] [PATCH 1/2] nir: When asked to print with a NULL state, just us bare variable names.

2015-01-23 Thread Eric Anholt
--- src/glsl/nir/nir_print.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index 1a50ae9..2ef55ed 100644 --- a/src/glsl/nir/nir_print.c +++ b/src/glsl/nir/nir_print.c @@ -210,7 +210,9 @@ print_var_dec

Re: [Mesa-dev] [PATCH 4/5] nir: Make some helpers for copying ALU src/dests.

2015-01-23 Thread Jason Ekstrand
On Fri, Jan 23, 2015 at 4:25 PM, Jason Ekstrand wrote: > I'll throw together a patch to make nir_src_copy take pointers to keep > things consistent. > > Reviewed-by: Jason Ekstrand > > On Thu, Jan 22, 2015 at 11:08 AM, Eric Anholt wrote: > >> Jason Ekstrand writes: >> >> > On Wed, Jan 21, 2015

Re: [Mesa-dev] [PATCH 4/5] nir: Make some helpers for copying ALU src/dests.

2015-01-23 Thread Jason Ekstrand
I'll throw together a patch to make nir_src_copy take pointers to keep things consistent. Reviewed-by: Jason Ekstrand On Thu, Jan 22, 2015 at 11:08 AM, Eric Anholt wrote: > Jason Ekstrand writes: > > > On Wed, Jan 21, 2015 at 5:26 PM, Eric Anholt wrote: > > > >> There aren't many users yet,

[Mesa-dev] [PATCH 2/2] nir: Add some more optimizations for handling constants in bcsel

2015-01-23 Thread Jason Ekstrand
shader-db results based on my scalarizing patches: total instructions in shared programs: 6077319 -> 6076895 (-0.01%) instructions in affected programs: 63509 -> 63085 (-0.67%) helped:306 HURT: 0 GAINED:

[Mesa-dev] [PATCH 1/2] nir/search: Add support for matching unknown constants

2015-01-23 Thread Jason Ekstrand
There are some algebraic transformations that we want to do but only if certain things are constants. For instance, we may want to replace a * (b + c) with (a * b) + (a * c) as long as a and either b or c is constant. While this generates more instructions, some of it will get constant folded. Th

[Mesa-dev] [PATCH v4 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Jason Ekstrand
Add a required field to the Opcode class, const_expr, that contains an expression or statement that computes the result of the opcode given known constant inputs. Then take those const_expr's and expand them into a function that takes an opcode and an array of constant inputs and spits out the cons

Re: [Mesa-dev] [PATCH] i965: Add a brw_fs_cmod_propagation unit test with large VGRF writes.

2015-01-23 Thread Matt Turner
On Fri, Jan 23, 2015 at 3:30 PM, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > .../drivers/dri/i965/test_fs_cmod_propagation.cpp | 40 > ++ > 1 file changed, 40 insertions(+) > > Yep, that is indeed broken, and my proposed code fixes it. > > Here's a unit

Re: [Mesa-dev] [PATCH 1/4] nir: use Python to autogenerate opcode information

2015-01-23 Thread Jason Ekstrand
On Fri, Jan 23, 2015 at 3:10 PM, Matt Turner wrote: > On Fri, Jan 23, 2015 at 1:43 PM, Jason Ekstrand > wrote: > > create mode 100644 src/glsl/nir/nir_opcodes.py > > create mode 100644 src/glsl/nir/nir_opcodes_c.py > > create mode 100644 src/glsl/nir/nir_opcodes_h.py > > Add the python files

[Mesa-dev] [PATCH 1/2] mesa: Move simple_list.h to src/util.

2015-01-23 Thread Eric Anholt
We have two copies of it in the tree, I'm going to delete one. --- src/gallium/targets/dri/Makefile.am| 1 + src/mesa/Makefile.sources | 1 - src/mesa/drivers/dri/i915/i830_texblend.c | 2 +- src/mesa/drivers/dri/i915/intel_syncobj.c

[Mesa-dev] [PATCH 2/2] gallium: Replace u_simple_list.h with util/simple_list.h

2015-01-23 Thread Eric Anholt
The code was exactly the same, except util/ has c++ guards and a struct simple_node declaration. --- For my NIR work, there were clashes between gallium's copy (from my driver) and Mesa's (from NIR) src/gallium/auxiliary/Makefile.sources| 1 - src/gallium/auxiliary/draw/draw_llvm.c

[Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Haixia Shi
The NULL platform is for off-screen rendering only. Render node support is required. v2: Only consider the render nodes. Do not use normal nodes as they require auth hooks. Signed-off-by: Haixia Shi --- src/egl/drivers/dri2/Makefile.am | 5 ++ src/egl/drivers/dri2/egl_dri2.c | 13 ++

[Mesa-dev] [PATCH] i965: Add a brw_fs_cmod_propagation unit test with large VGRF writes.

2015-01-23 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- .../drivers/dri/i965/test_fs_cmod_propagation.cpp | 40 ++ 1 file changed, 40 insertions(+) Yep, that is indeed broken, and my proposed code fixes it. Here's a unit test that provokes the problem. Thanks for putting together the unit test

Re: [Mesa-dev] [PATCH] nir: Make vec-to-movs handle src/dest aliasing.

2015-01-23 Thread Connor Abbott
On Fri, Jan 23, 2015 at 5:34 PM, Eric Anholt wrote: > Connor Abbott writes: > >> Argh, nevermind, I was reading it wrong... >> >> On Thu, Jan 22, 2015 at 8:18 PM, Connor Abbott wrote: >>> What happens if you have something like foo = vec3(foo.z, bar.x, >>> foo.x)? I don't think emitting vector m

Re: [Mesa-dev] [PATCH] nir: Add nir_lower_alu_scalar.

2015-01-23 Thread Eric Anholt
Jason Ekstrand writes: > Also, Could we rename this to nir_lower_alu_to_scalar? That's more > descriptive. That's even better. Done. signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.free

Re: [Mesa-dev] [PATCH 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Connor Abbott
To be honest, I'm not sure how much clearer this is than the original version... I think any way we do it is going to be somewhat messy. But I do understand what it's doing (at least I think so), and it's better to have something that both of us understand than something that only one of us really

Re: [Mesa-dev] [PATCH 1/4] nir: use Python to autogenerate opcode information

2015-01-23 Thread Matt Turner
On Fri, Jan 23, 2015 at 1:43 PM, Jason Ekstrand wrote: > create mode 100644 src/glsl/nir/nir_opcodes.py > create mode 100644 src/glsl/nir/nir_opcodes_c.py > create mode 100644 src/glsl/nir/nir_opcodes_h.py Add the python files to EXTRA_DIST in src/glsl/Makefile.am before you commit. __

Re: [Mesa-dev] [PATCH 11/16] i965/fs: Add pass to propagate conditional modifiers.

2015-01-23 Thread Kenneth Graunke
On Monday, January 19, 2015 03:31:10 PM Matt Turner wrote: > total instructions in shared programs: 5974160 -> 5959463 (-0.25%) > instructions in affected programs: 1743737 -> 1729040 (-0.84%) > GAINED:0 > LOST: 12 > --- > src/me

Re: [Mesa-dev] [PATCH] i965/fs: Allow SIMD16 on pre-SNB when try_replace_with_sel is successful

2015-01-23 Thread Matt Turner
On Fri, Jan 23, 2015 at 2:32 PM, Ian Romanick wrote: > From: Ian Romanick > > If try_replace_with_sel is able to replace the flow control with a SEL > instruction, then there is no flow control... failing SIMD16 because > of nonexistent flow control is wrong. > > No piglit regressions on any i965

Re: [Mesa-dev] [PATCH] i965: Do Sandybridge workaround flushes before each primitive.

2015-01-23 Thread Emil Velikov
On 23/01/15 22:25, Kenneth Graunke wrote: > On Thursday, January 22, 2015 07:14:33 PM Emil Velikov wrote: >> On 10/01/15 07:07, Kenneth Graunke wrote: >>> Sandybridge requires the post-sync non-zero workaround in a ton of >>> places, and if you ever miss one, the GPU usually hangs. >>> >> Would it

Re: [Mesa-dev] [PATCH] nir: Make vec-to-movs handle src/dest aliasing.

2015-01-23 Thread Eric Anholt
Connor Abbott writes: > Argh, nevermind, I was reading it wrong... > > On Thu, Jan 22, 2015 at 8:18 PM, Connor Abbott wrote: >> What happens if you have something like foo = vec3(foo.z, bar.x, >> foo.x)? I don't think emitting vector mov's for only the contiguous >> components is enough. >> >> O

[Mesa-dev] [PATCH] i965/fs: Allow SIMD16 on pre-SNB when try_replace_with_sel is successful

2015-01-23 Thread Ian Romanick
From: Ian Romanick If try_replace_with_sel is able to replace the flow control with a SEL instruction, then there is no flow control... failing SIMD16 because of nonexistent flow control is wrong. No piglit regressions on any i965 platform in Jenkins. total instructions in shared programs: 4382

Re: [Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.

2015-01-23 Thread Laura Ekstrand
Emil, In situations such as your TEXTURE_TARGET example, the functionality is not exposed to non-DSA functions. I've been making the backend functions take a bool dsa that instructs them how to behave depending on whether or not glTexParameter or glTextureParameter is called. Now this is arguabl

Re: [Mesa-dev] [PATCH] i965: Do Sandybridge workaround flushes before each primitive.

2015-01-23 Thread Kenneth Graunke
On Thursday, January 22, 2015 07:14:33 PM Emil Velikov wrote: > On 10/01/15 07:07, Kenneth Graunke wrote: > > Sandybridge requires the post-sync non-zero workaround in a ton of > > places, and if you ever miss one, the GPU usually hangs. > > > Would it be worth including this in the stable branch

Re: [Mesa-dev] [PATCH] GL: Update glext.h to fix ARB_dsa function prototypes.

2015-01-23 Thread Laura Ekstrand
I checked, and all of the currently implemented DSA functions build with this file. Laura On Fri, Jan 23, 2015 at 2:20 PM, Laura Ekstrand wrote: > --- > include/GL/glext.h | 48 ++-- > 1 file changed, 26 insertions(+), 22 deletions(-) > > diff --git

[Mesa-dev] [PATCH] GL: Update glext.h to fix ARB_dsa function prototypes.

2015-01-23 Thread Laura Ekstrand
--- include/GL/glext.h | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index d3cfbb5..0ca89ca 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -33,7 +33,7 @@ extern "C" { ** u

Re: [Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.

2015-01-23 Thread Emil Velikov
On 23/01/15 21:53, Jason Ekstrand wrote: > > > On Fri, Jan 23, 2015 at 1:46 PM, Emil Velikov > wrote: > > On 23/01/15 20:51, Jason Ekstrand wrote: > > > > > > On Thu, Jan 22, 2015 at 9:27 AM, Emil Velikov >

Re: [Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.

2015-01-23 Thread Ian Romanick
On 01/23/2015 01:53 PM, Jason Ekstrand wrote: > On Fri, Jan 23, 2015 at 1:46 PM, Emil Velikov > wrote: > On 23/01/15 20:51, Jason Ekstrand wrote: > > On Thu, Jan 22, 2015 at 9:27 AM, Emil Velikov > >

Re: [Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Emil Velikov
On 23/01/15 19:24, Haixia Shi wrote: > Hi Emil, > > On Fri, Jan 23, 2015 at 8:42 AM, Emil Velikov > wrote: >> Might be worth having a look at how platform_drm does it. But we warned >> there be dragons :) > > It seems platform_drm would cast disp->PlatformDisplay to a gbm_device > and use it if

Re: [Mesa-dev] [PATCH 10/10] nir: Add algebraic optimizations for division and reciprocal.

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jan 22, 2015 at 9:18 AM, Matt Turner wrote: > 8-10 are > > Reviewed-by: Matt Turner > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >

Re: [Mesa-dev] [PATCH 09/10] nir: Add algebraic optimizations for exponential/logarithmic functions.

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jan 22, 2015 at 3:41 AM, Kenneth Graunke wrote: > Most of these exist in the GLSL IR algebraic pass already. However, > SSA allows us to find more instances of the patterns. > > total NIR instructions in shared programs: 2015593 -> 2011430 (-0.21%) > NIR ins

Re: [Mesa-dev] [PATCH 08/10] nir: Add algebraic optimizations for simplifying comparisons.

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Fri, Jan 23, 2015 at 1:46 PM, Matt Turner wrote: > Reviewed-by: Matt Turner > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _

Re: [Mesa-dev] [PATCH 07/10] nir: Add algebraic optimizations for pointless shifts.

2015-01-23 Thread Jason Ekstrand
On Thu, Jan 22, 2015 at 9:09 AM, Matt Turner wrote: > On Thu, Jan 22, 2015 at 3:41 AM, Kenneth Graunke > wrote: > > The GLSL IR optimization pass contained these; we may as well include > > them too. > > > > No change in the number of NIR instructions on a shader-db run. > > > > total i965 instr

Re: [Mesa-dev] [PATCH v2 05/10] nir: Implement CSE on intrinsics that can be eliminated and reordered.

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jan 22, 2015 at 3:41 AM, Kenneth Graunke wrote: > Matt and I noticed that one of the shaders hurt by INTEL_USE_NIR=1 had > load_input and load_uniform intrinsics repeated several times, with the > same parameters, but each one generating a distinct SSA value.

Re: [Mesa-dev] [PATCH 04/10] nir: Pull nir_instr_can_cse()'s SSA checks out of the switch.

2015-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Fri, Jan 23, 2015 at 1:50 PM, Matt Turner wrote: > Reviewed-by: Matt Turner > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _

Re: [Mesa-dev] [PATCH 03/10] i965/nir: Report NIR instruction counts (in SSA form) via KHR_debug.

2015-01-23 Thread Jason Ekstrand
On Thu, Jan 22, 2015 at 7:39 AM, Jason Ekstrand wrote: > > On Jan 22, 2015 3:41 AM, "Kenneth Graunke" wrote: > > > > This allows us to count NIR instructions via shader-db. > > > > Use "run" as normal. The results file will contain both NIR and > > assembly. > > > > Then, to generate a NIR repo

Re: [Mesa-dev] [PATCH 02/10] i965/nir: Print NIR on INTEL_DEBUG=fs.

2015-01-23 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 03/10] i965/nir: Report NIR instruction counts (in SSA form) via KHR_debug.

2015-01-23 Thread Matt Turner
Reviewed-by: Matt Turner Although I'm not totally sure I want to be getting this information all the time. I guess we can add an environment variable to control it if needed. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesk

Re: [Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.

2015-01-23 Thread Jason Ekstrand
On Fri, Jan 23, 2015 at 1:46 PM, Emil Velikov wrote: > On 23/01/15 20:51, Jason Ekstrand wrote: > > > > > > On Thu, Jan 22, 2015 at 9:27 AM, Emil Velikov > > wrote: > > > > On 05/01/15 17:45, Laura Ekstrand wrote: > > > This comment is vague. Do you have

Re: [Mesa-dev] [PATCH 04/10] nir: Pull nir_instr_can_cse()'s SSA checks out of the switch.

2015-01-23 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 06/10] nir: Add a bunch of algebraic optimizations on logic/bit operations.

2015-01-23 Thread Matt Turner
On Thu, Jan 22, 2015 at 7:27 AM, Jason Ekstrand wrote: > On Jan 22, 2015 3:41 AM, "Kenneth Graunke" wrote: >> Matt and I noticed a bunch of "val <- ior a a" operations in a shader, >> so we decided to add an algebraic optimization for that. While there, >> I decided to add a bunch more of them.

Re: [Mesa-dev] [PATCH 08/10] nir: Add algebraic optimizations for simplifying comparisons.

2015-01-23 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.

2015-01-23 Thread Emil Velikov
On 23/01/15 20:51, Jason Ekstrand wrote: > > > On Thu, Jan 22, 2015 at 9:27 AM, Emil Velikov > wrote: > > On 05/01/15 17:45, Laura Ekstrand wrote: > > This comment is vague. Do you have a specific recommendation for the > > code here? > > >

[Mesa-dev] [PATCH 3/4] nir/constant_folding: use the new constant folding infrastructure

2015-01-23 Thread Jason Ekstrand
From: Connor Abbott Signed-off-by: Connor Abbott --- src/glsl/nir/nir_opt_constant_folding.c | 179 1 file changed, 21 insertions(+), 158 deletions(-) diff --git a/src/glsl/nir/nir_opt_constant_folding.c b/src/glsl/nir/nir_opt_constant_folding.c index 878436b.

[Mesa-dev] [PATCH 1/4] nir: use Python to autogenerate opcode information

2015-01-23 Thread Jason Ekstrand
From: Connor Abbott Before, we used a system where a file, nir_opcodes.h, defined some macros that were included to generate the enum values and the nir_op_infos structure. This worked pretty well, but for development the error messages were never very useful, Python tools couldn't understand the

[Mesa-dev] [PATCH 4/4] nir/opt_algebraic: be more careful about constant types

2015-01-23 Thread Jason Ekstrand
From: Connor Abbott We can do this now that we have opcode info available in Python. Signed-off-by: Connor Abbott v2 Jason Ekstrand : - Make it build again --- src/glsl/nir/nir_algebraic.py | 39 +++ src/glsl/nir/nir_opt_algebraic.py | 6 ++ 2 fil

[Mesa-dev] [PATCH 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Jason Ekstrand
Add a required field to the Opcode class, const_expr, that contains an expression or statement that computes the result of the opcode given known constant inputs. Then take those const_expr's and expand them into a function that takes an opcode and an array of constant inputs and spits out the cons

[Mesa-dev] [PATCH v3 0/4] A NIR constant folding infastructure

2015-01-23 Thread Jason Ekstrand
This is a 3rd version of the constant folding architecture that Connor came up with based on python autogeneration. This 3rd version has a few trivial fixes to some of the patches and a complete rewrite of 2. While I think Connor's patch 2 probably worked, it involved a lot of very opaque wrappin

Re: [Mesa-dev] [PATCH 1/2] i965/fs: Don't use backend_visitor::instructions after creating the CFG.

2015-01-23 Thread Matt Turner
On Sat, Jan 17, 2015 at 12:07 AM, Kenneth Graunke wrote: > With an updated commit message and Piglit passing (I'll test and let you > know), > Reviewed-by: Kenneth Graunke Reminder to piglit these the next time you power on your Gen4. :) ___ mesa-dev

Re: [Mesa-dev] [PATCH 07/16] i965: Add is_3src() to backend_instruction.

2015-01-23 Thread Matt Turner
On Fri, Jan 23, 2015 at 11:42 AM, Ian Romanick wrote: > On 01/20/2015 12:16 AM, Kenneth Graunke wrote: >> On Monday, January 19, 2015 03:31:06 PM Matt Turner wrote: >>> --- >>> src/mesa/drivers/dri/i965/brw_shader.cpp| 10 ++ >>> src/mesa/drivers/dri/i965/brw_shader.h

Re: [Mesa-dev] [PATCH 1/2] r600g, radeonsi: Fix calculation of IR target cap string buffer size

2015-01-23 Thread Tom Stellard
Reviewed-by: Tom Stellard On Fri, Jan 23, 2015 at 10:01:56PM +0100, Marek Olšák wrote: > Reviewed-by: Marek Olšák > > Marek > > On Thu, Jan 22, 2015 at 4:41 AM, Michel Dänzer wrote: > > From: Michel Dänzer > > > > Fixes writing beyond the allocated buffer: > > > > ==31855== Invalid write of

Re: [Mesa-dev] [PATCH 1/2] r600g, radeonsi: Fix calculation of IR target cap string buffer size

2015-01-23 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Jan 22, 2015 at 4:41 AM, Michel Dänzer wrote: > From: Michel Dänzer > > Fixes writing beyond the allocated buffer: > > ==31855== Invalid write of size 1 > ==31855==at 0x50AB2A9: vsprintf (iovsprintf.c:43) > ==31855==by 0x508F6F6: sprintf (sprintf.

Re: [Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.

2015-01-23 Thread Jason Ekstrand
On Thu, Jan 22, 2015 at 9:27 AM, Emil Velikov wrote: > On 05/01/15 17:45, Laura Ekstrand wrote: > > This comment is vague. Do you have a specific recommendation for the > > code here? > > > Seems like I'm way too subtle - yes I have a few. > > > 1. Add ARB_direct_state_access to struct gl_extens

Re: [Mesa-dev] [PATCH 07/16] i965: Add is_3src() to backend_instruction.

2015-01-23 Thread Ian Romanick
On 01/20/2015 12:16 AM, Kenneth Graunke wrote: > On Monday, January 19, 2015 03:31:06 PM Matt Turner wrote: >> --- >> src/mesa/drivers/dri/i965/brw_shader.cpp| 10 ++ >> src/mesa/drivers/dri/i965/brw_shader.h | 1 + >> src/mesa/drivers/dri/i965/brw_vec4_co

Re: [Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Haixia Shi
Hi Emil, On Fri, Jan 23, 2015 at 8:42 AM, Emil Velikov wrote: > Might be worth having a look at how platform_drm does it. But we warned > there be dragons :) It seems platform_drm would cast disp->PlatformDisplay to a gbm_device and use it if available; otherwise it always uses the first normal

[Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Haixia Shi
The NULL platform is for off-screen rendering only. Render node support is required. Signed-off-by: Haixia Shi --- src/egl/drivers/dri2/Makefile.am | 5 ++ src/egl/drivers/dri2/egl_dri2.c | 13 ++- src/egl/drivers/dri2/egl_dri2.h | 3 + src/egl/drivers/dri2/platform_null.c | 1

[Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Haixia Shi
The NULL platform is for off-screen rendering only. Render node support is required. Signed-off-by: Haixia Shi --- src/egl/drivers/dri2/Makefile.am | 5 ++ src/egl/drivers/dri2/egl_dri2.c | 13 ++- src/egl/drivers/dri2/egl_dri2.h | 3 + src/egl/drivers/dri2/platform_null.c | 1

Re: [Mesa-dev] [PATCH v2 2/5] nir: use Python to autogenerate opcode information

2015-01-23 Thread Connor Abbott
On Fri, Jan 23, 2015 at 1:07 PM, Jason Ekstrand wrote: > > > On Thu, Jan 22, 2015 at 8:32 PM, Connor Abbott wrote: >> >> Before, we used a system where a file, nir_opcodes.h, defined some macros >> that >> were included to generate the enum values and the nir_op_infos structure. >> This >> worked

[Mesa-dev] [PATCH] clover: CL 1.2 add GetKernelArgInfo

2015-01-23 Thread EdB
--- depends on clLinkProgram serie src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- src/gallium/state_trackers/clover/api/dispatch.hpp | 8 +- src/gallium/state_trackers/clover/api/kernel.cpp | 51 src/gallium/state_trackers/clover/core/kernel.cpp | 6 ++ src/gallium

Re: [Mesa-dev] [PATCH v2 2/5] nir: use Python to autogenerate opcode information

2015-01-23 Thread Jason Ekstrand
On Thu, Jan 22, 2015 at 8:32 PM, Connor Abbott wrote: > Before, we used a system where a file, nir_opcodes.h, defined some macros > that > were included to generate the enum values and the nir_op_infos structure. > This > worked pretty well, but for development the error messages were never very

Re: [Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Emil Velikov
On 23/01/15 02:00, Haixia Shi wrote: > Hi Emil, > > On Thu, Jan 22, 2015 at 4:38 PM, Emil Velikov > wrote: >> On 22/01/15 22:23, Haixia Shi wrote: >>> Hi Emil >>> >>> On Thu, Jan 22, 2015 at 1:36 PM, Emil Velikov >>> wrote: Hi Haixia Shi, On 22/01/15 17:35, Haixia Shi wrote: >>>

Re: [Mesa-dev] New stable-branch 10.4 candidate pushed

2015-01-23 Thread Emil Velikov
Hello list, As mentioned earlier here is the current status of the 10.4.3 release candidate: - 48 queued - 4 nominated (outstanding) - and 0 rejected patches In a nut shell this gives us over 40 fixes in the nine state-tracker, a couple of i965 fixes, and a build fix for OpenBSD. Take a look

Re: [Mesa-dev] [PATCH] egl: Pass the correct X visual depth to xcb_put_image().

2015-01-23 Thread Jose Fonseca
It looks like nobody really cares, so I'll take it as consent. This only happens if X requires 24bit visuals. Maybe a minority of drivers do that. At least Intel X driver does. BTW, this should go to stable branches too. Jose On 19/01/15 23:09, Jose Fonseca wrote: From: José Fonseca The

[Mesa-dev] [Bug 88275] [865G] Intel OpenGL rendering isn't starting

2015-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88275 --- Comment #25 from Eugene --- (In reply to Timothy Arceri from comment #24) > What does it say when you run: > > LIBGL_DEBUG=verbose glxinfo | grep direct $ LIBGL_DEBUG=verbose glxinfo | grep direct libGL: screen 0 does not appear to be DRI3

Re: [Mesa-dev] [PATCH 3/3] i965: Fix URB size for gen8

2015-01-23 Thread Ville Syrjälä
On Wed, Jan 21, 2015 at 12:51:02PM -0800, Kenneth Graunke wrote: > On Wednesday, January 21, 2015 08:17:36 PM ville.syrj...@linux.intel.com > wrote: > > From: Ville Syrjälä > > > > Increase the device info .urb.size for BDW GT3 and CHV to match the > > default URB size for each. > > > > Also ad

Re: [Mesa-dev] [PATCH 3/3] i965: Fix URB size for gen8

2015-01-23 Thread Ville Syrjälä
On Wed, Jan 21, 2015 at 12:51:02PM -0800, Kenneth Graunke wrote: > On Wednesday, January 21, 2015 08:17:36 PM ville.syrj...@linux.intel.com > wrote: > > From: Ville Syrjälä > > > > Increase the device info .urb.size for BDW GT3 and CHV to match the > > default URB size for each. > > > > Also ad

[Mesa-dev] [PATCH] i965: Fix URB size for CHV

2015-01-23 Thread ville . syrjala
From: Ville Syrjälä Increase the device info .urb.size for CHV to match the default URB size (192kB). Signed-off-by: Ville Syrjälä --- src/mesa/drivers/dri/i965/brw_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/

Re: [Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-23 Thread Frank Binns
On 23/01/15 01:11, Rob Clark wrote: > On Thu, Jan 22, 2015 at 4:36 PM, Emil Velikov > wrote: >>> +static const char* node_path_fmt_card = "/dev/dri/card%d"; >> You can reuse the DRM_DIR_NAME + DRM_DEV_NAME macros (from xf86drm.h) >> for this. >> >>> +static const char* node_path_fmt_render = "/de