vkdisplay: Use ifdef for platform specific defines

VK_KHR_*_SURFACE_EXTENSION_NAME are only available when corresponding
WSI is enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=784539
This commit is contained in:
Jussi Kukkonen 2017-07-05 11:00:42 +03:00 committed by Matthew Waters
parent c538942b0d
commit 9c6d36984f

View file

@ -449,11 +449,15 @@ gst_vulkan_display_type_to_extension_string (GstVulkanDisplayType type)
if (type == GST_VULKAN_DISPLAY_TYPE_NONE)
return NULL;
#if GST_VULKAN_HAVE_WINDOW_XCB
if (type & GST_VULKAN_DISPLAY_TYPE_XCB)
return VK_KHR_XCB_SURFACE_EXTENSION_NAME;
#endif
#if GST_VULKAN_HAVE_WINDOW_WAYLAND
if (type & GST_VULKAN_DISPLAY_TYPE_WAYLAND)
return VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
#endif
return NULL;
}