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

Alexandre Julliard julliard at winehq.org
Tue Mar 7 15:43:59 CST 2017


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Mar  7 09:50:13 2017 +0100

d3d11: Implement d3d11_immediate_context_CSGetShader().

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 | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 958dcfe..5e5c7a4 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -2002,8 +2002,27 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews(
 static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceContext *iface,
         ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
-    FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
+    struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
+    struct d3d11_compute_shader *shader_impl;
+    struct wined3d_shader *wined3d_shader;
+
+    TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
             iface, shader, class_instances, class_instance_count);
+
+    if (class_instances || class_instance_count)
+        FIXME("Dynamic linking not implemented yet.\n");
+
+    wined3d_mutex_lock();
+    if (!(wined3d_shader = wined3d_device_get_compute_shader(device->wined3d_device)))
+    {
+        wined3d_mutex_unlock();
+        *shader = NULL;
+        return;
+    }
+
+    shader_impl = wined3d_shader_get_parent(wined3d_shader);
+    wined3d_mutex_unlock();
+    ID3D11ComputeShader_AddRef(*shader = &shader_impl->ID3D11ComputeShader_iface);
 }
 
 static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11DeviceContext *iface,




More information about the wine-cvs mailing list