Re: [Mesa-dev] [PATCH] R600/SI: Add compute support for CI

2013-10-23 Thread Michel Dänzer
On Die, 2013-10-22 at 22:07 -0400, Tom Stellard wrote: diff --git a/lib/Target/R600/AMDGPU.td b/lib/Target/R600/AMDGPU.td index a722f55..f63617f 100644 --- a/lib/Target/R600/AMDGPU.td +++ b/lib/Target/R600/AMDGPU.td [...] @@ -262,13 +263,24 @@ void

Re: [Mesa-dev] [PATCH] wayland: Don't race when releasing named buffers

2013-10-23 Thread Jonas Ådahl
Still needs review. On Wed, Oct 2, 2013 at 5:06 PM, Jonas Ådahl jad...@gmail.com wrote: This patch fixes a race when a client releases a named buffer before the server had the time to handle 'wl_drm_create_buffer'. When triggered, the server would fail to create the buffer since the client

[Mesa-dev] [PATCH] Don't use gbm_dri_device when its not there

2013-10-23 Thread Jørgen Lind
--- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index b29eb1c..b143a95 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1843,10 +1843,12 @@

Re: [Mesa-dev] [PATCH] egl_dri2: Don't use gbm_dri_device when its not there

2013-10-23 Thread jorgen.lind
On Tuesday, October 22, 2013 12:25:20 PM Chad Versace wrote: I'm unsure if it makes sense to build EGL with Wayland support but without GBM support. That is, to configure Mesa with --with-egl-platforms=wayland # no drm Yeah, I was surprised that this code was being compiled at all. My

[Mesa-dev] [PATCH V2 2/2] glsl: Add check for unsized arrays to glsl types

2013-10-23 Thread Timothy Arceri
The main purpose of this patch is to increase readability of the array code by introducing is_unsized_array() to glsl_types. Some redundent is_array() checks are also removed, and small number of other related clean ups. The introduction of is_unsized_array() should also make the

[Mesa-dev] [PATCH 1/2] radeonsi: respect semantic indices for COLOR[i] fragment shader outputs

2013-10-23 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/radeonsi_shader.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 80ee325..42db8ca 100644 ---

[Mesa-dev] [PATCH 2/2] radeonsi: add the vertex shader position output if it's missing

2013-10-23 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com This fixes a lockup in piglit/spec/glsl-1.40/execution/tf-no-position. --- src/gallium/drivers/radeonsi/radeonsi_shader.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c

Re: [Mesa-dev] [PATCH] radeonsi/compute: Add Sea Islands support

2013-10-23 Thread Jay Cornwall
On 2013-10-22 21:05, Tom Stellard wrote: --- src/gallium/drivers/radeonsi/radeonsi_compute.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) [..] + si_pm4_set_reg(pm4, R_00B82C_COMPUTE_MAX_WAVE_ID, + 0x190 /*

Re: [Mesa-dev] [PATCH 6/6] glsl: Simplify the interface to link_invalidate_variable_locations

2013-10-23 Thread Paul Berry
On 18 October 2013 13:40, Paul Berry stereotype...@gmail.com wrote: On 11 October 2013 11:18, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com The unit tests added in the previous commits prove some things about the state of some internal data structures.

[Mesa-dev] [PATCH] glsl: set explicit_location correctly in lower_named_interface_blocks.

2013-10-23 Thread Paul Berry
When lower_named_interface_blocks lowers a built-in interface block member to an ir_variable, it needs to set explicit_location in the ir_variable. Otherwise the linker gets confused and treats the variable as a generic varying. Fixes the following piglit tests, which were regressed by commit

Re: [Mesa-dev] [PATCH 1/2] radeonsi: respect semantic indices for COLOR[i] fragment shader outputs

2013-10-23 Thread Michel Dänzer
On Mit, 2013-10-23 at 16:15 +0200, Marek Olšák wrote: From: Marek Olšák marek.ol...@amd.com Both patches are Reviewed-by: Michel Dänzer michel.daen...@amd.com -- Earthling Michel Dänzer| http://www.amd.com Libre software enthusiast |Mesa

[Mesa-dev] [RFC PATCH 2/2] i965/gs: Precompile geometry shaders.

2013-10-23 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_context.h | 6 ++ src/mesa/drivers/dri/i965/brw_shader.cpp | 4 src/mesa/drivers/dri/i965/brw_vec4_gs.c | 34 src/mesa/drivers/dri/i965/brw_vec4_gs.h | 4 4 files changed, 48 insertions(+) diff --git

[Mesa-dev] [RFC PATCH 1/2] i965/vec4: Extract function to set up vec4 prog key for precompiling.

2013-10-23 Thread Paul Berry
This will allow us to re-use it for precompiling geometry shaders. --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 22 ++ src/mesa/drivers/dri/i965/brw_vec4.h | 4 src/mesa/drivers/dri/i965/brw_vs.c | 15 +-- 3 files changed, 27 insertions(+), 14

[Mesa-dev] [RFC PATCH 0/2] i965/gs: Precompile geometry shaders.

2013-10-23 Thread Paul Berry
This series adds precompilation for geometry shaders. I'm not 100% certain this is worth doing, because: (a) I'm aware of very few programs out in the wild that actually use geometry shaders right now. (b) Since i965 hardware has no ability to remap vertex shader outputs to geometry shader

Re: [Mesa-dev] [PATCH] i965: Make fs gl_PrimitiveID input work even when there's no gs.

2013-10-23 Thread Eric Anholt
Paul Berry stereotype...@gmail.com writes: When a geometry shader is present, the fragment shader gl_PrimitiveID input acts like an ordinary varying, receiving data from the gs gl_PrimitiveID output. When there's no geometry shader, we have to ask the fixed function SF hardware to provide

Re: [Mesa-dev] [PATCH] glsl: silence unused 'var' variable warning

2013-10-23 Thread Paul Berry
On 22 October 2013 15:52, Brian Paul bri...@vmware.com wrote: --- src/glsl/builtin_variables.cpp |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index fc1115b..1f62fcf 100644 ---

Re: [Mesa-dev] [PATCH] radeonsi/compute: Add Sea Islands support

2013-10-23 Thread Tom Stellard
On Wed, Oct 23, 2013 at 09:47:30AM -0500, Jay Cornwall wrote: On 2013-10-22 21:05, Tom Stellard wrote: --- src/gallium/drivers/radeonsi/radeonsi_compute.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) [..] + si_pm4_set_reg(pm4,

Re: [Mesa-dev] [PATCH] R600/SI: Add compute support for CI

2013-10-23 Thread Tom Stellard
On Wed, Oct 23, 2013 at 09:31:53AM +0200, Michel D??nzer wrote: On Die, 2013-10-22 at 22:07 -0400, Tom Stellard wrote: diff --git a/lib/Target/R600/AMDGPU.td b/lib/Target/R600/AMDGPU.td index a722f55..f63617f 100644 --- a/lib/Target/R600/AMDGPU.td +++ b/lib/Target/R600/AMDGPU.td [...]

Re: [Mesa-dev] [PATCH 6/8] i965/gen6: Enable the features required for GL_ARB_sample_shading

2013-10-23 Thread Anuj Phogat
On Sun, Oct 20, 2013 at 7:25 AM, Paul Berry stereotype...@gmail.com wrote: On 14 October 2013 10:12, Anuj Phogat anuj.pho...@gmail.com wrote: - Enable GEN6_WM_MSDISPMODE_PERSAMPLE, GEN6_WM_POSOFFSET_SAMPLE, GEN6_WM_OMASK_TO_RENDER_TARGET as per extension's specification. - Don't enable

[Mesa-dev] [PATCH 2/2] i965/vec4: Remove uses_clip_distance from program key.

2013-10-23 Thread Paul Berry
This should never have been in the program key in the first place, since it's determined by the shader source, not by GL state. Change the code to just refer to gl_program::UsesClipDistanceOut directly. --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 +-

[Mesa-dev] [PATCH 1/2] glsl: Move UsesClipDistance from gl_{vertex, geometry}_program into gl_program.

2013-10-23 Thread Paul Berry
This will make it easier for back-ends to share code between geometry shader and vertex shader compilation. Also, it is renamed to UsesClipDistanceOut to clarify that (a) in geometry shaders, it refers to the gl_ClipDistance output rather than the gl_ClipDistance input, and (b) it is irrelevant

Re: [Mesa-dev] [PATCH 09/15] i965: Build the driver into a shared mesa_dri_drivers.so .

2013-10-23 Thread Eric Anholt
Chad Versace chad.vers...@linux.intel.com writes: On 10/11/2013 06:03 PM, Eric Anholt wrote: Previously, we've split things such that mesa core is in libdricore, exposing the whole Mesa core interface in the global namespace, and the i965_dri.so code all links against that. Along with

Re: [Mesa-dev] [PATCH 09/15] i965: Build the driver into a shared mesa_dri_drivers.so .

2013-10-23 Thread Eric Anholt
Emil Velikov emil.l.veli...@gmail.com writes: On 12/10/13 02:03, Eric Anholt wrote: Previously, we've split things such that mesa core is in libdricore, exposing the whole Mesa core interface in the global namespace, and the i965_dri.so code all links against that. Along with polluting

Re: [Mesa-dev] [PATCH] radeonsi/compute: Add Sea Islands support

2013-10-23 Thread Jay Cornwall
On 2013-10-23 13:05, Tom Stellard wrote: + si_pm4_set_reg(pm4, R_00B82C_COMPUTE_MAX_WAVE_ID, + 0x190 /* Default value */); Is there any visible effect on performance if this is set very low? I haven't tested with any other values. OK,

Re: [Mesa-dev] [PATCH 05/14] glsl: Add IR builder support for function calls.

2013-10-23 Thread Francisco Jerez
Ian Romanick i...@freedesktop.org writes: On 10/01/2013 07:15 PM, Francisco Jerez wrote: [..] +ir_call * +call(ir_function *f, ir_variable *ret, int num_params, ...) varargs functions that take an explicit count are very susceptible to copy-and-past bugs. If you copy-and-paste an

[Mesa-dev] [PATCH] i965: Update MESA_INFO to eliminate error

2013-10-23 Thread Courtney Goeltzenleuchter
If a user set MESA_INFO and the OpenGL application uses a 3.0 or later context then the MESA_INFO debug output will have an error when it queries for extensions using the deprecated enum GL_EXTENSIONS. Passing context argument allows code to return extension list directly regardless of profile.

Re: [Mesa-dev] [PATCH v2 03/14] glsl: Implement parser support for atomic counters.

2013-10-23 Thread Francisco Jerez
Thank you for your comments, I've rebased my atomic counters branch on top of master [1] and I think I've taken into account everything you had pointed out. The rebase has turned out to be especially painful this time. To avoid wasting more time rebasing patches that no-one is going to have a

Re: [Mesa-dev] [PATCH 24/24] i965: Simplify the shader time code by using atomic counter helpers.

2013-10-23 Thread Kenneth Graunke
On 09/26/2013 02:31 PM, Paul Berry wrote: [snip] However, there are two things which I expected to see in this patch series but I didn't: - Do atomic_uints need similar handling to ir_sampler_replacement_visitor in opt_function_inlining? - Do we need to update

Re: [Mesa-dev] [PATCH 24/24] i965: Simplify the shader time code by using atomic counter helpers.

2013-10-23 Thread Francisco Jerez
Kenneth Graunke kenn...@whitecape.org writes: On 09/26/2013 02:31 PM, Paul Berry wrote: [snip] However, there are two things which I expected to see in this patch series but I didn't: - Do atomic_uints need similar handling to ir_sampler_replacement_visitor in opt_function_inlining? -

[Mesa-dev] [PATCH] glsl/gs: Fix transform feedback of gl_ClipDistance.

2013-10-23 Thread Paul Berry
Since gl_ClipDistance is lowered from an array of floats to an array of vec4's during compilation, transform feedback has special logic to keep track of the pre-lowered array size so that attempting to perform transform feedback on gl_ClipDistance produces a result with the correct size.

Re: [Mesa-dev] [PATCH] gallium: new, unified pipe_context::set_sampler_views() function

2013-10-23 Thread Rob Clark
On Mon, Oct 7, 2013 at 8:23 PM, Brian Paul bri...@vmware.com wrote: diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index fc0c8aa..bcc846f 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++

[Mesa-dev] [PATCH 1/3] pipe-loader: Only export necessary symbols

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com This makes it possible to use clover with statically linked LLVM. --- src/gallium/targets/pipe-loader/Makefile.am | 4 src/gallium/targets/pipe-loader/pipe.link | 3 +++ 2 files changed, 7 insertions(+) create mode 100644

[Mesa-dev] [PATCH 2/3] configure.ac: Don't require shared LLVM when building OpenCL

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com This works now that pipe_*.so is no longer exporting LLVM symbols. --- configure.ac | 6 -- 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac index dfa35b4..81403ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1530,12

[Mesa-dev] Fix crashes with static LLVM

2013-10-23 Thread Tom Stellard
Hi, The attached patches introduce linker scripts to the pipe-loader and egl-static targets. The linker scripts prevents these targets from exporting LLVM (and other) symbols that they shouldn't be. This fixes several crashes in the radeon drivers when statically linking LLVM. With these

[Mesa-dev] [PATCH 3/3] egl-static: Only export necessary symbols

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com This fixes a crash in glamor when mesa links against static LLVM. --- src/gallium/targets/egl-static/Makefile.am | 4 src/gallium/targets/egl-static/egl.link| 3 +++ 2 files changed, 7 insertions(+) create mode 100644

[Mesa-dev] [PATCH] i965: Fix gl_MaxCombinedTextureImageUnits.

2013-10-23 Thread Paul Berry
We've always overriden ctx-Const.{Vertex,Fragment}Program.MaxTextureImageUnits to reflect the number of texture image units supported by the hardware (rather than using the default values assigned by Mesa core) so it seems sensible to do that for GeometryProgram.MaxTextureImageUnits too. We set

Re: [Mesa-dev] [PATCH] i965: Update MESA_INFO to eliminate error

2013-10-23 Thread Matt Turner
On Wed, Oct 23, 2013 at 12:41 PM, Courtney Goeltzenleuchter court...@lunarg.com wrote: If a user set MESA_INFO and the OpenGL application uses a 3.0 or later context then the MESA_INFO debug output will have an error when it queries for extensions using the deprecated enum GL_EXTENSIONS.

Re: [Mesa-dev] [PATCH] i965: Update MESA_INFO to eliminate error

2013-10-23 Thread Courtney Goeltzenleuchter
Hi Matt, I think the intended use was to provide glxinfo-like information from the app's perspective, i.e. if it asked for a compatibility context or something like that. That was how I discovered it, I wanted to get at the list of extensions that was being given to the app as it was different

Re: [Mesa-dev] [PATCH 1/3] pipe-loader: Only export necessary symbols

2013-10-23 Thread Matt Turner
On Wed, Oct 23, 2013 at 1:26 PM, Tom Stellard t...@stellard.net wrote: From: Tom Stellard thomas.stell...@amd.com This makes it possible to use clover with statically linked LLVM. --- src/gallium/targets/pipe-loader/Makefile.am | 4 src/gallium/targets/pipe-loader/pipe.link | 3 +++

Re: [Mesa-dev] [PATCH 3/3] egl-static: Only export necessary symbols

2013-10-23 Thread Matt Turner
On Wed, Oct 23, 2013 at 1:26 PM, Tom Stellard t...@stellard.net wrote: From: Tom Stellard thomas.stell...@amd.com This fixes a crash in glamor when mesa links against static LLVM. --- src/gallium/targets/egl-static/Makefile.am | 4 src/gallium/targets/egl-static/egl.link| 3 +++ 2

Re: [Mesa-dev] [PATCH 7/8] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-23 Thread Anuj Phogat
On Sun, Oct 20, 2013 at 7:37 AM, Paul Berry stereotype...@gmail.com wrote: On 16 October 2013 15:20, Ian Romanick i...@freedesktop.org wrote: On 10/16/2013 02:57 PM, Anuj Phogat wrote: On Tue, Oct 15, 2013 at 3:48 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 10/14/2013 10:12 AM,

Re: [Mesa-dev] [PATCH 4/8] glsl: Add new builtins required by GL_ARB_sample_shading

2013-10-23 Thread Anuj Phogat
On Fri, Oct 18, 2013 at 2:57 PM, Paul Berry stereotype...@gmail.com wrote: On 14 October 2013 10:12, Anuj Phogat anuj.pho...@gmail.com wrote: New builtins added by GL_ARB_sample_shading: in vec2 gl_SamplePosition in int gl_SampleID in int gl_NumSamples out int gl_SampleMask[]

[Mesa-dev] [PATCH 1/3] pipe-loader: Only export necessary symbols v2

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com This makes it possible to use clover with statically linked LLVM. v2: - Inline LINKER_SCRIPT variable --- src/gallium/targets/pipe-loader/Makefile.am | 2 ++ src/gallium/targets/pipe-loader/pipe.link | 3 +++ 2 files changed, 5 insertions(+)

[Mesa-dev] [PATCH 3/3] egl-static: Only export necessary symbols v2

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com This fixes a crash in glamor when mesa links against static LLVM. v2: - Inline LINKER_SCRIPT variable --- src/gallium/targets/egl-static/Makefile.am | 2 ++ src/gallium/targets/egl-static/egl.link| 3 +++ 2 files changed, 5 insertions(+) create

Re: [Mesa-dev] [PATCH] i965: Update MESA_INFO to eliminate error

2013-10-23 Thread Brian Paul
On 10/23/2013 03:14 PM, Courtney Goeltzenleuchter wrote: On Wed, Oct 23, 2013 at 3:05 PM, Matt Turner matts...@gmail.com mailto:matts...@gmail.com wrote: On Wed, Oct 23, 2013 at 12:41 PM, Courtney Goeltzenleuchter court...@lunarg.com mailto:court...@lunarg.com wrote: If a user set

[Mesa-dev] [PATCH] R600: Expand vector FSQRT ops

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com --- lib/Target/R600/AMDGPUISelLowering.cpp | 1 + test/CodeGen/R600/llvm.sqrt.ll | 54 ++ 2 files changed, 55 insertions(+) create mode 100644 test/CodeGen/R600/llvm.sqrt.ll diff --git

Re: [Mesa-dev] [PATCH] gallium: new, unified pipe_context::set_sampler_views() function

2013-10-23 Thread Brian Paul
On 10/23/2013 02:17 PM, Rob Clark wrote: On Mon, Oct 7, 2013 at 8:23 PM, Brian Paul bri...@vmware.com wrote: diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index fc0c8aa..bcc846f 100644 ---

[Mesa-dev] [PATCH] RFC clover: calculate maximum workgroup size based on device

2013-10-23 Thread Aaron Watry
The maximum workgroup size for a given kernel is based on the capabilities of the device that it's being run on. Previously, we were just returning the maximum value of a size_t which is obviously wrong. This patch uses the device's capabilities, but doesn't take into account any resource usage

[Mesa-dev] [PATCH 1/2] glsl: Optimize (not A) or (not B) into not (A and B).

2013-10-23 Thread Matt Turner
A few Serious Sam 3 shaders affected: instructions in affected programs: 4384 - 4344 (-0.91%) --- src/glsl/opt_algebraic.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 37b2f02..3bf0689 100644 ---

[Mesa-dev] [PATCH 2/2] glsl: Optimize (not A) and (not B) into not (A or B).

2013-10-23 Thread Matt Turner
No shader-db changes, but seems like a good idea. --- src/glsl/opt_algebraic.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 3bf0689..1ce9e2d 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@

Re: [Mesa-dev] [PATCH 1/2] glsl: Optimize (not A) or (not B) into not (A and B).

2013-10-23 Thread Eric Anholt
Matt Turner matts...@gmail.com writes: A few Serious Sam 3 shaders affected: These two are: Reviewed-by: Eric Anholt e...@anholt.net pgpSJbcZJCrms.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH] R600/SI: Add compute support for CI v2

2013-10-23 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com v2: - Fix LDS size calculation --- lib/Target/R600/AMDGPU.td| 2 ++ lib/Target/R600/AMDGPUAsmPrinter.cpp | 16 ++-- lib/Target/R600/AMDGPUCallingConv.td | 4 ++-- lib/Target/R600/AMDGPUSubtarget.h| 3 ++-

Re: [Mesa-dev] [PATCH 1/2] i965: Try not to reverse-schedule things when doing LIFO scheduling.

2013-10-23 Thread Matt Turner
On Tue, Oct 22, 2013 at 1:46 PM, Eric Anholt e...@anholt.net wrote: The LIFO plan was simple: Take the most recently made available instructions, and pick those first. But because of the order we were pushing things onto our list of available-to-schedule instructions, it meant that when a set

[Mesa-dev] [Bug 70823] New: while configuring the Mesa -9.2.2 file error will be there in C++ preprocessor .. please suggest me what to do..

2013-10-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70823 Priority: medium Bug ID: 70823 Assignee: mesa-dev@lists.freedesktop.org Summary: while configuring the Mesa -9.2.2 file error will be there in C++ preprocessor .. please suggest me

Re: [Mesa-dev] [PATCH] RFC clover: calculate maximum workgroup size based on device

2013-10-23 Thread Tom Stellard
On Wed, Oct 23, 2013 at 06:41:56PM -0500, Aaron Watry wrote: The maximum workgroup size for a given kernel is based on the capabilities of the device that it's being run on. Previously, we were just returning the maximum value of a size_t which is obviously wrong. This patch uses the