Module: wine Branch: master Commit: 8f212a21ed1f3f354bdd8d02c09e5e56d38cf8bb URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f212a21ed1f3f354bdd8d02c0...
Author: Józef Kucia jkucia@codeweavers.com Date: Wed Nov 11 03:40:58 2015 +0100
d3d11: Implement d3d11_immediate_context_PSGetShader().
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3d11/device.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 2e086f8..7127a23 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1052,8 +1052,28 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceContext *iface, ID3D11PixelShader **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 wined3d_shader *wined3d_shader; + struct d3d_pixel_shader *shader_impl; + + 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_pixel_shader(device->wined3d_device))) + { + wined3d_mutex_unlock(); + *shader = NULL; + return; + } + + shader_impl = wined3d_shader_get_parent(wined3d_shader); + wined3d_mutex_unlock(); + *shader = &shader_impl->ID3D11PixelShader_iface; + ID3D11PixelShader_AddRef(*shader); }
static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11DeviceContext *iface,