mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nir/opt_tex_skip_helpers: don't skip helpers for terminate_if source
Helpers must be terminated correctly. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610>
This commit is contained in:
parent
12eb51fb0a
commit
26e6c4c092
1 changed files with 7 additions and 0 deletions
|
|
@ -125,6 +125,13 @@ nir_opt_tex_skip_helpers(nir_shader *shader, bool no_add_divergence)
|
|||
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
|
||||
if (nir_intrinsic_has_semantic(intr, NIR_INTRINSIC_SUBGROUP)) {
|
||||
nir_foreach_src(instr, set_src_needs_helpers, &hs);
|
||||
} else if (intr->intrinsic == nir_intrinsic_terminate_if) {
|
||||
/* Unlike demote, terminate disables invocations completely.
|
||||
* For example, a subgroup operation after terminate should
|
||||
* include helpers, but not the invocations that were terminated.
|
||||
* So the condition must be correct for helpers too.
|
||||
*/
|
||||
set_src_needs_helpers(&intr->src[0], &hs);
|
||||
} else {
|
||||
/* All I/O addresses need helpers because getting them wrong
|
||||
* may cause a fault.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue