anv: resolve wayland-only build
authorEmil Velikov <emil.velikov@collabora.com>
Sat, 28 May 2016 18:49:37 +0000 (19:49 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 30 May 2016 09:26:35 +0000 (10:26 +0100)
Ensure that the final X11/XCB hunk is guarded by the correct macro.
Otherwise we'll require the symbol even when building without said
platform.

Cc: Cedric Sodhi <manday@openmail.cc>
Reported-by: Cedric Sodhi <manday@openmail.cc>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_wsi.c

index ce9ec32f3ecc260e666137ab04779fc4cbcbe402..006944a7e25063d10d1a4c3dbb1f3ddc4450957a 100644 (file)
@@ -39,7 +39,9 @@ anv_init_wsi(struct anv_physical_device *physical_device)
 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
    result = anv_wl_init_wsi(physical_device);
    if (result != VK_SUCCESS) {
+#ifdef VK_USE_PLATFORM_XCB_KHR
       anv_x11_finish_wsi(physical_device);
+#endif
       return result;
    }
 #endif