summaryrefslogtreecommitdiff
path: root/gdk/gdkvulkancontextprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-28 16:34:01 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-09 18:35:51 +0100
commit6d1d6e67925035742f70b9d167ab41dfe7075ff3 (patch)
tree9f9c032b4cf0a2d39027fe1d13e46f1b8ff45c95 /gdk/gdkvulkancontextprivate.h
parentcca547e5bccda95fd8bf283bec1bfc7b564e88f6 (diff)
downloadgtk+-6d1d6e67925035742f70b9d167ab41dfe7075ff3.tar.gz
vulkan: Add more infrastructure
gdk_window_create_vulkan_context() now exists and will return a Vulkan context for the given window. It even initializes the surface. But it doesn't do anything useful yet.
Diffstat (limited to 'gdk/gdkvulkancontextprivate.h')
-rw-r--r--gdk/gdkvulkancontextprivate.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdk/gdkvulkancontextprivate.h b/gdk/gdkvulkancontextprivate.h
index 7bed0d92fe..de4ba2ff2c 100644
--- a/gdk/gdkvulkancontextprivate.h
+++ b/gdk/gdkvulkancontextprivate.h
@@ -43,6 +43,9 @@ struct _GdkVulkanContext
struct _GdkVulkanContextClass
{
GObjectClass parent_class;
+
+ VkResult (* create_surface) (GdkVulkanContext *context,
+ VkSurfaceKHR *surface);
};
#ifdef GDK_WINDOWING_VULKAN
@@ -61,17 +64,20 @@ gdk_vulkan_handle_result (VkResult res,
#define GDK_VK_CHECK(func, ...) gdk_vulkan_handle_result (func (__VA_ARGS__), G_STRINGIFY (func))
gboolean gdk_display_ref_vulkan (GdkDisplay *display,
- const char *wsi_extension_name);
+ GError **error);
void gdk_display_unref_vulkan (GdkDisplay *display);
#else /* !GDK_WINDOWING_VULKAN */
static inline gboolean
-gdk_display_init_vulkan (GdkDisplay *display,
- const char *wsi_extension_name)
+gdk_display_ref_vulkan (GdkDisplay *display,
+ GError **error)
{
GDK_NOTE (VULKAN, g_print ("Support for Vulkan disabled at compile-time"));
+ g_set_error_literal (error, GDK_VULKAN_ERROR, GDK_VULKAN_ERROR_UNSUPPORTED,
+ "Vulkan support was not enabled at compie time.");
+
return FALSE;
}