Commit 7ff864e5 authored by Rosen's avatar Rosen
Browse files

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

Change-Id: I417cfd881e479e5fb243c0b775600504af3877b1
Signed-off-by: Rosen's avatarRosen Zhelev <>
parent 81544d04
Pipeline #169836 passed with stage
in 1 minute and 19 seconds
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment