Commit 77f59665 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat/tests: Fix test crash on old Windows 10 systems.

MFCreateDXGISurfaceBuffer() rejects unsupported riid argument. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52166Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4b69a997
...@@ -6867,7 +6867,12 @@ static void test_d3d12_surface_buffer(void) ...@@ -6867,7 +6867,12 @@ static void test_d3d12_surface_buffer(void)
ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D12Resource, (IUnknown *)resource, 0, FALSE, &buffer); hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D12Resource, (IUnknown *)resource, 0, FALSE, &buffer);
if (hr == E_INVALIDARG)
{
todo_wine todo_wine
win_skip("D3D12 resource buffers are not supported.\n");
goto notsupported;
}
ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr); ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
...@@ -6888,6 +6893,8 @@ if (SUCCEEDED(hr)) ...@@ -6888,6 +6893,8 @@ if (SUCCEEDED(hr))
IMFDXGIBuffer_Release(dxgi_buffer); IMFDXGIBuffer_Release(dxgi_buffer);
IMFMediaBuffer_Release(buffer); IMFMediaBuffer_Release(buffer);
} }
notsupported:
ID3D12Resource_Release(resource); ID3D12Resource_Release(resource);
refcount = ID3D12Device_Release(device); refcount = ID3D12Device_Release(device);
ok(!refcount, "Unexpected device refcount %u.\n", refcount); ok(!refcount, "Unexpected device refcount %u.\n", refcount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment