Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 8 ++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 11 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e6406c7a04f..cf1e0e207de 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1901,6 +1901,14 @@ void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *cont wined3d_shader_decref(prev); }
+struct wined3d_shader * CDECL wined3d_device_context_get_shader(const struct wined3d_device_context *context, + enum wined3d_shader_type type) +{ + TRACE("context %p, type %#x, shader %p.\n", context, type, shader); + + return context->state->shader[type]; +} + void CDECL wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int idx, struct wined3d_buffer *buffer) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 34eba025b8a..ada2c79fb77 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -171,6 +171,7 @@ @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) @ cdecl wined3d_device_context_flush(ptr) @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) +@ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) @ cdecl wined3d_device_context_resolve_sub_resource(ptr ptr long ptr long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index db5f75d7aca..33844349968 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2567,6 +2567,8 @@ void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context void __cdecl wined3d_device_context_flush(struct wined3d_device_context *context); void __cdecl wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view); +struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context, + enum wined3d_shader_type type); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags); HRESULT __cdecl wined3d_device_context_map(struct wined3d_device_context *context,