Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 14 ++++++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 17 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d239d59a8f2..33b06b44c29 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2878,6 +2878,20 @@ struct wined3d_sampler * CDECL wined3d_device_get_cs_sampler(const struct wined3 return wined3d_device_get_sampler(device, WINED3D_SHADER_TYPE_COMPUTE, idx); }
+struct wined3d_unordered_access_view * CDECL wined3d_device_context_get_unordered_access_view( + const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx) +{ + TRACE("context %p, pipeline %#x, idx %u.\n", context, pipeline, idx); + + if (idx >= MAX_UNORDERED_ACCESS_VIEWS) + { + WARN("Invalid UAV index %u.\n", idx); + return NULL; + } + + return context->state->unordered_access_view[pipeline][idx]; +} + static struct wined3d_unordered_access_view *wined3d_device_get_pipeline_unordered_access_view( const struct wined3d_device *device, enum wined3d_pipeline pipeline, unsigned int idx) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 6a7a8811051..442b06ed4ea 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -173,6 +173,7 @@ @ cdecl wined3d_device_context_get_scissor_rects(ptr ptr ptr) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_get_shader_resource_view(ptr long long) +@ cdecl wined3d_device_context_get_unordered_access_view(ptr long long) @ cdecl wined3d_device_context_get_viewports(ptr ptr ptr) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 26dc7844090..e5e522e9fb2 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2572,6 +2572,8 @@ struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct w enum wined3d_shader_type type); struct wined3d_shader_resource_view * __cdecl wined3d_device_context_get_shader_resource_view( const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx); +struct wined3d_unordered_access_view * __cdecl wined3d_device_context_get_unordered_access_view( + const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx); void __cdecl wined3d_device_context_get_viewports(const struct wined3d_device_context *context, unsigned int *viewport_count, struct wined3d_viewport *viewports); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context,