mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
tests: Introduce get_llvm_driver_version().
This commit is contained in:
committed by
Henri Verbeet
parent
42016ab09c
commit
41515b7047
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
@@ -904,10 +904,15 @@ static inline bool is_mesa_device_with_llvm_ge(ID3D12Device *device, uint32_t ma
|
||||
{
|
||||
VkPhysicalDeviceDriverPropertiesKHR driver_properties;
|
||||
VkPhysicalDeviceProperties device_properties;
|
||||
uint32_t llvm_major, llvm_minor, llvm_patch;
|
||||
|
||||
get_driver_properties(device, &device_properties, &driver_properties);
|
||||
|
||||
if (!get_llvm_driver_version(&device_properties, &llvm_major, &llvm_minor, &llvm_patch))
|
||||
return false;
|
||||
|
||||
return is_mesa_vulkan_driver(&driver_properties)
|
||||
&& compare_version_string_ge(device_properties.deviceName, "LLVM ", 16, 0 ,0);
|
||||
&& compare_versions(llvm_major, llvm_minor, llvm_patch, major, minor, patch) >= 0;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -523,4 +523,10 @@ static inline bool get_nvidia_driver_version(const VkPhysicalDeviceProperties *d
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool get_llvm_driver_version(const VkPhysicalDeviceProperties *device_properties,
|
||||
uint32_t *major, uint32_t *minor, uint32_t *patch)
|
||||
{
|
||||
return find_version_string(device_properties->deviceName, "LLVM ", major, minor, patch);
|
||||
}
|
||||
|
||||
#endif /* __VKD3D_VULKAN_UTILS_H */
|
||||
|
||||
Reference in New Issue
Block a user