[Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-21 Thread Bryan Cain
This is a port of 4da54c91d24da ("nvc0: implement multisample textures") to nv50. When coupled with the patch to only report 16 texture samplers (to fix crashes), all of the Piglit tests in spec/arb_texture_multisample pass. --- .../nouveau/codegen/nv50_ir_lowering_nv50.cpp |5 ++- src/g

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Bryan Cain
On 10/25/2013 01:35 PM, Emil Velikov wrote: > On 21/10/13 23:23, Bryan Cain wrote: >> This is a port of 4da54c91d24da ("nvc0: implement multisample textures") to >> nv50. >> >> When coupled with the patch to only report 16 texture samplers (to fix >>

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Bryan Cain
On 10/25/2013 04:11 PM, Christoph Bumiller wrote: > On 25.10.2013 20:35, Emil Velikov wrote: >> On 21/10/13 23:23, Bryan Cain wrote: >>> This is a port of 4da54c91d24da ("nvc0: implement multisample textures") to >>> nv50. >>> >>> When couple

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Bryan Cain
On 10/25/2013 05:05 PM, Christoph Bumiller wrote: > On 25.10.2013 23:51, Bryan Cain wrote: >> On 10/25/2013 04:11 PM, Christoph Bumiller wrote: >>> On 25.10.2013 20:35, Emil Velikov wrote: >>>> On 21/10/13 23:23, Bryan Cain wrote: >>>>> This is a port o

Re: [Mesa-dev] [PATCH 06/34] draw/gs: fix allocation of buffer for GS output vertices

2013-07-30 Thread Bryan Cain
d it should be safe to leave this patch unmerged. If any problems come up as a result, they can be addressed then. > >> >> >> - Original Message - >> > From: Bryan Cain >> > >> > Before, it accounted for the size of the vertices but not the o

[Mesa-dev] Geometry shader support for nv50

2013-04-17 Thread Bryan Cain
The following patch set makes the necessary changes to support geometry shaders in the nv50 driver. There are no piglit tests yet for geometry shader corner cases yet, so these changes were tested with all of the GS demos in mesa/demos and several corner case tests, using Paul Berry's "gs" branch

[Mesa-dev] [PATCH 1/3] nv50/ir: fix PFETCH and add RDSV to get VSTRIDE for GPs

2013-04-17 Thread Bryan Cain
From: Christoph Bumiller v2 (Bryan Cain ): Fix emission of PFETCH instructions using the SHL form. --- src/gallium/drivers/nv50/codegen/nv50_ir.h |1 + .../drivers/nv50/codegen/nv50_ir_emit_nv50.cpp | 62 ++-- src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp

[Mesa-dev] [PATCH 2/3] nv50/ir: delay calculation of indirect addresses

2013-04-17 Thread Bryan Cain
Instead of emitting an SHL 4 io an address register on the TGSI ARL and UARL instructions, emit the shift when the loaded address is actually used. This is necessary because input vertex and attribute indices in geometry shaders on nv50 need to be shifted left by 2 instead of 4. --- .../drivers/n

[Mesa-dev] [PATCH 3/3] nv50: add support for geometry shaders

2013-04-17 Thread Bryan Cain
Layer output probably doesn't work yet, but other than that everything seems to be working. --- .../drivers/nv50/codegen/nv50_ir_emit_nv50.cpp | 25 +++- src/gallium/drivers/nv50/nv50_program.c| 17 + src/gallium/drivers/nv50/nv50_shader_state.c

[Mesa-dev] [PATCH] glsl_to_tgsi: remove unnecessary dead code elimination pass

2014-05-05 Thread Bryan Cain
With the more advanced dead code elimination pass already being run, eliminate_dead_code was making no difference in instruction count, and had an undesirable O(n^2) runtime. So remove it and rename eliminate_dead_code_advanced to eliminate_dead_code. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp

Re: [Mesa-dev] [PATCH] mesa/st: Don't copy propagate from swizzles.

2013-04-24 Thread Bryan Cain
On 04/20/2013 12:40 PM, Fabian Bieler wrote: > Do not propagate a copy if source and destination are identical. > > Otherwise code like > > MOV TEMP[0].xyzw, TEMP[0].wzyx > mov TEMP[1].xyzw, TEMP[0].xyzw > > is changed to > > MOV TEMP[0].xyzw, TEMP[0].wzyx > mov TEMP[1].xyzw, TEMP[0].wzyx > --- >

[Mesa-dev] [PATCH] nouveau: emit and flush fence in fence_signalled if needed

2013-05-07 Thread Bryan Cain
The Mesa state tracker expects us to emit the fence even if it doesn't call fence_finish. Notably, this occurs when glClientWaitSync is called with timeout 0. Fixes Portal and Left 4 Dead 2, which were both stalling on startup by repeatedly calling glClientWaitSync with timeout 0 while waiting fo

Re: [Mesa-dev] [PATCH] gallium/tgsi: clarify (possibly change) TGSI_OPCODE_UCMP definition

2013-05-08 Thread Bryan Cain
On 05/08/2013 03:26 PM, Roland Scheidegger wrote: > There's some other > somewhat bogus code with comments saying UCMP should be used instead of > some poor emulation with i2f instructions. Yeah, sorry about that. I wrote that code (and comment) a few days before the UCMP opcode was added to TGSI

Re: [Mesa-dev] RFC: mesa/st dynamic sampler support in tgsi

2014-08-05 Thread Bryan Cain
On Mon, Aug 4, 2014 at 11:54 PM, Ilia Mirkin wrote: > Another apporach I've tried is to just use a TEMP register as the > indirect offset here. Unfortunately this gets destroyed by > st_glsl_to_tgsi's various optimizations which assume that temp > registers can't be reladdr's and so messes up the

Re: [Mesa-dev] RFC: mesa/st dynamic sampler support in tgsi

2014-08-05 Thread Bryan Cain
On Tue, Aug 5, 2014 at 3:23 PM, Ilia Mirkin wrote: > On Tue, Aug 5, 2014 at 4:14 PM, Bryan Cain wrote: > > On Mon, Aug 4, 2014 at 11:54 PM, Ilia Mirkin > wrote: > >> > >> Another apporach I've tried is to just use a TEMP register as the > >> i

Re: [Mesa-dev] GS plans?

2013-01-30 Thread Bryan Cain
On 01/29/2013 12:44 PM, Paul Berry wrote: > On 29 January 2013 09:33, Ian Romanick > wrote: > > On 01/29/2013 09:02 AM, Brian Paul wrote: > > > Hi Bryan, > > Back in July you announced your work on geometry shaders: > http://lists.freedeskto

[Mesa-dev] [PATCH 0/2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
These patches add support for clip distances in the Gallium interface and the Mesa state tracker, respectively. This should take care of gl_ClipDistance, one of the few GLSL 1.30 features not yet implemented in Gallium. If this is merged, driver developers will need to add support to their driver

[Mesa-dev] [PATCH 1/2] gallium: add TGSI_SEMANTIC_CLIPDIST for clip distance

2011-12-13 Thread Bryan Cain
--- src/gallium/auxiliary/tgsi/tgsi_dump.c |3 ++- src/gallium/include/pipe/p_shader_tokens.h |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index e830aa5..bd299b0 100644 --- a/src/

[Mesa-dev] [PATCH 2/2] st/mesa: add support for gl_ClipDistance

2011-12-13 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp |1 + src/mesa/state_tracker/st_program.c| 18 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 9ef65c8..d50

[Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
This is an updated version of the patch set I sent to the list a few hours ago. There is now a TGSI property called TGSI_PROPERTY_NUM_CLIP_DISTANCES that drivers can use to determine how many of the 8 available clip distances are actually used by a shader.

[Mesa-dev] [PATCH 1/2] gallium: add support for clip distances

2011-12-13 Thread Bryan Cain
--- src/gallium/auxiliary/tgsi/tgsi_dump.c |6 -- src/gallium/auxiliary/tgsi/tgsi_text.c |3 ++- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 14 ++ src/gallium/auxiliary/tgsi/tgsi_ureg.h |3 +++ src/gallium/include/pipe/p_shader_tokens.h |6 -- 5

[Mesa-dev] [PATCH 2/2] st/mesa: add support for gl_ClipDistance

2011-12-13 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 39 ++- src/mesa/state_tracker/st_program.c| 18 + 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.c

Re: [Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
On 12/13/2011 02:11 PM, Jose Fonseca wrote: > - Original Message - >> This is an updated version of the patch set I sent to the list a few >> hours >> ago. >> There is now a TGSI property called >> TGSI_PROPERTY_NUM_CLIP_DISTANCES >> that drivers can use to determine how many of the 8 ava

Re: [Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
On 12/13/2011 03:09 PM, Jose Fonseca wrote: > > - Original Message - >> On 12/13/2011 12:26 PM, Bryan Cain wrote: >>> On 12/13/2011 02:11 PM, Jose Fonseca wrote: >>>> - Original Message - >>>>> This is an updated version of the patc

Re: [Mesa-dev] [PATCH 1/2] gallium: add TGSI_SEMANTIC_CLIPDIST for clip distance

2011-12-13 Thread Bryan Cain
On 12/13/2011 03:07 PM, Brian Paul wrote: > On Tue, Dec 13, 2011 at 9:59 AM, Bryan Cain wrote: >> --- >> src/gallium/auxiliary/tgsi/tgsi_dump.c |3 ++- >> src/gallium/include/pipe/p_shader_tokens.h |3 ++- >> 2 files changed, 4 insertions(+), 2 deletion

Re: [Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
On 12/13/2011 03:25 PM, Jose Fonseca wrote: > > - Original Message - >> On 12/13/2011 03:09 PM, Jose Fonseca wrote: >>> - Original Message - >>>> On 12/13/2011 12:26 PM, Bryan Cain wrote: >>>>> On 12/13/2011 02:11 PM, J

Re: [Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
On 12/13/2011 03:48 PM, Jose Fonseca wrote: > - Original Message - >> On 12/13/2011 03:25 PM, Jose Fonseca wrote: >>> - Original Message - >>>> On 12/13/2011 03:09 PM, Jose Fonseca wrote: >>>>> - Original Message ----- >>>&g

Re: [Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
On 12/13/2011 03:48 PM, Jose Fonseca wrote: > - Original Message - >> On 12/13/2011 03:25 PM, Jose Fonseca wrote: >>> - Original Message - >>>> On 12/13/2011 03:09 PM, Jose Fonseca wrote: >>>>> - Original Message ----- >>>&g

Re: [Mesa-dev] [PATCH 0/2 v2] Add support for clip distances in Gallium

2011-12-13 Thread Bryan Cain
gt;>>>>> - Original Message - >>>>>>> On 12/13/2011 03:09 PM, Jose Fonseca wrote: >>>>>>>> - Original Message - >>>>>>>>> On 12/13/2011 12:26 PM, Bryan Cain wrote: >>>>>>&

[Mesa-dev] [PATCH 0/2 v3] Add support for clip distances in Gallium

2011-12-17 Thread Bryan Cain
This is the third revision of my changes to add support for gl_ClipDistance with Gallium. The difference between this set and v2 is that this set does not add a new TGSI_PROPERTY indicating the number of clip distances used. Instead, the UsageMask of the CLIPDIST output registers is set to indicat

[Mesa-dev] [PATCH 1/2] gallium: add support for clip distances

2011-12-17 Thread Bryan Cain
--- src/gallium/auxiliary/tgsi/tgsi_dump.c |3 +- src/gallium/auxiliary/tgsi/tgsi_text.c |3 +- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 36 +--- src/gallium/auxiliary/tgsi/tgsi_ureg.h |6 src/gallium/include/pipe/p_shader_tokens.h |3

[Mesa-dev] [PATCH 2/2] st/mesa: add support for gl_ClipDistance

2011-12-17 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 49 +--- src/mesa/state_tracker/st_program.c| 18 ++ 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp

[Mesa-dev] [PATCH 0/2 v4] Add support for clip distances in Gallium

2012-01-02 Thread Bryan Cain
This is the fourth revision of my changes to add support for gl_ClipDistance with Gallium. The first three revisions were sent in closer succession about two weeks ago. This revision is identical to v3 except for the inclusion of the changes suggested by Brian Paul in reply to the v3 patches. __

[Mesa-dev] [PATCH 1/2] gallium: add support for clip distances

2012-01-02 Thread Bryan Cain
--- src/gallium/auxiliary/tgsi/tgsi_dump.c |3 +- src/gallium/auxiliary/tgsi/tgsi_text.c |3 +- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 38 +-- src/gallium/auxiliary/tgsi/tgsi_ureg.h |6 src/gallium/include/pipe/p_shader_tokens.h |3 +

[Mesa-dev] [PATCH 2/2] st/mesa: add support for gl_ClipDistance

2012-01-02 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 48 +--- src/mesa/state_tracker/st_program.c| 18 ++ 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp

Re: [Mesa-dev] [PATCH 0/2 v4] Add support for clip distances in Gallium

2012-01-04 Thread Bryan Cain
On 01/02/2012 02:58 PM, Bryan Cain wrote: > This is the fourth revision of my changes to add support for gl_ClipDistance > with Gallium. The first three revisions were sent in closer succession about > two weeks ago. This revision is identical to v3 except for the inclusion of >

Re: [Mesa-dev] softpipe GL3 status

2012-01-06 Thread Bryan Cain
On 01/06/2012 01:26 PM, Ian Romanick wrote: > On 01/06/2012 09:04 AM, Dave Airlie wrote: >> Hi guys, >> >> Just a quick note, I've just spent a week or so trying to see where >> gallium and softpipe were w.r.t GL3.0 support. >> >> I've pushed a branch to my repo called softpipe-gl3. It contains >>

[Mesa-dev] [PATCH] gallium: add an IABS opcode to TGSI

2012-01-07 Thread Bryan Cain
This is a necessary operation that is missing from TGSI. --- src/gallium/auxiliary/tgsi/tgsi_exec.c |4 src/gallium/auxiliary/tgsi/tgsi_info.c |1 + src/gallium/docs/source/tgsi.rst | 13 + src/gallium/include/pipe/p_shader_tokens.h |3 ++- 4 files

Re: [Mesa-dev] softpipe GL3 status

2012-01-07 Thread Bryan Cain
On 01/07/2012 02:44 AM, Dave Airlie wrote: >> Let's add new opcodes for things like this. > I'll add IABS. I sent a patch to the mailing list that adds IABS about an hour ago, before reading this message. Bryan ___ mesa-dev mailing list mesa-dev@lists.

Re: [Mesa-dev] [PATCH 1/3] glsl_to_tgsi: Create a new variable_store class replacing variables field in glsl_to_tgsi_visitor

2012-01-07 Thread Bryan Cain
This is good work. I just have a few suggested changes. On 01/07/2012 12:26 PM, Vincent Lejeune wrote: > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 414 > +--- > 1 files changed, 309 insertions(+), 105 deletions(-) > > diff --git a/src/mesa/state_tracker/st_glsl

[Mesa-dev] [PATCH] mesa, glsl_to_tgsi: fixes for native integers

2011-08-26 Thread Bryan Cain
This fixes all of the piglit regressions in softpipe when native integers are enabled. --- src/mesa/main/uniforms.c |8 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 45 ++-- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/src/m

Re: [Mesa-dev] [PATCH] mesa, glsl_to_tgsi: fixes for native integers

2011-08-27 Thread Bryan Cain
On 08/27/2011 05:39 AM, Christoph Bumiller wrote: > On 27.08.2011 04:58, Bryan Cain wrote: >> This fixes all of the piglit regressions in softpipe when native integers are >> enabled. >> --- >> src/mesa/main/uniforms.c |8 + >> src/mesa/

[Mesa-dev] [PATCH] glsl: use a separate div_to_mul_rcp lowering flag for integers

2011-08-27 Thread Bryan Cain
TGSI, at the very least, has UDIV/IDIV instructions for integer division. --- src/glsl/ir_optimization.h | 13 +++-- src/glsl/lower_instructions.cpp|4 +++- src/mesa/drivers/dri/i965/brw_shader.cpp |1 + src/mesa/program/ir_to_mesa.cpp|

Re: [Mesa-dev] [PATCH] glsl: Use a separate div_to_mul_rcp lowering flag for integers.

2011-08-28 Thread Bryan Cain
On 08/27/2011 10:18 PM, Kenneth Graunke wrote: > From: Bryan Cain > > Using multiply and reciprocal for integer division involves potentially > lossy floating point conversions. This is okay for older GPUs that > represent integers as floating point, but undesirable for GPU

Re: [Mesa-dev] [PATCH] mesa, glsl_to_tgsi: fixes for native integers

2011-08-28 Thread Bryan Cain
On 08/26/2011 09:58 PM, Bryan Cain wrote: > This fixes all of the piglit regressions in softpipe when native integers are > enabled. > --- > src/mesa/main/uniforms.c |8 + > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 45 > +

Re: [Mesa-dev] [PATCH] glsl: Use a separate div_to_mul_rcp lowering flag for integers.

2011-08-28 Thread Bryan Cain
On 08/28/2011 07:38 PM, Eric Anholt wrote: > On Sat, 27 Aug 2011 20:18:55 -0700, Kenneth Graunke > wrote: >> From: Bryan Cain >> >> Using multiply and reciprocal for integer division involves potentially >> lossy floating point conversions. This is okay fo

[Mesa-dev] Missing integer "set" opcodes in Gallium

2011-08-29 Thread Bryan Cain
I somehow didn't notice this until now, but why are there no Gallium "set" opcodes for integers that are equivalent to the SGT or SLE opcodes for floats? Does it have to do with available hardware features? Bryan ___ mesa-dev mailing list mesa-dev@lists

Re: [Mesa-dev] Missing integer "set" opcodes in Gallium

2011-08-29 Thread Bryan Cain
On 08/29/2011 03:41 PM, Zack Rusin wrote: > On Monday, August 29, 2011 04:02:08 PM Zack Rusin wrote: >> Either way though if GL needs those ops then, like Brian mentioned, it'd be >> a good idea to add them. > Actually I think it seems easier to just flip the ops rather than add new > instruction

[Mesa-dev] [PATCH v2] glsl_to_tgsi, mesa: fixes for native integers and integer booleans

2011-08-30 Thread Bryan Cain
With this patch, there are no piglit regressions on softpipe with native integers enabled. Unlike my previous patch, this uses integer values of ~0 and 0 for true and false, respectively, instead of the float values 1.0 and 0.0. --- src/mesa/main/uniforms.c |6 +- src/mesa/s

[Mesa-dev] [PATCH] mesa: Replace the EmitNoIfs compiler flag with a MaxIfLevel flag.

2011-08-31 Thread Bryan Cain
This is a better, more fine-grained way of lowering if statements. Fixes the game And Yet It Moves on nv50. --- src/mesa/drivers/dri/i915/i915_context.c |2 +- src/mesa/main/mtypes.h |6 +- src/mesa/program/ir_to_mesa.cpp|8 src/mesa/stat

[Mesa-dev] [PATCH 1/2] gallium: add TGSI opcodes UARL and UCMP

2011-09-02 Thread Bryan Cain
They are needed by glsl_to_tgsi for an efficient implementation using native integers. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 30 src/gallium/auxiliary/tgsi/tgsi_info.c |3 ++ src/gallium/include/pipe/p_shader_tokens.h |5 +++- 3 files changed,

[Mesa-dev] [PATCH 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-02 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 18 +++--- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index e2857ed..05d4d33 100644 --- a/src/mesa/state_tracker/st_glsl_to_t

Re: [Mesa-dev] [PATCH v2] glsl_to_tgsi, mesa: fixes for native integers and integer booleans

2011-09-02 Thread Bryan Cain
Are there any objections to pushing this? Bryan On 08/31/2011 01:33 AM, Bryan Cain wrote: > With this patch, there are no piglit regressions on softpipe with native > integers enabled. Unlike my previous patch, this uses integer values of > ~0 and 0 for true and false, respectively, i

Re: [Mesa-dev] [PATCH v2] glsl_to_tgsi, mesa: fixes for native integers and integer booleans

2011-09-02 Thread Bryan Cain
On 09/02/2011 06:13 PM, Eric Anholt wrote: > On Wed, 31 Aug 2011 01:33:59 -0500, Bryan Cain wrote: >> With this patch, there are no piglit regressions on softpipe with native >> integers enabled. Unlike my previous patch, this uses integer values of >> ~0 and 0 for true an

Re: [Mesa-dev] [PATCH v2] glsl_to_tgsi, mesa: fixes for native integers and integer booleans

2011-09-03 Thread Bryan Cain
On 09/02/2011 06:13 PM, Eric Anholt wrote: > On Wed, 31 Aug 2011 01:33:59 -0500, Bryan Cain wrote: >> With this patch, there are no piglit regressions on softpipe with native >> integers enabled. Unlike my previous patch, this uses integer values of >> ~0 and 0 for true an

[Mesa-dev] [PATCH] mesa: add a UniformBooleanTrue option

2011-09-05 Thread Bryan Cain
Drivers supporting native integers set UniformBooleanTrue to the integer value that should be used for true when uploading uniform booleans. This is ~0 for Gallium and 1 for i965. --- src/mesa/drivers/dri/i965/brw_context.c |4 +++- src/mesa/main/mtypes.h |6 ++ src/m

Re: [Mesa-dev] [PATCH 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-10 Thread Bryan Cain
Can one of the Gallium interface maintainers please review this patch so I can push it? Bryan On 09/02/2011 11:09 AM, Bryan Cain wrote: > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 18 +++--- > 1 files changed, 7 insertions(+), 11 deletions(-) > > diff -

Re: [Mesa-dev] [PATCH 1/2] gallium: add TGSI opcodes UARL and UCMP

2011-09-10 Thread Bryan Cain
Can one of the Gallium interface maintainers please review this patch so I can push it? Bryan On 09/02/2011 11:09 AM, Bryan Cain wrote: > They are needed by glsl_to_tgsi for an efficient implementation using native > integers. > --- > src/gallium/auxiliary/tgsi/tgsi_exec.

Re: [Mesa-dev] [PATCH 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-10 Thread Bryan Cain
Disregard this, I meant to send this for patch 1/2 and not 2/2. This patch doesn't contain any Gallium interface changes. Bryan On 09/10/2011 11:43 AM, Bryan Cain wrote: > Can one of the Gallium interface maintainers please review this patch so > I can push it? > > Bryan > &

Re: [Mesa-dev] [PATCH 1/2] gallium: add TGSI opcodes UARL and UCMP

2011-09-10 Thread Bryan Cain
On 09/10/2011 12:05 PM, Brian Paul wrote: > On 09/10/2011 10:47 AM, Bryan Cain wrote: >> Can one of the Gallium interface maintainers please review this patch so >> I can push it? > > > We need documentation for these new instructions in > src/gallium/docs/source/tgsi.

Re: [Mesa-dev] [PATCH 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-10 Thread Bryan Cain
my question is: do the drivers need to be updated for > TGSI_OPCODE_UARL? Or will this only be emitted when the driver > supports integer operations? If that's the case, please say so in the > commit message or code. > > Otherwise: Reviewed-by: Brian Paul > > > On 09/10

[Mesa-dev] [PATCH v2 1/2] gallium: add TGSI opcodes UARL and UCMP

2011-09-10 Thread Bryan Cain
They are needed by glsl_to_tgsi for an efficient implementation using native integers. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 30 src/gallium/auxiliary/tgsi/tgsi_info.c |3 ++ src/gallium/docs/source/tgsi.rst | 19 + src/

[Mesa-dev] [PATCH v2 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-10 Thread Bryan Cain
Since TGSI now has a UARL opcode that takes an integer as the source, it is no longer necessary to hack around the lack of an integer ARL opcode using I2F. UARL is only emitted when native integers are enabled; ARL is still used otherwise. Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_gl

Re: [Mesa-dev] [PATCH v2 2/2] glsl_to_tgsi: use UARL instead of I2F and ARL

2011-09-14 Thread Bryan Cain
t; > Maybe you can see better than me what's wrong. > > This is a side-by-side diff of the failing TGSI shader. The right-hand > one is from Mesa master. The left-hand one is with the commit > reverted. > http://pastebin.com/raw.php?i=QXB3SZAE > > Thanks, > Marek

[Mesa-dev] [PATCH] glsl_to_tgsi: implement ir_binop_all_equal and ir_binop_any_nequal for native integers

2011-09-19 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 119 1 files changed, 85 insertions(+), 34 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 8921698..f68270d 100644 --- a/src/mesa/state_tracker/s

Re: [Mesa-dev] [PATCH 6/6] glsl_to_tgsi: Use _mesa_generate_parameters_list_for_uniforms

2011-10-07 Thread Bryan Cain
On 10/07/2011 07:06 PM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > Cc: Bryan Cain > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 119 > +--- > 1 files changed, 2 insertions(+), 117 deletions(-) &g

Re: [Mesa-dev] [PATCH] st/mesa: kill instruction if writemask=0 in eliminate_dead_code_advanced()

2011-10-09 Thread Bryan Cain
I don't think there's any reason we can't eliminate a dead instruction when the writemask is zero. I do wonder, though, why this patch actually makes a difference. There's an "if (!inst->dead_mask || !inst->dst.writemask)" three lines before the code visible in the patch that makes it not kill th

Re: [Mesa-dev] [PATCH] st/mesa: kill instruction if writemask=0 in eliminate_dead_code_advanced()

2011-10-09 Thread Bryan Cain
What does it do if there's no destination register? In any case, I don't think glsl_to_tgsi emits any ARLs of that form, so it shouldn't be a problem. Bryan On 10/07/2011 01:06 PM, Marek Olšák wrote: > I think ARL is allowed to have no destination register, right? In that > case, there should be

Re: [Mesa-dev] [PATCH 2/2] glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.

2011-10-18 Thread Bryan Cain
> > Signed-off-by: Kenneth Graunke > Cc: Bryan Cain > Cc: Ian Romanick > --- > src/glsl/lower_if_to_cond_assign.cpp |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/src/glsl/lower_if_to_cond_assign.cpp > b/src/glsl/lower_if_to_cond_as

Re: [Mesa-dev] [PATCH 1/2] glsl: Add uniform_locations_assigned parameter to do_dead_code opt pass

2011-10-21 Thread Bryan Cain
If it's worth anything, the glsl_to_tgsi part is Reviewed-by: Bryan Cain On 10/21/2011 01:49 PM, Ian Romanick wrote: > From: Ian Romanick > > Setting this flag prevents declarations of uniforms from being removed > from the IR. Since the IR is directly used by several API

Re: [Mesa-dev] TGSI declarations missing type info

2011-11-13 Thread Bryan Cain
On 11/13/2011 09:06 AM, Dave Airlie wrote: > Hi guys, > > Just been looking at llvmpipe integer support and it seems like we > lose some information about the type of data stored into temporaries, > > after st_glsl_to_cpp we no longer know what type the temporaries are, > and llvm would really like

Re: [Mesa-dev] [PATCH] glsl_to_tgsi: Invalidate and revalidate uniform backing storage

2011-11-16 Thread Bryan Cain
to me. > > Signed-off-by: Ian Romanick > Cc: Vadim Girlin > Cc: Bryan Cain > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 14 ++ > 1 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >

Re: [Mesa-dev] [PATCH] st/mesa: fix transform feedback of unsubscripted gl_ClipDistance array

2012-06-17 Thread Bryan Cain
On 6/16/2012 5:43 PM, Marcin Slusarz wrote: gl_ClipDistance needs special treatment in form of lowering pass which transforms gl_ClipDistance representation from float[] to vec4[]. There are 2 implementations - at glsl linker level (enabled by LowerClipDistance option) and at glsl_to_tgsi level (

Re: [Mesa-dev] [PATCH] st/mesa: fix transform feedback of unsubscripted gl_ClipDistance array

2012-06-18 Thread Bryan Cain
On Jun 17, 2012 6:55 PM, "Bryan Cain" wrote: > > On 6/16/2012 5:43 PM, Marcin Slusarz wrote: >> >> gl_ClipDistance needs special treatment in form of lowering pass >> which transforms gl_ClipDistance representation from float[] to >> vec4[]. There are

Re: [Mesa-dev] Mesa (master): docs: Update GL3.txt.

2012-07-11 Thread Bryan Cain
On 07/11/2012 12:24 AM, Eric Anholt wrote: > Kenneth Graunke writes: >> inverse() has been done for a while. > Does the inverse() builtin constant expression handling work for > you? It doesn't here. > >> None of us know what "highp change" means; > GLSL 1.40 spec: "Make the default precision qua

[Mesa-dev] [PATCH] nv50/ir: set position before i instead of i->next in NV50LoweringPreSSA::visit

2012-07-17 Thread Bryan Cain
Fixes rendering glitches in Psychonauts such as Raz's eyes flickering white. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=51962. --- .../drivers/nv50/codegen/nv50_ir_lowering_nv50.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nv50/codegen/nv50

[Mesa-dev] Support for EXT/ARB_geometry_shader4

2012-07-27 Thread Bryan Cain
Some of you already know about this from IRC, but recently I've been working on adding support for GL_EXT_geometry_shader4 and GL_ARB_geometry_shader4 (which are essentially identical) to Mesa. A significant amount of the required code was already there from Zack Rusin's work on geometry shaders a

Re: [Mesa-dev] [PATCH 0/16] Assorted gallium shader, sampler, sampler_view changes

2012-08-10 Thread Bryan Cain
On 08/09/2012 10:11 PM, Brian Paul wrote: > > The following patches are steps toward some gallium API clean-ups. > > 1. Eventually, replace > pipe_context::bind_fragment/vertex/geometry/compute_sampler_states() > with a single bind_sampler_states() entrypoint which takes a > PIPE_SHADER_x to identi

[Mesa-dev] [PATCH] glsl: fix typo

2011-04-23 Thread Bryan Cain
--- src/glsl/linker.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 1749235..725a198 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1349,7 +1349,7 @@ assign_attribute_locations(gl_shader_program *prog, u

[Mesa-dev] [PATCH] glsl: fix more typos

2011-04-23 Thread Bryan Cain
--- src/glsl/linker.cpp | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 725a198..255edc6 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -510,7 +510,7 @@ cross_validate_outputs_to_inputs(struct gl_shade

[Mesa-dev] GLSL IR to TGSI translator

2011-04-25 Thread Bryan Cain
Hi, In the last week or so, I've been working on a direct translator from GLSL IR to TGSI that does not go through Mesa IR. Although it is still a work in progress, it is now working and very usable. So before I go on, here is a link to the branch I've pushed to GitHub: https://github.com/Plomb

Re: [Mesa-dev] Status of VDPAU and XvMC state-trackers (was Re: Build error on current xvmc-r600 pip

2011-04-27 Thread Bryan Cain
> > nouveau's DRM so if anyone is motivated enough to rework the userspace > > side it will require proper planar surface support in pipe-video. > > (This is just an FYI for anyone who is paying attention to > > pipe-video.) > > > > Cheers. > If I remember

Re: [Mesa-dev] Status of VDPAU and XvMC state-trackers (was Re: Build error on current xvmc-r600 pip

2011-04-28 Thread Bryan Cain
e proper planar surface support in pipe-video. > > (This is just an FYI for anyone who is paying attention to > > pipe-video.) > > > > Cheers. > If I remember correctly Bryan Cain was working on getting this to work > again on NV50, he had MC working, but was strugglin

Re: [Mesa-dev] GLSL IR to TGSI translator

2011-04-28 Thread Bryan Cain
On 4/27/2011 10:23 PM, Brian Paul wrote: On Tue, Apr 26, 2011 at 12:26 AM, Bryan Cain wrote: Hi, In the last week or so, I've been working on a direct translator from GLSL IR to TGSI that does not go through Mesa IR. Although it is still a work in progress, it is now working and very u

Re: [Mesa-dev] GLSL IR to TGSI translator

2011-05-02 Thread Bryan Cain
On 05/02/2011 11:55 AM, Ian Romanick wrote: > On 04/27/2011 08:23 PM, Brian Paul wrote: > > On Tue, Apr 26, 2011 at 12:26 AM, Bryan Cain > wrote: > >> Hi, > >> > >> In the last week or so, I've been working on a direct translator from > >

Re: [Mesa-dev] Status of VDPAU and XvMC state-trackers (was Re: Build error on current xvmc-r600 pip

2011-05-05 Thread Bryan Cain
2011/4/27 Christian König > Regarding the not working idct on nvidia hardware I would guess that we > use something that the driver currently doesn't supports, like multiple > render targets, disabled opengl rasterisation rules, unsupported > intermediate buffer format or something else. > Hi Ch

Re: [Mesa-dev] Status of VDPAU and XvMC state-trackers (was Re: Build error on current xvmc-r600 pip

2011-05-06 Thread Bryan Cain
On 05/06/2011 03:59 AM, Christoph Bumiller wrote: > On 06.05.2011 06:59, Bryan Cain wrote: >> I found out the other day that nv50 doesn't support disabled GL >> rasterization rules, and doesn't plan to. Could iDCT be changed to >> work with GL rasterization rule

[Mesa-dev] GLSL IR int-to-float pass

2011-05-24 Thread Bryan Cain
Hi, In the past few days, I've been working on native integer support in my GLSL to TGSI translator. Something that's come to my attention is that supporting Gallium targets with and without integer support using a single GLSL IR backend will more or less require a GLSL IR pass to convert int, ui

Re: [Mesa-dev] GLSL IR int-to-float pass

2011-05-25 Thread Bryan Cain
On 05/25/2011 08:41 AM, Keith Whitwell wrote: > On Wed, 2011-05-25 at 09:32 -0400, Jerome Glisse wrote: >> On Tue, May 24, 2011 at 8:09 PM, Bryan Cain wrote: >>> Hi, >>> >>> In the past few days, I've been working on native integer support in my >>&g

Re: [Mesa-dev] GLSL IR int-to-float pass

2011-05-25 Thread Bryan Cain
On 05/25/2011 12:48 PM, Jerome Glisse wrote: > On Wed, May 25, 2011 at 9:41 AM, Keith Whitwell wrote: >> I'm not trying to impose a direction on this, but it seems like the GLSL >> IR->TGSI converter (once running) could be pushed down into the >> individual drivers and GLSL IR or a close cousin o

[Mesa-dev] Status of the GLSL->TGSI translator

2011-06-15 Thread Bryan Cain
My work on the GLSL IR to TGSI translator I announced on the list this April is now at the point where I think it is ready to be merged into Mesa. It is stable and doesn't regress any piglit tests on softpipe or nv50. It adds native integer support as required by GLSL 1.30, although it is current

Re: [Mesa-dev] Status of the GLSL->TGSI translator

2011-06-15 Thread Bryan Cain
On 06/15/2011 04:59 PM, Kenneth Graunke wrote: > Bryan, > > Thanks for your work on this! I'm glad to see GLSL IR->TGSI happening. > > A few quick comments on "mesa,st/mesa: add native support for integers > in shaders"... > > glsl_type::get_vec4_type(base) is equivalent to > glsl_type::get_instan

Re: [Mesa-dev] Status of the GLSL->TGSI translator

2011-06-16 Thread Bryan Cain
On Thu, Jun 16, 2011 at 12:46 AM, Dave Airlie wrote: > On Thu, Jun 16, 2011 at 3:22 PM, Dave Airlie wrote: > > On Thu, Jun 16, 2011 at 7:38 AM, Bryan Cain > wrote: > >> My work on the GLSL IR to TGSI translator I announced on the list this > >> April is now at

Re: [Mesa-dev] Status of the GLSL->TGSI translator

2011-06-16 Thread Bryan Cain
On Thu, Jun 16, 2011 at 9:08 AM, Brian Paul wrote: > > > Looks like nice work, Bryan. > > Just a few minor questions/comments for now: > > 1. The st_fragment/vertex/geometry_program structs now have a glsl_to_tgsi > field. I did a grep, but I couldn't find where that field is assigned. Can > you

Re: [Mesa-dev] Status of the GLSL->TGSI translator

2011-06-22 Thread Bryan Cain
On 06/16/2011 12:43 PM, Brian Paul wrote: > On 06/16/2011 10:34 AM, Bryan Cain wrote: >> On Thu, Jun 16, 2011 at 9:08 AM, Brian Paul > <mailto:bri...@vmware.com>> wrote: >> >> >> Looks like nice work, Bryan. >> >> Just a few minor quest

Re: [Mesa-dev] Merging glsl-to-tgsi to master

2011-07-12 Thread Bryan Cain
On 07/11/2011 11:53 AM, Egon Ashrafinia wrote: > Hello guys. > > 1 month ago, we talked about merging glsl-to-tgsi to master but it > still not happend. What about now? I could compile and test it a bit. > It works. > Anyone who could do it? What does Bryan Cain say about it? Hi

[Mesa-dev] Case where opt_copy_propagation doesn't do its job

2011-07-12 Thread Bryan Cain
It appears that the copy propagation pass in the GLSL compiler (in opt_copy_propagation.cpp) doesn't do copy propagation when the components of a variable are initialized separately, like this: (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.00)) ) (ass

Re: [Mesa-dev] Case where opt_copy_propagation doesn't do its job

2011-07-12 Thread Bryan Cain
On 07/12/2011 04:36 PM, Eric Anholt wrote: > On Tue, 12 Jul 2011 15:44:12 -0500, Bryan Cain wrote: >> It appears that the copy propagation pass in the GLSL compiler (in >> opt_copy_propagation.cpp) doesn't do copy propagation when the >> components of a variable are in

Re: [Mesa-dev] Merging glsl-to-tgsi to master

2011-07-13 Thread Bryan Cain
not happend. What about now? I could compile and test it a bit. It works. > > Anyone who could do it? What does Bryan Cain say about it? > > One thing to consider is whether or not this will make it more difficult > to cherry pick fixes to the 7.11 release branch. Bryan has been doing

Re: [Mesa-dev] Common Subexpression Elimination

2011-07-16 Thread Bryan Cain
On 07/16/2011 10:28 AM, Vincent wrote: > Hi, > > I wrote an optimisation pass that perform CSE (that is, it spots > expressions that appears twice or more, and factor them in a temporary > to avoid recalculation). > This is my first patch to Mesa, I would like to receive feedback : > case where the

  1   2   >