mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
d3d11: Implement d3d11_immediate_context_SetPredication().
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
e013179f9e
commit
8daf9a65f6
3 changed files with 19 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue