intel/fs: Fix use of undefined value in fixup_nomask_control_flow

Fixes: a8ac0bd759 "intel/fs/gen12: Workaround unwanted SEND execution..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7536>
(cherry picked from commit e9caba6ce5)
This commit is contained in:
Jason Ekstrand 2020-11-10 10:13:53 -06:00 committed by Dylan Baker
parent 51d4d91f7d
commit fe8c524c82
2 changed files with 3 additions and 2 deletions

View file

@ -778,7 +778,7 @@
"description": "intel/fs: Fix use of undefined value in fixup_nomask_control_flow",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "a8ac0bd759cbf9a5984df4bc9f553a3dca41a8ab"
},

View file

@ -7800,7 +7800,8 @@ fs_visitor::fixup_3src_null_dest()
static const fs_inst *
find_halt_control_flow_region_start(const fs_visitor *v)
{
if (brw_wm_prog_data(v->prog_data)->uses_kill) {
if (v->stage == MESA_SHADER_FRAGMENT &&
brw_wm_prog_data(v->prog_data)->uses_kill) {
foreach_block_and_inst(block, fs_inst, inst, v->cfg) {
if (inst->opcode == FS_OPCODE_DISCARD_JUMP ||
inst->opcode == FS_OPCODE_PLACEHOLDER_HALT)