nir/opt_access: fix getting variables in presence of similar bindings/desc
It's perfectly legal to declare multiple SSBOs that point to the same binding/descriptor_set with different access mask. Currently, it will always get the first one in the list that matches binding/desc_set regardless of the access mask, but other variables might have different access mask. Fix this by being conservative if another variable uses the same binding/desc_set because we can't get it reliably without adding a new field to vulkan_resource_index. This fixes rendering issues in Resident Evil Village with vkd3d-proton. This bug has been uncovered by ("spirv: Don't remove variables used by resource indexing intrinsics") because variables are no longer removed No fossils-db changes. Cc: 21.1 mesa-stable Signed-off-by:Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!10692>