diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 10709c4e0df..b5b26782817 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -293,6 +293,7 @@ struct d3d11_hull_shader HRESULT d3d11_hull_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, struct d3d11_hull_shader **shader) DECLSPEC_HIDDEN; +struct d3d11_hull_shader *unsafe_impl_from_ID3D11HullShader(ID3D11HullShader *iface) DECLSPEC_HIDDEN; /* ID3D11DomainShader */ struct d3d11_domain_shader diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e6702fc5f57..6f71d4dd21d 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1135,8 +1135,18 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShader(ID3D11DeviceContext *iface, ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count) { - FIXME("iface %p, shader %p, class_instances %p, class_instance_count %u stub!\n", + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + struct d3d11_hull_shader *hs = unsafe_impl_from_ID3D11HullShader(shader); + + TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n", iface, shader, class_instances, class_instance_count); + + if (class_instances) + FIXME("Dynamic linking is not implemented yet.\n"); + + wined3d_mutex_lock(); + wined3d_device_set_hull_shader(device->wined3d_device, hs ? hs->wined3d_shader : NULL); + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11DeviceContext *iface, diff --git a/dlls/d3d11/shader.c b/dlls/d3d11/shader.c index 420a47dbd27..7531586e4f9 100644 --- a/dlls/d3d11/shader.c +++ b/dlls/d3d11/shader.c @@ -788,6 +788,15 @@ HRESULT d3d11_hull_shader_create(struct d3d_device *device, const void *byte_cod return S_OK; } +struct d3d11_hull_shader *unsafe_impl_from_ID3D11HullShader(ID3D11HullShader *iface) +{ + if (!iface) + return NULL; + assert(iface->lpVtbl == &d3d11_hull_shader_vtbl); + + return impl_from_ID3D11HullShader(iface); +} + /* ID3D11DomainShader methods */ static inline struct d3d11_domain_shader *impl_from_ID3D11DomainShader(ID3D11DomainShader *iface)