[Mesa-dev] [PATCH 17/31] i965/fs: Assert that IF instruction with embedded compare has legal exec_size.
Francisco Jerez
currojerez at riseup.net
Sat May 21 05:47:52 UTC 2016
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.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index a15e15e..bec96b1 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4796,6 +4796,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:
--
2.7.3
More information about the mesa-dev
mailing list