From a41ccb0467aebd94afa06cac0c11a22f65fc2bbb Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 3 Nov 2022 09:55:49 +0000 Subject: [PATCH] a/vk: Use xrt limits for number of collection images max --- src/xrt/auxiliary/vk/vk_image_allocator.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xrt/auxiliary/vk/vk_image_allocator.h b/src/xrt/auxiliary/vk/vk_image_allocator.h index e870ee33f..9beac50da 100644 --- a/src/xrt/auxiliary/vk/vk_image_allocator.h +++ b/src/xrt/auxiliary/vk/vk_image_allocator.h @@ -1,4 +1,4 @@ -// Copyright 2020, Collabora, Ltd. +// Copyright 2020-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file @@ -9,6 +9,7 @@ #pragma once +#include "xrt/xrt_limits.h" #include "xrt/xrt_config_os.h" #include "xrt/xrt_vulkan_includes.h" #include "vk/vk_helpers.h" @@ -35,7 +36,11 @@ struct vk_image_collection { struct xrt_swapchain_create_info info; - struct vk_image images[8]; + /*! + * Limit set to same as max swapchain images because + * this struct is mostly used to back swapchains. + */ + struct vk_image images[XRT_MAX_SWAPCHAIN_IMAGES]; uint32_t image_count; };