mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-06 02:18:03 +02:00
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:
parent
81544d04ae
commit
7ff864e502
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue