i965/vec4: teach cmod propagation about different execution sizes
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 15 Sep 2016 09:30:32 +0000 (11:30 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:51 +0000 (11:26 +0100)
We can't propagate the conditional modifier from one instruction to
another of a different execution size / group, since that would change
the channels affected by the conditional.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp

index c531fba03123d15981e9ac24559db5d77fa26668..4454cdbfc94a25e153e2a18357141a10148b99d4 100644 (file)
@@ -76,7 +76,9 @@ opt_cmod_propagation_local(bblock_t *block)
                  scan_inst->dst.writemask != WRITEMASK_XYZW) ||
                 (scan_inst->dst.writemask == WRITEMASK_XYZW &&
                  inst->src[0].swizzle != BRW_SWIZZLE_XYZW) ||
-                (inst->dst.writemask & ~scan_inst->dst.writemask) != 0) {
+                (inst->dst.writemask & ~scan_inst->dst.writemask) != 0 ||
+                scan_inst->exec_size != inst->exec_size ||
+                scan_inst->group != inst->group) {
                break;
             }