ec-/Quake3e

Vulkan renderer only draws in top quarter of screen

Opened this issue · 9 comments

I'm on Arch Linux using Nvidia Open drivers and Wayland. I'm using the quake3e-git package from the AUR.

Using the Vulkan renderer, the game only renders in the top quarter of my fullscreen window as shown. When I set r_fullscreen 0, the game still only renders in the top quarter of the window. cl_renderer opengl renders the entire fullscreen window as expected.

Perhaps relevant settings:

seta r_mode "-1"
seta r_customwidth "3840"
seta r_customheight "2160"
seta cl_renderer "vulkan"
seta r_fullscsreen "1"

Screenshot_20241115_161741

Seems like wayland is reporting wrong size to game due to scaling factor. Are you using xwayland or did you force to wayland with sdl video driver env? r_mode is not used by default in r_fullscreen 1, r_modeFullscreen is. Also if your desktop resolution is in fact 4k you should be able to use -2 and not specify the width/height cvars.

Note it works fine for 4k res for me under Manjaro Linux KDE. Albeit this is X11 and NOT wayland.

It is using Wayland. Still getting the same behavior with r_mode -2 and r_modeFullscreen -2.

----- Initializing Renderer ----
-------------------------------
----- R_Init -----
SDL using driver "wayland"
Initializing Vulkan display
...setting mode -2: 3072 1728
Using 24 color bits, 24 depth, 8 stencil display.

You should probably try to force it to use x11 with SDL_VIDEODRIVER=x11 env var and have xwayland translate it. Wayland support is at the mercy of whatever SDL2 can handle with whatever scaling is on your machine.

Vulkan does work correctly with SDL_VIDEODRIVER=x11. For what it's worth, I'm using KDE Plasma 6.2.3 at 125% scaling. Thanks for your help.

ec- commented

Try to compile and run debug build and post \condump contents here

SDL_WINDOW_ALLOW_HIGHDPI presumably desired on wayland and macOS but even then not guaranteed. SDL_Vulkan_GetDrawableSize / SDL_GL_GetDrawableSize / SDL_GetWindowSize will have different behavior iirc.

Not really great wayland support with highdpi until SDL3 which has a lot of other downsides still that I can tell.

ec- commented

SDL2 might not report correctly window dimensions for Vulkan in Wayland mode, I see no reliable ways to fix this on engine side

now SDL_VIDEODRIVER=x11 doesn't seem to work, which did before

What else did you change on the system?