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

2015-01-03 Thread Emil Velikov
On 30/12/14 22:20, Laura Ekstrand wrote: To run this partial implementation, export MESA_EXTENSION_OVERRIDE=+GL_ARB_direct_state_access Indeed that does the job. Yet it seems that I was slightly confused with the usage/application of the boolean variable(s) - i.e. they seem to be used when

[Mesa-dev] [Bug 84023] GLSL compiler bug in uniform buffer load lowering or optimizations

2015-01-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84023 Fabio Pedretti fabio@libero.it changed: What|Removed |Added Status|NEW |RESOLVED

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #9 from almos aaalmo...@gmail.com --- I just checked L4D2 with mesa 10.3.2 (AMD Barts), and I see no such fps drops. Sure, in the beginning there are some hiccups, but once all shaders have been used at least once, everything is

[Mesa-dev] [PATCH 2/4] i965: Refactor tiled memcpy functions and move them into their own file

2015-01-03 Thread Jason Ekstrand
From: Sisinty Sasmita Patra sisinty.pa...@intel.com This commit refactors the tiled_memcpy code in intel_tex_subimage.c and moves it into its own file intel_tiled_memcpy files. Also, xtile_copy and ytile_copy are renamed to linear_to_xtiled and linear_to_ytiled respectively. The *_faster

[Mesa-dev] [PATCH 0/4] Add tiled fast-paths for texture download

2015-01-03 Thread Jason Ekstrand
We have had fast-paths in our driver for uploading 8-bit RGBA or BGRA textures for some time now. The basic idea behind the fast-path is that we can tile/detile in software faster than going through the GTT or waiting on the blitter to do it for us. This series adds the capability of doing it in

[Mesa-dev] [PATCH 1/4] i965/tex_subimage: Use the fast tiled path for rectangle textures

2015-01-03 Thread Jason Ekstrand
There's no reason why we should be doing this for 2D textures and not rectangles. Just a matter of adding another hunk to the condition. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri/i965/intel_tex_subimage.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Mesa-dev] [PATCH 4/4] i965: Implemente a tiled fast-path for glReadPixels and glGetTexImage

2015-01-03 Thread Jason Ekstrand
From: Sisinty Sasmita Patra sisinty.pa...@intel.com Added intel_readpixels_tiled_mempcpy and intel_gettexsubimage_tiled_mempcpy functions. These are the fast paths for glReadPixels and glGetTexImage. v2: Jason Ekstrand jason.ekstr...@intel.com - Refactor to make the functions look more like

[Mesa-dev] [PATCH 3/4] i965/tiled_memcpy: Add tiled-to-linear paths

2015-01-03 Thread Jason Ekstrand
From: Sisinty Sasmita Patra sisinty.pa...@intel.com This commit addes tiled copy functions for coping from tiled memory to linear memory. These are very similar to the existing linear-to-tiled paths. v2: Jason Ekstrand jason.ekstr...@intel.com - New commit message - Various whitespace

[Mesa-dev] [PATCH 05/22] glsl: Add sqrt, rsq, exp, exp2 to get_range

2015-01-03 Thread Thomas Helland
Also handle undefined behaviour for sqrt(x) where x 0 and rsq(x) where x = 0. This gives us some reduction in instruction count on three Dungeon Defenders shaders as they are doing: max(exp(x), 0) v2: Change to use new IS_CONSTANT() macro Fix high unintenionally not being returned Add

[Mesa-dev] [PATCH 03/22] glsl: Add a IS_CONSTANT macro

2015-01-03 Thread Thomas Helland
Change opt_algebraic to use the new macro. Remove the old less than / greater than functions. --- src/glsl/ir_constant_util.h | 49 ++--- src/glsl/opt_algebraic.cpp | 8 2 files changed, 23 insertions(+), 34 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 03/22] glsl: Add a IS_CONSTANT macro

2015-01-03 Thread Thomas Helland
I was just looking at the git log and noticed the commit: i965: Show opt_vector_float() and later passes in INTEL_DEBUG=optimizer. It converts a macro to use the GNU Statement Expression extension. This would greatly simplify the macro I've written in this patch, so I'm considering rewriting it

Re: [Mesa-dev] [PATCH 0/4] Add tiled fast-paths for texture download

2015-01-03 Thread Jason Ekstrand
And I forgot to CC chad... On Sat, Jan 3, 2015 at 11:54 AM, Jason Ekstrand ja...@jlekstrand.net wrote: We have had fast-paths in our driver for uploading 8-bit RGBA or BGRA textures for some time now. The basic idea behind the fast-path is that we can tile/detile in software faster than

Re: [Mesa-dev] [PATCH 15/22] glsl: Add ir_triop_lrp to get_range

2015-01-03 Thread Thomas Helland
2015-01-03 21:55 GMT+01:00 Matt Turner matts...@gmail.com: On Sat, Jan 3, 2015 at 11:18 AM, Thomas Helland thomashellan...@gmail.com wrote: --- src/glsl/opt_minmax.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp

Re: [Mesa-dev] [PATCH 03/22] glsl: Add a IS_CONSTANT macro

2015-01-03 Thread Matt Turner
On Sat, Jan 3, 2015 at 12:10 PM, Thomas Helland thomashellan...@gmail.com wrote: I was just looking at the git log and noticed the commit: i965: Show opt_vector_float() and later passes in INTEL_DEBUG=optimizer. It converts a macro to use the GNU Statement Expression extension. This would

Re: [Mesa-dev] [PATCH 01/22] glsl: Reorder optimization-passes

2015-01-03 Thread Matt Turner
On Sat, Jan 3, 2015 at 11:18 AM, Thomas Helland thomashellan...@gmail.com wrote: This allows opt_algebraic to resolve open-coded saturates into ir_unop_saturate before we potentially mess it up by removing the min or max in min/max-pruning. Since we are now emitting more free saturates on

Re: [Mesa-dev] [PATCH 15/22] glsl: Add ir_triop_lrp to get_range

2015-01-03 Thread Matt Turner
On Sat, Jan 3, 2015 at 11:18 AM, Thomas Helland thomashellan...@gmail.com wrote: --- src/glsl/opt_minmax.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index 8d63d96..f066b45 100644 --- a/src/glsl/opt_minmax.cpp

[Mesa-dev] [PATCH 19/22] glsl: Add a saturate range optimization

2015-01-03 Thread Thomas Helland
This improves one shader from Brutal Legend. It does a lrp that yields a result larger than 1, that then gets saturated. This is replaced by a constant 1. shaders/BrutalLegend/214.shader_test fs16:84 - 73 (-13.10%) shaders/BrutalLegend/214.shader_test fs8: 84 - 73 (-13.10%) ---

[Mesa-dev] [PATCH 01/22] glsl: Reorder optimization-passes

2015-01-03 Thread Thomas Helland
This allows opt_algebraic to resolve open-coded saturates into ir_unop_saturate before we potentially mess it up by removing the min or max in min/max-pruning. Since we are now emitting more free saturates on i965 this gives us some decrease in instruction count. total instructions in shared

[Mesa-dev] [PATCH 18/22] glsl: Add ir_unop_rcp to get_range

2015-01-03 Thread Thomas Helland
V2: Put in alphabetic order Rework to use new IS_CONSTANT macro Reduce code duplication by combining pos only and neg only variation --- src/glsl/opt_minmax.cpp | 29 + 1 file changed, 29 insertions(+) diff --git a/src/glsl/opt_minmax.cpp

[Mesa-dev] [PATCH 15/22] glsl: Add ir_triop_lrp to get_range

2015-01-03 Thread Thomas Helland
--- src/glsl/opt_minmax.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index 8d63d96..f066b45 100644 --- a/src/glsl/opt_minmax.cpp +++ b/src/glsl/opt_minmax.cpp @@ -457,6 +457,22 @@ get_range(ir_rvalue *rval)

[Mesa-dev] [PATCH 14/22] glsl: Add ir_triop_fma to get_range

2015-01-03 Thread Thomas Helland
--- src/glsl/opt_minmax.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index cca18e8..8d63d96 100644 --- a/src/glsl/opt_minmax.cpp +++ b/src/glsl/opt_minmax.cpp @@ -448,6 +448,15 @@ get_range(ir_rvalue *rval) return

[Mesa-dev] [PATCH 11/22] glsl: Add ir_binop_mul to get_range

2015-01-03 Thread Thomas Helland
V2: Add some air for readability Use the new IS_CONSTANT macro Combine if-blocks for reduced code-duplication Split out into separate function for reuse later --- src/glsl/opt_minmax.cpp | 33 + 1 file changed, 33 insertions(+) diff --git

[Mesa-dev] [PATCH 13/22] glsl: Add ir_binop_pow to get_range

2015-01-03 Thread Thomas Helland
V2: Replace range-setting for undefined behavior with a TODO. Use the new IS_CONSTANT macro --- 3 --- Ian mentioned he was not sure what the correct behavior should be. Optimizing based on undefined behavior is not pretty, so remove that and instead leave a note. --- src/glsl/opt_minmax.cpp |

[Mesa-dev] [PATCH 16/22] glsl: Add ir_binop_dot to get_range

2015-01-03 Thread Thomas Helland
--- src/glsl/opt_minmax.cpp | 24 1 file changed, 24 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index f066b45..5515f51 100644 --- a/src/glsl/opt_minmax.cpp +++ b/src/glsl/opt_minmax.cpp @@ -411,6 +411,30 @@ get_range(ir_rvalue *rval)

[Mesa-dev] [PATCH 20/22] glsl: Optimize some cases of undefined behaviour.

2015-01-03 Thread Thomas Helland
--- src/glsl/opt_minmax.cpp | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index 441ac69..07d3d53 100644 --- a/src/glsl/opt_minmax.cpp +++ b/src/glsl/opt_minmax.cpp @@ -78,6 +78,8 @@ public: ir_rvalue

[Mesa-dev] [PATCH 21/22] glsl: Add a range based comparison opt-pass

2015-01-03 Thread Thomas Helland
Try to resolv compares by checking the possible variable range. --- src/glsl/opt_minmax.cpp | 101 1 file changed, 101 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index 07d3d53..8cf0fe5 100644 ---

[Mesa-dev] [PATCH 17/22] glsl: Add log and log2 to get_range

2015-01-03 Thread Thomas Helland
The spec states that log / log2 of x = 0 is undefined. Just set the range to 0 if this is the case. Also set the range according to how we are oriented around one, as this causes us to shift from positive to negative values. V2: Utilize the new IS_CONSTANT() macro Put in alphabetic order ---

[Mesa-dev] [PATCH 08/22] glsl: Add abs to get_range

2015-01-03 Thread Thomas Helland
v2: Set in alphabetic order Change to use the new IS_CONSTANT macro Add a function for creating a minmax_range from two constants Use the function to improve the resolution of abs's range. --- src/glsl/opt_minmax.cpp | 28 1 file changed, 28 insertions(+)

[Mesa-dev] [PATCH 22/22] glsl: Remove useless abs based on range analysis

2015-01-03 Thread Thomas Helland
--- src/glsl/opt_minmax.cpp | 24 1 file changed, 24 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index 8cf0fe5..3d3cfff 100644 --- a/src/glsl/opt_minmax.cpp +++ b/src/glsl/opt_minmax.cpp @@ -80,6 +80,8 @@ public: ir_rvalue

[Mesa-dev] [PATCH 00/22] Expand get_range in minmax_pruning, V3

2015-01-03 Thread Thomas Helland
I couple months ago i posted a series for expanding the get_range function in minmax_pruning with support for more operations. So I've been hacking on this during my spare time in Christmas. I've now gotten to a point where I think this is not getting us anywhere, and I need some opinions from

[Mesa-dev] [PATCH 04/22] glsl: Change to using switch-case in get_range

2015-01-03 Thread Thomas Helland
This will make expansion easier and less cluttered. v2: Correct missing space --- src/glsl/opt_minmax.cpp | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index a3b0a65..56805c0 100644 ---

[Mesa-dev] [PATCH 02/22] glsl: Move common code to ir_constant_util.h

2015-01-03 Thread Thomas Helland
This will allow for less code duplication. I'll be using this in opt_minmax in the comming commits. v2: Don't use namespace Remove author tag --- src/glsl/ir_constant_util.h | 121 src/glsl/opt_algebraic.cpp | 85 +--

Re: [Mesa-dev] [PATCH] swrast: Build fix for darwin

2015-01-03 Thread Emil Velikov
On 02/01/15 04:14, Jeremy Huddleston Sequoia wrote: This is certainly not the best solution to the problem, so I'm just sending this patch to the list to get the discussion started on the best way to solve this problem. Currently, any platform that does not support _SC_PHYS_PAGES and

[Mesa-dev] [PATCH 07/22] glsl: Add saturate to get_range

2015-01-03 Thread Thomas Helland
We can use the intersection function to reduce the range even further if the operand has bounds between 0.0 and 1.0. v2: Rewrite as suggested by Ian. Put in alphabetic order. --- src/glsl/opt_minmax.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/opt_minmax.cpp

[Mesa-dev] [PATCH 12/22] glsl: Add ir_binop_sub to get_range

2015-01-03 Thread Thomas Helland
V2: Correct whitespace issues Put in alphabetic order Reviewed-by: Ian Romanick ian.d.romanick at intel.com --- src/glsl/opt_minmax.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index e4aa677..dd13800 100644 ---

[Mesa-dev] [PATCH 06/22] glsl: Add sin, cos and sign to get_range

2015-01-03 Thread Thomas Helland
They are bound between -1 and 1, so exploit that. v2: Put in alphabetical order Just return directly instead of assigning to temp variable. --- src/glsl/opt_minmax.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #10 from Stéphane Travostino stephane.travost...@gmail.com --- (In reply to almos from comment #9) I just checked L4D2 with mesa 10.3.2 (AMD Barts), and I see no such fps drops. Sure, in the beginning there are some hiccups, but

[Mesa-dev] [PATCH 10/22] glsl: Add ir_binop_add to get_range

2015-01-03 Thread Thomas Helland
V2: Fix whitespace issues Put in alphabetic order Split resolve of add into a separate function for reuse later Reviewed-by: Ian Romanick ian.d.romanick at intel.com --- src/glsl/opt_minmax.cpp | 23 +++ 1 file changed, 23 insertions(+) diff --git

[Mesa-dev] [PATCH 09/22] glsl: Add ir_unop_neg to get_range

2015-01-03 Thread Thomas Helland
V2: Put in alphabetic order Add some air for readability Reviewed-by: Ian Romanick ian.d.romanick at intel.com --- src/glsl/opt_minmax.cpp | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index 04ae0c0..43d6061 100644 ---

[Mesa-dev] [Bug 87925] SIGSEGV libX11 src/ImUtil.c:733

2015-01-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87925 --- Comment #2 from Emil Velikov emil.l.veli...@gmail.com --- Quick look at my old piglit results indicates: - It dates back at least until 10.2 - Only the classic swrast is affected -- You are receiving this mail because: You are the

Re: [Mesa-dev] [PATCH 19/22] glsl: Add a saturate range optimization

2015-01-03 Thread Matt Turner
On Sat, Jan 3, 2015 at 11:18 AM, Thomas Helland thomashellan...@gmail.com wrote: This improves one shader from Brutal Legend. It does a lrp that yields a result larger than 1, that then gets saturated. This is replaced by a constant 1. Not a comment on your patch, but the code in question does

[Mesa-dev] [PATCH 15/22] glsl: Add ir_triop_lrp to get_range v2

2015-01-03 Thread Thomas Helland
V2: Fix the logic so we don't emit bogus results. Fix the comments (spotted by Matt) --- Now, when we do the correct thing, we no longer get a reduction in instructions on that one Brutal Legend shader. src/glsl/opt_minmax.cpp | 16 1 file changed, 16 insertions(+) diff

[Mesa-dev] [PATCH:mesa] Bracket arguments to tr so they work with Solaris tr

2015-01-03 Thread Alan Coopersmith
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Usual-Tools.html#index-g_t_0040command_007btr_007d-1842 Without this fix, egl fails to build on Solaris, with the error: command-line:0:22: error: '_EGL_PLATFORM_x11' undeclared (first use in this

Re: [Mesa-dev] [PATCH:mesa] Bracket arguments to tr so they work with Solaris tr

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

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #11 from Stéphane Travostino stephane.travost...@gmail.com --- After spending half a day bisecting, I don't think there's any real difference between Mesa 10.3.2 and master: the fps drops happen in both releases, although they seem to

[Mesa-dev] Submitting more shaders to shader-db?

2015-01-03 Thread Aras Pranckevicius
Hi, I noticed some GLSL related discussions talk My shader-db is dominated by TF2, DOTA2, Portal, Brutal Legend and Dungeon Defenders. Maybe non-Source-engine games show some benefit from this series? Now, shader-db that I can find is this: http://cgit.freedesktop.org/mesa/shader-db/tree/shaders