nir/opt_uniform_atomics: add fs atomics predicated? flag

on agx (and mali), we predicate atomics on "if (!helper)", so doing so again in
this pass is redundant. and would cause a problem since we'd then have to lower
the "is helper inv?" flag late. so just skip the extra lowering code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
This commit is contained in:
Alyssa Rosenzweig
2024-08-01 22:00:46 -04:00
parent fbbdc965aa
commit d99c2ef059
5 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -1790,7 +1790,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
.lower_subgroup_masks = true,
};
if (OPT(nir_opt_uniform_atomics)) {
if (OPT(nir_opt_uniform_atomics, false)) {
OPT(nir_lower_subgroups, &subgroups_options);
OPT(nir_opt_algebraic_before_lower_int64);
+1 -1
View File
@@ -1472,7 +1472,7 @@ elk_postprocess_nir(nir_shader *nir, const struct elk_compiler *compiler,
*/
bool opt_uniform_atomic_stage_allowed = devinfo->ver >= 8;
if (opt_uniform_atomic_stage_allowed && OPT(nir_opt_uniform_atomics)) {
if (opt_uniform_atomic_stage_allowed && OPT(nir_opt_uniform_atomics, false)) {
const nir_lower_subgroups_options subgroups_options = {
.ballot_bit_size = 32,
.ballot_components = 1,