From 96cfb1cb7fbec6358c97711ca943588bab8e3fc3 Mon Sep 17 00:00:00 2001 From: Nick Hamilton Date: Mon, 16 Mar 2026 14:31:48 +0000 Subject: [PATCH] pvr: Fix for multiple attachments being assigned to the same tile buffer. When the first attachment is assigned to a tile buffer, the buffer alloc mask was not been updated. This means when a second attachment is added to the same tile buffer it will be assigned the same offset as the first which will lead to incorrect behaviour. Fixes for depq-vk: dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.suballocation.attachment.4.568 dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.dedicated_allocation.attachment.4.568 dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.suballocation.attachment.4.568 dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment.4.568 Fixes: a7de9dae6bd ("pvr: Add routine for filling out usc_mrt_setup from dynamic rendering state") Signed-off-by: Nick Hamilton Acked-by: Frank Binns Part-of: --- src/imagination/ci/bxs-4-64-fails.txt | 6 +----- src/imagination/vulkan/pvr_arch_mrt.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/imagination/ci/bxs-4-64-fails.txt b/src/imagination/ci/bxs-4-64-fails.txt index eae3333403e..601f3fee0b9 100644 --- a/src/imagination/ci/bxs-4-64-fails.txt +++ b/src/imagination/ci/bxs-4-64-fails.txt @@ -24,10 +24,7 @@ dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.dynamic_ena dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.dynamic_enable.d32_sfloat_s8_uint,Fail dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.static_enable.d24_unorm_s8_uint,Fail dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.static_enable.d32_sfloat_s8_uint,Fail -dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.dedicated_allocation.attachment.4.568,Fail -dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.suballocation.attachment.4.568,Fail dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.basic.partial_binding_depth_stencil,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment.4.568,Fail dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed0,Fail dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed0_multiview,Fail dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed1,Fail @@ -227,6 +224,5 @@ dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed98_multiview, dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed99,Fail dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed99_multiview,Fail dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed9_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.suballocation.attachment.4.568,Fail dEQP-VK.spirv_assembly.instruction.spirv1p4.opcopylogical.nested_arrays_different_inner_stride,Crash -dEQP-VK.spirv_assembly.instruction.spirv1p4.opcopylogical.nested_arrays_different_strides,Crash +dEQP-VK.spirv_assembly.instruction.spirv1p4.opcopylogical.nested_arrays_different_strides,Crash \ No newline at end of file diff --git a/src/imagination/vulkan/pvr_arch_mrt.c b/src/imagination/vulkan/pvr_arch_mrt.c index ff7a456cb57..b0fc2f3eb14 100644 --- a/src/imagination/vulkan/pvr_arch_mrt.c +++ b/src/imagination/vulkan/pvr_arch_mrt.c @@ -169,6 +169,16 @@ static VkResult pvr_alloc_mrt(const struct pvr_device_info *dev_info, sizeof(alloc->tile_buffers[0U]) * (resource->mem.tile_buffer + 1U - alloc->tile_buffers_count)); alloc->tile_buffers_count = resource->mem.tile_buffer + 1U; + + /* Need to add the resource to the new tile buffer */ + struct pvr_mrt_alloc_mask *tib_alloc = + &alloc->tile_buffers[resource->mem.tile_buffer]; + + ASSERTED const int32_t tile_buffer_offset = + pvr_mrt_alloc_from_buffer(dev_info, + tib_alloc, + pixel_size); + assert(tile_buffer_offset == 0); } /* The hardware makes the bit depth of the on-chip storage and memory