d3d11: Always initialize out view pointer in CreateUnorderedAccessView().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
db6d549837
commit
f467ebadd6
|
@ -3399,6 +3399,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateUnorderedAccessView(ID3D11De
|
|||
|
||||
TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
|
||||
|
||||
*view = NULL;
|
||||
|
||||
if (FAILED(hr = d3d11_unordered_access_view_create(device, resource, desc, &object)))
|
||||
return hr;
|
||||
|
||||
|
|
|
@ -19433,8 +19433,10 @@ static void test_create_unordered_access_view(void)
|
|||
U(uav_desc).Buffer.NumElements = 64;
|
||||
U(uav_desc).Buffer.Flags = 0;
|
||||
|
||||
uav = (void *)0xdeadbeef;
|
||||
hr = ID3D11Device_CreateUnorderedAccessView(device, (ID3D11Resource *)buffer, NULL, &uav);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!uav, "Unexpected pointer %p.\n", uav);
|
||||
|
||||
expected_refcount = get_refcount(device) + 1;
|
||||
hr = ID3D11Device_CreateUnorderedAccessView(device, (ID3D11Resource *)buffer, &uav_desc, &uav);
|
||||
|
@ -19483,8 +19485,10 @@ static void test_create_unordered_access_view(void)
|
|||
U(uav_desc).Buffer.NumElements = 64;
|
||||
U(uav_desc).Buffer.Flags = 0;
|
||||
|
||||
uav = (void *)0xdeadbeef;
|
||||
hr = ID3D11Device_CreateUnorderedAccessView(device, (ID3D11Resource *)buffer, &uav_desc, &uav);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!uav, "Unexpected pointer %p.\n", uav);
|
||||
|
||||
ID3D11Buffer_Release(buffer);
|
||||
|
||||
|
@ -19579,9 +19583,11 @@ static void test_create_unordered_access_view(void)
|
|||
texture = (ID3D11Resource *)texture3d;
|
||||
}
|
||||
|
||||
uav = (void *)0xdeadbeef;
|
||||
get_uav_desc(&uav_desc, &invalid_desc_tests[i].uav_desc);
|
||||
hr = ID3D11Device_CreateUnorderedAccessView(device, texture, &uav_desc, &uav);
|
||||
ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||
ok(!uav, "Unexpected pointer %p.\n", uav);
|
||||
|
||||
ID3D11Resource_Release(texture);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue