mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Add vulkan path in registry_handle_global
This commit is contained in:
parent
620fbe8976
commit
bd672b8b72
@ -184,7 +184,25 @@ static void registry_handle_global(void *data, struct wl_registry *reg,
|
|||||||
(void)version;
|
(void)version;
|
||||||
|
|
||||||
if (string_is_equal(interface, "wl_compositor"))
|
if (string_is_equal(interface, "wl_compositor"))
|
||||||
wl->compositor = (struct wl_compositor*)wl_registry_bind(reg, id, &wl_compositor_interface, 1);
|
{
|
||||||
|
unsigned num = 1;
|
||||||
|
switch (wl_api)
|
||||||
|
{
|
||||||
|
case GFX_CTX_OPENGL_API:
|
||||||
|
case GFX_CTX_OPENGL_ES_API:
|
||||||
|
case GFX_CTX_OPENVG_API:
|
||||||
|
break;
|
||||||
|
case GFX_CTX_VULKAN_API:
|
||||||
|
num = 3;
|
||||||
|
break;
|
||||||
|
case GFX_CTX_NONE:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
wl->compositor = (struct wl_compositor*)wl_registry_bind(reg,
|
||||||
|
id, &wl_compositor_interface, num);
|
||||||
|
}
|
||||||
else if (string_is_equal(interface, "wl_shell"))
|
else if (string_is_equal(interface, "wl_shell"))
|
||||||
wl->shell = (struct wl_shell*)wl_registry_bind(reg, id, &wl_shell_interface, 1);
|
wl->shell = (struct wl_shell*)wl_registry_bind(reg, id, &wl_shell_interface, 1);
|
||||||
}
|
}
|
||||||
@ -375,13 +393,14 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
|
|||||||
#ifdef HAVE_VULKAN_SUPPORT
|
#ifdef HAVE_VULKAN_SUPPORT
|
||||||
wl->width = width;
|
wl->width = width;
|
||||||
wl->height = height;
|
wl->height = height;
|
||||||
if (!vulkan_create_swapchain(wl))
|
|
||||||
|
if (vulkan_create_swapchain(wl))
|
||||||
|
wl->context.invalid_swapchain = true;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
RARCH_ERR("[Wayland/Vulkan]: Failed to update swapchain.\n");
|
RARCH_ERR("[Wayland/Vulkan]: Failed to update swapchain.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
wl->context.invalid_swapchain = true;
|
|
||||||
|
|
||||||
wl->need_new_swapchain = false;
|
wl->need_new_swapchain = false;
|
||||||
#endif
|
#endif
|
||||||
@ -596,6 +615,7 @@ static void *gfx_ctx_wl_init(void *video_driver)
|
|||||||
break;
|
break;
|
||||||
case GFX_CTX_VULKAN_API:
|
case GFX_CTX_VULKAN_API:
|
||||||
#ifdef HAVE_VULKAN_SUPPORT
|
#ifdef HAVE_VULKAN_SUPPORT
|
||||||
|
{
|
||||||
app.pApplicationName = "RetroArch";
|
app.pApplicationName = "RetroArch";
|
||||||
app.applicationVersion = 0;
|
app.applicationVersion = 0;
|
||||||
app.pEngineName = "RetroArch";
|
app.pEngineName = "RetroArch";
|
||||||
@ -685,6 +705,7 @@ static void *gfx_ctx_wl_init(void *video_driver)
|
|||||||
wl->context.queue_lock = slock_new();
|
wl->context.queue_lock = slock_new();
|
||||||
if (!wl->context.queue_lock)
|
if (!wl->context.queue_lock)
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case GFX_CTX_NONE:
|
case GFX_CTX_NONE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user