build: Make sure GTK compiles without Vulkan headers installed

Previously, code would work fine with --disable-vulkan if the Vulkan
headers were installed - code would happily just use them as they're
installed in /usr/include.
This commit is contained in:
Benjamin Otte
2016-12-09 20:21:18 +01:00
parent 98f5e794a6
commit 2c0564a46e
2 changed files with 7 additions and 5 deletions

View File

@@ -20,11 +20,9 @@
#include "config.h"
#include "gdkvulkancontextprivate.h"
#include "gdkvulkancontext.h"
#ifdef GDK_RENDERING_VULKAN
#include <vulkan/vulkan.h>
#endif
#include "gdkvulkancontextprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkinternals.h"
@@ -33,6 +31,7 @@
typedef struct _GdkVulkanContextPrivate GdkVulkanContextPrivate;
struct _GdkVulkanContextPrivate {
#ifdef GDK_RENDERING_VULKAN
VkSurfaceKHR surface;
VkSurfaceFormatKHR image_format;
@@ -42,8 +41,9 @@ struct _GdkVulkanContextPrivate {
guint n_images;
VkImage *images;
#endif
uint32_t draw_index;
guint32 draw_index;
};
enum {

View File

@@ -47,8 +47,10 @@ struct _GdkVulkanContextClass
{
GdkDrawContextClass parent_class;
#ifdef GDK_RENDERING_VULKAN
VkResult (* create_surface) (GdkVulkanContext *context,
VkSurfaceKHR *surface);
#endif
};
#ifdef GDK_RENDERING_VULKAN