radv: Call nir_lower_array_deref_of_vec in radv_lower_io_to_scalar_early.

This fixes an issue when a vector component of an arrayed output has a deref.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8197
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21028>
(cherry picked from commit e13074d763)
This commit is contained in:
Timur Kristóf 2023-02-01 01:02:09 +01:00 committed by Eric Engestrom
parent 35d330ed89
commit 07d5b352b1
2 changed files with 5 additions and 1 deletions

View file

@ -1723,7 +1723,7 @@
"description": "radv: Call nir_lower_array_deref_of_vec in radv_lower_io_to_scalar_early.",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -2427,6 +2427,10 @@ radv_lower_io_to_scalar_early(nir_shader *nir, nir_variable_mode mask)
{
bool progress = false;
NIR_PASS(progress, nir, nir_lower_array_deref_of_vec, mask,
nir_lower_direct_array_deref_of_vec_load | nir_lower_indirect_array_deref_of_vec_load |
nir_lower_direct_array_deref_of_vec_store |
nir_lower_indirect_array_deref_of_vec_store);
NIR_PASS(progress, nir, nir_lower_io_to_scalar_early, mask);
if (progress) {
/* Optimize the new vector code and then remove dead vars */