d3d11: Allow to pass NULL as "query" to d3d10_device_CreateQuery().

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:
Józef Kucia 2016-04-05 10:22:07 +02:00 committed by Alexandre Julliard
parent ccfda14c69
commit 94ec23b8cd
1 changed files with 7 additions and 2 deletions

View File

@ -4610,11 +4610,16 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device1 *iface,
if (FAILED(hr = d3d_query_create(device, (const D3D11_QUERY_DESC *)desc, FALSE, &object)))
return hr;
if (query)
{
*query = &object->ID3D10Query_iface;
return S_OK;
}
ID3D10Query_Release(&object->ID3D10Query_iface);
return S_FALSE;
}
static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePredicate(ID3D10Device1 *iface,
const D3D10_QUERY_DESC *desc, ID3D10Predicate **predicate)
{