Re: [Mesa-dev] [PATCH v2 08/19] i965/fs: Move offset(fs_reg, unsigned) to brw_fs.h

2015-06-25 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Thu, 2015-06-25 at 13:24 -0700, Jason Ekstrand wrote: > Shortly, offset() will depend on the builder so we need it moved to some > place where it has access to that. > --- > src/mesa/drivers/dri/i965/brw_fs.h| 21 + > src/mesa/drivers/dr

Re: [Mesa-dev] [Mesa-stable] [PATCH 4/4] glsl: validate sampler array indexing for 'constant-index-expression'

2015-06-25 Thread Tapani Pälli
On 06/25/2015 05:24 PM, Emil Velikov wrote: Hi gents, On 9 June 2015 at 14:09, Francisco Jerez wrote: Francisco Jerez writes: Tapani Pälli writes: Desktop GLSL < 130 and GLSL ES < 300 allow sampler array indexing where index can contain a loop induction variable. This extra check will

Re: [Mesa-dev] [PATCH v2 05/19] i965/fs: Explicitly set the exec_size on the add(32) in interpolation setup

2015-06-25 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Thu, 2015-06-25 at 13:24 -0700, Jason Ekstrand wrote: > Soon we will start using the builder to explicitly set all the execution > sizes. We could make a 32-wide builder, but the builder asserts that we > never grow it which is usually a reasonable assumption.

Re: [Mesa-dev] [PATCH v2 03/19] i965/fs: Fix fs_inst::regs_read() for uniform pull constant loads

2015-06-25 Thread Iago Toral
On Thu, 2015-06-25 at 13:24 -0700, Jason Ekstrand wrote: > Previously, fs_inst::regs_read() fell back to depending on the register > width for the second source. This isn't really correct since it isn't a > SIMD8 value at all, but a SIMD4x2 value. This commit changes it to > explicitly be always

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

2015-06-25 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 --- sr

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

2015-06-25 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. Als

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

2015-06-25 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 st

[Mesa-dev] [PATCH 4/6] i965: Implement interface to edit binding table entries

2015-06-25 Thread Abdiel Janulgue
Unlike normal software binding tables where the driver has to manually generate and fill a binding table array which are then uploaded to the hardware, the resource streamer instead presents the driver with an option to fill out slots for individual binding table indices. The hardware accumulates t

[Mesa-dev] [PATCH 1/6] i965: Define HW-binding table and resource streamer control opcodes

2015-06-25 Thread Abdiel Janulgue
v2: Use macros for HW binding table edits (Topi) v3: Add Broadwell support. v4: Make hardware binding table bit definitions even more clearer (Ken) Cc: kenn...@whitecape.org Reviewed-by: Topi Pohjolainen Reviewed-by: Kenneth Graunke Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/i965/

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

2015-06-25 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 ker

[Mesa-dev] i965: hardware-generated binding tables

2015-06-25 Thread Abdiel Janulgue
Time for another rebase, yet again. My previous patches were getting stale... Changes since last posting: - Always inspect the getparam.value in the I915_PARAM_HAS_RESOURCE_STREAMER ioctl as suggested by Chris Wilson. ___ mesa-dev mailing list mesa-

[Mesa-dev] Early calls to st_validate_state

2015-06-25 Thread Ilia Mirkin
Hello, A user reported a crash in wine in finalize_textures (called via st_validate_state). In this particular case it was happening through st_BlitFramebuffer (piglit test sent), but there are a number of callsites of st_validate_state from st/mesa. The reason it dies is that the fragment progra

[Mesa-dev] [RFC] Progress on loop-analysis in NIR (GSoC)

2015-06-25 Thread Thomas Helland
So its time for me to post the current state of my loop analysis pass. So where can you find this? You can find it in a branch on github[1], if you want a more reading-friendly experience. (Oh, and don't bother with looking at the commit history.) I've also pasted to code as-is below, as I've yet

Re: [Mesa-dev] [PATCH v2] mesa : NULL check InfoLog

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 4:16 PM, Ben Widawsky wrote: > On Thu, Jun 25, 2015 at 02:52:47PM +0200, Marta Lofstedt wrote: >> From: Marta Lofstedt >> >> When a program is compiled, but linking failed the >> sh->InfoLog could be NULL. This is expoloited >> by OpenGL ES 3.1 conformance tests. >> >> V2:

Re: [Mesa-dev] [PATCH] mesa : NULL check InfoLog

2015-06-25 Thread Matt Turner
On Tue, Jun 23, 2015 at 2:04 PM, Matt Turner wrote: > On Tue, Jun 23, 2015 at 4:03 AM, Marta Lofstedt > wrote: >> From: Marta Lofstedt >> >> When a program is compiled, but linking failed the >> sh->InfoLog could be NULL. This is expoloited exploited is misspelled >> by OpenGL ES 3.1 conforman

Re: [Mesa-dev] [PATCH] i965/vec4_live_variables: Do liveness analysis bottom-to-top

2015-06-25 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v3 11/18] mesa/macros: add power-of-two assertions for alignment macros

2015-06-25 Thread Anuj Phogat
On Thu, Jun 25, 2015 at 3:22 PM, Nanley Chery wrote: > How about if I create a patch which puts the greater than 0 check into > is_power_of_two()? > > (value > 0) && (value & (value - 1)) == 0); > Not a bad idea except that you'll need to fix conditions at all other places which expect the current

Re: [Mesa-dev] [PATCH v2] mesa : NULL check InfoLog

2015-06-25 Thread Ben Widawsky
On Thu, Jun 25, 2015 at 02:52:47PM +0200, Marta Lofstedt wrote: > From: Marta Lofstedt > > When a program is compiled, but linking failed the > sh->InfoLog could be NULL. This is expoloited > by OpenGL ES 3.1 conformance tests. > > V2: ralloc_strdup shProg->InfoLog > > Signed-off-by: Marta Lofs

Re: [Mesa-dev] ARB_arrays_of_arrays GLSL ES

2015-06-25 Thread Timothy Arceri
On Thu, 2015-06-25 at 10:07 -0700, Jason Ekstrand wrote: > On Thu, Jun 25, 2015 at 1:19 AM, Timothy Arceri < > t_arc...@yahoo.com.au> wrote: > > On Wed, 2015-06-24 at 11:17 -0700, Jason Ekstrand wrote: > > > On Sat, Jun 20, 2015 at 5:32 AM, Timothy Arceri < > > > t_arc...@yahoo.com.au> wrote: > > >

Re: [Mesa-dev] [PATCH] Allow setting GL_TEXTURE_COMPARE_MODE on a sampler object without ARB_shadow support.

2015-06-25 Thread Matt Turner
On Mon, Mar 23, 2015 at 12:25 PM, Stefan Dösinger wrote: > This fixes a GL error warning on r200 in Wine. > > The GL_ARB_sampler_objects extension does not specify a dependency on > GL_ARB_shadow or GL_ARB_depth_texture for this value. Just set the value > and don't do anything else. It won't matt

Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: > Back in March[1], I sent a patch porting _mesa_strto[df] to > C rather than C++. I fixed up the patch according to the > criticism, but unfortunately I dropped the ball before I sent > out the result. So here I am, picking it back up! > > Th

Re: [Mesa-dev] [Nouveau] [RFC PATCH 6/8] nv50: add support for compute/graphics global performance counters

2015-06-25 Thread Ilia Mirkin
What's with the \%'s everywhere? On Mon, Jun 22, 2015 at 4:53 PM, Samuel Pitoiset wrote: > This commit adds support for both compute and graphics global > performance counters which have been reverse engineered with > CUPTI (Linux) and PerfKit (Windows). > > Currently, only one query type can be

Re: [Mesa-dev] [Nouveau] [RFC PATCH 4/8] nv50: configure the ring buffer for reading back PM counters

2015-06-25 Thread Ilia Mirkin
Yeah, this whole thing has to be guarded by a drm version check, otherwise it'll end up with errors in dmesg I assume. Perhaps only allocate screen->query when the drm version matches, and gate things on that for the rest of the code? On Mon, Jun 22, 2015 at 4:53 PM, Samuel Pitoiset wrote: > To w

Re: [Mesa-dev] [PATCH v2 6/7] mesa/main: free locale at exit

2015-06-25 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 12:36 AM, Matt Turner wrote: > On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >> In order to save a small leak if mesa is continously loaded and >> unloaded, let's free the locale when the shared object is unloaded. >> >> Signed-off-by: Erik Faye-Lund >> --- >> s

Re: [Mesa-dev] [Nouveau] [RFC PATCH 3/8] nv50: allocate and map a notifier buffer object for PM

2015-06-25 Thread Ilia Mirkin
On Mon, Jun 22, 2015 at 4:53 PM, Samuel Pitoiset wrote: > This notifier buffer object will be used to read back global performance > counters results written by the kernel. > > For each domain, we will store the handle of the perfdom object, an > array of 4 counters and the number of cycles. Like

Re: [Mesa-dev] [PATCH v2 5/7] util: port _mesa_strto[df] to C

2015-06-25 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 12:44 AM, Matt Turner wrote: > On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >> _mesa_strtod and _mesa_strtof are only used from the GLSL compiler and >> the ARB_[vertex|fragment]_program code, meaning that the locale doesn't >> need to be initialized before the f

Re: [Mesa-dev] [PATCH v2 4/7] glsl: No need to lock in _mesa_glsl_release_types

2015-06-25 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 12:29 AM, Matt Turner wrote: > On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >> This function only gets called while mesa is unloading, so there's >> no potential of racing or multiple calls at the same time. So let's >> just get rid of the locking. >> >> Signed-o

Re: [Mesa-dev] [PATCH v2 5/7] util: port _mesa_strto[df] to C

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: > _mesa_strtod and _mesa_strtof are only used from the GLSL compiler and > the ARB_[vertex|fragment]_program code, meaning that the locale doesn't > need to be initialized before the first OpenGL context gets initialized. > > So let's use expl

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-25 Thread Davin McCall
On 25/06/15 14:32, Eero Tamminen wrote: Hi, On 06/25/2015 03:53 PM, Davin McCall wrote: On 25/06/15 12:27, Eero Tamminen wrote: On 06/25/2015 02:48 AM, Davin McCall wrote: In terms of performance: (export LIBGL_ALWAYS_SOFTWARE=1; time glmark2) For Intel driver, INTEL_NO_HW=1 could be used.

Re: [Mesa-dev] [PATCH v2 6/7] mesa/main: free locale at exit

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: > In order to save a small leak if mesa is continously loaded and > unloaded, let's free the locale when the shared object is unloaded. > > Signed-off-by: Erik Faye-Lund > --- > src/mesa/main/context.c | 12 +++- > src/util/strtod.c

Re: [Mesa-dev] [PATCH v3 12/18] mesa/macros: move ALIGN_NPOT to macros.h

2015-06-25 Thread Nanley Chery
On Wed, Jun 24, 2015 at 3:43 PM, Anuj Phogat wrote: > On Mon, Jun 22, 2015 at 4:02 PM, Nanley Chery wrote: >> From: Nanley Chery >> >> Aligning with a non-power-of-two number is a general task that can be used in >> various places. This commit is required for the next one. >> >> Signed-off-by: N

Re: [Mesa-dev] [PATCH v2 4/7] glsl: No need to lock in _mesa_glsl_release_types

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: > This function only gets called while mesa is unloading, so there's > no potential of racing or multiple calls at the same time. So let's > just get rid of the locking. > > Signed-off-by: Erik Faye-Lund > --- > src/glsl/glsl_types.cpp | 8 +

Re: [Mesa-dev] [PATCH 1/4] nir/from_ssa: add a flag to not convert everything to SSA

2015-06-25 Thread Connor Abbott
On Thu, Jun 25, 2015 at 1:36 PM, Jason Ekstrand wrote: > On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: >> We already don't convert constants out of SSA, and in our backend we'd >> like to have only one way of saying something is still in SSA. >> >> The one tricky part about this is that

Re: [Mesa-dev] [PATCH v3 11/18] mesa/macros: add power-of-two assertions for alignment macros

2015-06-25 Thread Nanley Chery
How about if I create a patch which puts the greater than 0 check into is_power_of_two()? (value > 0) && (value & (value - 1)) == 0); Thanks, Nanley On Wed, Jun 24, 2015 at 3:22 PM, Anuj Phogat wrote: > On Mon, Jun 22, 2015 at 4:02 PM, Nanley Chery wrote: >> From: Nanley Chery >> >> ALIGN and

Re: [Mesa-dev] [PATCH 1/5] darwin: Suppress type conversion warnings for GLhandleARB

2015-06-25 Thread Julien Isorce
On 19 June 2015 at 10:24, Jose Fonseca wrote: > On 19/06/15 04:46, Ian Romanick wrote: > >> On 06/17/2015 10:53 PM, Julien Isorce wrote: >> >>> From: Jon TURNEY >>> >>> On darwin, GLhandleARB is defined as a void *, not the unsigned int it >>> is on >>> linux. >>> >>> For the moment, apply a cas

Re: [Mesa-dev] [PATCH v4 3/6] mesa/es3.1: enable GL_ARB_texture_multisample for GLES 3.1

2015-06-25 Thread Ilia Mirkin
On Thu, Jun 25, 2015 at 4:22 PM, Ilia Mirkin wrote: > On Thu, Jun 25, 2015 at 5:08 AM, Marta Lofstedt > wrote: >> From: Marta Lofstedt >> >> v4 : only expose GL_ARB_texture_multisample enums >> for gles 3.1 and desktop GL. > > I was suspicious of this logic. Based on my reading of the code, what

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Dave Airlie
On 26 June 2015 at 07:11, Marek Olšák wrote: > Wait a moment, how did it fail with si_shader_io_get_unique_index? The > function shouldn't be called for ES with the viewport index, because > ES can't pass the output to GS. If it was called, ignoring the > viewport index in si_llvm_emit_es_epilogue

[Mesa-dev] [Bug 91106] glx: make check fails to build on osx

2015-06-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91106 Julien Isorce changed: What|Removed |Added CC||bri...@vmware.com, |

Re: [Mesa-dev] [PATCH] radeonsi: add support for geometry shader invocations.

2015-06-25 Thread Ilia Mirkin
On Thu, Jun 25, 2015 at 4:29 PM, Ilia Mirkin wrote: > On Thu, Jun 25, 2015 at 4:26 PM, Dave Airlie wrote: >> From: Dave Airlie >> >> Signed-off-by: Dave Airlie >> --- >> src/gallium/drivers/radeonsi/si_shader.c| 5 + >> src/gallium/drivers/radeonsi/si_shader.h| 1 + >> src/

[Mesa-dev] [Bug 91112] [HSW/BYT] dEQP-GLES3.functional.uniform_api.random.23 test timeout

2015-06-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91112 Bug ID: 91112 Summary: [HSW/BYT] dEQP-GLES3.functional.uniform_api.random.23 test timeout Product: Mesa Version: 10.6 Hardware: x86-64 (AMD64) OS: Linux (Al

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Marek Olšák
Wait a moment, how did it fail with si_shader_io_get_unique_index? The function shouldn't be called for ES with the viewport index, because ES can't pass the output to GS. If it was called, ignoring the viewport index in si_llvm_emit_es_epilogue should fix it. Marek On Thu, Jun 25, 2015 at 10:29

[Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-25 Thread Erik Faye-Lund
Back in March[1], I sent a patch porting _mesa_strto[df] to C rather than C++. I fixed up the patch according to the criticism, but unfortunately I dropped the ball before I sent out the result. So here I am, picking it back up! This time I've taken a deeper dive into the whole init/deinit of Mesa

[Mesa-dev] [PATCH v2 2/7] dri: don't touch the shader compiler

2015-06-25 Thread Erik Faye-Lund
This function is for deleting per-screen resources, and the shader compiler resources are not of such nature. Besides, dri shouldn't need to even know about the presence of a shader compiler. These resources will already be released when mesa gets unloaded, and that should be sufficient. Signed-o

[Mesa-dev] [PATCH v2 3/7] mesa/main: only call _mesa_destroy_shader_compiler once on exit

2015-06-25 Thread Erik Faye-Lund
There's no point in calling _mesa_destroy_shader_compiler multiple times on exit; the resources will only be released once anyway. So let's move the atexit-call into the part that is only called once. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.c | 7 ++- 1 file changed, 2 inser

[Mesa-dev] [PATCH v2 7/7] util: assert to verify that locale is initialized

2015-06-25 Thread Erik Faye-Lund
Add an assert to Verify that the locale has been initialized when we call strtod. This might help some developers sleep better at night. Signed-off-by: Erik Faye-Lund --- src/util/strtod.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/util/strtod.c b/src/util/strtod.c index 5c36b0

[Mesa-dev] [PATCH v2 6/7] mesa/main: free locale at exit

2015-06-25 Thread Erik Faye-Lund
In order to save a small leak if mesa is continously loaded and unloaded, let's free the locale when the shared object is unloaded. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.c | 12 +++- src/util/strtod.c | 8 src/util/strtod.h | 3 +++ 3 files change

[Mesa-dev] [PATCH v2 5/7] util: port _mesa_strto[df] to C

2015-06-25 Thread Erik Faye-Lund
_mesa_strtod and _mesa_strtof are only used from the GLSL compiler and the ARB_[vertex|fragment]_program code, meaning that the locale doesn't need to be initialized before the first OpenGL context gets initialized. So let's use explicit initialization from the one-time init code instead of depend

[Mesa-dev] [PATCH v2 1/7] mesa/main: Get rid of outdated GDB-hack

2015-06-25 Thread Erik Faye-Lund
All of these enums are now in use around in the code, so there's no need to explicitly use them here any more. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context

[Mesa-dev] [PATCH v2 4/7] glsl: No need to lock in _mesa_glsl_release_types

2015-06-25 Thread Erik Faye-Lund
This function only gets called while mesa is unloading, so there's no potential of racing or multiple calls at the same time. So let's just get rid of the locking. Signed-off-by: Erik Faye-Lund --- src/glsl/glsl_types.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 0/4] i965: use SSA values when we can

2015-06-25 Thread Jason Ekstrand
And, you got some shader-db stats: total instructions in shared programs: 6078991 -> 6073118 (-0.10%) instructions in affected programs: 402221 -> 396348 (-1.46%) helped:1527 HURT: 0 GAINED:8 LOST:

Re: [Mesa-dev] [PATCH 2/4] i965/fs: use SSA values directly

2015-06-25 Thread Jason Ekstrand
On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: > Before, we would use registers, but set a magical "parent_instr" field > to indicate that it was actually purely an SSA value (i.e., it wasn't > involved in any phi nodes). Instead, just use SSA values directly, which > lets us get rid of th

[Mesa-dev] [Bug 91111] [BYT regression] dEQP-GLES3.functional.shaders.texture_functions.texturelod.usamplercube_*

2015-06-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=9 Bug ID: 9 Summary: [BYT regression] dEQP-GLES3.functional.shaders.texture_functions.textur elod.usamplercube_* Product: Mesa Version: 10.6 Hardware:

[Mesa-dev] [Bug 90264] [Regression, bisected] Tooltip corruption in Chrome

2015-06-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90264 --- Comment #23 from Furkan --- Still there for me. I'm using Ubuntu 15.04, Chrome 43.0.2357.130, Linux 4.1, and Mesa 10.7~git1506250730.d1663c~gd~v from oibaf ppa. -- You are receiving this mail because: You are the QA Contact for the bug. Yo

Re: [Mesa-dev] [PATCH] gallium/hud: prevent NULL pointer dereference with pipe_query functions

2015-06-25 Thread Samuel Pitoiset
On 06/25/2015 02:36 PM, Marek Olšák wrote: What's the point of drawing a HUD pane if a query cannot be created? With my series which adds support for global performance counters on NV50, query_create() may fail if we want to monitor *two* different query types with the HUD. This limitation

Re: [Mesa-dev] [PATCH] i965/gen9: use an unreserved surface alignment value

2015-06-25 Thread Pohjolainen, Topi
On Thu, Jun 25, 2015 at 08:40:33AM -0700, Nanley Chery wrote: > On Thu, Jun 25, 2015 at 12:37 AM, Pohjolainen, Topi > wrote: > > On Wed, Jun 24, 2015 at 05:57:13PM -0700, Anuj Phogat wrote: > >> On Wed, Jun 24, 2015 at 3:51 PM, Nanley Chery > >> wrote: > >> > From: Nanley Chery > >> > > >> > Al

Re: [Mesa-dev] [PATCH 4/4] nir: remove parent_instr from nir_register

2015-06-25 Thread Jason Ekstrand
Yes, please! It was nice at the time, but it was always a hack. Reviewed-by: Jason Ekstrand On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: > It's no longer used > > Signed-off-by: Connor Abbott > --- > src/glsl/nir/nir.c | 1 - > src/glsl/nir/nir.h | 8 > s

Re: [Mesa-dev] [PATCH 3/4] nir: remove nir_src_get_parent_instr()

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: > It's now unused. > > Signed-off-by: Connor Abbott > --- > src/glsl/nir/nir.h | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h > index 2116f60..b33c9c5

Re: [Mesa-dev] [PATCH 1/4] nir/from_ssa: add a flag to not convert everything to SSA

2015-06-25 Thread Jason Ekstrand
On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: > We already don't convert constants out of SSA, and in our backend we'd > like to have only one way of saying something is still in SSA. > > The one tricky part about this is that we may now leave some undef > instructions around if they aren

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Marek Olšák
In that case, feel free to push. Reviewed-by: Marek Olšák Marek On Thu, Jun 25, 2015 at 10:25 PM, Dave Airlie wrote: > On 26 June 2015 at 00:26, Marek Olšák wrote: >> Hi Dave, >> >> The change in si_shader_io_get_unique_index can be dropped. The >> function is only used for shaders before GS.

Re: [Mesa-dev] [PATCH] radeonsi: add support for geometry shader invocations.

2015-06-25 Thread Ilia Mirkin
On Thu, Jun 25, 2015 at 4:26 PM, Dave Airlie wrote: > From: Dave Airlie > > Signed-off-by: Dave Airlie > --- > src/gallium/drivers/radeonsi/si_shader.c| 5 + > src/gallium/drivers/radeonsi/si_shader.h| 1 + > src/gallium/drivers/radeonsi/si_state.c | 1 - > src/galli

[Mesa-dev] [PATCH] radeonsi: add support for geometry shader invocations.

2015-06-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c| 5 + src/gallium/drivers/radeonsi/si_shader.h| 1 + src/gallium/drivers/radeonsi/si_state.c | 1 - src/gallium/drivers/radeonsi/si_state_shaders.c | 7 +++ 4 files changed,

[Mesa-dev] [PATCH v2 18/19] i965/fs_generator: Use inst->exec_size for determining hardware reg widths

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 8d821ab..0a70bdc 100644 --- a/

[Mesa-dev] [PATCH v2 16/19] i965/fs: Use the builder dispatch_width for computing register offsets

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index d4cc43d..d94a842 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/d

[Mesa-dev] [PATCH v2 19/19] i965/fs: Remove the width field from fs_reg

2015-06-25 Thread Jason Ekstrand
As of now, the width field is no longer used for anything. The width field "seemed like a good idea at the time" but is actually entirely redundant with the instruction's execution size. Initially, it gave us the ability to easily set the instructions execution size based entirely on register wid

[Mesa-dev] [PATCH v2 14/19] i965/fs: Remove exec_size guessing from fs_inst::init()

2015-06-25 Thread Jason Ekstrand
Now that all of the non-explicit constructors are gone, we don't need to guess anymore. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 22 -- 1 file changed, 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH v2 15/19] i965/fs: Use the builder dispatch width instead of dst.width for pull constants

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 6e45fa7..aeaa1c4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH v2 13/19] i965/fs_builder: Use the dispatch width for setting exec sizes

2015-06-25 Thread Jason Ekstrand
Previously we used dst.width but the two *should* be the same. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs_builder.h | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_builder.h b/src/mesa/drivers/dri

[Mesa-dev] [PATCH v2 10/19] i965/fs: Make better use of the builder in shader_time

2015-06-25 Thread Jason Ekstrand
Previously, we were just depending on register widths to ensure that various things were exec_size of 1 etc. Now, we do so explicitly using the builder. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[Mesa-dev] [PATCH v2 12/19] i965/fs: Use exec_size for determining regs read/written and partial writes

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d1e253a..4f56865 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH v2 17/19] i965/fs: Use exec_size instead of dst.width for computing component size

2015-06-25 Thread Jason Ekstrand
There are a variety of places where we use dst.width / 8 to compute the size of a single logical channel. Instead, we should be using exec_size. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp| 6 +++--- src/mesa/drivers/dri/i965/brw_fs_cse.cpp

[Mesa-dev] [PATCH v2 05/19] i965/fs: Explicitly set the exec_size on the add(32) in interpolation setup

2015-06-25 Thread Jason Ekstrand
Soon we will start using the builder to explicitly set all the execution sizes. We could make a 32-wide builder, but the builder asserts that we never grow it which is usually a reasonable assumption. Sinc this one instruction is a bit of an odd-ball, we just set the exec_size explicitly. Review

[Mesa-dev] [PATCH v2 04/19] i965/fs: Report the right value in fs_inst::regs_read() for PIXEL_X/Y

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 589b74c..6cf9e96 100644 --- a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH v2 01/19] i965/fs: Use a switch statement in fs_inst::regs_read()

2015-06-25 Thread Jason Ekstrand
This makes things a little simpler, more efficient, and quite a bit more readable. Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 45 ++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/sr

[Mesa-dev] [PATCH v2 02/19] i965/fs: Actually set/use the mlen for gen7 uniform pull constant loads

2015-06-25 Thread Jason Ekstrand
Previously, we were allocating the payload with different sizes per gen and then figuring out the mlen in the generator based on gen. This meant, among other things, that the higher level passes knew nothing about it. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 19 --- sr

[Mesa-dev] [PATCH v2 00/19] i965/fs: Remove the width field from fs_reg

2015-06-25 Thread Jason Ekstrand
This is a re-send of the series I did a week or two ago to remove the width field from the fs_reg class. I really didn't want to do a re-send but there have been enough fixes since then that I thought it was worth re-sending. Most of these patches have already been reviewed but not all. 02: New.

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Dave Airlie
On 26 June 2015 at 00:26, Marek Olšák wrote: > Hi Dave, > > The change in si_shader_io_get_unique_index can be dropped. The > function is only used for shaders before GS. > Ok okay I was hitting the assert in there for the layer/viewport index cases, but if the patch you pushed to master helps I'l

[Mesa-dev] [PATCH v2 11/19] i965/fs: Remove fs_inst constructors that don't take an explicit exec_size

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 30 ++ src/mesa/drivers/dri/i965/brw_fs_builder.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 6 -- src/mesa/drivers/dri/i965/brw_ir_fs.h | 9 + 4 files changed,

[Mesa-dev] [PATCH v2 09/19] i965/fs: Add a builder argument to offset()

2015-06-25 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 42 src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 58 +-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 143

[Mesa-dev] [PATCH v2 08/19] i965/fs: Move offset(fs_reg, unsigned) to brw_fs.h

2015-06-25 Thread Jason Ekstrand
Shortly, offset() will depend on the builder so we need it moved to some place where it has access to that. --- src/mesa/drivers/dri/i965/brw_fs.h| 21 + src/mesa/drivers/dri/i965/brw_ir_fs.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) di

[Mesa-dev] [PATCH v2 07/19] i965/blorp: Explicitly set execution sizes for new'd instructions

2015-06-25 Thread Jason Ekstrand
This doesn't affect instructions allocated using the builder. Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_e

[Mesa-dev] [PATCH v2 03/19] i965/fs: Fix fs_inst::regs_read() for uniform pull constant loads

2015-06-25 Thread Jason Ekstrand
Previously, fs_inst::regs_read() fell back to depending on the register width for the second source. This isn't really correct since it isn't a SIMD8 value at all, but a SIMD4x2 value. This commit changes it to explicitly be always one register. Reviewed-by: Iago Toral Quiroga v2: Use mlen for

[Mesa-dev] [PATCH v2 06/19] i965/fs: Set the builder group for emitting FB-write stencil/AA alpha

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 8976c25..2341d02 1

Re: [Mesa-dev] [PATCH v4 3/6] mesa/es3.1: enable GL_ARB_texture_multisample for GLES 3.1

2015-06-25 Thread Ilia Mirkin
On Thu, Jun 25, 2015 at 5:08 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > v4 : only expose GL_ARB_texture_multisample enums > for gles 3.1 and desktop GL. I was suspicious of this logic. Based on my reading of the code, what your ARB_texture_multisample_es31 thing does is expose those en

Re: [Mesa-dev] [PATCH 08/17] i965/fs: Make better use of the builder in shader_time

2015-06-25 Thread Jason Ekstrand
On Tue, Jun 23, 2015 at 2:09 AM, Pohjolainen, Topi wrote: > On Thu, Jun 18, 2015 at 05:51:37PM -0700, Jason Ekstrand wrote: >> Previously, we were just depending on register widths to ensure that >> various things were exec_size of 1 etc. Now, we do so explicitly using the >> builder. >> --- >>

[Mesa-dev] [PATCH 4/4] nir: remove parent_instr from nir_register

2015-06-25 Thread Connor Abbott
It's no longer used Signed-off-by: Connor Abbott --- src/glsl/nir/nir.c | 1 - src/glsl/nir/nir.h | 8 src/glsl/nir/nir_from_ssa.c | 8 3 files changed, 17 deletions(-) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index f03e80a..f661249 100644 --- a/s

[Mesa-dev] [PATCH 2/4] i965/fs: use SSA values directly

2015-06-25 Thread Connor Abbott
Before, we would use registers, but set a magical "parent_instr" field to indicate that it was actually purely an SSA value (i.e., it wasn't involved in any phi nodes). Instead, just use SSA values directly, which lets us get rid of the hack and reduces memory usage since we're not allocating a nir

[Mesa-dev] [PATCH 0/4] i965: use SSA values when we can

2015-06-25 Thread Connor Abbott
Before, we were using a hack where when we converted out of SSA, we set a "parent_instr" field of the nir_register to indicate that the register was actually an SSA value. But in the future, we want to handle SSA values directly, and right now we're creating an extra nir_register for everything, ev

[Mesa-dev] [PATCH 3/4] nir: remove nir_src_get_parent_instr()

2015-06-25 Thread Connor Abbott
It's now unused. Signed-off-by: Connor Abbott --- src/glsl/nir/nir.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 2116f60..b33c9c5 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -565,16 +565,6 @@ nir_src_for_reg(nir_reg

[Mesa-dev] [PATCH 1/4] nir/from_ssa: add a flag to not convert everything to SSA

2015-06-25 Thread Connor Abbott
We already don't convert constants out of SSA, and in our backend we'd like to have only one way of saying something is still in SSA. The one tricky part about this is that we may now leave some undef instructions around if they aren't part of a phi-web, so we have to be more careful about deletin

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

2015-06-25 Thread Ben Widawsky
On Thu, Jun 11, 2015 at 09:04:45PM -0700, Jordan Justen wrote: > This field should always be set for gen8. In the bdw PRM, Volume 2d: > Command Reference: Structures under INTERFACE_DESCRIPTOR_DATA, DWORD > 6, Bits 9:0, Number of Threads in GPGPU Thread Group: > > "This field should not be set to

Re: [Mesa-dev] [PATCH] i965: Remove special case for layered drawbuffer attachments.

2015-06-25 Thread Anuj Phogat
On Thu, Jun 25, 2015 at 10:08 AM, Kenneth Graunke wrote: > When binding a layered texture, the layer is already 0. There's no need > to special case this. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/gen6_surface_state.c | 3 ++- > 1 file changed, 2 insertions(+), 1 dele

[Mesa-dev] New stable-branch 10.6 candidate pushed

2015-06-25 Thread Emil Velikov
Hello list, The candidate for the Mesa 10.6.1 is now available. Currently we have: - 22 queued - 19 nominated (outstanding) - and 0 rejected (obsolete) patches The present queue consist of core mesa and glsl patches (amonst which a Dota2 Reborn bugfix) affecting all dri drivers, nouveau specif

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/6] clover: Call clBuildProgram() notification function when build completes v2

2015-06-25 Thread Tom Stellard
On Thu, Jun 25, 2015 at 03:19:40PM +0100, Emil Velikov wrote: > On 3 June 2015 at 14:27, Francisco Jerez wrote: > > Emil Velikov writes: > > > >> Hi Tom, > >> > >> On 31 March 2015 at 15:29, Francisco Jerez wrote: > >>> Tom Stellard writes: > >>> > v2: > - Only call notification for

Re: [Mesa-dev] [PATCH] i965/skl: Use more compact hiz dimensions

2015-06-25 Thread Jordan Justen
Reviewed-by: Jordan Justen On 2015-06-24 20:07:54, Ben Widawsky wrote: > gen8 had some special restrictions which don't seem to carry over to gen9. > Quoting the spec for SKL: > "The Z_Height and Z_Width values must equal those present in > 3DSTATE_DEPTH_BUFFER incremented by one." > > This fixe

Re: [Mesa-dev] [PATCH] i965/skl: Use more compact hiz dimensions

2015-06-25 Thread Anuj Phogat
On Wed, Jun 24, 2015 at 8:07 PM, Ben Widawsky wrote: > gen8 had some special restrictions which don't seem to carry over to gen9. > Quoting the spec for SKL: > "The Z_Height and Z_Width values must equal those present in > 3DSTATE_DEPTH_BUFFER incremented by one." > > This fixes nothing in piglit

Re: [Mesa-dev] ARB_arrays_of_arrays GLSL ES

2015-06-25 Thread Jason Ekstrand
On Thu, Jun 25, 2015 at 1:19 AM, Timothy Arceri wrote: > On Wed, 2015-06-24 at 11:17 -0700, Jason Ekstrand wrote: >> On Sat, Jun 20, 2015 at 5:32 AM, Timothy Arceri < >> t_arc...@yahoo.com.au> wrote: >> > Hi all, >> > >> > The restrictions in ES make the extension easier to implement so >> > I tho

[Mesa-dev] [PATCH] i965: Remove special case for layered drawbuffer attachments.

2015-06-25 Thread Kenneth Graunke
When binding a layered texture, the layer is already 0. There's no need to special case this. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen6_surface_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen6_surface_state.c b

Re: [Mesa-dev] [PATCH 1/2] clover: fix event handling of buffer operations

2015-06-25 Thread Grigori Goronzy
On 2015-06-09 22:52, Francisco Jerez wrote: + + if (blocking) + hev().wait(); + hard_event::wait() may fail, so this should probably be done before the ret_object() call to avoid leaks. Alright... C++ exceptions are a minefield. :) Is there any reason you didn't make the same change

Re: [Mesa-dev] [PATCH 2/2] clover: implement CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE

2015-06-25 Thread Grigori Goronzy
On 2015-05-28 13:04, Grigori Goronzy wrote: Work-group size should always be aligned to subgroup size; this is a basic requirement, otherwise some work-items will be no-operation. It might make sense to refine the value according to a kernel's resource usage, but that's a possible optimization f

[Mesa-dev] [PATCH] i965/vec4_live_variables: Do liveness analysis bottom-to-top

2015-06-25 Thread Jason Ekstrand
From Muchnick's Advanced Compiler Design and Implementation: "To determine which variables are live at each point in a flowgraph, we perform a backward data-flow analysis" Previously, we were walking the blocks forwards and updating the livein and then the liveout. However, the livein calculatio

  1   2   >