i965: Fix a bug in i965 compute-to-MRF.
authorEric Anholt <eric@anholt.net>
Tue, 18 Jan 2011 21:12:25 +0000 (13:12 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 19 Jan 2011 00:30:59 +0000 (16:30 -0800)
Fixes piglit glsl-fs-texture2d-branching.  I couldn't come up with a
testcase that didn't involve dead code, but it's still worthwhile to
fix I think.

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

index bb06fe5e36c7d368f860bb49846c336b7afe5f84..ba338959bf23188d8b3e161a00ecb2c069af1fd5 100644 (file)
@@ -3170,6 +3170,7 @@ fs_visitor::compute_to_mrf()
          */
         if (scan_inst->opcode == BRW_OPCODE_DO ||
             scan_inst->opcode == BRW_OPCODE_WHILE ||
+            scan_inst->opcode == BRW_OPCODE_ELSE ||
             scan_inst->opcode == BRW_OPCODE_ENDIF) {
            break;
         }