diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index ca0be9510cd..2ab4e708f5c 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2511,6 +2511,19 @@ zink_get_disk_shader_cache(struct pipe_screen *_screen) return screen->disk_cache; } +VkSemaphore +zink_create_semaphore(struct zink_screen *screen) +{ + VkSemaphoreCreateInfo sci = { + VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, + NULL, + 0 + }; + VkSemaphore sem = VK_NULL_HANDLE; + VkResult ret = VKSCR(CreateSemaphore)(screen->dev, &sci, NULL, &sem); + return ret == VK_SUCCESS ? sem : VK_NULL_HANDLE; +} + static struct zink_screen * zink_internal_create_screen(const struct pipe_screen_config *config) { diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h index e678eb47f4f..1eed13c197c 100644 --- a/src/gallium/drivers/zink/zink_screen.h +++ b/src/gallium/drivers/zink/zink_screen.h @@ -96,6 +96,9 @@ zink_screen_handle_vkresult(struct zink_screen *screen, VkResult ret) return success; } +VkSemaphore +zink_create_semaphore(struct zink_screen *screen); + VkFormat zink_get_format(struct zink_screen *screen, enum pipe_format format);