i965: Fold constants into the second arg of BRW_SEL as well.
authorEric Anholt <eric@anholt.net>
Thu, 18 Nov 2010 03:34:54 +0000 (11:34 +0800)
committerEric Anholt <eric@anholt.net>
Sat, 20 Nov 2010 01:42:07 +0000 (17:42 -0800)
This hits a common case with min/max operations.

src/mesa/drivers/dri/i965/brw_fs.cpp

index 2b5ad794bf7c2607e105ecd7cb1a2b8192c231ee..34f978435affafc49ea75d3f09bdfcd2ec77b7a3 100644 (file)
@@ -2781,6 +2781,7 @@ fs_visitor::propagate_constants()
               }
               break;
            case BRW_OPCODE_CMP:
+           case BRW_OPCODE_SEL:
               if (i == 1) {
                  scan_inst->src[i] = inst->src[0];
                  progress = true;