tests: Print the file name instead of the test name in test logs.

Some test programs, particularly the shader runner, are built from
many different files nowadays, and a line number is relatively
cumbersome to use if you don't know which file that line comes from.
This commit is contained in:
Giovanni Mascellani
2024-10-23 23:47:21 +02:00
committed by Henri Verbeet
parent 73be28a252
commit 3264378fa0
Notes: Henri Verbeet 2024-12-03 14:55:39 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1221
10 changed files with 469 additions and 438 deletions

View File

@@ -241,19 +241,19 @@ static HRESULT wait_for_fence(ID3D12Fence *fence, uint64_t value)
return ret == WAIT_OBJECT_0 ? S_OK : E_FAIL;
}
static void wait_queue_idle_(unsigned int line, ID3D12Device *device, ID3D12CommandQueue *queue)
static void wait_queue_idle_(const char *file, unsigned int line, ID3D12Device *device, ID3D12CommandQueue *queue)
{
ID3D12Fence *fence;
HRESULT hr;
hr = ID3D12Device_CreateFence(device, 0, D3D12_FENCE_FLAG_NONE,
&IID_ID3D12Fence, (void **)&fence);
assert_that_(line)(hr == S_OK, "Failed to create fence, hr %#x.\n", hr);
assert_that_(file, line)(hr == S_OK, "Failed to create fence, hr %#x.\n", hr);
hr = ID3D12CommandQueue_Signal(queue, fence, 1);
assert_that_(line)(hr == S_OK, "Failed to signal fence, hr %#x.\n", hr);
assert_that_(file, line)(hr == S_OK, "Failed to signal fence, hr %#x.\n", hr);
hr = wait_for_fence(fence, 1);
assert_that_(line)(hr == S_OK, "Failed to wait for fence, hr %#x.\n", hr);
assert_that_(file, line)(hr == S_OK, "Failed to wait for fence, hr %#x.\n", hr);
ID3D12Fence_Release(fence);
}