mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 13:10:07 +00:00
vulkan: Guard dmabuf code with HAVE_DMABUF
This commit is contained in:
parent
440c207146
commit
7830535c04
@ -1826,6 +1826,8 @@ gdk_display_unref_vulkan (GdkDisplay *display)
|
||||
display->vk_instance = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DMABUF
|
||||
|
||||
/* Hack. We don't include gsk/gsk.h here to avoid a build order problem
|
||||
* with the generated header gskenumtypes.h, so we need to hack around
|
||||
* a bit to access the gsk api we need.
|
||||
@ -1915,6 +1917,8 @@ gdk_vulkan_get_dmabuf_downloader (GdkDisplay *display,
|
||||
return GDK_DMABUF_DOWNLOADER (renderer);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
VkShaderModule
|
||||
gdk_display_get_vk_shader_module (GdkDisplay *self,
|
||||
const char *resource_name)
|
||||
|
@ -78,8 +78,10 @@ gboolean gdk_display_init_vulkan (GdkDisp
|
||||
void gdk_display_ref_vulkan (GdkDisplay *display);
|
||||
void gdk_display_unref_vulkan (GdkDisplay *display);
|
||||
|
||||
#ifdef HAVE_DMABUF
|
||||
GdkDmabufDownloader * gdk_vulkan_get_dmabuf_downloader (GdkDisplay *display,
|
||||
GdkDmabufFormatsBuilder *builder);
|
||||
#endif
|
||||
|
||||
VkShaderModule gdk_display_get_vk_shader_module (GdkDisplay *display,
|
||||
const char *resource_name);
|
||||
|
@ -69,6 +69,8 @@ gsk_gpu_download_op_print (GskGpuOp *op,
|
||||
}
|
||||
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
|
||||
#ifdef HAVE_DMABUF
|
||||
/* The code needs to run here because vkGetSemaphoreFdKHR() may
|
||||
* only be called after the semaphore has been submitted via
|
||||
* vkQueueSubmit().
|
||||
@ -102,6 +104,7 @@ gsk_gpu_download_op_vk_sync_semaphore (GskGpuDownloadOp *self)
|
||||
|
||||
vkDestroySemaphore (display->vk_device, self->vk_semaphore, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
gsk_gpu_download_op_vk_create (GskGpuDownloadOp *self)
|
||||
|
Loading…
Reference in New Issue
Block a user