summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-16 15:22:59 -0700
committerMatt Turner <[email protected]>2016-05-18 11:09:37 -0700
commitcbb0e3a7e8fffa4d5c5af8660d99cd3da8af97ec (patch)
tree8480fce7784c56094530f19160d09c3ad7e2a8fa /src
parent6a4ff51f7a28124f27da52fe8d1a04025ddf7a83 (diff)
i965/fs: Assert that nir_op_extract_*'s src1 is a constant.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index ad20dc8d92e..ebcc92a6753 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1384,6 +1384,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
case nir_op_extract_u8:
case nir_op_extract_i8: {
nir_const_value *byte = nir_src_as_const_value(instr->src[1].src);
+ assert(byte != NULL);
bld.emit(SHADER_OPCODE_EXTRACT_BYTE,
result, op[0], brw_imm_ud(byte->u32[0]));
break;
@@ -1392,6 +1393,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
case nir_op_extract_u16:
case nir_op_extract_i16: {
nir_const_value *word = nir_src_as_const_value(instr->src[1].src);
+ assert(word != NULL);
bld.emit(SHADER_OPCODE_EXTRACT_WORD,
result, op[0], brw_imm_ud(word->u32[0]));
break;