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: ae29e1cf76 ("pvr: drop pvr_assert macro")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39916>
This commit is contained in:
Frank Binns 2026-02-14 00:08:05 +00:00 committed by Marge Bot
parent 7a6d3c2815
commit 929fc82b2f

View file

@ -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;