[vulkan] fix custom border color query struct

This commit is contained in:
CamilleLaVey 2026-02-16 01:08:23 -04:00 committed by lizzie
parent e470715cc0
commit 598e88ea64

View file

@ -1064,12 +1064,14 @@ bool Device::GetSuitability(bool requires_swapchain) {
// Query VK_EXT_custom_border_color properties if the extension is enabled. // Query VK_EXT_custom_border_color properties if the extension is enabled.
if (extensions.custom_border_color) { if (extensions.custom_border_color) {
const auto fp = reinterpret_cast<PFN_vkGetPhysicalDeviceCustomBorderColorPropertiesEXT>( auto proc = dld.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceCustomBorderColorPropertiesEXT");
dld.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceCustomBorderColorPropertiesEXT")); if (proc != nullptr) {
if (fp != nullptr) { auto vkGetPhysicalDeviceCustomBorderColorPropertiesEXT =
reinterpret_cast<void(*)(VkPhysicalDevice, VkPhysicalDeviceCustomBorderColorPropertiesEXT*)>(
proc);
custom_border_color_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT; custom_border_color_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT;
custom_border_color_properties.pNext = nullptr; custom_border_color_properties.pNext = nullptr;
fp(physical, &custom_border_color_properties); vkGetPhysicalDeviceCustomBorderColorPropertiesEXT(physical, &custom_border_color_properties);
has_custom_border_color_properties = true; has_custom_border_color_properties = true;
} else { } else {
has_custom_border_color_properties = false; has_custom_border_color_properties = false;