[PATCH] mfplat/tests: Handle ResetDevice() failure when used with D3D12 device.

Nikolay Sivov nsivov at codeweavers.com
Wed Dec 15 02:12:43 CST 2021


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52165
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

Windows 10 1803 already supports this, but older versions do not.

 dlls/mfplat/tests/mfplat.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index 33b93852e2a..21eab6d1172 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -7467,6 +7467,11 @@ static void test_sample_allocator_d3d12(void)
     ok(hr == S_OK, "Failed to create device manager, hr %#x.\n", hr);
 
     hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)device, token);
+    if (FAILED(hr))
+    {
+        win_skip("Device manager does not support D3D12 devices.\n");
+        goto done;
+    }
     ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
 
     hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocator, (void **)&allocator);
-- 
2.34.1




More information about the wine-devel mailing list