Re: [Mesa-dev] [PATCH] clover: fix clBuildProgram Piglit regression

2014-11-03 Thread Francisco Jerez
Tom Stellard writes: > On Sun, Nov 02, 2014 at 08:03:31PM +0200, Francisco Jerez wrote: >> EdB writes: >> >> > should trigger CL_INVALID_VALUE >> > if device_list is NULL and num_devices is greater than zero. >> > >> > introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563 >> >> Tom, can you j

Re: [Mesa-dev] [PATCH][RFC] mesa/main: Clamp rgba with streamed sse

2014-11-03 Thread Juha-Pekka Heikkila
On 31.10.2014 20:30, Roland Scheidegger wrote: > Am 31.10.2014 um 18:17 schrieb Matt Turner: >> On Fri, Oct 31, 2014 at 3:13 AM, Juha-Pekka Heikkila >> wrote: >>> Signed-off-by: Juha-Pekka Heikkila >>> --- >>> src/mesa/main/colormac.h | 20 +++ >>> src/mesa/main/pixeltransfer.c

Re: [Mesa-dev] [PATCH][RFC] mesa/main: Clamp rgba with streamed sse

2014-11-03 Thread Timothy Arceri
On Fri, 2014-10-31 at 17:24 +, Jose Fonseca wrote: > On 31/10/14 17:01, Matt Turner wrote: > > On Fri, Oct 31, 2014 at 4:12 AM, Jose Fonseca wrote: > >> On 31/10/14 10:13, Juha-Pekka Heikkila wrote: > >>> > >>>defined(__SSE2__) && defined(__GNUC__) > >> > >> > >> Instead of duplicate this

Re: [Mesa-dev] [PATCH] draw: allow LLVM use on non-SSE2 X86 cpus

2014-11-03 Thread Roland Scheidegger
Am 01.11.2014 um 22:19 schrieb David Heidelberg: > > This patch remove workaround related to LLVM < 3.2 bug. > > Original bug has been closed as fixed in 2011. > At this moment gallium requires LLVM 3.3 (2013). > > LLVM has been tested without SSE2 support in commit > ca70de9bd20bc4a11b2d2d368e0

Re: [Mesa-dev] [PATCH] Set llvmpipe and softpipe note only for MSAA.

2014-11-03 Thread Roland Scheidegger
Am 02.11.2014 um 18:35 schrieb Romain Failliot: > Hi! > > Sorry if I'm doing this wrong, first time here. I've tried git > send-mail, but I don't have an SMTP server so it wasn't working. Here is > the simple commit (and the patch attached): > > Set llvmpipe and softpipe note only for MSAA. >

Re: [Mesa-dev] [PATCH] draw: allow LLVM use on non-SSE2 X86 cpus

2014-11-03 Thread david
On 2014-11-03 11:51, Roland Scheidegger wrote: Am 01.11.2014 um 22:19 schrieb David Heidelberg: This patch remove workaround related to LLVM < 3.2 bug. Original bug has been closed as fixed in 2011. At this moment gallium requires LLVM 3.3 (2013). LLVM has been tested without SSE2 support in

[Mesa-dev] [Bug 85799] segfault since glsl: Drop constant 0.0 components from dot products

2014-11-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85799 Bug ID: 85799 Summary: segfault since glsl: Drop constant 0.0 components from dot products Product: Mesa Version: git Hardware: Other OS: All St

Re: [Mesa-dev] [PATCH][RFC] mesa/main: Clamp rgba with streamed sse

2014-11-03 Thread Bruno Jimenez
On Mon, 2014-11-03 at 20:39 +1100, Timothy Arceri wrote: > On Fri, 2014-10-31 at 17:24 +, Jose Fonseca wrote: > > On 31/10/14 17:01, Matt Turner wrote: > > > On Fri, Oct 31, 2014 at 4:12 AM, Jose Fonseca wrote: > > >> On 31/10/14 10:13, Juha-Pekka Heikkila wrote: > > >>> > > >>>defined(__S

[Mesa-dev] [PATCH] clover: Fix clBuildProgram piglit regression

2014-11-03 Thread Tom Stellard
Should trigger CL_INVALID_VALUE if device_list is NULL and num_devices is greater than zero. Introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563 Reported by: EdB --- Hi Francisco, I understand what you are saying now about why we don't need to pass the vector of devices. It's because the de

Re: [Mesa-dev] [PATCH] clover: Fix clBuildProgram piglit regression

2014-11-03 Thread Francisco Jerez
Tom Stellard writes: > Should trigger CL_INVALID_VALUE if device_list is NULL and num_devices > is greater than zero. > > Introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563 > > Reported by: EdB > --- > > Hi Francisco, > > I understand what you are saying now about why we don't need to pass th

[Mesa-dev] [PATCH] i965/disasm: Disassemble tdr and tm registers properly.

2014-11-03 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_disasm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c index 53ec767..a0f6d57 100644 --- a/src/mesa/drivers/dri/i965/brw_disasm.c +++ b/src/mesa/drivers/dri/i965/brw_disas

[Mesa-dev] [Bug 85799] segfault since glsl: Drop constant 0.0 components from dot products

2014-11-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85799 Matt Turner changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

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

2014-11-03 Thread Matt Turner
On Wed, Oct 29, 2014 at 1:10 PM, Matt Turner wrote: > 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

[Mesa-dev] [PATCH 6/5] i965/fs: Remove opt_drop_redundant_mov_to_flags().

2014-11-03 Thread Matt Turner
Dead code elimination now handles this. --- Depends on the previously sent 5 patch series. src/mesa/drivers/dri/i965/brw_fs.cpp | 31 --- src/mesa/drivers/dri/i965/brw_fs.h | 1 - 2 files changed, 32 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b

[Mesa-dev] [PATCH 2/2] i965/vec4: Rewrite dead code elimination to use live in/out.

2014-11-03 Thread Matt Turner
Improves 359 shaders by >=10% 114 shaders by >=20% 91 shaders by >=30% 82 shaders by >=40% 22 shaders by >=50% 4 shaders by >=60% 2 shaders by >=80% total instructions in shared programs: 5505182 -> 5482260 (-0.42%) instructions in affec

[Mesa-dev] [PATCH 1/2] i965/vec4: Track liveness of the flag register.

2014-11-03 Thread Matt Turner
--- .../drivers/dri/i965/brw_vec4_live_variables.cpp | 28 ++ .../drivers/dri/i965/brw_vec4_live_variables.h | 5 2 files changed, 33 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_vec4_live_variabl

[Mesa-dev] [PATCH] util: Implement unreachable for MSVC using __assume

2014-11-03 Thread Ian Romanick
From: Ian Romanick Based on the description of __assume at: http://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx Signed-off-by: Ian Romanick Cc: Brian Paul --- src/util/macros.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util/macros.h b/src/util/macros.h index ff37a7d..da

[Mesa-dev] [PATCH] mesa: Silence unused parameter warning in check_context_limits in non-debug builds

2014-11-03 Thread Ian Romanick
From: Ian Romanick ../../src/mesa/main/context.c: In function 'check_context_limits': ../../src/mesa/main/context.c:733:41: warning: unused parameter 'ctx' [-Wunused-parameter] Signed-off-by: Ian Romanick --- src/mesa/main/context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/me

Re: [Mesa-dev] [PATCH] i965/disasm: Disassemble tdr and tm registers properly.

2014-11-03 Thread Kenneth Graunke
On Monday, November 03, 2014 11:00:04 AM Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_disasm.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c > index 53ec767..a0f6d57 100644 > --- a/src/me

[Mesa-dev] [PATCH 01/10] mesa/main: Pass the data that _mesa_uniform actually wants

2014-11-03 Thread Ian Romanick
From: Ian Romanick The GL_ enums were previously used because glsl_types.h couldn't be used in C code. That was fixed some time ago (and uniforms.c already includes glsl_types.h), so this is no longer necessary. Signed-off-by: Ian Romanick --- src/mesa/main/uniform_query.cpp | 73 ++--

[Mesa-dev] [PATCH 02/10] mesa: Remove GLSL_TYPE_SAMPLER check

2014-11-03 Thread Ian Romanick
From: Ian Romanick Noting the assertion just a few lines earlier, returnType cannot be GLSL_TYPE_SAMPLER. Signed-off-by: Ian Romanick --- src/mesa/main/uniform_query.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/unifor

[Mesa-dev] [PATCH 05/10] mesa: Get some gl_shader_program::LinkStatus checking out of the main path

2014-11-03 Thread Ian Romanick
From: Ian Romanick I really wanted to remove 'shProg != NULL' as well, but that would have required adding a dummy program as the default program. That seemed like more churn than removing one test was worth. Signed-off-by: Ian Romanick --- src/mesa/main/uniform_query.cpp | 25 +++

[Mesa-dev] [PATCH 04/10] mesa: Rework location == -1 error checking

2014-11-03 Thread Ian Romanick
From: Ian Romanick Only one caller wanted to generate an error when location == -1, so move the error generation to that caller. There will be more callers in the future that do not want to generate errors. Move the location == -1 check later in validate_uniform_parameters. As currently implem

[Mesa-dev] [PATCH 06/10] mesa: Rework array error checks in validate_uniform_parameters

2014-11-03 Thread Ian Romanick
From: Ian Romanick Before ARB_explicit_uniform_location, Mesa's location encoding allowed locations for non-array types that had non-zero array indices. Basically, part of the location was the uniform and part was the array index. This meant that some checks had to occur for arrays and non-array

[Mesa-dev] [PATCH 09/10] glsl: Swap the order of glsl_type::name and ::length

2014-11-03 Thread Ian Romanick
From: Ian Romanick On x86-64 this saves 8 bytes of padding in the structure, and this reduces the size of the structure to 32 bytes. Signed-off-by: Ian Romanick --- src/glsl/glsl_types.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/glsl/glsl_types.h b/

[Mesa-dev] [PATCH 10/10] mesa: Uniform logging is very, very unlikely

2014-11-03 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/uniform_query.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index f971ba1..32870d0 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/

[Mesa-dev] [PATCH 00/10] glUniform* micro-optimizations, part 1

2014-11-03 Thread Ian Romanick
This is the first, and more minor, batch of micro-optimizations for the glUniform* paths. Other than patch 8, these probably aren't going to make a lot of difference, even on CPU limited applications. The next batch, which needs a bit more time to finish baking, should have some more substantial

[Mesa-dev] [PATCH 08/10] glsl: Store glsl_type::vector_elements and ::matrix_columns as uint8_t

2014-11-03 Thread Ian Romanick
From: Ian Romanick Due to the total number of bits used in the bitfield, this does not increase the size of the structure. It does, however, reduce the number of instructions required each time one of these fields is accessed. To access ::matrix_columns with the bitfield, three instructions wer

[Mesa-dev] [PATCH 03/10] mesa: Minor clean ups in _mesa_uniform

2014-11-03 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/uniform_query.cpp | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index aefa8b8..a6992c7 100644 --- a/src/mesa

[Mesa-dev] [PATCH 07/10] mesa: Don't check for API_OPENGLES in _mesa_uniform_matrix

2014-11-03 Thread Ian Romanick
From: Ian Romanick There are no uniforms in OpenGL ES 1.x, so we can't even get to this code in that API. Also, reorder the checks. First check that transpose is true, then check whether or not that is legal in the current API. transpose should never be true in an ES2 context, so this gets one

Re: [Mesa-dev] [PATCH 00/10] glUniform* micro-optimizations, part 1

2014-11-03 Thread Brian Paul
On 11/03/2014 05:22 PM, Ian Romanick wrote: This is the first, and more minor, batch of micro-optimizations for the glUniform* paths. Other than patch 8, these probably aren't going to make a lot of difference, even on CPU limited applications. The next batch, which needs a bit more time to fin

[Mesa-dev] [PATCH 15/15] draw: allow LLVM use on non-SSE2 X86 cpus

2014-11-03 Thread David Heidelberg
This patch remove workaround related to LLVM 2.7 bug. Original bug has been closed as fixed in 2011. At this moment gallium requires LLVM 3.3 (2013). Original LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=6960 Signed-off-by: David Heidelberg --- src/gallium/auxiliary/draw/draw_context.c | 1

[Mesa-dev] [PATCH 1/1] r600, llvm: Fix mem leak

2014-11-03 Thread Jan Vesely
Signed-off-by: Jan Vesely --- src/gallium/drivers/r600/r600_llvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c index c19693a..5f74bf7 100644 --- a/src/gallium/drivers/r600/r600_llvm.c +++ b/src/gallium/drivers/r6

[Mesa-dev] [PATCH 1/1] r600: upload implicit arguments even if there are no explicit args

2014-11-03 Thread Jan Vesely
Signed-off-by: Jan Vesely --- moreover, the condition is never true now that clover appends dim info src/gallium/drivers/r600/evergreen_compute.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c i

[Mesa-dev] [PATCH] mesa: Don't call _mesa_ClipControl from glPopAttrib when unsupported.

2014-11-03 Thread Kenneth Graunke
Otherwise, calling glPopAttrib on drivers that don't support ARB_clip_control gives you a GL error, which is surprising at best. Signed-off-by: Kenneth Graunke --- src/mesa/main/attrib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/

[Mesa-dev] [PATCH 2/4] i965: Use ctx->Const.MaxLineWidth when clamping ctx->Line.Width.

2014-11-03 Thread Kenneth Graunke
Rather than hardcoding platform values in every code path, just use the maximum value we set. Currently, ctx->Const.LineWidth == 5, which is smaller than the hardware limit. But applications shouldn't be using a value larger than we support anyway. Signed-off-by: Kenneth Graunke --- src/mesa/d

[Mesa-dev] [PATCH 4/4] i965: Advertise a line width of 40.0 on Cherryview and Skylake.

2014-11-03 Thread Kenneth Graunke
According to the documentation, line widths higher than 40.0 may have quality problems. That's already 20 times larger than we've been exposing, so it seems totally sufficient. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 6 +- 1 file changed, 5 insertions(+)

[Mesa-dev] [PATCH 1/4] i965: Set Line Width correctly on Cherryview and Skylake.

2014-11-03 Thread Kenneth Graunke
Line Width moved to DW1 bits 29:12. It's actually now a U11.7. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965/gen8_sf_state.c | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_de

[Mesa-dev] [PATCH 3/4] i965: Advertise larger line widths.

2014-11-03 Thread Kenneth Graunke
We've artificially been limiting this to 5 for no particular reason. On Gen4-5, the limit is [0, 7.5] with a granularity of 0.5 (U3.1). On Gen6+, the limit is [0, 7.9921875]. Since it's a U3.7, the granularity should be 0.125 (1/8). This patch conservatively advertises one granularity smaller th

[Mesa-dev] [PATCH 0/4] i965: Totally legit line width patches

2014-11-03 Thread Kenneth Graunke
Here are some totally legit line width patches. I noticed that Cherryview was setting line width in DW2 of 3DSTATE_SF, when it actually moved to DW1 at a different bit location. While fixing that, I figured I should update the clamp value to reflect the new hardware limit...which led me to want t

[Mesa-dev] [Bug 54080] glXQueryDrawable fails with GLXBadDrawable for a Window in direct context

2014-11-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=54080 --- Comment #8 from Adam Nielsen --- FYI the latest Oculus Rift SDK release hits this bug now. This means under Linux, the Rift can only be used with alternatives like the nVidia closed-source driver. https://developer.oculusvr.com/forums/viewt

Re: [Mesa-dev] [Mesa-announce] Mesa 10.3 release candidate 1

2014-11-03 Thread Ausmus, James
On Thu, Oct 23, 2014 at 11:35 AM, Matt Turner wrote: > > On Sun, Aug 24, 2014 at 11:51 PM, Thierry Vignaud > wrote: > > On 21 August 2014 17:54, Carl Worth wrote: > >> I have verified building from the .tar.bz2 file by doing the following > >> on a Debian (unstable) system: > >> > >> tar xjf Mes

Re: [Mesa-dev] [Mesa-announce] Mesa 10.3 release candidate 1

2014-11-03 Thread Matt Turner
On Mon, Nov 3, 2014 at 7:35 PM, Ausmus, James wrote: > I am able to reproduce this consistently with -j40 - it bisects to: Thanks. Maybe you could give a little more information, like an error message or something? ___ mesa-dev mailing list mesa-dev@lis

Re: [Mesa-dev] [PATCH] mesa: Don't call _mesa_ClipControl from glPopAttrib when unsupported.

2014-11-03 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Mon, Nov 3, 2014 at 6:18 PM, Kenneth Graunke wrote: > Otherwise, calling glPopAttrib on drivers that don't support > ARB_clip_control gives you a GL error, which is surprising at best. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/main/attrib.c | 3 ++- >

Re: [Mesa-dev] [PATCH 1/3] i965: Add #defines for Broadwell HiZ workarounds in CACHE_MODE_1.

2014-11-03 Thread Kristian Høgsberg
On Wed, Oct 22, 2014 at 8:58 AM, Kenneth Graunke wrote: > This patch adds macros needed for the HiZ PMA stall optimization. > > Signed-off-by: Kenneth Graunke Reviewed-by: Kristian Høgsberg > --- > src/mesa/drivers/dri/i965/intel_reg.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --

Re: [Mesa-dev] [PATCH 2/3] i965: Implement the PMA stall fix.

2014-11-03 Thread Kristian Høgsberg
On Wed, Oct 22, 2014 at 8:58 AM, Kenneth Graunke wrote: > Certain non-promoted depth cases typically incur stalls. In very > specific cases, we can enable a workaround which improves performance. > > Improves performance in GLBenchmark 2.7 TRex by 1.17762% +/- 0.448765% > (n=75) at 1280x720 on Br

Re: [Mesa-dev] [PATCH 3/3] i965: Re-enable Z16 on Gen8+.

2014-11-03 Thread Kristian Høgsberg
On Wed, Oct 22, 2014 at 8:58 AM, Kenneth Graunke wrote: > Improves performance in GLBenchmark 2.7 TRex by 3.9% +/- 0.336383% > (n=80) at 1280x720 on Broadwell GT3. Together with the previous patch, > it improves performance by 5.42738% +/- 0.541971% (n=10) at 1920x1080. > > Note that without