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.
The feature-level of Zink depends on two things; what’s implemented in Zink, as well as the features of the Vulkan driver.
OpenGL 2.1 is the minimum version Zink can support, and will always be exposed, given Vulkan support. There’s a few features that are required for correct behavior, but not all of these are validated; instead you’ll see rendering-issues and likely validation error, or even crashes.
Here’s a list of those requirements:
In addition to this, VK_KHR_external_memory is required to support the DRI code-path.
We also require either the VK_EXT_scalar_block_layout extension or
Vulkan 1.2, with the
For OpenGL 3.0 support, the following additional requirements needs to be supported:
For OpenGL 3.1 support, the following additional
For OpenGL 3.2 support, the following additional
are required to be supported, although some of these might not actually get
For OpenGL 3.3 support, the following additional requirements needs to be supported, although some of these might not actually get verified:
For OpenGL 4.0 support, the following additional requirements needs to be supported:
For OpenGL 4.1 support, the following additional
For OpenGL 4.2 support, the following additional requirements needs to be supported:
For Vulkan 1.2 and above:
For Vulkan 1.1 and below:
For OpenGL 4.3 support, the following additional requirements needs to be supported:
For OpenGL 4.4 support, the following additional requirements needs to be supported:
For OpenGL 4.5 support, the following additional
are required to be supported
There’s a few tools that are useful for debugging Zink, like this environment variable:
ZINK_DEBUGType: flags, Default: ""¶
Print the NIR form of all shaders to stderr.
Write the binary SPIR-V form of all compiled shaders to a file in the current directory, and print a message with the filename to stderr.
Print the TGSI form of TGSI shaders to stderr.
Dump Validation layer output.
Vulkan Validation Layers¶
Another useful tool for debugging is the Vulkan Validation Layers.
The validation layers effectively insert extra checking between Zink and the
Vulkan driver, pointing out incorrect usage of the Vulkan API. The layers can
be enabled by setting the environment variable
“VK_LAYER_KHRONOS_validation”. You can read more about the Validation Layers
in the link above.