We're hiring!
*

A summer sprint: bringing near-native performance to Zink

Mike Blumenkrantz avatar

Mike Blumenkrantz
November 06, 2020

Share this post:

Reading time:

Hello! I'm Mike, and this is your regularly-scheduled Fall news roundup for the Zink project. While I'm not currently working at Collabora, I've had an absolute blast working with and getting mentored by the experts here (hi Erik!) as I struggled to figure out all of this graphics driver stuff and then get coding on the project. I've since accounted for roughly 70% of all patches to the driver since May of this year, and significant progress has been made.

That being said, I thought it would be great to post my latest Zink update on Collabora's blog, as this week marks a little over 2 years since the project was initially announced!

As an organization, Collabora are true masters at mentoring and community outreach, and with the help of experts like Erik Faye-Lund and Daniel Stone, I found it both easy and productive to start hacking on some code in my free time to make great strides in taking the driver to the next level.

So, let's dive in.

Current Status

If a Mesa release shipped today, Zink would have a number of improvements from the previous Fall update:

  • core GL 3.3 support is now finished
  • MacOS support has been added (and continues to be worked on thanks to Duncan Hopkins)
  • RaspberryPi 4 support thanks to Igalia

Near Term

With this said, I have a public branch with well over 400 patches that are going to continue to be landing. That's why in the very near future, expect to see support for:

And that'll round out GL 4.0 support! From there it's another 150+ patches to get to GL 4.6 and ES 3.2, the process of which I've been chronicling in some detail on my blog.

Future Plans

Feature support isn't the only thing people want out of graphics drivers, however, and Zink is no exception. I have a couple hundred patches which improve Zink performance which I'll be looking to merge once core features have all been implemented. Here's a quick retrospective of the progress.

The starting point of benchmarking, for which I used Unigine Heaven as it's representative of a modern 3D game, was very humble:


The textures were failing to render in color due to an application bug that required a driconf (configuration for graphics drivers) workaround.

Also the FPS is decidedly not great, even on my Intel laptop's integrated GPU.

With the rendering problem fixed, things still looked grim:


14FPS isn't very much, especially considering native GL drivers were hitting upwards of 50FPS at the same point, meaning Zink was starting from ~25% of native performance.

I spent a week or so (and 75ish patches) aggressively optimizing Zink's command buffer dispatch and descriptor usage to implement caching and recycling, and things were now looking a lot better:


This ended up being huge, and Zink was now over 60% of native performance. It still wasn't enough, however, as nobody is going to want to use a driver that can only play games at 60% of their hardware's capability. With the help of more internal rewrites as well as integrating Marek Olšák's threaded GL context, I made one final push for a big FPS gain:


With these changes (which I've detailed more on my blog), Zink is now at ~95% of native performance on my system, and I expect this number to improve further in 2021 after further review and discussion with all the helpful folks here.

The future for Zink is bright!

Community-Building

The #zink channel on FreeNode is growing larger every day, as are the number of bug reports and news articles related to Zink. If anyone out there has an interest in doing Open Source work, either as a hobby or a career, I can't recommend Collabora and their associated projects highly enough.

If you're interested in Zink, feel free to comment here, join IRC (#zink on FreeNode), or reach out more directly to anyone involved.

Comments (2)

  1. Mattias Bengtsson:
    Nov 06, 2020 at 11:17 PM

    95% is huuuge! Especially over time if less new games and software will use OpenGL.

    Great work!!

    Reply to this comment

    Reply to this comment

  2. Alvar Lagerlöf:
    Nov 21, 2020 at 10:52 PM

    Amazing work! Along with things like DXVK, Vulkan is really shaping up to be used everywhere!

    Reply to this comment

    Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Automatic regression handling and reporting for the Linux Kernel

14/03/2024

In continuation with our series about Kernel Integration we'll go into more detail about how regression detection, processing, and tracking…

Almost a fully open-source boot chain for Rockchip's RK3588!

21/02/2024

Now included in our Debian images & available via our GitLab, you can build a complete, working BL31 (Boot Loader stage 3.1), and replace…

What's the latest with WirePlumber?

19/02/2024

Back in 2022, after a series of issues were found in its design, I made the call to rework some of WirePlumber's fundamentals in order to…

DRM-CI: A GitLab-CI pipeline for Linux kernel testing

08/02/2024

Continuing our Kernel Integration series, we're excited to introduce DRM-CI, a groundbreaking solution that enables developers to test their…

Persian Rug, Part 4 - The limitations of proxies

23/01/2024

This is the fourth and final part in a series on persian-rug, a Rust crate for interconnected objects. We've touched on the two big limitations:…

How to share code between Vulkan and Gallium

16/01/2024

One of the key high-level challenges of building Mesa drivers these days is figuring out how to best share code between a Vulkan driver…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2024. All rights reserved. Privacy Notice. Sitemap.