summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2021-06-16 14:54:46 -0400
committerDylan Baker <dylan.c.baker@intel.com>2021-08-12 10:06:57 -0700
commit4b0f88e7e541e6d3cb51b0861df08de16c323aaa (patch)
tree8e2e9491aa3f99cc976c1ed6e3bae11349f8b765
parentb750b385cf4d90343329abfea5de1db9ea7f15a6 (diff)
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@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11732> (cherry picked from commit 03c18f7efc4398f3a2ef1630bb40c6820aedd0dd)
-rw-r--r--.pick_status.json2
-rw-r--r--src/compiler/nir/nir_lower_mediump.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index ad85ee20307..b97ffb384d4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -292,7 +292,7 @@
"description": "nir/lower_mediump_io: Don't remap base unless needed",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "fb29cef8ddabdd05aeddc5220017bb28a83bb19c"
},
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);