mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
tests: Introduce get_mvk_driver_version().
This commit is contained in:
committed by
Henri Verbeet
parent
265d0fddb5
commit
190033bb85
Notes:
Henri Verbeet
2025-10-06 19:48:45 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1768
@@ -491,4 +491,20 @@ static inline bool get_mesa_driver_version(const VkPhysicalDeviceProperties *dev
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool get_mvk_driver_version(const VkPhysicalDeviceProperties *device_properties,
|
||||
const VkPhysicalDeviceDriverPropertiesKHR *driver_properties,
|
||||
uint32_t *major, uint32_t *minor, uint32_t *patch)
|
||||
{
|
||||
uint32_t version = device_properties->driverVersion;
|
||||
|
||||
if (driver_properties->driverID != VK_DRIVER_ID_MOLTENVK)
|
||||
return false;
|
||||
|
||||
*major = version / 10000;
|
||||
*minor = (version / 100) % 100;
|
||||
*patch = version % 100;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* __VKD3D_VULKAN_UTILS_H */
|
||||
|
||||
Reference in New Issue
Block a user