mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 01:30:25 +01:00
brw: make HALT instruction act as barrier in new CSE pass
This brings backc9e33e5cbf("intel/fs/cse: Make HALT instruction act as CSE barrier."), from the old CSE pass into the new one. Fixes new CTS test: dEQP-VK.subgroups.shader_quad_control.terminated_invocation Fixes:9690bd369d("intel/brw: Delete old local common subexpression elimination pass") Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34643>
This commit is contained in:
parent
b9275b54a1
commit
29d7b90cfc
1 changed files with 18 additions and 0 deletions
|
|
@ -418,6 +418,24 @@ brw_opt_cse_defs(brw_shader &s)
|
|||
last_flag_write = last;
|
||||
last = inst;
|
||||
|
||||
/* Discard jumps aren't represented in the CFG unfortunately, so we need
|
||||
* to make sure that they behave as a CSE barrier, since we lack global
|
||||
* dataflow information. This is particularly likely to cause problems
|
||||
* with instructions dependent on the current execution mask like
|
||||
* SHADER_OPCODE_FIND_LIVE_CHANNEL.
|
||||
*/
|
||||
if (inst->opcode == BRW_OPCODE_HALT ||
|
||||
inst->opcode == SHADER_OPCODE_HALT_TARGET) {
|
||||
/* Treat each side of the HALT separately for local_only
|
||||
* expressions as it's altering the channel enables.
|
||||
*/
|
||||
set_foreach(set, e) {
|
||||
brw_inst *match = (brw_inst *) e->key;
|
||||
if (match->block == block && local_only(match))
|
||||
_mesa_set_remove(set, e);
|
||||
}
|
||||
}
|
||||
|
||||
if (inst->dst.is_null()) {
|
||||
bool ignored;
|
||||
if (last_flag_write && !inst->writes_accumulator &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue