pvr: Fix typo causing seg faults copying immutable samplers
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Thu, 18 May 2023 12:43:11 +0000 (13:43 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 5 Jun 2023 13:06:57 +0000 (13:06 +0000)
Fixes seg faults in:
  dEQP-VK.binding_model.shader_access.primary_cmd_buf
    .sampler_immutable.no_access.single_descriptor.*
  dEQP-VK.binding_model.shader_access.primary_cmd_buf
    .sampler_immutable.no_access.multiple_contiguous_descriptors.*

It does not fix them. Now they just hit asserts in the compiler.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23357>

src/imagination/vulkan/pvr_descriptor_set.c

index 7d34e5e..8227aaf 100644 (file)
@@ -541,7 +541,7 @@ VkResult pvr_CreateDescriptorSetLayout(
             for (uint32_t j = 0; j < binding->descriptorCount; j++) {
                PVR_FROM_HANDLE(pvr_sampler,
                                sampler,
-                               bindings->pImmutableSamplers[j]);
+                               binding->pImmutableSamplers[j]);
                const uint32_t next = j + layout->immutable_sampler_count;
 
                layout->immutable_samplers[next] = sampler;