tests: Mark a number of test failures as buggy on macOS before Sequoia.

It's hard to pinpoint exactly what's going wrong with these
tests. They seem to be related to atomics and GPU timestamps,
both categories that are known to have problems on MoltenVK in a
way or another; those failures clearly depend on a few factors
like the MoltenVK version, the macOS version and whether we're in
a virtual machine or not, but the exact dependency on those factors
is hard to describe (for example, in general the paravirtualized
device offered inside virtual machines has a lot more problems than
real devices, but I've seen tests, fixed all other conditions,
working on the paravirtualized device and not on the real device).

The only thing all tests in this batch have in common is that I've
never seen them fail on a Sequoia system, thus I've settled for
using just that as the bug_if() condition. Ultimately, wasting a
lot of time to get to the bottom of each single test failure is
pointless, and being able to mark the CI job as not allowed to
fail gives better regression protection than investigating each
of those. Also, I routinely run the tests on a Sequoia system, so
if these tests get broken this is going to be noticed anyway.
This commit is contained in:
Giovanni Mascellani
2025-03-20 19:14:54 +01:00
committed by Henri Verbeet
parent 2540081988
commit aab8ba02d8
Notes: Henri Verbeet 2025-04-03 20:33:55 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1440
2 changed files with 46 additions and 3 deletions

View File

@@ -7795,7 +7795,7 @@ static void test_draw_uav_only(void)
transition_resource_state(command_list, resource,
D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE);
bug_if(is_radv_device(context.device))
bug_if(is_radv_device(context.device) || is_macos_lt(15, 0, 0))
check_sub_resource_uint(resource, 0, queue, command_list, 500, 0);
ID3D12DescriptorHeap_Release(cpu_descriptor_heap);
@@ -24071,6 +24071,7 @@ static void test_decrement_uav_counter(void)
ID3D12GraphicsCommandList_Dispatch(command_list, tests[i].decrement_count, 1, 1);
counter = read_uav_counter(&context, counter_buffer, 0);
bug_if(is_macos_lt(15, 0, 0))
ok(counter == tests[i].expected_value, "Got %u, expected %u.\n",
counter, tests[i].expected_value);
@@ -24448,8 +24449,8 @@ static void test_atomic_instructions(void)
unsigned int expected = test->expected_result[j];
bool is_bug;
is_bug = test->i.x < 0
&& (!strcmp(instructions[j], "atomic_imax") || !strcmp(instructions[j], "atomic_imin"));
is_bug = is_macos_lt(15, 0, 0) || (test->i.x < 0
&& (!strcmp(instructions[j], "atomic_imax") || !strcmp(instructions[j], "atomic_imin")));
/* Fixed at least on radv with mesa >= 21.3.7. */
bug_if(is_bug)
@@ -37764,6 +37765,7 @@ static void test_clock_calibration(void)
hr = ID3D12CommandQueue_GetClockCalibration(context.queue, &gpu_times[1], &cpu_times[1]);
ok(hr == S_OK, "Failed to retrieve calibrated timestamps, hr %#x.\n", hr);
bug_if(is_macos_lt(15, 0, 0))
ok(gpu_times[1] > gpu_times[0], "Inconsistent GPU timestamps %"PRIu64" and %"PRIu64".\n",
gpu_times[0], gpu_times[1]);
ok(cpu_times[1] > cpu_times[0], "Inconsistent CPU timestamps %"PRIu64" and %"PRIu64".\n",

View File

@@ -56,6 +56,10 @@ typedef int HRESULT;
#include <stddef.h>
#include <time.h>
#ifdef __APPLE__
# include <sys/sysctl.h>
#endif
#ifdef VKD3D_CROSSTEST
# include "vkd3d_dxgi1_4.h"
#else
@@ -527,6 +531,11 @@ static inline bool is_mvk_device(ID3D12Device *device)
return false;
}
static inline bool is_macos_lt(unsigned int major, unsigned int minor, unsigned int patch)
{
return false;
}
static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
{
return true;
@@ -846,6 +855,38 @@ static inline bool is_mvk_device(ID3D12Device *device)
return properties.driverID == VK_DRIVER_ID_MOLTENVK;
}
#ifdef __APPLE__
static inline bool is_macos_lt(unsigned int major, unsigned int minor, unsigned int patch)
{
char str[256];
size_t size = sizeof(str);
unsigned int version[3];
int ret;
ret = sysctlbyname("kern.osproductversion", str, &size, NULL, 0);
assert(!ret);
ret = sscanf(str, "%u.%u.%u", &version[0], &version[1], &version[2]);
for (; ret < ARRAY_SIZE(version); ++ret)
version[ret] = 0;
if (version[0] != major)
return version[0] < major;
if (version[1] != minor)
return version[1] < minor;
return version[2] < patch;
}
#else
static inline bool is_macos_lt(unsigned int major, unsigned int minor, unsigned int patch)
{
return false;
}
#endif
static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
{
VkPhysicalDevice vk_physical_device = vkd3d_get_vk_physical_device(device);