r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier
authorPatrick Rudolph <siro@das-labor.org>
Mon, 28 Mar 2016 09:52:00 +0000 (11:52 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 27 Apr 2016 02:48:50 +0000 (12:48 +1000)
commitfb5d38e21982e9eb3195c61d020c9772b73bdbcf
treea1ee316f8a34030850300abd2c51c2a288404034
parent7aa3a936564f43e46f7cc706670f7995752d1e41
r600g: fix and optimize tgsi_cmp when using ABS and NEG modifier

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 Rudolph <siro@das-labor.org>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c