Commit 8daf9a65 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Implement d3d11_immediate_context_SetPredication().

parent e013179f
......@@ -163,6 +163,14 @@ static const struct ID3D11QueryVtbl d3d11_query_vtbl =
d3d11_query_GetDesc,
};
struct d3d_query *unsafe_impl_from_ID3D11Query(ID3D11Query *iface)
{
if (!iface)
return NULL;
assert(iface->lpVtbl == &d3d11_query_vtbl);
return CONTAINING_RECORD(iface, struct d3d_query, ID3D11Query_iface);
}
/* ID3D10Query methods */
static inline struct d3d_query *impl_from_ID3D10Query(ID3D10Query *iface)
......
......@@ -372,6 +372,7 @@ struct d3d_query
HRESULT d3d_query_create(struct d3d_device *device, const D3D11_QUERY_DESC *desc, BOOL predicate,
struct d3d_query **query) DECLSPEC_HIDDEN;
struct d3d_query *unsafe_impl_from_ID3D11Query(ID3D11Query *iface) DECLSPEC_HIDDEN;
struct d3d_query *unsafe_impl_from_ID3D10Query(ID3D10Query *iface) DECLSPEC_HIDDEN;
/* ID3D11DeviceContext - immediate context */
......
......@@ -483,7 +483,16 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetData(ID3D11DeviceCon
static void STDMETHODCALLTYPE d3d11_immediate_context_SetPredication(ID3D11DeviceContext *iface,
ID3D11Predicate *predicate, BOOL value)
{
FIXME("iface %p, predicate %p, value %#x stub!\n", iface, predicate, value);
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
struct d3d_query *query;
TRACE("iface %p, predicate %p, value %#x.\n", iface, predicate, value);
query = unsafe_impl_from_ID3D11Query((ID3D11Query *)predicate);
wined3d_mutex_lock();
wined3d_device_set_predication(device->wined3d_device, query ? query->wined3d_query : NULL, value);
wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D11DeviceContext *iface,
......
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