mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 18:00:10 +01:00
intel/brw/xe3+: Mask subgroup shuffle index to be within valid range to avoid VRT hangs.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
This commit is contained in:
parent
d2af77aa6b
commit
8102500b95
1 changed files with 11 additions and 1 deletions
|
|
@ -6497,7 +6497,17 @@ fs_nir_emit_intrinsic(nir_to_brw_state &ntb,
|
|||
|
||||
case nir_intrinsic_shuffle: {
|
||||
const brw_reg value = get_nir_src(ntb, instr->src[0]);
|
||||
const brw_reg index = get_nir_src(ntb, instr->src[1]);
|
||||
brw_reg index = get_nir_src(ntb, instr->src[1]);
|
||||
|
||||
if (devinfo->ver >= 30) {
|
||||
/* Mask index to constrain it to be within the valid range in
|
||||
* order to avoid potentially reading past the end of the GRF
|
||||
* file, which can lead to hangs on Xe3+ with VRT enabled.
|
||||
*/
|
||||
const brw_reg tmp = bld.vgrf(BRW_TYPE_UD);
|
||||
bld.AND(tmp, index, brw_imm_ud(s.dispatch_width - 1));
|
||||
index = tmp;
|
||||
}
|
||||
|
||||
bld.emit(SHADER_OPCODE_SHUFFLE, retype(dest, value.type), value, index);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue