A really small change to the Zink driver, that gives OpenGL support on top of Vulkan, has given an ~10x speed boost for DOOM (2016). Other games are likely to benefit from this change too but DOOM was the one where an issue was noticed.
Writing on their blog last week, developer Mike Blumenkrantz noted that a really odd issue was found where "Even as early as the title screen, framerate would struggle to hit 30fps for a while before rocketing up to whatever maximum it could reach. In-game was the same, soaring to the 200fps maximum after enough time standing stationary without moving the camera. As soon as the camera shifted however, back to 20fps we went.".
After investigating they found the problem and a merge request that was accepted for Mesa that's only around 4 lines has fixed the issue to allow DOOM to run at full-speed on the Zink driver.
Makes me often wonder how many things can be fixed up by such small changes.
What's the point of the Zink driver? As the Mesa documentation states: "The Zink driver is a Gallium driver that emits Vulkan API calls instead of targeting a specific GPU architecture. This can be used to get full desktop OpenGL support on devices that only support Vulkan.".
Quoting: GuestNot entirely true. DOOM does have a few crash bugs with their own Vulkan implementation and for some OpenGL has been more stable so this can also help there too.Quoting: PinballWizardThis is a big deal for me; the multiplayer for that is literally my favorite game at the moment and it's sub-par Linux performance has left me booting into Windows to play! Thanks for sharing this, looking into how to leverage it.
I think you are misreading this: DOOM 2016 already has Vulkan support, and the Vulkan renderer has always performed better than OpenGL. I doubt running OpenGL-atop-of-Vulkan would be better than running Vulkan directly.
This is only useful on OpenGL-only games and devices that *only* support Vulkan.
https://www.phoronix.com/news/Zink-macOS-OpenGL-Vulkan
That's likely where I got that idea.
Quoting: GuestHe specifically mentioned performance... anyway, if he has a problem with Vulkan crashing, he should just use the OpenGL renderer!
I think the point was that if their card doesn't support OpenGL (which... we don't know - PinballWizard doesn't share any PC info), then Zink is the only way to use the OpenGL renderer. I think?
Quoting: GuestI honestly think you're missing the point. Performance is an issue, yes. DOOM has Vulkan and OpenGL and while Vulkan performs better, for a lot of people it has numerous crash bugs that OpenGL in DOOM does not. So by using Zink, they could potentially see better performance than plain OpenGL in DOOM without the crashing of the Vulkan implementation in DOOM directly.Quoting: Liam DaweQuoting: GuestNot entirely true. DOOM does have a few crash bugs with their own Vulkan implementation and for some OpenGL has been more stable so this can also help there too.Quoting: PinballWizardThis is a big deal for me; the multiplayer for that is literally my favorite game at the moment and it's sub-par Linux performance has left me booting into Windows to play! Thanks for sharing this, looking into how to leverage it.
I think you are misreading this: DOOM 2016 already has Vulkan support, and the Vulkan renderer has always performed better than OpenGL. I doubt running OpenGL-atop-of-Vulkan would be better than running Vulkan directly.
This is only useful on OpenGL-only games and devices that *only* support Vulkan.
He specifically mentioned performance... anyway, if he has a problem with Vulkan crashing, he should just use the OpenGL renderer!
I know you love your translation layers Liam, but there is no need to add yet another one in this case.
Last edited by Liam Dawe on 15 February 2023 at 8:55 pm UTC
Quoting: slaapliedjeHa, at this point there are too many wrappers with various names. For some reason I was thinking Zink was a macOS thing, and was surprised to see the article here initially. Since macOS doesn't actually have Vulkan support directly, I was thinking translating Vulkan to OpenGL makes more sense there.
https://www.phoronix.com/news/Zink-macOS-OpenGL-Vulkan
That's likely where I got that idea.
Native OpenGL support on MacOSX and iOS has been deprecated years ago (meaning they won't outright remove it but they won't improve it nor fix it when it breaks)
Vulkan over OpenGL is very hard because it's a more flexible API that more closely resembles how a modern GPU works internally, while OpenGL is more abstracted and high-level, so it does a lot of stuff in the background for each command... easier to ask it to do X but harder to optimize (and damn hard to make it do exactly each thing you can do in vulkan without crazy wasteful workarounds). OpenGL over Vulkan isn't easy, but it sure is much much easier than that.
MacOSX and iOS also have no Vulkan support, but their Metal API is quite similar to Vulkan so there is MoltenVK to translate Vulkan to Metal... and this works quite cleanly with mostly zero overhead, the entire vulkan featureset and no big quirks.
It works so well that using Zync to provide OpenGL over Vulkan over MoltenVK over Metal works pretty much as expected when Zync is just running over Vulkan... and it is something pretty useful to have there because of OpenGL being deprecated.
For continuously developed apps like an Office Suite Apple's pressure over app devs seems reasonable (eg: making every app use the best APIs available and etc), but for gaming it's an impossible long-term proposition (because old games frequently don't even get simple updates, much less entirely rewritten).
What makes it a bit less impossible are exactly the efforts of 3rd-party opensource devs like the ones behing Zync, MoltenVK and etc.
In that realm it's hard to not admire the stuff that's modular, stackable, fully compliant to open standards, cross-platform, open to new maintainers so the torch is passed along and almost never goes out, etc.
Last edited by Marlock on 16 February 2023 at 2:13 am UTC
See more from me