From 6d943e10a66cc9ecc8716d6ae30d4c0c3ad59c42 Mon Sep 17 00:00:00 2001 From: Greg V Date: Tue, 1 Jan 2019 02:38:00 +0300 Subject: [PATCH 1/2] Wayland: unbreak Vulkan after fixing HiDPI resizing --- gfx/drivers_context/wayland_ctx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index e65569e967..683c9a12bd 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -1058,8 +1058,8 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) break; case GFX_CTX_VULKAN_API: #ifdef HAVE_VULKAN - wl->width = width; - wl->height = height; + wl->width = width / wl->buffer_scale; + wl->height = height / wl->buffer_scale; if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval)) { From a9a53fdb646cb7755c3a1ebb11fb9ca9584450c3 Mon Sep 17 00:00:00 2001 From: Greg V Date: Tue, 1 Jan 2019 02:43:59 +0300 Subject: [PATCH 2/2] Wayland: create fullscreen Vulkan surface multiplied by the scale --- gfx/drivers_context/wayland_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 683c9a12bd..4037cc349e 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -1618,7 +1618,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data, #ifdef HAVE_VULKAN if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND, wl->input.dpy, wl->surface, - wl->width, wl->height, wl->swap_interval)) + wl->width * wl->buffer_scale, wl->height * wl->buffer_scale, wl->swap_interval)) goto error; #endif break;