From e1dae7b11ccfd9f318c8ba448b3823d1f4a6961a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 20 Apr 2017 11:04:18 +0200 Subject: [PATCH] d3d11: Implement d3d11_immediate_context_HSGetShader(). 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/device.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d2eaec8cea2..d6881de04d6 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1942,8 +1942,27 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceContext *iface, ID3D11HullShader **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_hull_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_hull_shader(device->wined3d_device))) + { + wined3d_mutex_unlock(); + *shader = NULL; + return; + } + + shader_impl = wined3d_shader_get_parent(wined3d_shader); + wined3d_mutex_unlock(); + ID3D11HullShader_AddRef(*shader = &shader_impl->ID3D11HullShader_iface); } static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11DeviceContext *iface,