voodoo icon indicating copy to clipboard operation
voodoo copied to clipboard

Wrong return type for `driver_version`

Open GabrielMajeri opened this issue 6 years ago • 3 comments

The driver_version function returns a voodoo::Version structure.

However, the spec does not say if this is in the same format as a Vulkan version. It's just a u32, its format is driver-specific.

GabrielMajeri avatar Jun 22 '18 18:06 GabrielMajeri

Version is convertible to and from a u32 (the Vulkan native format). The format should not be driver specific. If it is, it's a bug. Can you give an example and provide your hardware/driver specifications?

c0gent avatar Jun 22 '18 18:06 c0gent

The Vulkan GPUInfo site contains a function to convert from that device specific format to a more readable one.

For example, NVIDIA packs 4 numbers in the u32, Intel on Windows packs 2 numbers (a major and a minor version), and Mesa seems to indeed use the Vulkan version format.

GabrielMajeri avatar Jun 22 '18 19:06 GabrielMajeri

I see what you mean. You're right, that API isn't correct.

Could you submit a fix for it? I'm not going to have time to work on it right away.

Thanks for finding this.

c0gent avatar Jun 22 '18 19:06 c0gent