summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/test_fs_copy_propagation.cpp9
2 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 31ba202..da02fb1 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -431,7 +431,9 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
if (entry->saturate) {
switch(inst->opcode) {
case BRW_OPCODE_SEL:
- if (inst->src[1].file != IMM ||
+ if ((inst->conditional_mod != BRW_CONDITIONAL_GE &&
+ inst->conditional_mod != BRW_CONDITIONAL_L) ||
+ inst->src[1].file != IMM ||
inst->src[1].f < 0.0 ||
inst->src[1].f > 1.0) {
return false;
diff --git a/src/mesa/drivers/dri/i965/test_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_copy_propagation.cpp
index daba123..ed2f1e0 100644
--- a/src/mesa/drivers/dri/i965/test_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_fs_copy_propagation.cpp
@@ -163,6 +163,15 @@ TEST_F(copy_propagation_test, maxmax_sat_imm)
{ BRW_CONDITIONAL_L , -1.5f, false },
{ BRW_CONDITIONAL_GE , 1.5f, false },
{ BRW_CONDITIONAL_L , 1.5f, false },
+
+ { BRW_CONDITIONAL_NONE, 0.5f, false },
+ { BRW_CONDITIONAL_Z , 0.5f, false },
+ { BRW_CONDITIONAL_NZ , 0.5f, false },
+ { BRW_CONDITIONAL_G , 0.5f, false },
+ { BRW_CONDITIONAL_LE , 0.5f, false },
+ { BRW_CONDITIONAL_R , 0.5f, false },
+ { BRW_CONDITIONAL_O , 0.5f, false },
+ { BRW_CONDITIONAL_U , 0.5f, false },
};
for (unsigned i = 0; i < sizeof(test) / sizeof(test[0]); i++) {