Zink OpenGL-On-Vulkan Driver Enables Shader Object Support

Written by Michael Larabel in Mesa on 27 April 2023 at 08:24 AM EDT. 11 Comments
Introduced one month ago in Vulkan 1.3.246 was the new VK_EXT_shader_object extension that was worked on by developers from Activision to Valve. Zink lead developer Mike Blumenkrantz at Valve has been busy the past few weeks on getting this shader object support wired up for use by this OpenGL-on-Vulkan driver.

VK_EXT_shader_object adds a new shader object type to represent a single compiled shader stage. The Vulkan shader objects are intended to be more flexible but comparably performant alternative to pipeline objects.

Earlier this week Blumenkrantz landed part one of his code to make use of shader objects in Zink. With that merge code he noted:
"this reimplements and uses EXT_shader_object for separate shaders

...but only in Tomb Raider (2013) since feedback loops are otherwise broken

...and also nvidia proprietary will crash when trying this since they have however many bugs

so really this implements something that nobody can use, but if they did use it on a reference implementation of EXT_shader_object that actually functioned (i.e., lavapipe) then it would work fine."

Merged overnight was part two of Zink's EXT-shader_object implementation:
"this enables EXT_shader_object use for all separate shader precompiles

ideally, once drivers catch up, this means it should be possible to (finally) play Tomb Raider (2013) without any hitching."

Then finally hitting Mesa 23.2-devel today as well is the final part three:
"this is the last part, enabling shader objects to be used for all precompilation when possible/available
this should match the functionality of GPL, but it should also (theoretically) have significantly less CPU overhead, so I've enabled this to be the new default when available

currently I'm not changing any of the requirements for shader object enablement, so this is probably only be usable on desktops"

In turn this should help provide for a smooth gaming experience for OpenGL titles like Tomb Raider running on Zink.

Tomb Raider on Linux

It's on my TODO list to run some fresh Zink benchmarks soon at least for Intel Arc Graphics and AMD Radeon hardware with their open-source Linux drivers.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week