Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
similarly - needs to be modified not just to always use sampler views > but use them based on if the incoming shader already uses them or not. > Which conceptually looks worse to me. But otherwise I agree this should > work. > > Roland > > > Am 10.06.2015 um 20:30 schrieb

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
texture instructions. This will move us further away > from adopting SVIEW, but I don't see that happening for OpenGL anyway. > > Marek > > On Wed, Jun 10, 2015 at 8:59 PM, Rob Clark wrote: >> So, afaiu, everything that might insert a sampler is using >> tgsi_transf

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
ve to plumb that through tgsi and tgsi_to_nir.. BR, -R > > Jose > > > > On 10/06/15 21:07, Rob Clark wrote: >> >> that is starting to look more attractive, mostly just because >> tgsi_transform stuff is so cumbersome.. >> >> (I did start thinking about

Re: [Mesa-dev] Request for Mentorship

2015-06-10 Thread Rob Clark
On Wed, Jun 10, 2015 at 7:28 PM, Emil Velikov wrote: > On 5 June 2015 at 22:08, Rob Clark wrote: >> so, maybe a bit off topic (and maybe doesn't really help with the >> whole finding a mentor thing).. but a sort of wish-list thing for >> piglit that I've had in t

[Mesa-dev] [PATCH 4/7] util/pstipple: updates for SVIEW decls

2015-06-10 Thread Rob Clark
From: Rob Clark To allow for shaders which use SVIEW decls for TEX* instructions, we need to preserve the constraint that the shader either has no SVIEW's or it has one matching SVIEW for each SAMP. Signed-off-by: Rob Clark --- src/gallium/auxiliary/util/u_pstipple.c

[Mesa-dev] [PATCH 3/7] draw: updates to support SVIEW decls

2015-06-10 Thread Rob Clark
From: Rob Clark To allow for shaders which use SVIEW decls for TEX* instructions, we need to preserve the constraint that the shader either has no SVIEW's or it has one matching SVIEW for each SAMP. Signed-off-by: Rob Clark --- src/gallium/auxiliary/draw/draw_pipe_aaline.c

[Mesa-dev] [PATCH 1/7] tgsi: update docs for SVIEW usage with TEX* instructions

2015-06-10 Thread Rob Clark
From: Rob Clark Based on mailing list discussion here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html Signed-off-by: Rob Clark --- src/gallium/docs/source/tgsi.rst | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/docs/source/tgsi.rst b

[Mesa-dev] [PATCH 7/7] gallium/ttn: add texture-type support

2015-06-10 Thread Rob Clark
From: Rob Clark v2: rebased on using SVIEW to hold type information Signed-off-by: Rob Clark --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 44 - 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium

[Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-10 Thread Rob Clark
From: Rob Clark Some hardware needs to know the sampler type. Update the blit related shaders to include SVIEW decl. Signed-off-by: Rob Clark --- Possibly I should have refactored the existing code to pass around a return_type rather than doing the is_uint/is_sint thing everywhere. And this

[Mesa-dev] [PATCH 6/7] glsl_to_tgsi: add SVIEW decl support

2015-06-10 Thread Rob Clark
From: Rob Clark Freedreno needs sampler type information to deal with int/uint textures. To accomplish this, start creating sampler-view declarations, as suggested here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html create a sampler-view with index matching the

[Mesa-dev] [PATCH 2/7] tgsi/transform: add support for SVIEW decls

2015-06-10 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/auxiliary/tgsi/tgsi_transform.h | 24 1 file changed, 24 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h index 921aa906..e7de49e 100644 --- a

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Rob Clark
her u_simple_shader) is actually creating separate samplers for depth+stencil. So I don't *think* we use _is_pure_uint/sint() on zs formats.. Currently I'm always treating stencil SVIEW as uint and depth SVIEW as float (since at least from u_format.csv this seemed to be the case..) BR, -R

[Mesa-dev] [PATCH 4/7] util/pstipple: updates for SVIEW decls

2015-06-11 Thread Rob Clark
From: Rob Clark To allow for shaders which use SVIEW decls for TEX* instructions, we need to preserve the constraint that the shader either has no SVIEW's or it has one matching SVIEW for each SAMP. Signed-off-by: Rob Clark Reviewed-by: Roland Scheidegger --- src/gallium/auxiliary

[Mesa-dev] [PATCH 1/7] tgsi: update docs for SVIEW usage with TEX* instructions

2015-06-11 Thread Rob Clark
From: Rob Clark Based on mailing list discussion here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html Signed-off-by: Rob Clark Reviewed-by: Roland Scheidegger --- src/gallium/docs/source/tgsi.rst | 12 1 file changed, 12 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 2/7] tgsi/transform: add support for SVIEW decls

2015-06-11 Thread Rob Clark
From: Rob Clark TODO single return_type (use enum) v2: single return_type arg, and use enum Signed-off-by: Rob Clark Reviewed-by: Roland Scheidegger --- src/gallium/auxiliary/tgsi/tgsi_transform.h | 21 + 1 file changed, 21 insertions(+) diff --git a/src/gallium

[Mesa-dev] [PATCH 6/7] glsl_to_tgsi: add SVIEW decl support

2015-06-11 Thread Rob Clark
From: Rob Clark Freedreno needs sampler type information to deal with int/uint textures. To accomplish this, start creating sampler-view declarations, as suggested here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html create a sampler-view with index matching the

[Mesa-dev] [PATCH 7/7] gallium/ttn: add texture-type support

2015-06-11 Thread Rob Clark
From: Rob Clark v2: rebased on using SVIEW to hold type information Signed-off-by: Rob Clark Reviewed-by: Eric Anholt --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 44 - 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir

[Mesa-dev] [PATCH 3/7] draw: updates to support SVIEW decls

2015-06-11 Thread Rob Clark
From: Rob Clark To allow for shaders which use SVIEW decls for TEX* instructions, we need to preserve the constraint that the shader either has no SVIEW's or it has one matching SVIEW for each SAMP. Signed-off-by: Rob Clark Reviewed-by: Roland Scheidegger --- src/gallium/auxiliary

[Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Rob Clark
From: Rob Clark Some hardware needs to know the sampler type. Update the blit related shaders to include SVIEW decl. Signed-off-by: Rob Clark --- src/gallium/auxiliary/util/u_blit.c | 35 +--- src/gallium/auxiliary/util/u_blitter.c| 53 +- src

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Rob Clark
On Thu, Jun 11, 2015 at 4:51 PM, Roland Scheidegger wrote: > Am 11.06.2015 um 22:38 schrieb Rob Clark: >> From: Rob Clark >> >> Some hardware needs to know the sampler type. Update the blit related >> shaders to include SVIEW decl. >> >> Signed-of

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Rob Clark
On Thu, Jun 11, 2015 at 5:47 PM, Brian Paul wrote: > On 06/11/2015 02:38 PM, Rob Clark wrote: >> >> From: Rob Clark >> >> Some hardware needs to know the sampler type. Update the blit related >> shaders to include SVIEW decl. >> >> Signed-off-by:

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-12 Thread Rob Clark
On Thu, Jun 11, 2015 at 8:36 PM, Roland Scheidegger wrote: > Am 12.06.2015 um 02:02 schrieb Rob Clark: >> On Thu, Jun 11, 2015 at 5:47 PM, Brian Paul wrote: >>> On 06/11/2015 02:38 PM, Rob Clark wrote: >>>> >>>> From: Rob Clark >>>> >>

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-12 Thread Rob Clark
On Fri, Jun 12, 2015 at 9:47 AM, Rob Clark wrote: > On Thu, Jun 11, 2015 at 8:36 PM, Roland Scheidegger > wrote: >> Am 12.06.2015 um 02:02 schrieb Rob Clark: >>> On Thu, Jun 11, 2015 at 5:47 PM, Brian Paul wrote: >>>> On 06/11/2015 02:38 PM, Rob Clark w

[Mesa-dev] [RFC shader-db] Add support for shadertoy tests

2015-06-16 Thread Rob Clark
Attached script grabs shaders from shadertoy, and dumps them out as .shader_test files which can be run through shader-db for compiler testing. shadertoy only gives you a fragment shader (which works based on gl_FragCoord), so a generic vertex shader is used. And a blurb is inserted for the pre-d

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-17 Thread Rob Clark
, maybe I'll just move the helpers into ir3 for now until the is_packed stuff is purged.. BR, -R > > On Mon, Jun 8, 2015 at 12:45 PM, Rob Clark wrote: >> From: Rob Clark >> >> I need something like this in a couple places. And didn't see anything >> lik

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-18 Thread Rob Clark
On Thu, Jun 18, 2015 at 1:23 AM, Connor Abbott wrote: > On Wed, Jun 17, 2015 at 12:02 PM, Rob Clark wrote: >> On Wed, Jun 17, 2015 at 2:27 PM, Connor Abbott wrote: >>> So, as is, this patch isn't quite correct. When I originally wrote >>> NIR, the idea was t

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-18 Thread Rob Clark
On Thu, Jun 18, 2015 at 11:01 AM, Connor Abbott wrote: (really I want phi's for variables too.. the way I turn arrays into fanin/collect fanout/split works on the backend for dealing with arrays in ssa form (other than making instruction graph large) but the way I go from nir

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-18 Thread Rob Clark
On Thu, Jun 18, 2015 at 12:42 PM, Rob Clark wrote: > On Thu, Jun 18, 2015 at 11:01 AM, Connor Abbott wrote: >>>>> (really I want phi's for variables too.. the way I turn arrays into >>>>> fanin/collect fanout/split works on the backend for dealing wit

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-18 Thread Rob Clark
On Thu, Jun 18, 2015 at 1:27 PM, Connor Abbott wrote: > On Thu, Jun 18, 2015 at 9:42 AM, Rob Clark wrote: >> On Thu, Jun 18, 2015 at 11:01 AM, Connor Abbott wrote: >>>>>> (really I want phi's for variables too.. the way I turn arrays into >>>>>&g

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-18 Thread Rob Clark
On Thu, Jun 18, 2015 at 2:34 PM, Connor Abbott wrote: > On Thu, Jun 18, 2015 at 11:19 AM, Rob Clark wrote: >> On Thu, Jun 18, 2015 at 1:27 PM, Connor Abbott wrote: >>> On Thu, Jun 18, 2015 at 9:42 AM, Rob Clark wrote: >>>> On Thu, Jun 18, 2015 at 11:01

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-19 Thread Rob Clark
On Fri, Jun 19, 2015 at 6:21 PM, Connor Abbott wrote: > On Thu, Jun 18, 2015 at 12:04 PM, Rob Clark wrote: >> On Thu, Jun 18, 2015 at 2:34 PM, Connor Abbott wrote: >>> On Thu, Jun 18, 2015 at 11:19 AM, Rob Clark wrote: >>>> On Thu, Jun 18, 2015 at 1:27 PM, Conn

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-19 Thread Rob Clark
On Fri, Jun 19, 2015 at 6:21 PM, Connor Abbott wrote: >>> and the RA has to >>> split live-ranges of other things and deal with arrays specially too >>> in order to not introduce extra array copies. >> >> If I did spilling/rematerialization.. but I don't. > > If you force every array into a speci

Re: [Mesa-dev] [PATCH] nir: add helper to get # of src/dest components

2015-06-19 Thread Rob Clark
On Fri, Jun 19, 2015 at 6:45 PM, Connor Abbott wrote: > On Thu, Jun 18, 2015 at 12:04 PM, Rob Clark wrote: >> It is only vaguely an issue at the moment >> because the priority-queue scheduler that replaced what is on master >> does very badly with wide/shallow shaders

[Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-23 Thread Rob Clark
From: Rob Clark Ok, so actually there is a ttn issue here to fix as well.. but it brought up a question in my mind. When ttn sees something like DCL IN[0..1] it will treat that as an array (which in the end will result in constraints about where the registers get allocated. Which is not

Re: [Mesa-dev] [RFC shader-db] Add support for shadertoy tests

2015-06-23 Thread Rob Clark
if the samplers should actually be 2d/3d/cube..) That said, I think the shaderdb shaders are a fairly, umm, unique stress test of a shader compiler.. and the API to scrape shaders seems to convenient to ignore.. BR, -R > Dylan > > On Tue, Jun 16, 2015 at 03:46:50PM -0400, Rob Clark wrote:

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-24 Thread Rob Clark
; declaration. If any TGSI user doesn't understand it, that user should > be fixed. > > Marek > > On Tue, Jun 23, 2015 at 3:20 PM, Rob Clark wrote: >> From: Rob Clark >> >> Ok, so actually there is a ttn issue here to fix as well.. but it >> brought up a

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-24 Thread Rob Clark
I'm in android hell trying to get some more traces from blob :-/) BR, -R > It would be nice to enable the arrays on all drivers instead of > working around it indefinitely. > > Marek > > On Wed, Jun 24, 2015 at 1:31 PM, Rob Clark wrote: >> Ok, I *thought* we didn

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-24 Thread Rob Clark
tell where the array > declaration starts and what its semantic name is. > > Marek > > On Wed, Jun 24, 2015 at 8:35 PM, Rob Clark wrote: >> On Wed, Jun 24, 2015 at 12:31 PM, Marek Olšák wrote: >>> Yes, ArrayID != 0 means it's an array, otherwise it's just a

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-24 Thread Rob Clark
d > > > Am 25.06.2015 um 01:31 schrieb Rob Clark: >> tgsi.rst currently says: >> >> >> If no ArrayID is specified with an indirect addressing operand the whole >> register file might be accessed by this operand. This is strongly discouraged >>

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-25 Thread Rob Clark
was only written for TEMPs. I agree that TEMP > indexing doesn't necessarily need arrays to work, but INPUT and OUTPUT > indexing always needs them. > > Marek > > On Thu, Jun 25, 2015 at 1:31 AM, Rob Clark wrote: >> tgsi.rst currently says: >> >> &g

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-27 Thread Rob Clark
edesktop.org/mesa/mesa/commit/?id=b6ebe7eabf54936a02acc0968e718e0c264a73f5 > > It would be nice to enable the arrays on all drivers instead of > working around it indefinitely. > > Marek > > On Wed, Jun 24, 2015 at 1:31 PM, Rob Clark wrote: >> Ok, I *thought* we didn't

[Mesa-dev] [PATCH 5/7] gallium/ttn: don't upset nir_validate w/ BRK's

2015-06-27 Thread Rob Clark
From: Rob Clark Previously we were unconditionally doing ttn_get_src() even for instructions with no src's. Which created a lot of unnecessary load_const instructions. These were mostly harmless since NIR opt passes would strip them back out. But for an ENDIF following a BRK, it would r

[Mesa-dev] [PATCH 4/7] gallium/ttn: add TXB2

2015-06-27 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index e202ce6..1ad8c68 100644 --- a/src/gallium/auxiliary/nir

[Mesa-dev] [PATCH 7/7] nir: cleanup open-coded instruction casts

2015-06-27 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_alu_to_scalar.c | 2 +- src/glsl/nir/nir_lower_vec_to_movs.c | 2 +- src/glsl/nir/nir_search.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glsl/nir/nir_lower_alu_to_scalar.c b/src

[Mesa-dev] [PATCH 3/7] gallium/ttn: partial fix for output arrays

2015-06-27 Thread Rob Clark
From: Rob Clark It isn't quite yet practical to enable TGSI_ANY_INOUT_DECL_RANGE shader cap yet, at least not in drivers that need lower_to_scalar pass (which right now is all of the ttn users), since the register arrays do not get converted to SSA, which angers nir_lower_alu_to_scalar. S

[Mesa-dev] [PATCH 2/7] gallium/ttn: IN/OUT are only array if ArrayID != 0

2015-06-27 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 143 ++-- 1 file changed, 81 insertions(+), 62 deletions(-) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 065bbf0..a189559

[Mesa-dev] [PATCH 6/7] nir/lower_phis_to_scalar: undef is trivially scalarizable

2015-06-27 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_phis_to_scalar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/nir/nir_lower_phis_to_scalar.c b/src/glsl/nir/nir_lower_phis_to_scalar.c index a57d253..739170d 100644 --- a/src/glsl/nir

[Mesa-dev] [PATCH 0/7] smattering of tgsi/ttn/nir fixes

2015-06-27 Thread Rob Clark
From: Rob Clark Mostly ttn fixes, plus a couple small nir fixes/cleanups, and a doc patch to clairify ArrayID usage Rob Clark (7): tgsi: update docs for ArrayID usage gallium/ttn: IN/OUT are only array if ArrayID != 0 gallium/ttn: partial fix for output arrays gallium/ttn: add TXB2

[Mesa-dev] [PATCH 1/7] tgsi: update docs for ArrayID usage

2015-06-27 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/docs/source/tgsi.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 89ca172..4e869e7 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs

Re: [Mesa-dev] [RFC] gallium/hud: fix issue w/ tgsi_to_nir

2015-06-27 Thread Rob Clark
On Sat, Jun 27, 2015 at 12:57 PM, Connor Abbott wrote: > On Sat, Jun 27, 2015 at 6:48 AM, Rob Clark wrote: >> I had a quick look at enabling this for freedreno.. although looks >> like it is going to take some work in tgsi_to_nir and/or nir.. the >> problem is we end u

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

2015-06-27 Thread Rob Clark
Connor, btw, how does glsl_to_nir handle this? I guess at some point we want to try to align ttn w/ gtn (ie. cleanup the whole nir with a tgsi accent thing).. not that this would be the worst of the ttn vs gtn diff's in the current state, so it is fine if there isn't a better way to do it right n

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

2015-06-27 Thread Rob Clark
On Sat, Jun 27, 2015 at 7:47 PM, Connor Abbott wrote: > On Sat, Jun 27, 2015 at 2:54 PM, Rob Clark wrote: >> Connor, btw, how does glsl_to_nir handle this? > > The variable for gl_FragColor a special location (FRAG_RESULT_COLOR), > whereas normal outputs (i.e. gl_FragData[

[Mesa-dev] [PATCH 1/4] tgsi: update docs for ArrayID usage

2015-07-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/docs/source/tgsi.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 89ca172..4e869e7 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs

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

2015-07-01 Thread Rob Clark
From: Ilia Mirkin 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 TGSI this is done with a property. NIR doesn't have that, so encode it as a funny location and decode on the other end. Signed-off-by

[Mesa-dev] [PATCH 3/4] nir/lower_phis_to_scalar: undef is trivially scalarizable

2015-07-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_phis_to_scalar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/nir/nir_lower_phis_to_scalar.c b/src/glsl/nir/nir_lower_phis_to_scalar.c index a57d253..739170d 100644 --- a/src/glsl/nir

[Mesa-dev] [PATCH 0/4] smattering of tgsi/ttn/nir fixes (v2)

2015-07-01 Thread Rob Clark
From: Rob Clark Resend, with the patches that didn't yet get an explicit r-b (hint, hint). No real changes, although did add a bit of info to the commit msg for 2/4. Also picked up a patch from Ilia for fixing MRT. This would be solved differently after we gain some proper nir enums/de

[Mesa-dev] [PATCH 2/4] gallium/ttn: IN/OUT are only array if ArrayID != 0

2015-07-01 Thread Rob Clark
From: Rob Clark Fixes issue with gallium HUD. See this thread for details: http://lists.freedesktop.org/archives/mesa-dev/2015-June/087140.html Signed-off-by: Rob Clark --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 143 ++-- 1 file changed, 81 insertions(+), 62

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 wrote: > Rob Clark writes: > >> From: Ilia Mirkin >> >> 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 TG

[Mesa-dev] [PATCH] xa: don't leak fences

2015-07-08 Thread Rob Clark
From: Rob Clark XA was never unref'ing last_fence in the various call paths to pipe->flush(). Add this to xa_context_flush() and update the other open-coded calls to pipe->flush() to use xa_context_flush() instead. This fixes a memory leak reported with xf86-video-freedreno.

[Mesa-dev] [PATCH 1/4] gallium: clarify reference counting for fence

2015-07-08 Thread Rob Clark
From: Rob Clark No where was it spelled out that the state tracker may expect the pipe driver to unref the old fence. Signed-off-by: Rob Clark --- src/gallium/include/pipe/p_context.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/include/pipe

[Mesa-dev] [PATCH 4/4] vc4: unref old fence

2015-07-08 Thread Rob Clark
From: Rob Clark Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark --- src/gallium/drivers/vc4/vc4_context.c

[Mesa-dev] [PATCH 0/4] fence refcnting fixes

2015-07-08 Thread Rob Clark
From: Rob Clark This isn't at all clear for pipe driver writers currently, since it is not documented anywhere. But radeon/nouveau/llvmpipe seem to drop the ref on the **fence passed in to pipe->flush() (if *fence!=NULL). Freedreno/ilo/vc4 where not doing this. Some state trackers

[Mesa-dev] [PATCH 2/4] freedreno: unref old fence

2015-07-08 Thread Rob Clark
From: Rob Clark Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark --- src/gallium/drivers/freedr

[Mesa-dev] [PATCH 3/4] ilo: unref old fence

2015-07-08 Thread Rob Clark
From: Rob Clark Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark --- src/gallium/drivers/ilo/ilo_context.c

Re: [Mesa-dev] [PATCH 0/4] fence refcnting fixes

2015-07-08 Thread Rob Clark
.. BR, -R On Wed, Jul 8, 2015 at 4:34 PM, Rob Clark wrote: > From: Rob Clark > > This isn't at all clear for pipe driver writers currently, since it > is not documented anywhere. But radeon/nouveau/llvmpipe seem to drop > the ref on the **fence passed in to pipe->flush() (if

[Mesa-dev] [PATCH 3/4] ilo: unref old fence

2015-07-08 Thread Rob Clark
From: Rob Clark Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark --- src/gallium/drivers/ilo/ilo_context.c

[Mesa-dev] [PATCH 2/4] freedreno: unref old fence

2015-07-08 Thread Rob Clark
From: Rob Clark Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark --- src/gallium/drivers/freedr

[Mesa-dev] [PATCH 4/4] vc4: unref old fence

2015-07-08 Thread Rob Clark
From: Rob Clark Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark --- src/gallium/drivers/vc4/vc4_context.c

Re: [Mesa-dev] [PATCH 0/4] fence refcnting fixes

2015-07-09 Thread Rob Clark
On Thu, Jul 9, 2015 at 4:21 AM, Christian König wrote: > On 08.07.2015 22:34, Rob Clark wrote: >> >> From: Rob Clark >> >> This isn't at all clear for pipe driver writers currently, since it >> is not documented anywhere. But radeon/nouveau/llvmpipe seem to

Re: [Mesa-dev] [PATCH 4/4] vc4: unref old fence

2015-07-09 Thread Rob Clark
On Thu, Jul 9, 2015 at 8:36 AM, Emil Velikov wrote: > On 9 July 2015 at 01:46, Rob Clark wrote: >> From: Rob Clark >> >> Some, but not all, state trackers will explicitly unref (and set to >> NULL) the previous *fence before calling pipe->flush(). So driver >&g

[Mesa-dev] [PATCH shader-db] Add support for shadertoy tests

2015-07-09 Thread Rob Clark
Attached script grabs shaders from shadertoy, and dumps them out as .shader_test files which can be run through shader-db for compiler testing. shadertoy only gives you a fragment shader (which works based on gl_FragCoord), so a generic vertex shader is used. And a blurb is inserted for the pre-d

Re: [Mesa-dev] [PATCH] xa: don't leak fences

2015-07-10 Thread Rob Clark
but I don't think we are quite at the point where we can remove it. BR, -R On Fri, Jul 10, 2015 at 7:12 AM, Marek Olšák wrote: > I wonder... do we still need XA considering that everybody can just > use glamor instead? > > Marek > > > On Wed, Jul 8, 2015 at 7:39 PM, Rob

Re: [Mesa-dev] [PATCH] xa: don't leak fences

2015-07-10 Thread Rob Clark
On Fri, Jul 10, 2015 at 6:20 PM, Eric Anholt wrote: > Rob Clark writes: > >> well, freedreno and vmware ddx still use XA.. they both could probably >> be ported to use glamor instead, but that hasn't been done yet.. >> >> At least for freedreno with upstre

[Mesa-dev] [PATCH] xa: add xa_surface_from_handle2

2015-07-21 Thread Rob Clark
From: Rob Clark Like xa_surface_from_handle(), but takes a handle type, rather than hard-coding 'shared' handle. This is needed to fix bugs seen with xf86-video-freedreno with xrandr rotation, for example. The root issue is that doing a GEM_OPEN ioctl on a bo that already has a

Re: [Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

2015-10-12 Thread Rob Clark
On Mon, Oct 12, 2015 at 12:47 AM, Jason Ekstrand wrote: >> > +/** >> > + * Convert a 2-byte half float to a 4-byte float. >> > + * Based on code from: >> > + * http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/008786.html >> > + */ >> > +static inline float >> > +_mesa_half_to_float(GLhalfAR

Re: [Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

2015-10-12 Thread Rob Clark
On Mon, Oct 12, 2015 at 2:22 PM, Matt Turner wrote: > On Mon, Oct 12, 2015 at 11:12 AM, Rob Clark wrote: >> On Mon, Oct 12, 2015 at 12:47 AM, Jason Ekstrand >> wrote: >>>> > +/** >>>> > + * Convert a 2-byte half float to a 4-byte float. &

Re: [Mesa-dev] [PATCH 2/6] glsl: move builtin types to glsl_types.cpp

2015-10-12 Thread Rob Clark
the commit msg[1] (but I assume no point to resend to list just for that) [1] https://github.com/freedreno/mesa/commits/wip-nir-no-glsl BR, -R > On Oct 10, 2015 11:48 AM, "Rob Clark" wrote: >> >> From: Rob Clark >> >> First step at untangling NIR's

[Mesa-dev] [PATCH] glsl: move half<->float convertion to util

2015-10-12 Thread Rob Clark
From: Rob Clark Needed in NIR too, so move out of mesa/main/imports.c Signed-off-by: Rob Clark --- src/glsl/Makefile.am | 1 + src/glsl/ir_constant_expression.cpp | 1 + src/glsl/nir/nir_constant_expressions.py | 1 + src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

2015-10-12 Thread Rob Clark
On Mon, Oct 12, 2015 at 3:41 PM, Roland Scheidegger wrote: > Am 12.10.2015 um 20:33 schrieb Rob Clark: >> On Mon, Oct 12, 2015 at 2:22 PM, Matt Turner wrote: >>> On Mon, Oct 12, 2015 at 11:12 AM, Rob Clark wrote: >>>> On Mon, Oct 12, 2015 at 12:47 A

Re: [Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

2015-10-12 Thread Rob Clark
On Mon, Oct 12, 2015 at 6:07 PM, Roland Scheidegger wrote: > Am 12.10.2015 um 22:37 schrieb Rob Clark: >> On Mon, Oct 12, 2015 at 3:41 PM, Roland Scheidegger >> wrote: >>> Am 12.10.2015 um 20:33 schrieb Rob Clark: >>>> On Mon, Oct 12, 2015 at 2:22 PM, Matt

Re: [Mesa-dev] [PATCH 03/17] mesa: Move gl_frag_depth_layout from mtypes.h to shader_enums.h

2015-10-12 Thread Rob Clark
and bonus points for adding a gl_frag_depth_layout_name() ;-) On Fri, Oct 9, 2015 at 5:04 AM, Michael Schellenberger Costa wrote: > Hi, > > as this conflicts directly with Robs patch > http://lists.freedesktop.org/archives/mesa-dev/2015-October/096670.html > you might want to update it > > Michae

Re: [Mesa-dev] [PATCH 5/6] nir: remove dependency on glsl

2015-10-13 Thread Rob Clark
On Tue, Oct 13, 2015 at 11:22 AM, Emil Velikov wrote: > Hi Rob, > > On 10 October 2015 at 19:47, Rob Clark wrote: >> From: Rob Clark >> >> Move glsl_types into NIR, now that the dependency on glsl_symbol_table >> has been split out. >> >> Possibly ma

[Mesa-dev] [PATCH] gallium/util: fix debug_get_flags_option on 32-bit harder

2015-10-15 Thread Rob Clark
From: Rob Clark I noticed the FD_MESA_DEBUG=help numeric flags output was looking kinda funny. Signed-off-by: Rob Clark --- src/gallium/auxiliary/util/u_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium

Re: [Mesa-dev] [PATCH 5/6] nir: remove dependency on glsl

2015-10-15 Thread Rob Clark
On Tue, Oct 13, 2015 at 12:15 PM, Emil Velikov wrote: > On 13 October 2015 at 16:37, Rob Clark wrote: >> On Tue, Oct 13, 2015 at 11:22 AM, Emil Velikov >> wrote: >>> Hi Rob, >>> >>> On 10 October 2015 at 19:47, Rob Clark wrote: >>>> Fr

Re: [Mesa-dev] [RFC 1/2] gallium: add renderonly driver

2015-10-15 Thread Rob Clark
On Thu, Oct 15, 2015 at 7:09 PM, Emil Velikov wrote: > Hi Christian, > > I'm glad to see Thierry's work revived. Hopefully this will soon be > the basis of many more drivers. > > On 11 October 2015 at 16:09, Christian Gmeiner > wrote: >> This commit adds a generic renderonly driver library, which

Re: [Mesa-dev] MSVC, MinGW build break

2015-10-17 Thread Rob Clark
On Fri, Oct 16, 2015 at 11:11 PM, Brian Paul wrote: > Hi Rob, > > Your recent commit "nir: remove dependency on glsl" broke the build for MSVC > and MinGW. > > For MSVC: > > [...] > Linking build\windows-x86-debug\gallium\tests\graw\occlusion-query.exe ... > Linking build\windows-x86-debug\gal

Re: [Mesa-dev] MSVC, MinGW build break

2015-10-17 Thread Rob Clark
On Sat, Oct 17, 2015 at 12:07 PM, Brian Paul wrote: > On 10/17/2015 07:04 AM, Rob Clark wrote: >> >> On Fri, Oct 16, 2015 at 11:11 PM, Brian Paul wrote: >>> >>> Hi Rob, >>> >>> Your recent commit "nir: remove dependency on glsl"

Re: [Mesa-dev] MSVC, MinGW build break

2015-10-17 Thread Rob Clark
On Sat, Oct 17, 2015 at 12:17 PM, Brian Paul wrote: > On 10/17/2015 10:13 AM, Rob Clark wrote: >> >> On Sat, Oct 17, 2015 at 12:07 PM, Brian Paul wrote: >>> >>> On 10/17/2015 07:04 AM, Rob Clark wrote: >>>> >>>> >>>> On Fri,

Re: [Mesa-dev] MSVC, MinGW build break

2015-10-17 Thread Rob Clark
On Sat, Oct 17, 2015 at 12:36 PM, Brian Paul wrote: > On 10/17/2015 10:07 AM, Brian Paul wrote: >> >> On 10/17/2015 07:04 AM, Rob Clark wrote: >>> >>> On Fri, Oct 16, 2015 at 11:11 PM, Brian Paul wrote: >>>> >>>> Hi Rob, >>>&g

Re: [Mesa-dev] MSVC, MinGW build break

2015-10-19 Thread Rob Clark
On Mon, Oct 19, 2015 at 10:02 AM, Jose Fonseca wrote: > On 17/10/15 17:44, Rob Clark wrote: >> >> On Sat, Oct 17, 2015 at 12:36 PM, Brian Paul wrote: >>> >>> On 10/17/2015 10:07 AM, Brian Paul wrote: >>>> >>>> >>>> On 10/17/2

[Mesa-dev] [RFCv0 3/8] gallium: add NIR as a possible IR

2015-10-19 Thread Rob Clark
--- src/gallium/include/pipe/p_defines.h | 1 + src/gallium/include/pipe/p_state.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 29b0bfb..0dbc54c 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src

[Mesa-dev] [RFCv0 2/8] gallium: refactor pipe_shader_state to support multiple IR's

2015-10-19 Thread Rob Clark
The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some cases we should be able to skip the TGSI

[Mesa-dev] [RFCv0 8/8] freedreno/ir3: hack for mismatch on varying slots for glsl->tgsi->nir vs glsl->nir

2015-10-19 Thread Rob Clark
Complete hack just for debugging. It isn't intended that mixing and matching glsl->tgsi->nir vs glsl->nir between shader stages should actually work. --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/freedreno/ir

[Mesa-dev] [RFCv0 6/8] freedreno/ir3: add support for NIR as preferred IR

2015-10-19 Thread Rob Clark
For now under debug flag, since only suitable for debugging/testing. --- src/gallium/drivers/freedreno/freedreno_screen.c | 5 +++- src/gallium/drivers/freedreno/freedreno_util.h | 1 + .../drivers/freedreno/ir3/ir3_compiler_nir.c | 15 ++- src/gallium/drivers/freedreno/ir3/i

[Mesa-dev] [PATCH 1/8] nir: add nir_var_all enum

2015-10-19 Thread Rob Clark
Otherwise, passing -1 gets you: error: invalid conversion from 'int' to 'nir_variable_mode' [-fpermissive] Signed-off-by: Rob Clark --- src/glsl/nir/nir.c | 4 src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_lower_io.c | 2 +-

[Mesa-dev] [RFCv0 7/8] freedreno/ir3: fix const_index handling for uniforms

2015-10-19 Thread Rob Clark
When coming directly from glsl_to_nir (rather than via TGSI where information about, for example, mat4's is lost), both const_index fields will be used (vs. tgsi_to_nir where the 2nd is always zero). For example: decl_var uniform INTERP_QUALIFIER_NONE mat4 ModelViewProjectionMatrix (0, 0) dec

[Mesa-dev] [RFCv0 5/8] freedreno/ir3: drop tokens arg

2015-10-19 Thread Rob Clark
We can get the tokens from variant->shader so drop the extra arg. This will make things easier to support either getting TGSI or NIR as input. --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gallium/dr

[Mesa-dev] [RFCv0 4/8] mesa/st: add support for NIR as possible driver IR

2015-10-19 Thread Rob Clark
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 223 - src/mesa/state_tracker/st_program.c| 43 +- 2 files changed, 260 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp ind

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Rob Clark
On Mon, Oct 19, 2015 at 3:51 PM, Ilia Mirkin wrote: > On Mon, Oct 19, 2015 at 3:47 PM, Rob Clark wrote: >> Also, there is some trivial shader variant handling in mesa st which >> would have to be ported to NIR. Or, perhaps, just somehow expose the >> shader key to the dri

[Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Rob Clark
From: Rob Clark (grr, resend to the right list..) Still quite rough around the edges, but now it's at the point of sorta- kinda-working-sometimes. So I guess time to get wider feedback. The initial goal is to figure out things that glsl_to_nir does differently from tgsi_to_nir, so we ca

  1   2   3   4   5   6   7   8   9   10   >