=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11: Implement d3d11_immediate_context_IASetPrimitiveTopology().

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 15 10:27:59 CDT 2015


Module: wine
Branch: master
Commit: 6d984251aff4f78c88f00343e2670be816961919
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6d984251aff4f78c88f00343e2670be816961919

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Oct 14 02:08:11 2015 +0200

d3d11: Implement d3d11_immediate_context_IASetPrimitiveTopology().

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/device.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 8a7a794..a06f3e6 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -39,6 +39,12 @@ static inline struct d3d11_immediate_context *impl_from_ID3D11DeviceContext(ID3D
     return CONTAINING_RECORD(iface, struct d3d11_immediate_context, ID3D11DeviceContext_iface);
 }
 
+static inline struct d3d_device *device_from_immediate_ID3D11DeviceContext(ID3D11DeviceContext *iface)
+{
+    struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext(iface);
+    return CONTAINING_RECORD(context, struct d3d_device, immediate_context);
+}
+
 static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11DeviceContext *iface,
         REFIID riid, void **out)
 {
@@ -249,7 +255,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceCo
 static void STDMETHODCALLTYPE d3d11_immediate_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
         D3D11_PRIMITIVE_TOPOLOGY topology)
 {
-    FIXME("iface %p, topology %u stub!\n", iface, topology);
+    struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
+
+    TRACE("iface %p, topology %u.\n", iface, topology);
+
+    wined3d_mutex_lock();
+    wined3d_device_set_primitive_type(device->wined3d_device, (enum wined3d_primitive_type)topology);
+    wined3d_mutex_unlock();
 }
 
 static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D11DeviceContext *iface,




More information about the wine-cvs mailing list