[Mesa-dev] [PATCH] i965: Only emit interpolation setup if there are actual FS inputs.

2013-10-19 Thread Kenneth Graunke
Dead code elimination would get rid of the extra instructions, but skipping this saves iterations through the optimization loop. >From shader-db: N Min MaxMedian AvgStddev x 14672 3 16 3 3.13345150.59904168 + 14672 1

Re: [Mesa-dev] [PATCH] radeonsi: Optimize out exports to unbound color buffers

2013-10-19 Thread Marek Olšák
As per the discussion on IRC, this is trying to fix an issue with a GLSL compiler pass lower_output_reads that always generates 8 output writes for any shader which writes gl_FragData. I'll fix this in the GLSL compiler. NAK. Marek On Sun, Oct 20, 2013 at 2:33 AM, Jay Cornwall wrote: > This patc

[Mesa-dev] [PATCH] radeonsi: Optimize out exports to unbound color buffers

2013-10-19 Thread Jay Cornwall
This patch identifies shader exports to unbound CBs and removes them during TGSI to LLVM IR lowering. The method is identical to the one used in the gallium/r600 driver. The GLSL lower_output_reads pass generates temporary copies for writes to shader outputs. In the case of gl_FragData, this resul

Re: [Mesa-dev] [PATCH 5/8] i965: Implement FS backend for ARB_sample_shading

2013-10-19 Thread Paul Berry
On 14 October 2013 10:12, Anuj Phogat wrote: > Implement the FS backend for new builtins added by the extension: > in vec2 gl_SamplePosition > in int gl_SampleID > in int gl_NumSamples > out int gl_SampleMask[] > There is a lot going on in this one patch, and it's getting hard to follow all the

Re: [Mesa-dev] [PATCH 5/8] i965: Implement FS backend for ARB_sample_shading

2013-10-19 Thread Paul Berry
On 18 October 2013 10:30, Anuj Phogat wrote: > I know we can specify stride if we have a brw_reg :- > fs_reg (stride(brw_vec1_grf(0, 0), 2, 4, 0)); > > But I could not find a reliable way to use stride if we have a fs_reg. > That's why I used OR to get the desired result. > The right way to do

Re: [Mesa-dev] [PATCH] r600g/sb: Initialize shader::dce_flags.

2013-10-19 Thread Vadim Girlin
On 10/19/2013 06:18 AM, Vinson Lee wrote: Fixes "Uninitialized scalar field" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Vadim Girlin --- src/gallium/drivers/r600/sb/sb_shader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/d

Re: [Mesa-dev] [PATCH] Remove error when calling glGenQueries/glDeleteQueries while a query is active

2013-10-19 Thread Brian Paul
On 10/17/2013 02:35 PM, Carl Worth wrote: There is nothing in the OpenGL specification which prevents the user from calling glGenQueries to generate a new query object while another object is active. Neither is there anything in the Mesa implementation which prevents this. So remove the INVALID_O

Re: [Mesa-dev] [PATCH] glsl/linker: Allow mixing of desktop GLSL versions.

2013-10-19 Thread Paul Berry
On 18 October 2013 11:07, Ian Romanick wrote: > On 10/17/2013 08:07 PM, Paul Berry wrote: > > Previously, Mesa followed the linkage rules outlined in the GLSL > > 1.20-1.40 specs, which (collectively) said that GLSL versions 1.10 and > > 1.20 could be linked together, but no other versions could

Re: [Mesa-dev] [PATCH 7/8] i965/gs: If a DUAL_OBJECT gs would spill, fall back to DUAL_INSTANCED.

2013-10-19 Thread Paul Berry
On 18 October 2013 16:46, Eric Anholt wrote: > Paul Berry writes: > > Since most geometry shaders used in piglit testing are small, > > DUAL_INSTANCED mode won't get exercised very much in a normal piglit > > run. To force DUAL_INSTANCED mode to be used for all geometry > > shaders, set INTEL_D

Re: [Mesa-dev] [PATCH 5/8] i965/gs: Fix up gl_PointSize input swizzling for DUAL_INSTANCED gs.

2013-10-19 Thread Paul Berry
On 18 October 2013 17:04, Eric Anholt wrote: > Paul Berry writes: > > > Geometry shaders that run in "DUAL_INSTANCED" mode store their inputs > > in vec4's. This means that when compiling gl_PointSize input > > swizzling (a MOV instruction which uses a geometry shader input as > > both source a

Re: [Mesa-dev] [PATCH 1/2] gallivm: implement seamless cube filtering

2013-10-19 Thread Brian Paul
On 10/18/2013 01:47 PM, srol...@vmware.com wrote: From: Roland Scheidegger For seamless cube filtering it is necessary to determine new faces and new coords per sample. The logic for this is _seriously_ complex (what needs to happen is very "asymmetric" wrt face, x/y under/overflow), further co

[Mesa-dev] [PATCH] mesa: fix a couple issues with U_FIXED, I_FIXED macros

2013-10-19 Thread Brian Paul
Silence a bunch of MSVC type conversion warnings. Changed return type of S_FIXED to int32_t (signed). The result is the same. It just seems more intuitive that a signed conversion function should return a signed value. --- src/mesa/main/macros.h |6 +++--- 1 file changed, 3 insertions(+), 3

[Mesa-dev] [PATCH 2/2] mesa: remove GL_MESA_program_debug bits from gl.h

2013-10-19 Thread Brian Paul
The code for this was removed from Mesa some time ago. --- include/GL/gl.h | 21 - 1 file changed, 21 deletions(-) diff --git a/include/GL/gl.h b/include/GL/gl.h index 968032c..6b94e3f 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -2102,27 +2102,6 @@ typedef void (AP

[Mesa-dev] [PATCH 1/2] mesa: remove remnants of GL_MESA_shader_debug

2013-10-19 Thread Brian Paul
This extension never saw any real use so remove it. --- include/GL/gl.h | 20 src/mapi/glapi/gen/gl_API.xml | 32 2 files changed, 52 deletions(-) diff --git a/include/GL/gl.h b/include/GL/gl.h index babb746..968032c 100644 -

[Mesa-dev] [PATCH] winsys/radeon: cleanup CS offloading

2013-10-19 Thread Christian König
From: Christian König Using atomic function for ncs is superfluous since it is protected by a mutex anyway. Also lock the mutex only once while retrieving the next CS for submission. Signed-off-by: Christian König --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 31 -