From 8ab4c23deb4f3d1cb0af3ba986f4ac8ec2d54945 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 17 Jul 2020 13:21:44 +0200 Subject: [PATCH] Move another context driver to VK context drivers --- retroarch.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/retroarch.c b/retroarch.c index 899b013b5b..c5c1e9418d 100644 --- a/retroarch.c +++ b/retroarch.c @@ -575,13 +575,18 @@ static const video_driver_t *video_drivers[] = { NULL, }; +#ifdef HAVE_VULKAN static const gfx_ctx_driver_t *gfx_ctx_vk_drivers[] = { -#if defined(_WIN32) && !defined(__WINRT__) && (defined(HAVE_VULKAN)) +#if defined(_WIN32) && !defined(__WINRT__) &gfx_ctx_w_vk, +#endif +#if defined(HAVE_VULKAN_DISPLAY) + &gfx_ctx_khr_display, #endif &gfx_ctx_null, NULL }; +#endif static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = { #if defined(ORBIS) @@ -652,9 +657,6 @@ static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = { #endif #ifdef EMSCRIPTEN &gfx_ctx_emscripten, -#endif -#if defined(HAVE_VULKAN) && defined(HAVE_VULKAN_DISPLAY) - &gfx_ctx_khr_display, #endif &gfx_ctx_null, NULL @@ -33039,6 +33041,7 @@ static const gfx_ctx_driver_t *video_context_driver_init( return ctx; } +#ifdef HAVE_VULKAN static const gfx_ctx_driver_t *vk_context_driver_init_first(void *data, const char *ident, enum gfx_ctx_api api, unsigned major, unsigned minor, bool hw_render_ctx, void **ctx_data) @@ -33083,6 +33086,7 @@ static const gfx_ctx_driver_t *vk_context_driver_init_first(void *data, return NULL; } +#endif static const gfx_ctx_driver_t *gl_context_driver_init_first(void *data, const char *ident, enum gfx_ctx_api api, unsigned major, @@ -33150,6 +33154,7 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data, switch (api) { case GFX_CTX_VULKAN_API: +#ifdef HAVE_VULKAN { const gfx_ctx_driver_t *ptr = vk_context_driver_init_first( data, ident, api, major, minor, hw_render_ctx, ctx_data); @@ -33157,6 +33162,7 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data, return ptr; /* fall-through if no valid driver was found */ } +#endif case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: case GFX_CTX_OPENVG_API: