From ed9b4ca3b7b04d3a47e149add50197a91d5a51df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 6 Jul 2016 12:02:29 +0200 Subject: [PATCH] wined3d: Implement d3d11_immediate_context_Begin(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d11/async.c | 5 +++++ dlls/d3d11/d3d11_private.h | 1 + dlls/d3d11/device.c | 10 +++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/async.c b/dlls/d3d11/async.c index c100e732277..f91a053f7f8 100644 --- a/dlls/d3d11/async.c +++ b/dlls/d3d11/async.c @@ -171,6 +171,11 @@ struct d3d_query *unsafe_impl_from_ID3D11Query(ID3D11Query *iface) return CONTAINING_RECORD(iface, struct d3d_query, ID3D11Query_iface); } +struct d3d_query *unsafe_impl_from_ID3D11Asynchronous(ID3D11Asynchronous *iface) +{ + return unsafe_impl_from_ID3D11Query((ID3D11Query *)iface); +} + /* ID3D10Query methods */ static inline struct d3d_query *impl_from_ID3D10Query(ID3D10Query *iface) diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 8fde5783ac1..6fd521001cb 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -464,6 +464,7 @@ HRESULT d3d_query_create(struct d3d_device *device, const D3D11_QUERY_DESC *desc 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; +struct d3d_query *unsafe_impl_from_ID3D11Asynchronous(ID3D11Asynchronous *iface) DECLSPEC_HIDDEN; /* ID3D11DeviceContext - immediate context */ struct d3d11_immediate_context diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 2fa0f9d3733..ed902c70a60 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -492,7 +492,15 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_Begin(ID3D11DeviceContext *iface, ID3D11Asynchronous *asynchronous) { - FIXME("iface %p, asynchronous %p stub!\n", iface, asynchronous); + struct d3d_query *query = unsafe_impl_from_ID3D11Asynchronous(asynchronous); + HRESULT hr; + + TRACE("iface %p, asynchronous %p.\n", iface, asynchronous); + + wined3d_mutex_lock(); + if (FAILED(hr = wined3d_query_issue(query->wined3d_query, WINED3DISSUE_BEGIN))) + ERR("Failed to issue query, hr %#x.\n", hr); + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_End(ID3D11DeviceContext *iface,