Mesa (main): nir/lower_mediump_io: Don't remap base unless needed
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 10 21:16:19 UTC 2021
Module: Mesa
Branch: main
Commit: 03c18f7efc4398f3a2ef1630bb40c6820aedd0dd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=03c18f7efc4398f3a2ef1630bb40c6820aedd0dd
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Wed Jun 16 14:54:46 2021 -0400
nir/lower_mediump_io: Don't remap base unless needed
Otherwise drivers that don't use 16-bit slots for varyings will get
confused and have their driver_locations scribbled over. This has caused
multiple problems for both Panfrost and Asahi this week. Given the only
other user of the pass for varyings is radeonsi, which needs both
together, I think this is the least controversial fix.
Fixes: fb29cef8dda ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11732>
---
src/compiler/nir/nir_lower_mediump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_lower_mediump.c b/src/compiler/nir/nir_lower_mediump.c
index 0cc58c1e755..f4b10806358 100644
--- a/src/compiler/nir/nir_lower_mediump.c
+++ b/src/compiler/nir/nir_lower_mediump.c
@@ -224,7 +224,7 @@ nir_lower_mediump_io(nir_shader *nir, nir_variable_mode modes,
}
}
- if (changed)
+ if (changed && use_16bit_slots)
nir_recompute_io_bases(impl, modes);
nir_metadata_preserve(impl, nir_metadata_all);
More information about the mesa-commit
mailing list