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.
Last edited by Botonoski on 2 November 2018 at 3:22 pm UTC
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
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.)
Last edited by YoRHa-2B on 2 November 2018 at 10:21 pm UTC
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.
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
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.
See more from me