panvk: Hook up descriptor array bounds checking

The clamping on the array index was already implemented, but
lower_desc_ctx::add_bounds_checks was always false. Set it based on
the robustness state we're being passed.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31251>
This commit is contained in:
Boris Brezillon
2024-09-19 09:52:38 +02:00
committed by Marge Bot
parent 0872c65f13
commit 15f18c862f

View File

@@ -1179,7 +1179,14 @@ panvk_per_arch(nir_lower_descriptors)(
struct vk_descriptor_set_layout *const *set_layouts,
struct panvk_shader *shader)
{
struct lower_desc_ctx ctx = {0};
struct lower_desc_ctx ctx = {
.add_bounds_checks =
rs->storage_buffers !=
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT ||
rs->uniform_buffers !=
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT ||
rs->images != VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT,
};
bool progress;
#if PAN_ARCH <= 7