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@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17012>
This commit is contained in:
Bas Nieuwenhuizen 2022-06-13 22:17:19 +02:00 committed by Marge Bot
parent a7d6365f20
commit e75f11625d

View file

@ -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 */