summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-03-19 11:44:43 -0700
committerEric Anholt <[email protected]>2010-03-22 15:04:46 -0700
commit8a998342c6bf591f1969b432bdda1732d480ee56 (patch)
tree681c3ab2df1d2c1a1dcabc10c9e35e81409681bb /src/mesa
parentef2664da6c4db1b52ef351641e3ee949b87f9c7b (diff)
i965: Optimize OPCODE_CMP by using BRW_SEL to choose results.
Tested with piglit glsl-fs-sqrt-branch, fp-cmp.vpfp.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index 1869fd06d5a..5abc0672f3f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -620,14 +620,10 @@ void emit_cmp(struct brw_compile *p,
for (i = 0; i < 4; i++) {
if (mask & (1<<i)) {
- brw_set_saturate(p, (mask & SATURATE) ? 1 : 0);
- brw_MOV(p, dst[i], arg2[i]);
- brw_set_saturate(p, 0);
-
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_L, arg0[i], brw_imm_f(0));
brw_set_saturate(p, (mask & SATURATE) ? 1 : 0);
- brw_MOV(p, dst[i], arg1[i]);
+ brw_SEL(p, dst[i], arg1[i], arg2[i]);
brw_set_saturate(p, 0);
brw_set_predicate_control_flag_value(p, 0xff);
}