From 929fc82b2f8c259cbe77dc62ea657baa8d4473cd Mon Sep 17 00:00:00 2001 From: Frank Binns Date: Sat, 14 Feb 2026 00:08:05 +0000 Subject: [PATCH] pvr: remove asserts in pvr_get_image_subresource_layout() These asserts were there to validate this bit of the Vulkan spec: VUID-vkGetImageSubresourceLayout-mipLevel-01716 The mipLevel member of pSubresource must be less than the mipLevels specified in image VUID-vkGetImageSubresourceLayout-arrayLayer-01717 The arrayLayer member of pSubresource must be less than the arrayLayers specified in image However, this function isn't just called via vkGetImageSubresourceLayout(), but from elsewhere in the driver. At least in the case of arrayLayer, the assert doesn't always hold true, for example, in the case of deferred RTA clears on a 2D array image view of a 3D image. The array layer assert was being hit by the following test cases: dEQP-VK.renderpass.remaining_array_layers.multi_layer_fb.* dEQP-VK.renderpass2.remaining_array_layers.multi_layer_fb.* As the asserts don't really add any value, rather than moving them into pvr_GetImageSubresourceLayout(), just drop them entirely. Fixes: ae29e1cf7618 ("pvr: drop pvr_assert macro") Signed-off-by: Frank Binns Reviewed-by: Simon Perretta Part-of: --- src/imagination/vulkan/pvr_image.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/imagination/vulkan/pvr_image.c b/src/imagination/vulkan/pvr_image.c index 7d7acebda72..9955ef8e7a1 100644 --- a/src/imagination/vulkan/pvr_image.c +++ b/src/imagination/vulkan/pvr_image.c @@ -423,9 +423,6 @@ void pvr_get_image_subresource_layout(const struct pvr_image *image, const struct pvr_mip_level *mip_level = &plane->mip_levels[subresource->mipLevel]; - assert(subresource->mipLevel < image->vk.mip_levels); - assert(subresource->arrayLayer < image->vk.array_layers); - layout->offset = plane->offset + subresource->arrayLayer * plane->layer_size + mip_level->offset;