Join us on the Linux Gaming community on Lemmy, the federated open source alternative to Reddit.

Zink, a new driver project for OpenGL on Vulkan from Collabora

By - | Views: 12,482

Here's one I wasn't aware of, developer Erik “kusma” Faye-Lund from Collabora has been working on Zink. It's a new OpenGL implementation that works on top of Vulkan. It's a "Mesa Gallium driver", which aims to provide "hardware accelerated OpenGL when only a Vulkan driver is available".

Writing about the work in a blog post, the developer talked a little about why they're doing it. Their aims include: simplifying the graphics stack, lessening the work-load for future GPU drivers, enabling more integration and supporting application porting to Vulkan. Sounds like some pretty useful goals to me. They do go into more detail on each point, which is worth reading. The idea of everyone targeting Vulkan in future, with something like this being used for OpenGL is quite interesting if it could ever happen.

While it's still early days for the project, it's currently only supporting OpenGL 2.1, and OpenGL ES 1.1 and 2.0 plus some extensions and so it has some ways to go before it's truly useful. Even so, it sounds exciting and they show off some simple games working with it already. Dave Airlie from Red Hat has also been jumping in, with work on OpenGL 3.3 progressing so it looks like it might move forwards quite quickly.

See more about it here.

Hat tip to Joe from our Telegram Group.

Article taken from GamingOnLinux.com.
Tags: Mesa, OpenGL, Vulkan
19 Likes
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG and Humble Store. See more here.
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
The comments on this article are closed.
10 comments

Botonoski 2 Nov, 2018
I have had yet to consider a future where GPUs may lack OpenGL support, good that we're getting ahead of the game and creating an avenue for legacy support.


Last edited by Botonoski on 2 November 2018 at 3:22 pm UTC
MayeulC 2 Nov, 2018
It was in one of the earlier articles' comments that someone suggested that Zink + Gallium Nine could be an alternative to VK9 :)

Hopefully this will get us better OpenGL drivers in embedded devices. Unfortunately, companies could still provide their Vulkan drivers as blobs only, and better OGL support is, AFAIK, a driving force behind SoC companies contributing to Mesa.

Just imagine Nine over Zink over MoltenVK (would it be HLSL/DXIL -> TGSI -> ( NIR -> ) SPIR-V -> MLSL -> LLVM IR -> machine code?). I guess Nine would actually end up mainlined if this was a possibility.


Last edited by MayeulC on 2 November 2018 at 4:19 pm UTC
YoRHa-2B 2 Nov, 2018
It technically still is a translation layer, it just happens to depend on Mesa. But it was mentioned that it could potentially run on Nvidia (and with some work, even on Windows). Benefits should be obvious:

1. Nobody in their right mind would start a new OpenGL implementation without using Mesa.
2. Gallium itself is a modern API that should map reasonably well to Vulkan for the most part, it's somewhat similar to the D3D11 DDI.
(3. It might bring Nine to Nvidia one day. Would require Nine to add NIR support though.)
GustyGhost 2 Nov, 2018
I'm getting lost in keeping up with all of the different API translation projects. It's all beginning to resemble a hillbilly family tree.
YoRHa-2B 2 Nov, 2018
dgvoodoo2 is a decent implementation of D3D <=8 on top of D3D11, which apparently works quite nicely on DXVK and seems to work better than wined3d in some games. Sadly it's not open-source.


Last edited by YoRHa-2B on 2 November 2018 at 10:21 pm UTC
MayeulC 3 Nov, 2018
Quoting: YoRHa-2B(3. It might bring Nine to Nvidia one day. Would require Nine to add NIR support though.)

Could you elaborate on this a bit, please? I was under the impression that Nine would use TGSI as an intermediate representation, that NIR <-> TGSI was pretty functional, and that Zink, being a Gallium driver, would accept TGSI. Am I wrong and Zink is only being fed NIR?

I guess it sort of makes sense since I think we have NIR -> SPIR-V, but no TGSI -> SPIR-V.
YoRHa-2B 3 Nov, 2018
Quoteand that Zink, being a Gallium driver, would accept TGSI. Am I wrong and Zink is only being fed NIR?
Zink does indeed only support NIR, Intel's future Gallium driver will almost certainly also only accept NIR. TGSI is slowly being dropped because it's not a good IR (it's somewhat similar to DXBC, and that's never a good thing).

Quoting: MayeulCthat NIR <-> TGSI was pretty functional,
Is it? If that's the case, then Nine should indeed work, but i wasn't aware that TGSI->NIR is a thing.

Edit: Turns out you're right, there is a TGSI->NIR pass. As of right now, Nine fails to enumerate adapters, but ironically, wined3d can render simple Dx9 samples on top of the Zink driver! (not correctly yet, but it works!)


Last edited by YoRHa-2B on 4 November 2018 at 8:38 pm UTC
anarchist_tomato 5 Nov, 2018
Definitely worthy and needed but still a hilarious example of redundancy.
mannerov 6 Nov, 2018
Quoting: YoRHa-2BEdit: Turns out you're right, there is a TGSI->NIR pass. As of right now, Nine fails to enumerate adapters, but ironically, wined3d can render simple Dx9 samples on top of the Zink driver! (not correctly yet, but it works!)

That is not surprising, wined3d support old ogl for it's d3d backend.
Meanwhile nine dropped compatibility for cards (or drivers) with couldn't emulate full dx9 support (in practice you required it needs a dx10+ card, or an amd r500). That enables simplifications.

TGSI->NIR is a thing, but it needs to be plugged at some point, and maybe using it on nine will show a few issues to fix there. Nine also uses some features that are available via ogl only since some ogl 4 extensions.
Unless someone is motivated to implement the few nine required features in Zink and plug the two, support is unlikely to happen in the short term.
Then also, to enable nine internal multithreading (which reduces cpu overhead on the application thread), Zink will have to be multithread safe and be whitelisted in nine.
While you're here, please consider supporting GamingOnLinux on:

Patreon, Liberapay or PayPal Donation.

This ensures all of our main content remains totally free for everyone with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.