Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Vulkan Driver and Vulkan SDK interact?

Tags:

gpu

vulkan

I would like to know how the Vulkan Driver interact with the SDK.

For instance, I'm interested to know if there is some sort of incopatibility if the VK_API_VERSION is different in the driver and the SDK.

For example in CUDA, newer CUDA Drivers maintain backward compatibilty but they are not forward compatible with newer CUDA versions. Anyone knows if this also happens in Vulkan?

CUDA Driver Backward but Not Forward Compatible

like image 849
Hopobcn Avatar asked Jan 02 '26 03:01

Hopobcn


1 Answers

Vulkan's compatibility is laid out in the Vulkan specification, and it's based on version numbers: X.Y.Z.

Z is the "patch" number, which represent mostly editorial or minor behavior changes to the specification. No user-facing APIs are allowed to change based on the patch number. Code that could work with X.Y.(Z-1) must work with X.Y.Z, and vice-versa. So if the SDK can load Vulkan version X.Y, it can load it for every Z within that version.

Y is the minor version number, which represents backwards compatible changes to the API. That is, if your code worked with X.(Y-1), it will also work with X.Y. However, the reverse is not necessarily true. So if you're using the SDK loader intended for version 1.0, it should be functional for version 1.1 and above.

Obviously new APIs added in 1.1+ will not be available to you if you use the 1.0 loader.

X represents the major version number. If that changes, all bets are off. APIs can be removed, modified, validation rules changed, etc. So if you're using the SDK loader for version 1.3, and version 2.0 comes out, there's no guarantee that the 1.3 loader will load it. Most importantly of all, even if it did appear to load correctly, you should never use it.

Applications written against one major version of Vulkan should never be expected to work on a different major version.


The above explains the contract between the Vulkan specification and the user, whomever that might be. If you're using the SDK, then the SDK sits between you and the implementation. It can add rules on top of the above.

However, from the documentation, I see no evidence that the loader attempts to prevent loading higher minor API versions for versions of the loader from previous API versions. So it would appear that the SDK loader follows the Vulkan specification. If the loader is built for Vulkan 1.1, then it should work for any Vulkan implementation up to 2.0. At which point the loader could fail to work, since APIs that it depends on are not present.

like image 116
Nicol Bolas Avatar answered Jan 06 '26 10:01

Nicol Bolas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!