Merge pull request #12324 from devnexen/macos_vulkan_build_fix

macOS with vulkan build fix
This commit is contained in:
Autechre 2021-04-26 22:16:24 +02:00 committed by GitHub
commit 8466a213e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,8 @@ typedef struct cocoa_ctx_data
/* TODO/FIXME - static globals */
static unsigned g_vk_minor = 0;
static unsigned g_vk_major = 0;
/* Forward declaration */
CocoaView *cocoaview_get(void);
static uint32_t cocoa_vk_gfx_ctx_get_flags(void *data)
{
@ -179,9 +181,13 @@ static void cocoa_vk_gfx_ctx_swap_buffers(void *data)
{
cocoa_ctx->vk.context.has_acquired_swapchain = false;
if (cocoa_ctx->vk.swapchain == VK_NULL_HANDLE)
{
retro_sleep(10);
}
else
{
vulkan_present(&cocoa_ctx->vk, cocoa_ctx->vk.context.current_swapchain_index);
}
}
vulkan_acquire_next_image(&cocoa_ctx->vk);
}

View File

@ -1867,6 +1867,7 @@ extern const gfx_ctx_driver_t gfx_ctx_videocore;
extern const gfx_ctx_driver_t gfx_ctx_qnx;
extern const gfx_ctx_driver_t gfx_ctx_cgl;
extern const gfx_ctx_driver_t gfx_ctx_cocoagl;
extern const gfx_ctx_driver_t gfx_ctx_cocoavk;
extern const gfx_ctx_driver_t gfx_ctx_emscripten;
extern const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev;
extern const gfx_ctx_driver_t gfx_ctx_khr_display;