mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
tests: Mark a couple of tests as working on recent NVIDIA GPUs.
I don't know the exact version that fixed this todo, but on the same hardware this test was failing a couple of years ago, so I presume something was fixed at some point. I am writing my current driver version, but a lower one might turn out to be sufficient.
This commit is contained in:
parent
4094e5dbeb
commit
9f4a568868
Notes:
Henri Verbeet
2024-07-31 21:03:26 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/971
@ -11483,7 +11483,8 @@ static void test_shader_instructions(void)
|
||||
|
||||
transition_resource_state(command_list, context.render_target,
|
||||
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
|
||||
todo_if(uint_tests[i].is_todo || (uint_tests[i].todo_on_nvidia && is_nvidia_device(context.device)))
|
||||
todo_if(uint_tests[i].is_todo ||
|
||||
(uint_tests[i].todo_on_nvidia && is_nvidia_device_lt(context.device, 535, 183, 1)))
|
||||
check_sub_resource_uvec4(context.render_target, 0, queue, command_list, &uint_tests[i].output.u);
|
||||
|
||||
reset_command_list(command_list, context.allocator);
|
||||
|
@ -501,6 +501,12 @@ static inline bool is_nvidia_device(ID3D12Device *device)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_nvidia_device_lt(ID3D12Device *device,
|
||||
uint32_t major, uint32_t minor, uint32_t patch)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_qualcomm_device(ID3D12Device *device)
|
||||
{
|
||||
return false;
|
||||
@ -800,6 +806,23 @@ static inline bool is_nvidia_device(ID3D12Device *device)
|
||||
return properties.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR;
|
||||
}
|
||||
|
||||
/* NVIDIA uses a different bit pattern than standard Vulkan. */
|
||||
#define NV_MAKE_API_VERSION(major, minor, patch) \
|
||||
((((uint32_t)(major)) << 22u) | (((uint32_t)(minor)) << 14u) | (((uint32_t)(patch)) << 6u))
|
||||
|
||||
static inline bool is_nvidia_device_lt(ID3D12Device *device,
|
||||
uint32_t major, uint32_t minor, uint32_t patch)
|
||||
{
|
||||
VkPhysicalDeviceDriverPropertiesKHR driver_properties;
|
||||
VkPhysicalDeviceProperties device_properties;
|
||||
|
||||
get_driver_properties(device, &device_properties, &driver_properties);
|
||||
if (driver_properties.driverID != VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR)
|
||||
return false;
|
||||
|
||||
return device_properties.driverVersion < NV_MAKE_API_VERSION(major, minor, patch);
|
||||
}
|
||||
|
||||
static inline bool is_qualcomm_device(ID3D12Device *device)
|
||||
{
|
||||
VkPhysicalDeviceDriverPropertiesKHR properties;
|
||||
|
Loading…
Reference in New Issue
Block a user