pvr: Adjust EOT PBE state to account for the iview's base array layer
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Fri, 22 Sep 2023 09:11:09 +0000 (10:11 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 9 Oct 2023 16:58:05 +0000 (16:58 +0000)
Fixes various dEQP array tests.
E.g.
  dEQP-VK.pipeline.monolithic.framebuffer_attachment
    .1d_array_32_64_4

Reported-by: James Glanville <james.glanville@imgtec.com>
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/25348>

src/imagination/vulkan/pvr_cmd_buffer.c

index f7ae345..317e59c 100644 (file)
@@ -973,6 +973,9 @@ static void pvr_setup_pbe_state(
    surface_params.addr =
       PVR_DEV_ADDR_OFFSET(image->vma->dev_addr,
                           image->mip_levels[iview->vk.base_mip_level].offset);
+   surface_params.addr =
+      PVR_DEV_ADDR_OFFSET(surface_params.addr,
+                          iview->vk.base_array_layer * image->layer_size);
 
    surface_params.mem_layout = image->memlayout;
    surface_params.stride = pvr_stride_from_pitch(level_pitch, iview->vk.format);