vkd3d: Validate the fence count in d3d12_device_SetEventOnMultipleFenceCompletion().

This commit is contained in:
Henri Verbeet
2025-04-29 21:03:25 +02:00
parent 75ce9cef92
commit 3ea84156c7
Notes: Henri Verbeet 2025-05-06 19:05:21 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1476
2 changed files with 6 additions and 3 deletions

View File

@@ -4908,6 +4908,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_SetEventOnMultipleFenceCompletion(
FIXME("iface %p, fences %p, values %p, fence_count %u, flags %#x, event %p stub!\n",
iface, fences, values, fence_count, flags, event);
if (!fence_count)
return E_INVALIDARG;
return E_NOTIMPL;
}

View File

@@ -38969,12 +38969,12 @@ static void test_multi_fence_event(void)
/* 0 fence count. */
hr = ID3D12Device1_SetEventOnMultipleFenceCompletion(device1, NULL, NULL, 0, 0, NULL);
todo ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
hr = ID3D12Device1_SetEventOnMultipleFenceCompletion(device1,
NULL, NULL, 0, D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY, NULL);
todo ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
hr = ID3D12Device1_SetEventOnMultipleFenceCompletion(device1, fences, fence_values, 0, 0, event);
todo ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ret = wait_event(event, 0);
ok(ret == WAIT_TIMEOUT, "Got ret %#x.\n", ret);