i965/fs: Assert that IF instruction with embedded compare has legal exec_size.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 17 May 2016 23:01:29 +0000 (16:01 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 28 May 2016 06:19:22 +0000 (23:19 -0700)
We shouldn't encounter these right now but if we did it wouldn't be
possible for the SIMD lowering pass to split it into multiple
instructions because of its side effects on control flow, so just
assert in order to kill the program.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 2b6cf221f4ca2fa5d549e25c7df109af874cdcc9..df72fda49c2c97194569f95f7566795ab2ad9ca1 100644 (file)
@@ -4788,6 +4788,10 @@ get_lowered_simd_width(const struct brw_device_info *devinfo,
       return MIN2(devinfo->is_haswell ? 8 : ~0u,
                   get_fpu_lowered_simd_width(devinfo, inst));
 
+   case BRW_OPCODE_IF:
+      assert(inst->src[0].file == BAD_FILE || inst->exec_size <= 16);
+      return inst->exec_size;
+
    case SHADER_OPCODE_RCP:
    case SHADER_OPCODE_RSQ:
    case SHADER_OPCODE_SQRT: