headless: Fix build with up-to-date Vulkan headers

Vulkan Headers removed VK_FORMAT_RANGE_SIZE. The VkFormat enum now
has valid values in multiple ranges for different extensions.

Fixes headless implementation for itterating over core Vulkan 1.0
formats.

Change-Id: I417cfd881e479e5fb243c0b775600504af3877b1
Signed-off-by: Rosen Zhelev <rosen.zhelev@arm.com>
This commit is contained in:
Rosen Zhelev 2020-06-28 21:41:21 +01:00
parent 81544d04ae
commit 7ff864e502

View file

@ -93,10 +93,11 @@ VkResult surface_properties::get_surface_formats(VkPhysicalDevice physical_devic
VkResult res = VK_SUCCESS;
/* Construct a list of all formats supported by the driver - for color attachment */
VkFormat formats[VK_FORMAT_RANGE_SIZE];
constexpr int max_core_1_0_formats = VK_FORMAT_ASTC_12x12_SRGB_BLOCK + 1;
VkFormat formats[max_core_1_0_formats];
uint32_t format_count = 0;
for (int id = 0; id < VK_FORMAT_RANGE_SIZE; id++)
for (int id = 0; id < max_core_1_0_formats; id++)
{
VkImageFormatProperties image_format_props;