d3d11: Return E_INVALIDARG from GetData() when "data" is NULL and "data_size" is non-zero.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c0fb3fb9e1
commit
d3c58df455
|
@ -298,6 +298,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_query_GetData(ID3D10Query *iface, void *d
|
|||
|
||||
TRACE("iface %p, data %p, data_size %u, flags %#x.\n", iface, data, data_size, flags);
|
||||
|
||||
if (!data && data_size)
|
||||
return E_INVALIDARG;
|
||||
|
||||
wined3d_flags = wined3d_getdata_flags_from_d3d11_async_getdata_flags(flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
|
|
@ -527,6 +527,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetData(ID3D11DeviceCon
|
|||
TRACE("iface %p, asynchronous %p, data %p, data_size %u, data_flags %#x.\n",
|
||||
iface, asynchronous, data, data_size, data_flags);
|
||||
|
||||
if (!data && data_size)
|
||||
return E_INVALIDARG;
|
||||
|
||||
wined3d_flags = wined3d_getdata_flags_from_d3d11_async_getdata_flags(data_flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
|
|
@ -4710,7 +4710,7 @@ static void test_occlusion_query(void)
|
|||
hr = ID3D11DeviceContext_GetData(context, query, NULL, sizeof(DWORD), 0);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
hr = ID3D11DeviceContext_GetData(context, query, NULL, sizeof(data), 0);
|
||||
todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
ID3D11DeviceContext_Begin(context, query);
|
||||
ID3D11DeviceContext_End(context, query);
|
||||
|
|
Loading…
Reference in New Issue