Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-04-24 Thread Patrick Rudolph
On 2016-04-07 08:10 AM, Dave Airlie wrote: > On 7 April 2016 at 15:43, Ian Romanick wrote: >> On 04/02/2016 02:45 AM, Patrick Rudolph wrote: >>> Are there optimizations done on TGSI ? >>> I can't find any file in src/gallium/auxiliary/tgsi that does so. >> >> What I meant was, at some point the dr

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-04-06 Thread Dave Airlie
On 7 April 2016 at 15:43, Ian Romanick wrote: > On 04/02/2016 02:45 AM, Patrick Rudolph wrote: >> Are there optimizations done on TGSI ? >> I can't find any file in src/gallium/auxiliary/tgsi that does so. > > What I meant was, at some point the driver translates TGSI into its own > representation

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-04-06 Thread Ian Romanick
On 04/02/2016 02:45 AM, Patrick Rudolph wrote: > Are there optimizations done on TGSI ? > I can't find any file in src/gallium/auxiliary/tgsi that does so. What I meant was, at some point the driver translates TGSI into its own representation. When that translation occurs, generate the smarter co

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-04-05 Thread Marek Olšák
On Sat, Apr 2, 2016 at 11:45 AM, Patrick Rudolph wrote: > Are there optimizations done on TGSI ? > I can't find any file in src/gallium/auxiliary/tgsi that does so. Since this is for Nine, only the driver can do optimizations. r600_shader.c is probably the best place to optimize this (or SB). Ma

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-04-02 Thread Patrick Rudolph
Are there optimizations done on TGSI ? I can't find any file in src/gallium/auxiliary/tgsi that does so. Kind Regards, Patrick On 2016-03-30 06:59 PM, Ian Romanick wrote: > I'd recommend doing this at a higher level. We've been doing this in > NIR (in nir_opt_algebraic.py) for quite some time, a

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-03-30 Thread Ian Romanick
I'd recommend doing this at a higher level. We've been doing this in NIR (in nir_opt_algebraic.py) for quite some time, and we've found that having x==0 instead of -abs(x)>=0 in higher-level IR helps other optimizations make progress. Maybe do this when translating out of TGSI? On 03/30/2016 03:

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-03-30 Thread Patrick Rudolph
It affects the game "RIFT" and fixes slightly wrong colors on the player model, when using the nine state-tracker. Kind Regards, Patrick On 2016-03-29 11:09 PM, Dave Airlie wrote: > On 28 March 2016 at 19:52, wrote: >> From: Patrick Rudolph >> >> Some apps set NEG and ABS on the source param t

Re: [Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-03-29 Thread Dave Airlie
On 28 March 2016 at 19:52, wrote: > From: Patrick Rudolph > > Some apps set NEG and ABS on the source param to test for zero. > Use ALU_OP3_CNDE insted of ALU_OP3_CNDGE and unset both modifiers. > > It also removes the need for a MOV instruction, as ABS isn't > supported on op3. > > Tested on AM

[Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-03-28 Thread siro
From: Patrick Rudolph Some apps set NEG and ABS on the source param to test for zero. Use ALU_OP3_CNDE insted of ALU_OP3_CNDGE and unset both modifiers. It also removes the need for a MOV instruction, as ABS isn't supported on op3. Tested on AMD CAYMAN and AMD RV770. Signed-off-by: Patrick Rud

[Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-03-28 Thread siro
From: Patrick Rudolph Some apps set NEG and ABS on the source param to test for zero. Use ALU_OP3_CNDE insted of ALU_OP3_CNDGE and unset both modifiers. It also removes the need for a MOV instruction, as ABS isn't supported on op3. Tested on AMD CAYMAN and AMD RV770. Signed-off-by: Patrick Rud

[Mesa-dev] [PATCH] r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

2016-03-28 Thread siro
From: Patrick Rudolph Some apps set NEG and ABS on the source param to test for zero. Use ALU_OP3_CNDE insted of ALU_OP3_CNDGE and unset both modifiers. It also removes the need for a MOV instruction, as ABS isn't supported on op3. Tested on AMD CAYMAN and AMD RV770. Signed-off-by: Patrick Rud