[Mesa-dev] [PATCH 4/5] i965/vec4: Add argument index and type checks to SEL saturate propagation.

Francisco Jerez currojerez at riseup.net
Fri Mar 20 07:16:16 PDT 2015


SEL saturate propagation already implicitly relies on these
assumptions.
---
 src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 9437e79..02fa27e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -344,7 +344,10 @@ try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
        */
       switch(inst->opcode) {
       case BRW_OPCODE_SEL:
-         if (inst->src[1].file != IMM ||
+         if (arg != 0 ||
+             inst->src[0].type != BRW_REGISTER_TYPE_F ||
+             inst->src[1].file != IMM ||
+             inst->src[1].type != BRW_REGISTER_TYPE_F ||
              inst->src[1].fixed_hw_reg.dw1.f < 0.0 ||
              inst->src[1].fixed_hw_reg.dw1.f > 1.0) {
             return false;
-- 
2.1.3



More information about the mesa-dev mailing list