Mesa (main): radv: Deal with derefs from opaque types in function parameters.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 27 01:47:47 UTC 2022
Module: Mesa
Branch: main
Commit: e75f11625d1d9bac1d8c477ec75924290325c705
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e75f11625d1d9bac1d8c477ec75924290325c705
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Mon Jun 13 22:17:19 2022 +0200
radv: Deal with derefs from opaque types in function parameters.
Needs more copy propagation before nir_opt_derefs picks it up.
Note that the full general problem of opaque types stored in
intermediate variables is still open, but that seems like a whole
can of worms, and no sense to have gfxbench stay broken during the
time it takes to solve that.
Cc: mesa-stable
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5945
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17012>
---
src/amd/vulkan/radv_shader.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 04a4d4ef904..fe22ae372a7 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -761,8 +761,10 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_pipeline_
NIR_PASS(_, nir, nir_lower_returns);
bool progress = false;
NIR_PASS(progress, nir, nir_inline_functions);
- if (progress)
+ if (progress) {
+ NIR_PASS(_, nir, nir_opt_copy_prop_vars);
NIR_PASS(_, nir, nir_copy_prop);
+ }
NIR_PASS(_, nir, nir_opt_deref);
/* Pick off the single entrypoint that we want */
More information about the mesa-commit
mailing list