vkformat: fix build error

fix build error when VK_KHR_format_feature_flags2 is not defined.

Co-authored-by: Victor Jaquez vjaquez@igalia.com
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8655>
This commit is contained in:
Dongyun Seo 2025-03-21 11:41:11 +09:00 committed by GStreamer Marge Bot
parent 4e4f8b7a79
commit bbc6535a6b

View File

@ -614,13 +614,18 @@ _get_feature_flags (GstVulkanDevice * device, gpointer func,
#endif
gst_vkGetPhysicalDeviceFormatProperties2 (gpu, format, &prop2);
if (supports_KHR_format_feature_flags2 (device))
if (supports_KHR_format_feature_flags2 (device)) {
#if defined (VK_KHR_format_feature_flags2)
return tiling == VK_IMAGE_TILING_LINEAR ?
prop3.linearTilingFeatures : prop3.optimalTilingFeatures;
else
#else
g_assert_not_reached ();
#endif
} else {
return tiling == VK_IMAGE_TILING_LINEAR ?
prop2.formatProperties.linearTilingFeatures :
prop2.formatProperties.optimalTilingFeatures;
}
}
#endif /* defined (VK_KHR_get_physical_device_properties2) */