Re: [Mesa-dev] [PATCH 0/9] i965 assembly validator

2015-11-03 Thread Kenneth Graunke
On Wednesday, October 21, 2015 03:58:08 PM Matt Turner wrote: > Inspired by a bug this summer, I've written a basic assembly validation > pass. The series currently checks only three things: > >- that instruction sources are not null (when they shouldn't be); >- that the Gen supports the i

Re: [Mesa-dev] [PATCH 9/9] i965: Check accumulator restrictions.

2015-11-03 Thread Kenneth Graunke
On Wednesday, October 21, 2015 03:58:17 PM Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_eu_validate.c | 244 > > 1 file changed, 244 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c > b/src/mesa/drivers/dri/i965/brw_eu_validate.

Re: [Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 10:44 PM, Kenneth Graunke wrote: > On Tuesday, November 03, 2015 10:20:26 PM Matt Turner wrote: >> On Tue, Nov 3, 2015 at 9:47 PM, Kenneth Graunke >> wrote: >> > On Wednesday, October 21, 2015 03:58:14 PM Matt Turner wrote: >> >> Will allow annotations to contain error mes

Re: [Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

2015-11-03 Thread Kenneth Graunke
On Tuesday, November 03, 2015 10:20:26 PM Matt Turner wrote: > On Tue, Nov 3, 2015 at 9:47 PM, Kenneth Graunke wrote: > > On Wednesday, October 21, 2015 03:58:14 PM Matt Turner wrote: > >> Will allow annotations to contain error messages (indicating an > >> instruction violates a rule for instance

Re: [Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 10:20 PM, Matt Turner wrote: > On Tue, Nov 3, 2015 at 9:47 PM, Kenneth Graunke wrote: >> But this isn't safe when i = 0, as cur will be out of bounds... > > I don't think so. The code as-is might be tricky, but I think it's correct -- > >>> + if (annotation->ann[i].off

Re: [Mesa-dev] [PATCH 8/9] i965: Check instructions appear only on supported hardware.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 10:21 PM, Kenneth Graunke wrote: > On Wednesday, October 21, 2015 03:58:16 PM Matt Turner wrote: >> --- >> src/mesa/drivers/dri/i965/brw_eu_validate.c | 257 >> >> 1 file changed, 257 insertions(+) >> >> diff --git a/src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH 7/9] i965: Add initial assembly validation pass.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 10:14 PM, Kenneth Graunke wrote: > On Wednesday, October 21, 2015 03:58:15 PM Matt Turner wrote: >> Initially just checks that sources are non-NULL, which would have >> alerted us to the problem fixed by commit 6c846dc5. >> --- >> src/mesa/drivers/dri/i965/Makefile.sources

Re: [Mesa-dev] [PATCH 8/9] i965: Check instructions appear only on supported hardware.

2015-11-03 Thread Kenneth Graunke
On Wednesday, October 21, 2015 03:58:16 PM Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_eu_validate.c | 257 > > 1 file changed, 257 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c > b/src/mesa/drivers/dri/i965/brw_eu_validate.

Re: [Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 9:47 PM, Kenneth Graunke wrote: > On Wednesday, October 21, 2015 03:58:14 PM Matt Turner wrote: >> Will allow annotations to contain error messages (indicating an >> instruction violates a rule for instance) that are printed after the >> disassembly of the block. >> --- >>

Re: [Mesa-dev] [PATCH 7/9] i965: Add initial assembly validation pass.

2015-11-03 Thread Kenneth Graunke
On Wednesday, October 21, 2015 03:58:15 PM Matt Turner wrote: > Initially just checks that sources are non-NULL, which would have > alerted us to the problem fixed by commit 6c846dc5. > --- > src/mesa/drivers/dri/i965/Makefile.sources | 1 + > src/mesa/drivers/dri/i965/brw_eu.h

[Mesa-dev] [PATCH v4 4/6] nouveau: add support for sending debug messages via KHR_debug

2015-11-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nouveau_context.h | 4 src/gallium/drivers/nouveau/nouveau_screen.c| 19 +++ src/gallium/drivers/nouveau/nv30/nv30_context.c | 1 + src/gallium/drivers/nouveau/nv50/nv50_context.c | 1 + src/gallium/drivers/n

[Mesa-dev] [PATCH v4 2/6] st/mesa: set debug callback for debug contexts

2015-11-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_manager.c | 56 + 1 file changed, 56 insertions(+) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 7abd128..c38c11d 100644 --- a/src/mesa/state_tracker/st_ma

[Mesa-dev] [PATCH v4 1/6] gallium: expose a debug message callback settable by context owner

2015-11-03 Thread Ilia Mirkin
This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/util/u_debug.c | 14 ++ src/gallium/auxiliary/util/u_debug.h | 20 src/gallium/docs/source/context.rst | 3 +++ src/gallium/include/pipe

[Mesa-dev] [PATCH v4 0/6] gallium: allow drivers to report debug info to st

2015-11-03 Thread Ilia Mirkin
I believe I've addressed the various feedback -- I've reduced the pipe-side types to a more manageable quantity, renamed the debug info struct to debug callback, and added a few comments. An earlier version of the st/clover patch was tested too. Ilia Mirkin (6): gallium: expose a debug message c

[Mesa-dev] [PATCH v4 6/6] nouveau: send back a debug message when waiting for a fence to complete

2015-11-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nouveau_buffer.c | 13 +++-- src/gallium/drivers/nouveau/nouveau_context.h| 1 + src/gallium/drivers/nouveau/nouveau_fence.c | 14 -- src/gallium/drivers/nouveau/nouveau_fence.h | 4 +++- src/galliu

[Mesa-dev] [PATCH v4 5/6] nv50, nvc0: provide debug messages with shader compilation stats

2015-11-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h | 1 + src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp | 2 ++ src/gallium/drivers/nouveau/nv50/nv50_program.c| 8 +++- src/gallium/drivers/nouveau/nv50/nv50_program.h| 3 ++- src/gall

[Mesa-dev] [PATCH v4 3/6] st/clover: provide a path for drivers to call through to pfn_notify

2015-11-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin [ Francisco Jerez: Clean up clover::context interface by passing around a function object. ] --- src/gallium/state_trackers/clover/api/context.cpp | 7 ++- src/gallium/state_trackers/clover/core/context.cpp | 5 +++-- src/gallium/state_trackers/clover/core/con

Re: [Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

2015-11-03 Thread Kenneth Graunke
On Wednesday, October 21, 2015 03:58:14 PM Matt Turner wrote: > Will allow annotations to contain error messages (indicating an > instruction violates a rule for instance) that are printed after the > disassembly of the block. > --- > src/mesa/drivers/dri/i965/intel_asm_annotation.c | 60 > ++

[Mesa-dev] [PATCH] gallium/hud: document GALLIUM_HUD_PERIOD in envvars.html.

2015-11-03 Thread Jimmy Berry
--- docs/envvars.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/envvars.html b/docs/envvars.html index bdfe999..173c941 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -179,6 +179,8 @@ Mesa EGL supports different sets of environment variables. See the GALLIUM_HUD - dr

[Mesa-dev] [PATCH v2] gallium/hud: control visibility at startup and runtime.

2015-11-03 Thread Jimmy Berry
- env GALLIUM_HUD_VISIBLE: control default visibility - env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal --- Thanks for the feedback. I believe all the suggested changes have been implemented. One note, all the logic except for the toggle was already in hud_create() and not hud_draw().

Re: [Mesa-dev] [PATCH] glsl: remove old TODO

2015-11-03 Thread Tapani Pälli
On 11/04/2015 06:30 AM, Tapani Pälli wrote: On 11/04/2015 05:51 AM, Timothy Arceri wrote: SSBO support now exists. Yes, program resource support for SSBO is done; Reviewed-by: Tapani Pälli resources themselves already got added by 9b477ad49d3f82503a1b8ba23dedfc05cd848fe8 and then rest h

Re: [Mesa-dev] [PATCH] glsl: make sure to only add subroutines to resource list

2015-11-03 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 11/04/2015 05:42 AM, Timothy Arceri wrote: Over looked in 763cd8c080353. --- src/glsl/linker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 9dcc2a7..c1e4efb 100644 --- a/src/glsl/linker.cp

Re: [Mesa-dev] [PATCH 2/2] nir: Rename nir_live_variables.c to nir_liveness.c.

2015-11-03 Thread Jason Ekstrand
Thanks for fixing that! Both patches are Reviewed-by: Jason Ekstrand On Tue, Nov 3, 2015 at 5:19 PM, Kenneth Graunke wrote: > It doesn't actually operate on variables. > --- > src/glsl/Makefile.sources | 2 +- > src/glsl/nir/nir_live_variables.c | 297 >

Re: [Mesa-dev] [PATCH v2] i965: Fix scalar VS float[] and vec2[] output arrays.

2015-11-03 Thread Jason Ekstrand
On Tue, Nov 3, 2015 at 7:32 PM, Kenneth Graunke wrote: > The scalar VS backend has never handled float[] and vec2[] outputs > correctly (my original code was broken). Outputs need to be padded > out to vec4 slots. > > In fs_visitor::nir_setup_outputs(), we tried to process each vec4 slot > by loo

Re: [Mesa-dev] [PATCH 5/9] i965: Combine assembly annotations if possible.

2015-11-03 Thread Kenneth Graunke
On Tuesday, November 03, 2015 01:23:13 PM Matt Turner wrote: > On Mon, Oct 26, 2015 at 5:08 AM, Pohjolainen, Topi > wrote: > > On Wed, Oct 21, 2015 at 03:58:13PM -0700, Matt Turner wrote: > >> Often annotations are identical between sets of consecutive > >> instructions. We can perhaps avoid some

Re: [Mesa-dev] [PATCH] glsl: remove old TODO

2015-11-03 Thread Tapani Pälli
On 11/04/2015 05:51 AM, Timothy Arceri wrote: SSBO support now exists. Yes, program resource support for SSBO is done; Reviewed-by: Tapani Pälli --- src/glsl/linker.cpp | 5 - 1 file changed, 5 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index c1e4efb..26c029

Re: [Mesa-dev] [PATCH] glsl: remove old TODO

2015-11-03 Thread Matt Turner
Presumably this was fixed by commit f408a13dd30? If so, and Samuel/Tapani confirm, Acked-by: Matt Turner (Would be nice to mention the commit sha in the commit message as well) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.free

[Mesa-dev] [PATCH] glsl: remove old TODO

2015-11-03 Thread Timothy Arceri
SSBO support now exists. --- src/glsl/linker.cpp | 5 - 1 file changed, 5 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index c1e4efb..26c0298 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -3800,11 +3800,6 @@ build_program_resource_list(struct gl_shader_p

[Mesa-dev] [PATCH] glsl: make sure to only add subroutines to resource list

2015-11-03 Thread Timothy Arceri
Over looked in 763cd8c080353. --- src/glsl/linker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 9dcc2a7..c1e4efb 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -3776,7 +3776,8 @@ build_program_resource_list(

[Mesa-dev] [PATCH v2] i965: Fix scalar VS float[] and vec2[] output arrays.

2015-11-03 Thread Kenneth Graunke
The scalar VS backend has never handled float[] and vec2[] outputs correctly (my original code was broken). Outputs need to be padded out to vec4 slots. In fs_visitor::nir_setup_outputs(), we tried to process each vec4 slot by looping from 0 to ALIGN(type_size_scalar(type), 4) / 4. However, this

Re: [Mesa-dev] [PATCH] radeonsi: add basic glClearBufferSubData acceleration

2015-11-03 Thread Alex Deucher
On Tue, Nov 3, 2015 at 6:47 PM, Marek Olšák wrote: > From: Marek Olšák > > --- > src/gallium/drivers/radeonsi/si_blit.c | 55 > ++ > 1 file changed, 55 insertions(+) > > diff --git a/src/gallium/drivers/radeonsi/si_blit.c > b/src/gallium/drivers/radeonsi/si_blit

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Timothy Arceri
On Tue, 2015-11-03 at 20:42 -0500, Ilia Mirkin wrote: > On Tue, Nov 3, 2015 at 8:23 PM, Timothy Arceri > wrote: > > On Wed, 2015-11-04 at 12:12 +1100, Timothy Arceri wrote: > > > On Tue, 2015-11-03 at 19:39 -0500, Ilia Mirkin wrote: > > > > On Tue, Nov 3, 2015 at 7:31 PM, Timothy Arceri > > > > w

Re: [Mesa-dev] [PATCH] llvmpipe: use simple coeffs calc for 128bit vectors

2015-11-03 Thread Roland Scheidegger
Ok I'm convinced enough it's not worth bothering about the (mostly minimal) performance impact and pushed this (a slightly altered version). Thanks! Roland Am 03.11.2015 um 09:36 schrieb Oded Gabbay: > There are currently two methods in llvmpipe code to calculate coeffs to > be used as inputs for

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Ilia Mirkin
On Tue, Nov 3, 2015 at 8:23 PM, Timothy Arceri wrote: > On Wed, 2015-11-04 at 12:12 +1100, Timothy Arceri wrote: >> On Tue, 2015-11-03 at 19:39 -0500, Ilia Mirkin wrote: >> > On Tue, Nov 3, 2015 at 7:31 PM, Timothy Arceri >> > wrote: >> > > On Tue, 2015-11-03 at 19:21 -0500, Ilia Mirkin wrote: >>

Re: [Mesa-dev] [PATCH V3] i965: add support for image AoA

2015-11-03 Thread Francisco Jerez
Timothy Arceri writes: > V3: clamp array index to the correct size (the size of the current array > rather than the inner array) Francisco Jerez. > > V2: avoid useless zero-initialization and addition for the first AoA level, > avoid redundant temporary, make use of type_size_scalar(), rename aoa

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Timothy Arceri
On Wed, 2015-11-04 at 12:12 +1100, Timothy Arceri wrote: > On Tue, 2015-11-03 at 19:39 -0500, Ilia Mirkin wrote: > > On Tue, Nov 3, 2015 at 7:31 PM, Timothy Arceri > > wrote: > > > On Tue, 2015-11-03 at 19:21 -0500, Ilia Mirkin wrote: > > > > I'm still unclear what problem you're trying to solve h

[Mesa-dev] [PATCH 1/2] nir: Rename live_variables to live_ssa_defs.

2015-11-03 Thread Kenneth Graunke
This computes liveness of SSA values, not nir_variables. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.h| 4 ++-- src/glsl/nir/nir_from_ssa.c | 2 +- src/glsl/nir/nir_live_variables.c | 12 ++-- src/glsl/nir/nir_lower_glob

[Mesa-dev] [PATCH 2/2] nir: Rename nir_live_variables.c to nir_liveness.c.

2015-11-03 Thread Kenneth Graunke
It doesn't actually operate on variables. --- src/glsl/Makefile.sources | 2 +- src/glsl/nir/nir_live_variables.c | 297 -- src/glsl/nir/nir_liveness.c | 297 ++ 3 files changed, 298 insertions(+), 298 deletion

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Timothy Arceri
On Tue, 2015-11-03 at 19:39 -0500, Ilia Mirkin wrote: > On Tue, Nov 3, 2015 at 7:31 PM, Timothy Arceri > wrote: > > On Tue, 2015-11-03 at 19:21 -0500, Ilia Mirkin wrote: > > > I'm still unclear what problem you're trying to solve here? What's > > > wrong with having b[1] = b[1]? > > > > There is

Re: [Mesa-dev] The i965 vec4 backend, exec_masks, and 64-bit types

2015-11-03 Thread Francisco Jerez
Francisco Jerez writes: > Connor Abbott writes: > >> Hi all, >> >> While working on FP64 for i965, there's an issue that I thought of >> with the vec4 backend that I'm not sure how to resolve. From what I >> understand, the execmask works the same way in Align16 mode as Align1 >> mode, except th

Re: [Mesa-dev] [PATCH 05/10] i965/meta/gen9: Individually fast clear color attachments

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 4:46 PM, Ben Widawsky wrote: > On Tue, Oct 13, 2015 at 09:14:29PM -0700, Matt Turner wrote: >> On Tue, Oct 13, 2015 at 9:12 PM, Matt Turner wrote: >> > On Tue, Oct 13, 2015 at 8:50 PM, Ben Widawsky >> > wrote: >> >> The impetus for this patch comes from a seemingly benign

Re: [Mesa-dev] [PATCH 05/10] i965/meta/gen9: Individually fast clear color attachments

2015-11-03 Thread Ben Widawsky
On Tue, Oct 13, 2015 at 09:14:29PM -0700, Matt Turner wrote: > On Tue, Oct 13, 2015 at 9:12 PM, Matt Turner wrote: > > On Tue, Oct 13, 2015 at 8:50 PM, Ben Widawsky > > wrote: > >> The impetus for this patch comes from a seemingly benign statement within > >> the > >> spec (quoted within the pat

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Ilia Mirkin
On Tue, Nov 3, 2015 at 7:31 PM, Timothy Arceri wrote: > On Tue, 2015-11-03 at 19:21 -0500, Ilia Mirkin wrote: >> I'm still unclear what problem you're trying to solve here? What's >> wrong with having b[1] = b[1]? > > There is nothing wrong with it, but nir seems to expect this type of > assignmen

[Mesa-dev] [PATCH] i965: Add src/dst interference for certain instructions with hazards.

2015-11-03 Thread Kenneth Graunke
When working on tessellation shaders, I created some vec4 virtual opcodes for creating message headers through a sequence like: mov(8) g7<1>UD 0xUD{ align1 WE_all 1Q compacted }; mov(1) g7.5<1>UD0x0100UD{ align1 WE_all }; mov(1) g7<1>UD g0<0,1,0>UD {

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Timothy Arceri
On Tue, 2015-11-03 at 19:21 -0500, Ilia Mirkin wrote: > I'm still unclear what problem you're trying to solve here? What's > wrong with having b[1] = b[1]? There is nothing wrong with it, but nir seems to expect this type of assignment to be optimised out and hits an assert if its not. Its removed

Re: [Mesa-dev] [PATCH 04/10] i965/skl: skip fast clears for certain surface formats

2015-11-03 Thread Ben Widawsky
On Fri, Oct 16, 2015 at 04:05:22PM -0700, Chad Versace wrote: > On Tue 13 Oct 2015, Ben Widawsky wrote: > > Initially I had this planned as a patch to be squashed in to the enabling > > patch > > because there is no point enabling fast clears without this. However, Chad > > merged a patch which di

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Ilia Mirkin
I'm still unclear what problem you're trying to solve here? What's wrong with having b[1] = b[1]? On Tue, Nov 3, 2015 at 7:19 PM, Timothy Arceri wrote: > On Mon, 2015-11-02 at 03:27 -0500, Ilia Mirkin wrote: >> On Sun, Nov 1, 2015 at 3:33 AM, Timothy Arceri >> wrote: >> > Handles the case with f

Re: [Mesa-dev] [PATCH] glsl: remove redundant function inout assignments

2015-11-03 Thread Timothy Arceri
On Mon, 2015-11-02 at 03:27 -0500, Ilia Mirkin wrote: > On Sun, Nov 1, 2015 at 3:33 AM, Timothy Arceri > wrote: > > Handles the case with function inout params where array elements > > do an assignment to themselves e.g. > > > > void array_mod(inout int b[2]) > > { > > b[0] = int(2); > >

[Mesa-dev] [PATCH] radeonsi: add basic glClearBufferSubData acceleration

2015-11-03 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_blit.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index fce014a..e934146 100644 --- a/src/gallium/drivers/radeonsi/s

[Mesa-dev] [PATCH 4/4] radeonsi: add workarounds for CP DMA to stay on the fast path

2015-11-03 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_cp_dma.c | 90 ++-- 1 file changed, 85 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index e6aa9ca..641a6d1 100644 --- a/src/galliu

[Mesa-dev] [PATCH] radeonsi: add register definitions for Stoney

2015-11-03 Thread Marek Olšák
From: Marek Olšák There are a few non-stoney changes too. --- src/gallium/drivers/radeonsi/sid.h | 322 + 1 file changed, 322 insertions(+) diff --git a/src/gallium/drivers/radeonsi/sid.h b/src/gallium/drivers/radeonsi/sid.h index 49d8e2c..3a5101a 100644 ---

[Mesa-dev] [PATCH 1/4] radeonsi: only enable write confirmation on the last CP DMA packet

2015-11-03 Thread Marek Olšák
From: Marek Olšák This should improve performance for big copies that need to be split. --- src/gallium/drivers/radeonsi/si_cp_dma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c inde

[Mesa-dev] [PATCH 2/4] radeonsi: unify CP DMA code determining various flags

2015-11-03 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_cp_dma.c | 51 ++-- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index c563644..4cdde29 100644 --- a/src/galli

[Mesa-dev] [PATCH 3/4] radeonsi: unify CP DMA preparation logic

2015-11-03 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_cp_dma.c | 71 +++- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index 4cdde29..e6aa9ca 100644 --- a/src/galli

[Mesa-dev] Avoid segfault in omx deconstructor

2015-11-03 Thread StDenis, Tom
If the constructor fails before the lists are initialized the deconstructor will fail. This patch is a bit of a kludge fix to just avoid the undefined behaviour. The real fix down the road would be to avoid calling the deconstructor if the constructor failed at all. Tom From 3cf2f8e32b7093c

Re: [Mesa-dev] [PATCH 3/3] st/mesa: implement ARB_copy_image

2015-11-03 Thread Marek Olšák
On Wed, Oct 28, 2015 at 5:25 PM, Ilia Mirkin wrote: > On Sun, Oct 25, 2015 at 1:25 PM, Marek Olšák wrote: >> +static void >> +st_CopyImageSubData(struct gl_context *ctx, >> +struct gl_texture_image *src_image, >> +struct gl_renderbuffer *src_renderbuffer, >

Re: [Mesa-dev] [PATCH 03/10] i965/skl: Enable fast color clears on SKL

2015-11-03 Thread Ben Widawsky
On Fri, Oct 16, 2015 at 04:10:02PM -0700, Chad Versace wrote: > But this patch doesn't enable fast clears! The reverts in pathches 6 and > 7 need to be folded into this patch, otherwise the patch does not do > what it claims. > > Also, you can't enable fast clears before patches 4 and 5 without in

[Mesa-dev] [PATCH 3/3] i965/nir/fs: Implement new barrier functions for compute shaders

2015-11-03 Thread Jordan Justen
For these nir intrinsics, we emit the same code as nir_intrinsic_memory_barrier: * nir_intrinsic_memory_barrier_atomic_counter * nir_intrinsic_memory_barrier_buffer * nir_intrinsic_memory_barrier_image We treat these nir intrinsics as no-ops: * nir_intrinsic_group_memory_barrier * nir_intri

[Mesa-dev] [PATCH 2/3] nir: Add new barrier functions for compute shaders

2015-11-03 Thread Jordan Justen
When these functions are called in glsl-ir, we create a corresponding nir intrinsic function call. Signed-off-by: Jordan Justen --- src/glsl/nir/glsl_to_nir.cpp | 15 +++ src/glsl/nir/nir_intrinsics.h | 11 +++ 2 files changed, 26 insertions(+) diff --git a/src/glsl/nir/gls

[Mesa-dev] [PATCH 1/3] glsl: Add new barrier functions for compute shaders

2015-11-03 Thread Jordan Justen
When these functions are called in GLSL code, we create an intrinsic function call: * groupMemoryBarrier => __intrinsic_group_memory_barrier * memoryBarrierAtomicCounter => __intrinsic_memory_barrier_atomic_counter * memoryBarrierBuffer => __intrinsic_memory_barrier_buffer * memoryBarrierImage

Re: [Mesa-dev] [PATCH 1/7] i965: use real latencies in the pre-RA scheduler

2015-11-03 Thread Jason Ekstrand
On Fri, Oct 30, 2015 at 6:02 PM, Connor Abbott wrote: > Before, we simply assumed that reducing register pressure was the number > one priority in the pre-RA scheduler, and set the latency of every > instruction to 1 to get the scheduler to ignore it. But for the > aggressive scheduler, this doesn

[Mesa-dev] [PATCH V3] i965: add support for image AoA

2015-11-03 Thread Timothy Arceri
V3: clamp array index to the correct size (the size of the current array rather than the inner array) Francisco Jerez. V2: avoid useless zero-initialization and addition for the first AoA level, avoid redundant temporary, make use of type_size_scalar(), rename aoa_size to element_size, assign the

Re: [Mesa-dev] [PATCH 00/11] nir: Add a pass management framework

2015-11-03 Thread Jason Ekstrand
On Tue, Nov 3, 2015 at 12:16 AM, Kenneth Graunke wrote: > On Wednesday, October 28, 2015 02:32:00 PM Jason Ekstrand wrote: >> This series adds a nir_pass datastructure and some helpers for managing >> optimization and lowering passes. I've been meaning to get around to this >> for some time. The

[Mesa-dev] [PATCH v2 08/10] nir/algebraic: Use the nir_pass framework internally

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.h| 4 ++-- src/glsl/nir/nir_algebraic.py | 38 +- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 5242112..beca805 100644 --- a/src/g

[Mesa-dev] [PATCH v2 10/10] ir3: Use nir_pass for lower_if_else

2015-11-03 Thread Jason Ekstrand
Cc: Rob Clark Reviewed-by: Kristian Høgsberg --- src/gallium/drivers/freedreno/ir3/ir3_nir.h | 2 +- .../drivers/freedreno/ir3/ir3_nir_lower_if_else.c | 21 + 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.

[Mesa-dev] [PATCH v2 02/10] nir: Add a pass-running infastructure

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg v2: (Jason Ekstrand): - Make run_pass take a nir_shader** to allow for nir_shader_clone testing v3: (Jason Ekstrand): - Switch back to taking a nir_shader* - Rework run_pass a bit with suggestions from Ken - Add a NIR_DECL_PASS macro --- src/glsl/nir/nir.h

[Mesa-dev] [PATCH v2 05/10] nir/phis_to_scalar: Use the nir_pass framework internally

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.h | 3 +-- src/glsl/nir/nir_lower_phis_to_scalar.c | 26 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index b18f1d6..a8ed3f8 100644 ---

[Mesa-dev] [PATCH v2 04/10] nir/alu_to_scalar: Use the nir_pass framework internally

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.h | 3 +- src/glsl/nir/nir_lower_alu_to_scalar.c | 57 -- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index f2d01e9..b18f1d6 100644

[Mesa-dev] [PATCH v2 06/10] nir/lower_vars_to_ssa: Use the nir_pass framework internally

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.h | 2 +- src/glsl/nir/nir_lower_vars_to_ssa.c | 17 + 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index a8ed3f8..517b7f8 100644 --- a/src/glsl/nir/ni

[Mesa-dev] [PATCH v2 07/10] nir: Use the nir_pass framework internally for copy_prop, dce, and cse

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 2 +- src/gallium/drivers/vc4/vc4_program.c | 2 +- src/glsl/nir/nir.h | 9 +++-- src/glsl/nir/nir_opt_copy_propagate.c | 18 +

[Mesa-dev] [PATCH v2 09/10] nir: Use the nir_pass framework internally for more passes

2015-11-03 Thread Jason Ekstrand
In particular, this commit adds it for: - nir_opt_constant_folding - nir_opt_dead_cf - nor_opt_peephole_select - nir_opt_remove_phis - nir_opt_undef Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.h | 14 +- src/glsl/nir/nir_opt_constant_folding.c | 22 +

[Mesa-dev] [PATCH v2 01/10] nir: Move nir_metadata.c to nir_pass.c

2015-11-03 Thread Jason Ekstrand
We're about to put more pass management stuff in here so it needs a better name. Reviewed-by: Kristian Høgsberg --- src/glsl/Makefile.sources | 2 +- src/glsl/nir/nir_metadata.c | 54 - src/glsl/nir/nir_pass.c | 54 ++

[Mesa-dev] [PATCH v2 03/10] nir: Unexpose _impl versions of copy_prop and dce

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.h| 2 -- src/glsl/nir/nir_opt_copy_propagate.c | 2 +- src/glsl/nir/nir_opt_dce.c| 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 1d3e281..f2d01e

Re: [Mesa-dev] [PATCH 7/8] nir: Properly invalidate metadata in nir_opt_remove_phis().

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Tue, Nov 3, 2015 at 12:19 PM, Eduardo Lima Mitev wrote: > On 11/03/2015 09:31 AM, Kenneth Graunke wrote: >> Signed-off-by: Kenneth Graunke >> --- >> src/glsl/nir/nir_opt_remove_phis.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/src/glsl/nir/n

Re: [Mesa-dev] [PATCH 6/8] nir: Properly invalidate metadata in nir_lower_vec_to_movs().

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Tue, Nov 3, 2015 at 12:31 AM, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > src/glsl/nir/nir_lower_vec_to_movs.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/glsl/nir/nir_lower_vec_to_movs.c > b/src/glsl/nir/nir_lower_vec_t

Re: [Mesa-dev] [PATCH 4/8] nir: Properly invalidate metadata in nir_remove_dead_variables().

2015-11-03 Thread Jason Ekstrand
On Tue, Nov 3, 2015 at 12:31 AM, Kenneth Graunke wrote: > We can't preserve dominance or live variable information. > > This also begs the question: what about globals? Metadata only exists > at the nir_function_impl level, so it would seem there is no metadata > about global variables for us to

Re: [Mesa-dev] [PATCH 3/8] nir: Properly invalidate metadata in nir_split_var_copies().

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Tue, Nov 3, 2015 at 12:31 AM, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > src/glsl/nir/nir_split_var_copies.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/glsl/nir/nir_split_var_copies.c > b/src/glsl/nir/nir_split_var_cop

Re: [Mesa-dev] [PATCH 2/8] nir: Properly invalidate metadata in nir_lower_global_vars_to_local().

2015-11-03 Thread Jason Ekstrand
On Tue, Nov 3, 2015 at 12:31 AM, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > src/glsl/nir/nir_lower_global_vars_to_local.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/glsl/nir/nir_lower_global_vars_to_local.c > b/src/glsl/nir/nir_lower_global_vars_to_local

Re: [Mesa-dev] [PATCH 5/8] nir: Properly invalidate metadata in nir_opt_copy_prop().

2015-11-03 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Tue, Nov 3, 2015 at 12:31 AM, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > src/glsl/nir/nir_opt_copy_propagate.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/glsl/nir/nir_opt_copy_propagate.c > b/src/glsl/nir/nir_opt_copy

[Mesa-dev] [RFC 5/5] i965/vec4: Plumb separate surfaces and samplers through from NIR

2015-11-03 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_vec4.h | 4 +++- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 27 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 12 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [RFC 4/5] i965/vec4: Separate the sampler from the surface in generate_tex

2015-11-03 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index 8bc21df..6155274 100644 --- a/src/mesa/drivers/dri

[Mesa-dev] [RFC 3/5] i965/fs: Plumb separate surfaces and samplers through from NIR

2015-11-03 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs.cpp| 47 +++-- src/mesa/drivers/dri/i965/brw_fs.h | 4 ++- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp

[Mesa-dev] [RFC 0/5] nir: Separate Textures and Samplers

2015-11-03 Thread Jason Ekstrand
Separate textures and samplers are something that a lot of hardware supports. Our hardware in particular has done this ever since the original i965 chips. Part of this is because DX has made it a requirement for some time now. GL allows you to expose it sort-of but weasel-words it enough that yo

[Mesa-dev] [RFC 2/5] i965/fs: Separate the sampler from the surface in generate_tex

2015-11-03 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 20 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 8058b34..b06a069 10064

[Mesa-dev] [RFC 1/5] nir: Separate texture from sampler in nir_tex_instr

2015-11-03 Thread Jason Ekstrand
This commit adds the capability to NIR to support separate textures and samplers. As it currently stands, glsl_to_nir only sets the sampler and leaves the texture alone as it did before and nir_lower_samplers assumes this. However, backends can, if they wish, assume that they are separate because

Re: [Mesa-dev] [PATCH 5/9] i965: Combine assembly annotations if possible.

2015-11-03 Thread Matt Turner
On Mon, Oct 26, 2015 at 5:08 AM, Pohjolainen, Topi wrote: > On Wed, Oct 21, 2015 at 03:58:13PM -0700, Matt Turner wrote: >> Often annotations are identical between sets of consecutive >> instructions. We can perhaps avoid some memory allocations by reusing >> the previous annotation. >> --- >> sr

Re: [Mesa-dev] [PATCH v2 1/2] nvc0: handle NULL pointer in nvc0_get_compute_param()

2015-11-03 Thread Ilia Mirkin
Series is: Reviewed-by: Ilia Mirkin On Tue, Nov 3, 2015 at 4:04 PM, Samuel Pitoiset wrote: > To get the size (in bytes) of a compute parameter, clover first calls > get_compute_param() with a NULL data pointer. The RET() macro is based > on nv50. > > Changes since v2: > - get rid of ul suffixes

Re: [Mesa-dev] [PATCH] i965/vec4: Send from GRF in atomic operations.

2015-11-03 Thread Kenneth Graunke
On Saturday, October 31, 2015 02:22:47 PM Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 30 > +++--- > 1 file changed, 18 insertions(+), 12 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp > b/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH v2 1/2] nvc0: handle NULL pointer in nvc0_get_compute_param()

2015-11-03 Thread Samuel Pitoiset
To get the size (in bytes) of a compute parameter, clover first calls get_compute_param() with a NULL data pointer. The RET() macro is based on nv50. Changes since v2: - get rid of ul suffixes when they are unnecessary Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_scr

[Mesa-dev] [PATCH v2 2/2] nvc0: add missing compute parameters required by clover

2015-11-03 Thread Samuel Pitoiset
This fixes crashes with some piglit OpenCL tests. Changes since v2: - get rid of ul suffixes when they are unnecessary Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/dr

Re: [Mesa-dev] [PATCH 20/24] Revert "i965: Have brw_imm_vf4() take the vector components as integer values."

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 5:16 AM, Francisco Jerez wrote: > Matt Turner writes: > >> This reverts commit bbf8239f92ecd79431dfa41402e1c85318e7267f. >> >> I didn't like that commit to begin with -- computing things at compile >> time is fine -- but for purposes of verifying that the resulting values >

Re: [Mesa-dev] [PATCH 4/8] nir: Properly invalidate metadata in nir_remove_dead_variables().

2015-11-03 Thread Eduardo Lima Mitev
On 11/03/2015 09:31 AM, Kenneth Graunke wrote: > We can't preserve dominance or live variable information. > > This also begs the question: what about globals? Metadata only exists > at the nir_function_impl level, so it would seem there is no metadata > about global variables for us to invalidat

Re: [Mesa-dev] [PATCH 7/8] nir: Properly invalidate metadata in nir_opt_remove_phis().

2015-11-03 Thread Eduardo Lima Mitev
On 11/03/2015 09:31 AM, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > src/glsl/nir/nir_opt_remove_phis.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/glsl/nir/nir_opt_remove_phis.c > b/src/glsl/nir/nir_opt_remove_phis.c > index 5bdf7ef..66d3754 100644 > --

Re: [Mesa-dev] [PATCH 04/24] i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 12:13 PM, Matt Turner wrote: > On Tue, Nov 3, 2015 at 12:09 PM, Ilia Mirkin wrote: >> On Tue, Nov 3, 2015 at 3:00 PM, Matt Turner wrote: >>> On Tue, Nov 3, 2015 at 5:48 AM, Francisco Jerez >>> wrote: Matt Turner writes: > Generated by > >sed -i

Re: [Mesa-dev] [PATCH 04/24] i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 12:09 PM, Ilia Mirkin wrote: > On Tue, Nov 3, 2015 at 3:00 PM, Matt Turner wrote: >> On Tue, Nov 3, 2015 at 5:48 AM, Francisco Jerez >> wrote: >>> Matt Turner writes: >>> Generated by sed -i -e 's/\.bits\././g' *.c *.h *.cpp sed -i -e 's/dw1\.//

Re: [Mesa-dev] [PATCH 04/24] i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

2015-11-03 Thread Ilia Mirkin
On Tue, Nov 3, 2015 at 3:00 PM, Matt Turner wrote: > On Tue, Nov 3, 2015 at 5:48 AM, Francisco Jerez wrote: >> Matt Turner writes: >> >>> Generated by >>> >>>sed -i -e 's/\.bits\././g' *.c *.h *.cpp >>>sed -i -e 's/dw1\.//g' *.c *.h *.cpp >>> >>> and then reverting changes to comments in

Re: [Mesa-dev] [PATCH 04/24] i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

2015-11-03 Thread Matt Turner
On Tue, Nov 3, 2015 at 5:48 AM, Francisco Jerez wrote: > Matt Turner writes: > >> Generated by >> >>sed -i -e 's/\.bits\././g' *.c *.h *.cpp >>sed -i -e 's/dw1\.//g' *.c *.h *.cpp >> >> and then reverting changes to comments in gen7_blorp.cpp and >> brw_fs_generator.cpp. >> >> There wasn'

Re: [Mesa-dev] The i965 vec4 backend, exec_masks, and 64-bit types

2015-11-03 Thread Francisco Jerez
Connor Abbott writes: > Hi all, > > While working on FP64 for i965, there's an issue that I thought of > with the vec4 backend that I'm not sure how to resolve. From what I > understand, the execmask works the same way in Align16 mode as Align1 > mode, except that you only use the first 8 channel

Re: [Mesa-dev] memoryBarrier + SSBO

2015-11-03 Thread Ilia Mirkin
Ian, any comment on this? On Fri, Sep 25, 2015 at 1:32 PM, Ilia Mirkin wrote: > Hi Ian (and other spec experts), > > The ARB_ssbo spec mentions the following: > > OpenGL 4.0 (either core or compatibility profile) is required. > > ... > > Additionally, the shading language provides the mem

Re: [Mesa-dev] Avoid segfault in omx deconstructor

2015-11-03 Thread Christian König
The subject line should have something like "st/omx: ...". Apart from that the patch is Reviewed-by: Christian König Regards, Christian. On 03.11.2015 19:06, StDenis, Tom wrote: Now with the correct email address ... Cheers, Tom ---

  1   2   >