Move another context driver to VK context drivers

This commit is contained in:
twinaphex 2020-07-17 13:21:44 +02:00
parent 2ff2604e69
commit 8ab4c23deb
1 changed files with 10 additions and 4 deletions

View File

@ -575,13 +575,18 @@ static const video_driver_t *video_drivers[] = {
NULL, NULL,
}; };
#ifdef HAVE_VULKAN
static const gfx_ctx_driver_t *gfx_ctx_vk_drivers[] = { 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, &gfx_ctx_w_vk,
#endif
#if defined(HAVE_VULKAN_DISPLAY)
&gfx_ctx_khr_display,
#endif #endif
&gfx_ctx_null, &gfx_ctx_null,
NULL NULL
}; };
#endif
static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = { static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = {
#if defined(ORBIS) #if defined(ORBIS)
@ -652,9 +657,6 @@ static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = {
#endif #endif
#ifdef EMSCRIPTEN #ifdef EMSCRIPTEN
&gfx_ctx_emscripten, &gfx_ctx_emscripten,
#endif
#if defined(HAVE_VULKAN) && defined(HAVE_VULKAN_DISPLAY)
&gfx_ctx_khr_display,
#endif #endif
&gfx_ctx_null, &gfx_ctx_null,
NULL NULL
@ -33039,6 +33041,7 @@ static const gfx_ctx_driver_t *video_context_driver_init(
return ctx; return ctx;
} }
#ifdef HAVE_VULKAN
static const gfx_ctx_driver_t *vk_context_driver_init_first(void *data, static const gfx_ctx_driver_t *vk_context_driver_init_first(void *data,
const char *ident, enum gfx_ctx_api api, unsigned major, const char *ident, enum gfx_ctx_api api, unsigned major,
unsigned minor, bool hw_render_ctx, void **ctx_data) 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; return NULL;
} }
#endif
static const gfx_ctx_driver_t *gl_context_driver_init_first(void *data, static const gfx_ctx_driver_t *gl_context_driver_init_first(void *data,
const char *ident, enum gfx_ctx_api api, unsigned major, 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) switch (api)
{ {
case GFX_CTX_VULKAN_API: case GFX_CTX_VULKAN_API:
#ifdef HAVE_VULKAN
{ {
const gfx_ctx_driver_t *ptr = vk_context_driver_init_first( const gfx_ctx_driver_t *ptr = vk_context_driver_init_first(
data, ident, api, major, minor, hw_render_ctx, ctx_data); 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; return ptr;
/* fall-through if no valid driver was found */ /* fall-through if no valid driver was found */
} }
#endif
case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_API:
case GFX_CTX_OPENGL_ES_API: case GFX_CTX_OPENGL_ES_API:
case GFX_CTX_OPENVG_API: case GFX_CTX_OPENVG_API: