From 7b3936cd0682194359be4009e9a1e59adc4c3a08 Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Thu, 5 Dec 2019 11:55:20 -0500 Subject: [PATCH] Adjust the Wayland Vulkan configuration tests Define VK_USE_PLATFORM_WAYLAND_KHR before the vulkan.h include so the test will fail if the Wayland WSI header doesn't exist. Require features.vulkan so that vulkan related code won't build when --disable-vulkan is used. Change-Id: I275efcb3e728b59c6f99598c235074b941f1fbf0 Reviewed-by: Dan Cape Reviewed-by: Paul Olav Tvete Reviewed-by: Johan Helsing --- src/plugins/platforms/wayland/configure.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/configure.json b/src/plugins/platforms/wayland/configure.json index f49beaf703c..94a1531d7ad 100644 --- a/src/plugins/platforms/wayland/configure.json +++ b/src/plugins/platforms/wayland/configure.json @@ -155,6 +155,9 @@ "label": "Vulkan Buffer Sharing", "type": "compile", "test": { + "head": [ + "#define VK_USE_PLATFORM_WAYLAND_KHR 1" + ], "include": [ "vulkan/vulkan.h" ], @@ -250,7 +253,7 @@ }, "wayland-vulkan-server-buffer": { "label": "Vulkan-based server buffer integration", - "condition": "features.wayland-client && features.opengl && features.egl && tests.vulkan-server-buffer", + "condition": "features.wayland-client && features.vulkan && features.opengl && features.egl && tests.vulkan-server-buffer", "output": [ "privateFeature" ] }, "wayland-shm-emulation-server-buffer": {