[Mesa-dev] [PATCH] i965/skl: Set the pulls bary bit in 3DSTATE_PS_EXTRA

2015-07-03 Thread Neil Roberts
On Gen9+ there is a new bit in 3DSTATE_PS_EXTRA that must be set if the shader sends a message to the pixel interpolator. This fixes the interpolateAt* tests on SKL, apart from interpolateatsample-nonconst but that is not implemented anywhere so it's not a regression. ---

Re: [Mesa-dev] [PATCH] glapi: fix argument parsing in glX_proto_recv.py

2015-07-03 Thread Emil Velikov
On 02/07/15 18:25, Dylan Baker wrote: One of the plugins I use with vim helpfully added an underscore to the front of mode for kicks. Obviously this isn't a feature used very often because it's been broken since d986cb7c70db (since May 20th), and no one has noticed. Iirc these have a long

Re: [Mesa-dev] [PATCH 2/2] mesa: remove duplicate array index validation and extra uniform location lookup

2015-07-03 Thread Timothy Arceri
On Fri, 2015-07-03 at 15:08 +0300, Martin Peres wrote: On 03/07/15 13:55, Timothy Arceri wrote: This change removes multiple functions designed to validate an array subscript and replaces them with a call to a single function. The change also means that validation is now only done once

Re: [Mesa-dev] [PATCH 4/4] gallium/ttn: mark location specially in nir for color0-writes-all

2015-07-03 Thread Rob Clark
On Wed, Jul 1, 2015 at 4:27 PM, Eric Anholt e...@anholt.net wrote: Rob Clark robdcl...@gmail.com writes: From: Ilia Mirkin imir...@alum.mit.edu We need to distinguish a shader that has separate writes to each MRT from one which is supposed to write the data from MRT 0 to all the MRTs. In

Re: [Mesa-dev] [PATCH RFC] egl/dri2: Add dri3 support to x11 platform

2015-07-03 Thread Emil Velikov
Hi Boyan, Thank you for doing this ! A few suggestions which you might be interesting: Considering that the backend has handled more than dri2 perhaps we can do a s/dri2/dri/ :-) That obviously is independent of your work. On 01/07/15 16:31, Boyan Ding wrote: Signed-off-by: Boyan Ding

Re: [Mesa-dev] [PATCH 1/6] i965/vec4: Plumb log_data through so the backend_shader field gets set.

2015-07-03 Thread Kenneth Graunke
On Friday, July 03, 2015 10:50:52 AM Pohjolainen, Topi wrote: On Wed, Jul 01, 2015 at 03:03:31PM -0700, Kenneth Graunke wrote: Jason plumbed this through a while back in the FS backend, but apparently we were just passing NULL in the vec4 backend. This patch passes brw in as intended.

Re: [Mesa-dev] [PATCH] i965/skl: Set the pulls bary bit in 3DSTATE_PS_EXTRA

2015-07-03 Thread Ben Widawsky
On Fri, Jul 03, 2015 at 01:15:21PM +0100, Neil Roberts wrote: On Gen9+ there is a new bit in 3DSTATE_PS_EXTRA that must be set if the shader sends a message to the pixel interpolator. This fixes the interpolateAt* tests on SKL, apart from interpolateatsample-nonconst but that is not

Re: [Mesa-dev] [PATCH 2/6] i965/vec4: Move perf_debug about register spilling into the visitor.

2015-07-03 Thread Kenneth Graunke
On Friday, July 03, 2015 11:11:45 AM Pohjolainen, Topi wrote: On Wed, Jul 01, 2015 at 03:03:32PM -0700, Kenneth Graunke wrote: This patch makes us only issue the performance warning about register spilling if we actually spilled registers. We also use scratch space for indirect addressing

Re: [Mesa-dev] [PATCH 39/78] i965/nir/vec4: Add swizzle utility method for vector ops

2015-07-03 Thread Antía Puentes
Hi Jason, On mar, 2015-06-30 at 14:18 -0700, Jason Ekstrand wrote: On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev el...@igalia.com wrote: From: Antia Puentes apuen...@igalia.com For operations that have a predefined operand size 0, defined in glsl/nir/nir_opcodes.c, NIR returns a

Re: [Mesa-dev] [PATCH 2/5] applegl: Provide requirements of _SET_DrawBuffers

2015-07-03 Thread Emil Velikov
On 02/07/15 16:32, Jon TURNEY wrote: On 02/07/2015 13:42, Emil Velikov wrote: On 27 June 2015 at 12:21, Jon TURNEY wrote: This smells to me like there's something not quite right about the partitioning of stuff between libmesa and libglapi, but I don't have any insight into what exactly the

[Mesa-dev] [Bug 90162] glGetFramebufferAttachmentParameteriv failing if certain FB attributes are zero

2015-07-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90162 Tapani Pälli lem...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

Re: [Mesa-dev] [PATCH v2] glsl: add a missing call to _mesa_locale_init

2015-07-03 Thread Matt Turner
On Fri, Jul 3, 2015 at 12:46 AM, Erik Faye-Lund kusmab...@gmail.com wrote: After c61bc6e (util: port _mesa_strto[df] to C), make check fails due to a missing _mesa_locale_init. Fixup this oversight, by moving the stand-alone compiler initializer inside initialize_context_to_defaults().

Re: [Mesa-dev] [PATCH RFC] egl/dri2: Add dri3 support to x11 platform

2015-07-03 Thread Boyan Ding
Hi Emil, On 07/03/2015 10:36 PM, Emil Velikov wrote: Hi Boyan, Thank you for doing this ! A few suggestions which you might be interesting: Considering that the backend has handled more than dri2 perhaps we can do a s/dri2/dri/ :-) That obviously is independent of your work. On 01/07/15

Re: [Mesa-dev] [PATCH 07/19] glsl: allow precision qualifiers for AoA

2015-07-03 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin imir...@alum.mit.edu On Sat, Jun 20, 2015 at 8:33 AM, Timothy Arceri t_arc...@yahoo.com.au wrote: --- src/glsl/ast_to_hir.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index

[Mesa-dev] [PATCH V2 4/4] mesa: remove now unused _mesa_get_uniform_location

2015-07-03 Thread Timothy Arceri
Cc: Tapani Pälli tapani.pa...@intel.com --- src/mesa/main/uniform_query.cpp | 75 - src/mesa/main/uniforms.h| 4 --- 2 files changed, 79 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index

[Mesa-dev] [PATCH V2 3/4] mesa: remove overlapping array index validation and extra uniform location lookup

2015-07-03 Thread Timothy Arceri
This change removes multiple functions designed to validate an array subscript and replaces them with a call to a single function. The change also means that validation is now only done once and the index is retrived at the same time, as a result the getUniformLocation code can be simplified

[Mesa-dev] [PATCH V2 2/4] mesa: fix incorrect comment

2015-07-03 Thread Timothy Arceri
Cc: Tapani Pälli tapani.pa...@intel.com --- src/mesa/main/shader_query.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index a6246a3..0473c2e 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp

[Mesa-dev] [PATCH V2 1/4] glsl: check for leading zeros in array index validation

2015-07-03 Thread Timothy Arceri
Cc: Tapani Pälli tapani.pa...@intel.com --- src/glsl/linker.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 71a45e8..d8f1689 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -462,6 +462,10 @@

[Mesa-dev] [PATCH] gallivm: fix lp_build_compare_ext

2015-07-03 Thread sroland
From: Roland Scheidegger srol...@vmware.com The expansion should always be to the same width as the input arguments no matter what, since these functions should work with any bit width of the arguments (the sext is a no-op on any sane simd architecture). Thus, fix the caller expecting

Re: [Mesa-dev] [PATCH] glapi: fix argument parsing in glX_proto_recv.py

2015-07-03 Thread Dylan Baker
I asked about dumping them and was told that they would leave mesa only when x itself died. If be more than happy to see them go if they're not useful On Jul 3, 2015 06:28, Emil Velikov emil.l.veli...@gmail.com wrote: On 02/07/15 18:25, Dylan Baker wrote: One of the plugins I use with vim

[Mesa-dev] [Bug 91222] lp_test_format regression on CentOS 7

2015-07-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91222 Bug ID: 91222 Summary: lp_test_format regression on CentOS 7 Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Keywords:

Re: [Mesa-dev] [PATCH] i965/skl: Set the pulls bary bit in 3DSTATE_PS_EXTRA

2015-07-03 Thread Kenneth Graunke
On Friday, July 03, 2015 01:15:21 PM Neil Roberts wrote: On Gen9+ there is a new bit in 3DSTATE_PS_EXTRA that must be set if the shader sends a message to the pixel interpolator. This fixes the interpolateAt* tests on SKL, apart from interpolateatsample-nonconst but that is not implemented

Re: [Mesa-dev] [PATCH 19/78] nir/nir_lower_io: Add vec4 support

2015-07-03 Thread Iago Toral
On Thu, 2015-07-02 at 09:31 +0200, Iago Toral wrote: On Tue, 2015-06-30 at 11:32 -0700, Jason Ekstrand wrote: I'm not sure what I think about adding an is_scalar flag vs. having _scalar and _vec4 versions of each function. My feeling is that once we tweak assign_var_locations as I

Re: [Mesa-dev] [PATCH 4/6] i965/vec4: Move c-last_scratch into vec4_visitor.

2015-07-03 Thread Pohjolainen, Topi
On Wed, Jul 01, 2015 at 03:03:34PM -0700, Kenneth Graunke wrote: Nothing outside of vec4_visitor uses it, so we may as well keep it internal. Commit db9c915abcc5ad78d2d11d0e732f04cc94631350 for the vec4 backend. (The empty class will be going away soon.) Signed-off-by: Kenneth Graunke

Re: [Mesa-dev] [PATCH 5/6] i965/vs: Remove 'c'/vs_compile from vec4_vs_visitor.

2015-07-03 Thread Pohjolainen, Topi
On Wed, Jul 01, 2015 at 03:03:35PM -0700, Kenneth Graunke wrote: At this point, the brw_vs_compile structure only contains the key and gl_vertex_program pointer. We may as well pass and store them directly; it's simpler and more convenient (key- instead of vs_compile-key...). Signed-off-by:

Re: [Mesa-dev] [PATCH 2/6] i965/vec4: Move perf_debug about register spilling into the visitor.

2015-07-03 Thread Pohjolainen, Topi
On Wed, Jul 01, 2015 at 03:03:32PM -0700, Kenneth Graunke wrote: This patch makes us only issue the performance warning about register spilling if we actually spilled registers. We also use scratch space for indirect addressing and the like. This is basically commit

Re: [Mesa-dev] [PATCH 5/6] i965/vs: Remove 'c'/vs_compile from vec4_vs_visitor.

2015-07-03 Thread Pohjolainen, Topi
On Fri, Jul 03, 2015 at 11:29:33AM +0300, Pohjolainen, Topi wrote: On Wed, Jul 01, 2015 at 03:03:35PM -0700, Kenneth Graunke wrote: At this point, the brw_vs_compile structure only contains the key and gl_vertex_program pointer. We may as well pass and store them directly; it's simpler and

Re: [Mesa-dev] [PATCH 13/78] i965/nir/vec4: Implement conditional statements (nir_cf_node_if)

2015-07-03 Thread Iago Toral
On Thu, 2015-07-02 at 10:11 -0700, Jason Ekstrand wrote: On Wed, Jul 1, 2015 at 11:44 PM, Iago Toral ito...@igalia.com wrote: On Tue, 2015-06-30 at 09:30 -0700, Jason Ekstrand wrote: On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev el...@igalia.com wrote: From: Iago Toral Quiroga

[Mesa-dev] [PATCH v2] glsl: add a missing call to _mesa_locale_init

2015-07-03 Thread Erik Faye-Lund
After c61bc6e (util: port _mesa_strto[df] to C), make check fails due to a missing _mesa_locale_init. Fixup this oversight, by moving the stand-alone compiler initializer inside initialize_context_to_defaults(). Signed-off-by: Erik Faye-Lund kusmab...@gmail.com --- Here's what the latter

Re: [Mesa-dev] [PATCH 1/6] i965/vec4: Plumb log_data through so the backend_shader field gets set.

2015-07-03 Thread Pohjolainen, Topi
On Wed, Jul 01, 2015 at 03:03:31PM -0700, Kenneth Graunke wrote: Jason plumbed this through a while back in the FS backend, but apparently we were just passing NULL in the vec4 backend. This patch passes brw in as intended. Signed-off-by: Kenneth Graunke kenn...@whitecape.org ---

Re: [Mesa-dev] [PATCH 3/6] i965/vec4: Move total_scratch calculation into the visitor.

2015-07-03 Thread Pohjolainen, Topi
On Wed, Jul 01, 2015 at 03:03:33PM -0700, Kenneth Graunke wrote: This is more consistent with how we do it in the FS backend, and reduces a tiny bit of duplication. It'll also allow for a bit more tidying. And it also makes it clearer that code generation doesn't have anything to do with the

Re: [Mesa-dev] [PATCH 6/6] i965/vs: Get rid of brw_vs_compile completely.

2015-07-03 Thread Pohjolainen, Topi
On Wed, Jul 01, 2015 at 03:03:36PM -0700, Kenneth Graunke wrote: After tearing it out another level or two, and just passing the key and vp directly, we can finally remove this struct. It also eliminates a pointless memcpy() of the key. Signed-off-by: Kenneth Graunke kenn...@whitecape.org

[Mesa-dev] [PATCH 1/2] glsl: move max_index calc to assign_attribute_or_color_locations

2015-07-03 Thread Tapani Pälli
Change function to get all gl_constants for inspection, this is used by follow-up patch. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/linker.cpp | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp

[Mesa-dev] [PATCH 2/2] glsl: verify location when dual source blending

2015-07-03 Thread Tapani Pälli
Same check is made for glBindFragDataLocationIndexed but it was missing when using layout qualifiers. Fixes following Piglit test: arb_blend_func_extended-output-location Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/linker.cpp | 19 +++ 1 file changed,

[Mesa-dev] [PATCH v2 5/6] i965: Upload binding tables in hw-generated binding table format.

2015-07-03 Thread Abdiel Janulgue
When hardware-generated binding tables are enabled, use the hw-generated binding table format when uploading binding table state. Normally, the CS will will just consume the binding table pointer commands as pipelined state. When the RS is enabled however, the RS flushes whatever edited surface

[Mesa-dev] [PATCH v5 2/6] i965: Enable resource streamer for the batchbuffer

2015-07-03 Thread Abdiel Janulgue
Check first if the hardware and kernel supports resource streamer. If this is allowed, tell the kernel to enable the resource streamer enable bit on MI_BATCHBUFFER_START by specifying I915_EXEC_RESOURCE_STREAMER execbuffer flags. v2: - Use new I915_PARAM_HAS_RESOURCE_STREAMER ioctl to check if

[Mesa-dev] [PATCH v4 3/6] i965: Enable hardware-generated binding tables on render path.

2015-07-03 Thread Abdiel Janulgue
This patch implements the binding table enable command which is also used to allocate a binding table pool where where hardware-generated binding table entries are flushed into. Each binding table offset in the binding table pool is unique per each shader stage that are enabled within a batch.

[Mesa-dev] [PATCH 6/6] i965: Disable resource streamer in BLORP

2015-07-03 Thread Abdiel Janulgue
Switch off hardware-generated binding tables and gather push constants in the blorp. Blorp requires only a minimal set of simple constants. There is no need for the extra complexity to program a gather table entry into the pipeline. Cc: kenn...@whitecape.org Signed-off-by: Abdiel Janulgue

Re: [Mesa-dev] [PATCH] i965/cs: Initialize GPGPU Thread Count

2015-07-03 Thread Jordan Justen
On 2015-06-25 11:34:59, Ben Widawsky wrote: On Thu, Jun 11, 2015 at 09:04:45PM -0700, Jordan Justen wrote: + desc[dw++] = 0; + const uint32_t media_threads = + brw-gen = 8 ? + SET_FIELD(threads, GEN8_MEDIA_GPGPU_THREAD_COUNT) : + SET_FIELD(threads,

Re: [Mesa-dev] [PATCH v4 3/6] i965: Enable hardware-generated binding tables on render path.

2015-07-03 Thread Chris Wilson
On Fri, Jul 03, 2015 at 10:00:31AM +0300, Abdiel Janulgue wrote: +void +gen7_enable_hw_binding_tables(struct brw_context *brw) +{ + if (!brw-use_resource_streamer) + return; + + if (!brw-hw_bt_pool.bo) { + /* We use a single re-usable buffer object for the lifetime of the +

Re: [Mesa-dev] [PATCH v2 23/82] glsl: Do not do CSE for expressions involving SSBO loads

2015-07-03 Thread Iago Toral
On Fri, 2015-07-03 at 13:23 +0300, Francisco Jerez wrote: Samuel Iglesias Gonsálvez sigles...@igalia.com writes: On 29/06/15 09:11, Jordan Justen wrote: On 2015-06-24 07:36:24, Iago Toral wrote: On Wed, 2015-06-24 at 15:43 +0300, Francisco Jerez wrote: AFAICT the reason why this (and

Re: [Mesa-dev] [PATCH v2 23/82] glsl: Do not do CSE for expressions involving SSBO loads

2015-07-03 Thread Francisco Jerez
Samuel Iglesias Gonsálvez sigles...@igalia.com writes: On 29/06/15 09:11, Jordan Justen wrote: On 2015-06-24 07:36:24, Iago Toral wrote: On Wed, 2015-06-24 at 15:43 +0300, Francisco Jerez wrote: AFAICT the reason why this (and many of the other changes in GLSL optimization passes) is needed

Re: [Mesa-dev] [PATCH] i965/fs: Don't disable SIMD16 when using the pixel interpolator

2015-07-03 Thread Francisco Jerez
Neil Roberts n...@linux.intel.com writes: There was a comment saying that in SIMD16 mode the pixel interpolator returns coords interleaved 8 channels at a time and that this requires extra work to support. However, this interleaved format is exactly what the PLN instruction requires so I

[Mesa-dev] [PATCH 2/2] mesa: remove duplicate array index validation and extra uniform location lookup

2015-07-03 Thread Timothy Arceri
This change removes multiple functions designed to validate an array subscript and replaces them with a call to a single function. The change also means that validation is now only done once and the index is retrived at the same time, as a result the getUniformLocation code can be merged saving

[Mesa-dev] [PATCH 1/2] glsl: check for leading zeros in array index validation

2015-07-03 Thread Timothy Arceri
Cc: Martin Peres martin.pe...@linux.intel.com Cc: Tapani Pälli tapani.pa...@intel.com --- src/glsl/linker.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 71a45e8..d8f1689 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@

Re: [Mesa-dev] [PATCH 2/2] mesa: remove duplicate array index validation and extra uniform location lookup

2015-07-03 Thread Martin Peres
On 03/07/15 13:55, Timothy Arceri wrote: This change removes multiple functions designed to validate an array subscript and replaces them with a call to a single function. The change also means that validation is now only done once and the index is retrived at the same time, as a result the