diff options
author | Mark Janes <markjanes@swizzler.org> | 2020-08-07 16:35:32 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2020-08-10 13:29:56 -0700 |
commit | ee06e47c5b1d7e5132435ba4ed7be5a2b16bc77e (patch) | |
tree | 91e1ce9fd492b39d3e6d5edbc9dd93e43440c7fe | |
parent | 166630f759246cc1a49ece8dc3feb4e3d6a777a2 (diff) |
intel/fs: Assert if lower_source_modifiers converts 32x16 to 32x32 multiplication
Lowering source modifiers will convert a 16bit source to a 32bit
value. In the case of integer multiplication, this will reverse
previous lowering performed by lower_mul_dword_inst.
Assert to prevent an illegal DxD operation (and GPU hang).
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
-rw-r--r-- | src/intel/compiler/brw_fs_lower_regioning.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_lower_regioning.cpp b/src/intel/compiler/brw_fs_lower_regioning.cpp index 9db2c540afa..8ae52dfef96 100644 --- a/src/intel/compiler/brw_fs_lower_regioning.cpp +++ b/src/intel/compiler/brw_fs_lower_regioning.cpp @@ -256,6 +256,12 @@ namespace brw { lower_src_modifiers(fs_visitor *v, bblock_t *block, fs_inst *inst, unsigned i) { assert(inst->components_read(i) == 1); + assert(v->devinfo->has_integer_dword_mul || + inst->opcode != BRW_OPCODE_MUL || + brw_reg_type_is_floating_point(get_exec_type(inst)) || + MIN2(type_sz(inst->src[0].type), type_sz(inst->src[1].type)) >= 4 || + type_sz(inst->src[i].type) == get_exec_type_size(inst)); + const fs_builder ibld(v, block, inst); const fs_reg tmp = ibld.vgrf(get_exec_type(inst)); |