From 76a4efe1ed462953b310c10821f7522c982fa281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Tue, 7 Mar 2017 09:50:12 +0100 Subject: [PATCH] wined3d: Introduce wined3d_device_get_compute_shader(). 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/wined3d/device.c | 7 +++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 3 files changed, 9 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 139b4da2d4b..c576f02fefb 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2738,6 +2738,13 @@ void CDECL wined3d_device_set_compute_shader(struct wined3d_device *device, stru wined3d_shader_decref(prev); } +struct wined3d_shader * CDECL wined3d_device_get_compute_shader(const struct wined3d_device *device) +{ + TRACE("device %p.\n", device); + + return device->state.shader[WINED3D_SHADER_TYPE_COMPUTE]; +} + void CDECL wined3d_device_set_cs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer) { TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 875e7e3e078..1e187f96b43 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -51,6 +51,7 @@ @ cdecl wined3d_device_get_base_vertex_index(ptr) @ cdecl wined3d_device_get_clip_plane(ptr long ptr) @ cdecl wined3d_device_get_clip_status(ptr ptr) +@ cdecl wined3d_device_get_compute_shader(ptr) @ cdecl wined3d_device_get_creation_parameters(ptr ptr) @ cdecl wined3d_device_get_depth_stencil_view(ptr) @ cdecl wined3d_device_get_device_caps(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 58e3f0d0d96..69241fc9e84 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2162,6 +2162,7 @@ HRESULT __cdecl wined3d_device_get_clip_plane(const struct wined3d_device *devic UINT plane_idx, struct wined3d_vec4 *plane); HRESULT __cdecl wined3d_device_get_clip_status(const struct wined3d_device *device, struct wined3d_clip_status *clip_status); +struct wined3d_shader * __cdecl wined3d_device_get_compute_shader(const struct wined3d_device *device); void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *creation_parameters); struct wined3d_rendertarget_view * __cdecl wined3d_device_get_depth_stencil_view(const struct wined3d_device *device);