Henri Verbeet : d3d10core: Implement d3d10_device_PSGetShader().

Alexandre Julliard julliard at winehq.org
Tue Nov 13 13:46:05 CST 2012


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Nov 12 21:51:01 2012 +0100

d3d10core: Implement d3d10_device_PSGetShader().

---

 dlls/d3d10core/device.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 3cc0529..0889f3b 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,




More information about the wine-cvs mailing list