-
Notifications
You must be signed in to change notification settings - Fork 475
Description
some time ago i noticed that our media player mpv that uses moltenvk via libplacebo + vulkan started to exhibit glitches in rendering:
- green artifacts
- weirdly scaled/shifted frames in-between normal frames (noticable on playback)
- OSC/stats glitching, no background colour
- sometimes several swapchain errors, when seeking/next file switch, rendering stops
i can reliable reproduce the problem when putting enough pressure on the GPU and it being close to its limits, with the current moltenvk release.
bisected the problem to following libplacebo commit haasn/libplacebo@11b3350. everything is fine before this. the changes of that commit seems fine and in general we don't see anything obviously wrong with it. furthermore, even though i don't like to argument that way, no other vulkan driver on any other platform exhibits that problem currently.
i tried the following, which still exhibits the problems:
MVK_CONFIG_ALLOW_METAL_EVENTS=0MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE=0
following does not exhibit the problems or can't be observed:
MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE=3
MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE=3 is very slow and doesn't really saturate my GPU, it only renders between 35-45fps in my tests and not the ~60fps like the other setups. so it might still exhibit the problem if it were faster.
some screenshots and videos of the problem:
green artifacts:

stats glitch, vanishing background between frames:


screen recording of the glitches:
background + green: https://0x0.st/PXjm.mov
scale-shift: https://0x0.st/PXja.mov
original issue as reference with more infos mpv-player/mpv#17258