mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 06:50:10 +01:00
zink: add a util function for creating semaphores
annoying to keep copy/pasting this around Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681>
This commit is contained in:
parent
020db79340
commit
283de45fd6
2 changed files with 16 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue