From d2fa9a75b2821661a872cd697ca65b25f9f13d31 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 12 Nov 2012 21:51:01 +0100 Subject: [PATCH] d3d10core: Implement d3d10_device_PSGetShader(). --- dlls/d3d10core/device.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 3cc0529b8f..0889f3be80 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -465,7 +465,21 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetShaderResources(ID3D10Device *if static void STDMETHODCALLTYPE d3d10_device_PSGetShader(ID3D10Device *iface, ID3D10PixelShader **shader) { - FIXME("iface %p, shader %p stub!\n", iface, shader); + struct d3d10_device *device = impl_from_ID3D10Device(iface); + struct d3d10_pixel_shader *shader_impl; + struct wined3d_shader *wined3d_shader; + + TRACE("iface %p, shader %p.\n", iface, shader); + + if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device))) + { + *shader = NULL; + return; + } + + shader_impl = wined3d_shader_get_parent(wined3d_shader); + *shader = &shader_impl->ID3D10PixelShader_iface; + ID3D10PixelShader_AddRef(*shader); } static void STDMETHODCALLTYPE d3d10_device_PSGetSamplers(ID3D10Device *iface, -- 2.32.0.93.g670b81a890