gallivm: Run nir_convert_to_lcssa before nir_convert_from_ssa
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Sun, 13 Aug 2023 12:22:43 +0000 (14:22 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 14 Aug 2023 22:02:26 +0000 (22:02 +0000)
commitb2f6de8f0d86b8143084212f970af072780fc201
tree56e4975ff8049ea7e34fc09f017937e0c1ff3aae
parent4695bebc7951356c913b4695f36863ba4544e816
gallivm: Run nir_convert_to_lcssa before nir_convert_from_ssa

Without loop exit phis, the code emitted by nir_lower_non_uniform_access
won't be lowered to registers. Therefore, all lanes will have the value
of the last iteration.

Fixes the remaining descriptor indexing fails:
dEQP-VK.descriptor_indexing.storage_texel_buffer
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind_in_loop
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind_in_loop_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_in_loop
dEQP-VK.descriptor_indexing.storage_texel_buffer_in_loop_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_minNonUniform

cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24661>
src/gallium/auxiliary/gallivm/lp_bld_nir.c