[Mesa-dev] [Bug 85586] New: Draw module crashes in LLVM generated code since commit 60ec95fa1e0c42bd42358185970b20c9b81591fa

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85586 Bug ID: 85586 Summary: Draw module crashes in LLVM generated code since commit 60ec95fa1e0c42bd42358185970b20c9b81591fa Product: Mesa Version: git Hardware: Other

[Mesa-dev] [Bug 85586] Draw module crashes in LLVM generated code since commit 60ec95fa1e0c42bd42358185970b20c9b81591fa

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85586 --- Comment #1 from Michel Dänzer mic...@daenzer.net --- Using current LLVM 3.6 Git snapshot. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list

[Mesa-dev] [Bug 84570] Borderlands 2/Pre-Sequel: Constant frame rate drops while playing; really bad with additionl lighting

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84570 --- Comment #31 from Michel Dänzer mic...@daenzer.net --- (In reply to Kai from comment #30) Michel, is there any chance attachment 107544 [details] [review] will be part of 3.18? No, but it's in Alex's queue for 3.19. -- You are receiving

[Mesa-dev] [PATCH] radeon/llvm: Dynamically allocate branch/loop stack arrays

2014-10-29 Thread Michel Dänzer
From: Michel Dänzer michel.daen...@amd.com This prevents us from silently overflowing the stack arrays, and allows arbitrary stack depths. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85454 Reported-and-Tested-by: Nick Sarnie commendsar...@gmail.com Signed-off-by: Michel Dänzer

[Mesa-dev] [PATCH] glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

2014-10-29 Thread Kenneth Graunke
v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event rather than gettimeofday(), which gives us the presentation time instead of the time when SwapBuffers was called. Suggested by Keith Packard. This relies on the fact that the X Present implementation uses

[Mesa-dev] [PATCH] glsl: Improve the CSE pass debugging output.

2014-10-29 Thread Kenneth Graunke
The CSE pass now prints out why it thinks a value is not a candidate for adding to the AE set. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/opt_cse.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/glsl/opt_cse.cpp b/src/glsl/opt_cse.cpp

Re: [Mesa-dev] [PATCH] radeon/llvm: Dynamically allocate branch/loop stack arrays

2014-10-29 Thread Marek Olšák
Reviewed-by: Marek Olšák marek.ol...@amd.com Marek On Wed, Oct 29, 2014 at 8:58 AM, Michel Dänzer mic...@daenzer.net wrote: From: Michel Dänzer michel.daen...@amd.com This prevents us from silently overflowing the stack arrays, and allows arbitrary stack depths. Bugzilla:

[Mesa-dev] [PATCH 1/3] egl: rework handling EGL_CONTEXT_FLAGS for ES debug contexts

2014-10-29 Thread Matthew Waters
From: Matthew Waters ystree...@gmail.com As of version 15 of the EGL_KHR_create_context spec, debug contexts are allowed for ES contexts. We should allow creation instead of erroring. Signed-off-by: Matthew Waters ystree...@gmail.com --- src/egl/main/eglcontext.c | 51

[Mesa-dev] [PATCH 2/3] glapi: add function pointers for KHR_debug for gles

2014-10-29 Thread Matthew Waters
From: Matthew Waters ystree...@gmail.com Signed-off-by: Matthew Waters ystree...@gmail.com --- src/mapi/glapi/gen/KHR_debug.xml| 73 + src/mesa/main/extensions.c | 2 +- src/mesa/main/tests/dispatch_sanity.cpp | 25 +++ 3 files

[Mesa-dev] [PATCH 3/3] main/get: make KHR_debug enums available everywhere

2014-10-29 Thread Matthew Waters
From: Matthew Waters ystree...@gmail.com Although GL_CONTEXT_FLAGS is not explicitly added by KHR_debug, it contains, It is implementation defined how much debug output is generated if the context was created without the CONTEXT_DEBUG_BIT set. This is a new query bit added to the

[Mesa-dev] [PATCH 0/3] add KHR_debug for gles contexts

2014-10-29 Thread Matthew Waters
- rebase and resend. v3: - fix up the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR check v2: - replace = with |= - remove offset=assign from the api xml Matthew Waters (3): egl: rework handling EGL_CONTEXT_FLAGS for ES debug contexts glapi: add function pointers for KHR_debug for gles

[Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-10-29 Thread Timothy Arceri
Makes use of SSE to speed up compute of min and max elements Callgrind cpu usage results from pts benchmarks: Openarena 0.8.8: 3.67% - 1.03% UrbanTerror: 2.36% - 0.81% V5: - actually make use of the optimisation in android (Emil Velikov) - set a better array size limit for using SSE and added

Re: [Mesa-dev] [PATCH V4] mesa: add SSE optimisation for glDrawElements

2014-10-29 Thread Timothy Arceri
On Wed, 2014-10-29 at 16:58 +1100, Timothy Arceri wrote: On Tue, 2014-10-28 at 22:14 +, Bruno Jimenez wrote: Hi, I haven't had time to play yet with OpenMP, but I have seen the assembly it produces in my computer. If I enable SSE2 it can use it, and if I enable SSE4.1 it uses the

Re: [Mesa-dev] [PULL] i965: rename brw_gs - brw_ff_gs; rename brw_vec4_gs - brw_gs.

2014-10-29 Thread Iago Toral
On Tue, 2014-10-28 at 19:27 -0700, Kenneth Graunke wrote: Hello, I'd like to rename some files in i965: - brw_gs.c - brw_ff_gs.c - brw_gs.h - brw_ff_gs.h - brw_gs_emit.c - brw_ff_gs_emit.c - brw_vec4_gs.c - brw_gs.c - brw_vec4_gs.h - brw_gs.h The current brw_gs files are

Re: [Mesa-dev] [PATCH] glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

2014-10-29 Thread Keith Packard
Kenneth Graunke kenn...@whitecape.org writes: v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event rather than gettimeofday(), which gives us the presentation time instead of the time when SwapBuffers was called. Suggested by Keith Packard. This relies on the fact

Re: [Mesa-dev] [PATCH 3/3] gk20a: use NOUVEAU_BO_GART as VRAM domain

2014-10-29 Thread Ilia Mirkin
On Mon, Oct 27, 2014 at 6:34 AM, Alexandre Courbot acour...@nvidia.com wrote: GK20A does not have dedicated VRAM, therefore allocating in VRAM can be sub-optimal and sometimes even harmful. Set its VRAM domain to NOUVEAU_BO_GART so all objects are allocated in system memory. Signed-off-by:

[Mesa-dev] [Bug 84566] Unify the format conversion code

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 --- Comment #45 from Jason Ekstrand ja...@jlekstrand.net --- (In reply to Iago Toral from comment #44) (In reply to Iago Toral from comment #43) (...) 3) Luminance formats have special requirements. A conversion to Luminance from RGBA

Re: [Mesa-dev] [PATCH] glsl: Improve the CSE pass debugging output.

2014-10-29 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 84566] Unify the format conversion code

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 --- Comment #46 from Jason Ekstrand ja...@jlekstrand.net --- (In reply to Iago Toral from comment #43) Jason, we are running into some issues when attempting to use _mesa_format_convert for glReadPixels and glGetTexImage. Generally, one

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Neil Roberts n...@linux.intel.com changed: What|Removed |Added Depends on||83908 -- You are

Re: [Mesa-dev] [PATCH 05/14] i965: Add SIMD8 URB write low-level IR instruction

2014-10-29 Thread Kristian Høgsberg
On Tue, Oct 28, 2014 at 4:17 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 3:17 PM, Kristian Høgsberg k...@bitplanet.net wrote: This is all we need from the generator for SIMD8 vertex shaders. This opcode is just the send instruction, all the hard work will happen in the

Re: [Mesa-dev] [PATCH 08/14] i965: Prepare for using the ATTR register file in the fs backend

2014-10-29 Thread Kristian Høgsberg
On Tue, Oct 28, 2014 at 4:33 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 3:17 PM, Kristian Høgsberg k...@bitplanet.net wrote: The scalar vertex shader will use the ATTR register file for vertex attributes. This patch adds support for the ATTR file to fs_visitor.

[Mesa-dev] [PATCH 2/2] util: Move bitset to the util/ folder

2014-10-29 Thread Jason Ekstrand
--- .../drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 2 +- .../drivers/dri/i965/brw_performance_monitor.c | 2 +- .../drivers/dri/i965/brw_vec4_live_variables.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_context.h

Re: [Mesa-dev] [PATCH 09/14] i965: Move more code into codegen-branch of the fs_visitor::run() if statement

2014-10-29 Thread Kristian Høgsberg
On Tue, Oct 28, 2014 at 4:36 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 3:17 PM, Kristian Høgsberg k...@bitplanet.net wrote: These last few operations all only apply when we've actually generated code, optimized and allocated registers. The dummy and the repclear shaders

[Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

2014-10-29 Thread Jason Ekstrand
--- src/gallium/state_trackers/glx/xlib/glx_api.c | 6 +- src/gallium/state_trackers/glx/xlib/xm_api.c | 10 +- src/mesa/drivers/common/meta.c| 3 +- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 4 +- src/mesa/drivers/dri/i965/brw_curbe.c |

Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm

2014-10-29 Thread Emil Velikov
On 27/10/14 21:03, Jan Vesely wrote: On Mon, 2014-10-27 at 20:22 +, Emil Velikov wrote: On 27/10/14 18:05, Jan Vesely wrote: On Mon, 2014-10-27 at 02:24 +, Emil Velikov wrote: On 26/10/14 19:36, Jan Vesely wrote: On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: On 24/10/14

[Mesa-dev] [Bug 70410] egl-static/Makefile: linking fails with llvm = 3.4

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70410 Emil Velikov emil.l.veli...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Mesa-dev] [PATCH 1/1] configure: fix typos

2014-10-29 Thread Emil Velikov
On 21/10/14 16:19, Jan Vesely wrote: Signed-off-by: Jan Vesely jan.ves...@rutgers.edu --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 93b25a2..a588d55 100644 --- a/configure.ac +++ b/configure.ac @@ -1970,7

[Mesa-dev] [PATCH] glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

2014-10-29 Thread Kenneth Graunke
v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event rather than gettimeofday(), which gives us the presentation time instead of the time when SwapBuffers was called. Suggested by Keith Packard. This relies on the fact that the X DRI3/Present implementations use

Re: [Mesa-dev] [PATCH 1/3] egl: rework handling EGL_CONTEXT_FLAGS for ES debug contexts

2014-10-29 Thread Emil Velikov
On 29/10/14 10:43, Matthew Waters wrote: From: Matthew Waters ystree...@gmail.com As of version 15 of the EGL_KHR_create_context spec, debug contexts are allowed for ES contexts. We should allow creation instead of erroring. By moving the check from the dri module to the loader we can end

Re: [Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

2014-10-29 Thread Kenneth Graunke
On Wednesday, October 29, 2014 11:27:56 AM Jason Ekstrand wrote: --- src/gallium/state_trackers/glx/xlib/glx_api.c | 6 +- src/gallium/state_trackers/glx/xlib/xm_api.c | 10 +- src/mesa/drivers/common/meta.c| 3 +-

Re: [Mesa-dev] [PATCH] glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

2014-10-29 Thread Keith Packard
Kenneth Graunke kenn...@whitecape.org writes: v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event rather than gettimeofday(), which gives us the presentation time instead of the time when SwapBuffers was called. Suggested by Keith Packard. This relies on the fact

Re: [Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

2014-10-29 Thread Roland Scheidegger
I like the idea of the series, however gallium still uses its own definitions (by the looks of it supporting more compilers for native definitions but in some cases with worse code for the fallback) sometimes with different names (fls/util_last_bit) and sometimes with the same even (ffs and

[Mesa-dev] [PATCH 2/2] i965/vec4: Perform CSE on MAD instructions with final arguments switched.

2014-10-29 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp index 28c69ca..630d335 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp +++

[Mesa-dev] [PATCH 1/2] i965/fs: Perform CSE on MAD instructions with final arguments switched.

2014-10-29 Thread Matt Turner
Multiplication is commutative. instructions in affected programs: 48314 - 47954 (-0.75%) --- src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp

[Mesa-dev] [PATCH 1/5] i965/vec4: Make live_intervals part of the vec4_visitor class.

2014-10-29 Thread Matt Turner
Like in fs_visitor. --- src/mesa/drivers/dri/i965/brw_vec4.h | 5 +++-- src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp | 15 +++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp| 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git

[Mesa-dev] [PATCH 3/5] i965/fs: Track liveness of the flag register.

2014-10-29 Thread Matt Turner
--- .../drivers/dri/i965/brw_fs_live_variables.cpp | 35 ++ src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 5 2 files changed, 40 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp

[Mesa-dev] [PATCH 4/5] i965/fs: Dead code eliminate instructions writing the flag.

2014-10-29 Thread Matt Turner
Most prominently helps Natural Selection 2, which has a surprising number shaders that do very complicated things before drawing black. instructions in affected programs: 23824 - 19570 (-17.86%) --- .../dri/i965/brw_fs_dead_code_eliminate.cpp| 23 +++--- 1 file

[Mesa-dev] [PATCH 2/5] i965: Use local pointer to block_data in live intervals.

2014-10-29 Thread Matt Turner
The next patch will be simplified because of this, and makes reading the code a lot easier. --- .../dri/i965/brw_fs_dead_code_eliminate.cpp| 2 +- .../drivers/dri/i965/brw_fs_live_variables.cpp | 54 -- src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 6 +--

[Mesa-dev] [PATCH 5/5] i965/fs: Use const fs_reg rather than a copy or pointer.

2014-10-29 Thread Matt Turner
Also while we're touching var_from_reg, just make it an inline function. --- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 8 src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 14 -- src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 11

Re: [Mesa-dev] [PATCH 12/14] i965: Add fs_visitor::run_vs() to generate scalar vertex shader code

2014-10-29 Thread Kristian Høgsberg
On Tue, Oct 28, 2014 at 4:50 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 3:17 PM, Kristian Høgsberg k...@bitplanet.net wrote: This patch uses the previous refactoring to add a new run_vs() method that generates vertex shader code using the scalar visitor and optimizer.

[Mesa-dev] [PATCH] i965/fs: Don't compute_to_mrf() in the optimization loop.

2014-10-29 Thread Matt Turner
... or on Gen = 7 at all. We use load_payload to gather results for the FB write(s) now, so we never write to MRFs directly. It's still called after lower_load_payload() since that will generate MOVs to MRFs on platforms with MRFs. No differences in shader-db on Haswell (Gen 7.5). ---

[Mesa-dev] [Bug 84186] X 1.16.1 RC 1 segfaults and reports XXX fail to create fbo with Radeon HD 7970.

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84186 Mathias Brodala i...@noctus.net changed: What|Removed |Added CC||i...@noctus.net --

[Mesa-dev] [Bug 57702] Eliminate RTLD_GLOBAL glapi hacks after removing support for static libglapi

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=57702 fjhenigman fjhmesa...@gmail.com changed: What|Removed |Added CC||fjhmesa...@gmail.com

[Mesa-dev] [Bug 84186] X 1.16.1 RC 1 segfaults and reports XXX fail to create fbo with Radeon HD 7970.

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84186 --- Comment #6 from Mathias Brodala i...@noctus.net --- Created attachment 108659 -- https://bugs.freedesktop.org/attachment.cgi?id=108659action=edit X startup with EGL debug info I am experiencing basically the same issue with my HD4670 when

Re: [Mesa-dev] [PATCH] i965/fs: Don't compute_to_mrf() in the optimization loop.

2014-10-29 Thread Kenneth Graunke
On Wednesday, October 29, 2014 02:31:53 PM Matt Turner wrote: ... or on Gen = 7 at all. We use load_payload to gather results for the FB write(s) now, so we never write to MRFs directly. It's still called after lower_load_payload() since that will generate MOVs to MRFs on platforms with MRFs.

Re: [Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

2014-10-29 Thread Jason Ekstrand
On Wed, Oct 29, 2014 at 1:45 PM, Roland Scheidegger srol...@vmware.com wrote: I like the idea of the series, however gallium still uses its own definitions (by the looks of it supporting more compilers for native definitions but in some cases with worse code for the fallback) sometimes with

[Mesa-dev] [PATCH 1/2] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Jason Ekstrand
--- configure.ac | 1 + src/gallium/auxiliary/tgsi/tgsi_exec.c | 1 + src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 +- src/gallium/auxiliary/util/u_helpers.c | 1 + src/gallium/auxiliary/util/u_math.h|

Re: [Mesa-dev] [PATCH 1/2] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Matt Turner
On Wed, Oct 29, 2014 at 3:42 PM, Jason Ekstrand ja...@jlekstrand.net wrote: diff --git a/configure.ac b/configure.ac index 03f1bca..e2258eb 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,7 @@ dnl Check for compiler builtins AX_GCC_BUILTIN([__builtin_bswap32])

Re: [Mesa-dev] [PATCH 3/5] i965/fs: Track liveness of the flag register.

2014-10-29 Thread Matt Turner
On Wed, Oct 29, 2014 at 2:10 PM, Matt Turner matts...@gmail.com wrote: --- .../drivers/dri/i965/brw_fs_live_variables.cpp | 35 ++ src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 5 2 files changed, 40 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 1/2] i965/fs: Perform CSE on MAD instructions with final arguments switched.

2014-10-29 Thread Kenneth Graunke
On Wednesday, October 29, 2014 02:09:55 PM Matt Turner wrote: Multiplication is commutative. instructions in affected programs: 48314 - 47954 (-0.75%) --- src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [Bug 57702] Eliminate RTLD_GLOBAL glapi hacks after removing support for static libglapi

2014-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=57702 --- Comment #3 from fjhenigman fjhmesa...@gmail.com --- If I'm understanding correctly: - this bug asks that, for example, /usr/lib64/dri/i965_dri.so pull in libglapi - at the moment it's deliberately not pulled because some use case didn't want

Re: [Mesa-dev] [PATCH] glsl: Drop constant 0.0 components from dot products.

2014-10-29 Thread Kenneth Graunke
On Thursday, October 23, 2014 04:19:19 PM Matt Turner wrote: Helps a small number of vertex shaders in the games Dungeon Defenders and Shank, as well as an internal benchmark. instructions in affected programs: 2801 - 2719 (-2.93%) --- src/glsl/opt_algebraic.cpp | 25

Re: [Mesa-dev] [PATCH 06/14] i965: Add new SIMD8 VS prog data flag

2014-10-29 Thread Kristian Høgsberg
On Tue, Oct 28, 2014 at 5:48 PM, Kenneth Graunke kenn...@whitecape.org wrote: On Tuesday, October 28, 2014 04:25:05 PM Matt Turner wrote: On Tue, Oct 28, 2014 at 3:17 PM, Kristian Høgsberg k...@bitplanet.net wrote: This flag signals that we have a SIMD8 VS shader so we can set up the

Re: [Mesa-dev] [PATCH 1/2] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Jason Ekstrand
On Wed, Oct 29, 2014 at 3:51 PM, Matt Turner matts...@gmail.com wrote: On Wed, Oct 29, 2014 at 3:42 PM, Jason Ekstrand ja...@jlekstrand.net wrote: diff --git a/configure.ac b/configure.ac index 03f1bca..e2258eb 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,7 @@ dnl Check

[Mesa-dev] [PATCH v2 2/2] glsl: Lower constant arrays to uniform arrays.

2014-10-29 Thread Kenneth Graunke
Consider GLSL code such as: const ivec2 offsets[] = ivec2[](ivec2(-1, -1), ivec2(-1, 0), ivec2(-1, 1), ivec2(0, -1), ivec2(0, 0), ivec2(0, 1), ivec2(1, -1), ivec2(1, 0), ivec2(1, 1)); ivec2 offset = offsets[non-constant expression]; Both i965 and nv50

[Mesa-dev] [PATCH v2 1/2] glsl: Add infrastructure for hidden uniforms.

2014-10-29 Thread Kenneth Graunke
In the compiler, we'd like to generate implicit uniforms for internal use. These should not be visible via the GL uniform introspection API. To support that, we add a new ir_variable::how_declared value of ir_var_hidden, and plumb that through to gl_uniform_storage. v2 (idr): Fix some memory

[Mesa-dev] [prefix=PATCH v3 1/3] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Jason Ekstrand
--- configure.ac | 1 + scons/gallium.py | 2 + src/gallium/auxiliary/tgsi/tgsi_exec.c | 1 + src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 +- src/gallium/auxiliary/util/u_helpers.c |

[Mesa-dev] [prefix=PATCH v3 3/3] util: Move bitset to the util/ folder

2014-10-29 Thread Jason Ekstrand
--- .../drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 2 +- .../drivers/dri/i965/brw_performance_monitor.c | 2 +- .../drivers/dri/i965/brw_vec4_live_variables.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_context.h

[Mesa-dev] [prefix=PATCH v3 2/3] util: Move ALIGN from mesa/main/macros.h to util/macros.h

2014-10-29 Thread Jason Ekstrand
--- src/mesa/main/bitset.h | 1 + src/mesa/main/macros.h | 27 --- src/util/macros.h | 27 +++ 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h index f50b14f..dbf1af9 100644 ---

Re: [Mesa-dev] [PATCH 02/14] i965: Generalize fs_generator further

2014-10-29 Thread Kristian Høgsberg
On Tue, Oct 28, 2014 at 5:30 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 3:59 PM, Matt Turner matts...@gmail.com wrote: - assert(stage == MESA_SHADER_FRAGMENT); I like removing these asserts from the function bodies, but I'm confused why you're doing it. The VS isn't

[Mesa-dev] [PATCH 1/6] glsl: Move common code to constant_util

2014-10-29 Thread Thomas Helland
This will be used later on in opt_minmax Signed-off-by: Thomas Helland thomashellan...@gmail.com --- src/glsl/ir_constant_util.h | 103 src/glsl/opt_algebraic.cpp | 95 ++-- src/glsl/opt_minmax.cpp | 19

[Mesa-dev] [PATCH 0/6][RFC] glsl: Expand opt_minmax get_range

2014-10-29 Thread Thomas Helland
This series does some initial work to make expansion of the get_range function a lot cleaner. It also adds a couple simple initial ranges. These patches are by no means perfect, but I hope they will provide some feedback and ideas. I'm hoping to expand this to do the following: -Add get_range

[Mesa-dev] [PATCH 6/6] glsl: Add abs/sqrt/exp to get_range

2014-10-29 Thread Thomas Helland
All of these are guaranteed to be larger than 0 Signed-off-by: Thomas Helland thomashellan...@gmail.com --- 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 4088c80..e768857 100644 ---

[Mesa-dev] [PATCH 5/6] glsl: Add saturate to get_range

2014-10-29 Thread Thomas Helland
Also, if the operand has bounds between 0.0 and 1.0 then copy that range up. Signed-off-by: Thomas Helland thomashellan...@gmail.com --- src/glsl/opt_minmax.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index

[Mesa-dev] [PATCH 4/6] glsl: Expand get_range to include sin/cos/sign

2014-10-29 Thread Thomas Helland
This gets rid of extra instructions in some shaders I purposefully wrote to test this. Works for shaders similar to the following: vec3 c = {8, 8, 8}; gl_FragColor.rgb = max(sin(d), c); Signed-off-by: Thomas Helland thomashellan...@gmail.com --- src/glsl/opt_minmax.cpp | 17 + 1

[Mesa-dev] [PATCH 2/6] glsl: Expand constant_util

2014-10-29 Thread Thomas Helland
Add functions for is_greater_than_one and is_less_than_zero Signed-off-by: Thomas Helland thomashellan...@gmail.com --- src/glsl/ir_constant_util.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/glsl/ir_constant_util.h b/src/glsl/ir_constant_util.h index

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

2014-10-29 Thread Thomas Helland
This will make expansion easier and less cluttered. Signed-off-by: Thomas Helland thomashellan...@gmail.com --- src/glsl/opt_minmax.cpp | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp index e4141bc..b21daca

Re: [Mesa-dev] [PATCH 1/6] glsl: Move common code to constant_util

2014-10-29 Thread Matt Turner
On Wed, Oct 29, 2014 at 6:11 PM, Thomas Helland thomashellan...@gmail.com wrote: This will be used later on in opt_minmax Signed-off-by: Thomas Helland thomashellan...@gmail.com --- src/glsl/ir_constant_util.h | 103 src/glsl/opt_algebraic.cpp

Re: [Mesa-dev] [PATCH v2 2/2] glsl: Lower constant arrays to uniform arrays.

2014-10-29 Thread Matt Turner
On Wed, Oct 29, 2014 at 5:16 PM, Kenneth Graunke kenn...@whitecape.org wrote: diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources index 0c55327..6aed52d 100644 --- a/src/glsl/Makefile.sources +++ b/src/glsl/Makefile.sources @@ -58,6 +58,7 @@ LIBGLSL_FILES = \

[Mesa-dev] [PATCH] glsl: Skip loop-too-large heuristic if indexing arrays of a certain size

2014-10-29 Thread Kenneth Graunke
A pattern in certain shaders is: uniform vec4 colors[NUM_LIGHTS]; for (int i = 0; i NUM_LIGHTS; i++) { ...use colors[i]... } In this case, the application author expects the shader compiler to unroll the loop. By doing so, it replaces variable indexing of the array with

Re: [Mesa-dev] [PATCH 3/5] mesa: Handle clip control in meta operations.

2014-10-29 Thread Mathias Fröhlich
Hi Neil, On Tuesday, October 28, 2014 18:22:33 Neil Roberts wrote: On inspection it looks like this would potentially break _mesa_meta_Clear when it is using GLSL because that does not save the MESA_META_TRANSFORM state. I wonder if MESA_META_TRANSFORM is not the right state flag for this