From bbc6535a6b9f59c37797a45f6a00fb566a3e3023 Mon Sep 17 00:00:00 2001 From: Dongyun Seo Date: Fri, 21 Mar 2025 11:41:11 +0900 Subject: [PATCH] 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: --- .../gst-plugins-bad/gst-libs/gst/vulkan/gstvkformat.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkformat.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkformat.c index ac39472f85..8fad8fb8e7 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkformat.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkformat.c @@ -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) */