[PATCH 7/9] wined3d: Introduce wined3d_device_get_cs_uav().
Józef Kucia
jkucia at codeweavers.com
Mon Apr 24 05:02:30 CDT 2017
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/device.c | 20 ++++++++++++++++++++
dlls/wined3d/wined3d.spec | 1 +
include/wine/wined3d.h | 2 ++
3 files changed, 23 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b5f4bdd..4cf0384 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2862,6 +2862,18 @@ static void wined3d_device_set_pipeline_unordered_access_view(struct wined3d_dev
wined3d_unordered_access_view_decref(prev);
}
+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)
+{
+ if (idx >= MAX_UNORDERED_ACCESS_VIEWS)
+ {
+ WARN("Invalid UAV index %u.\n", idx);
+ return NULL;
+ }
+
+ return device->state.unordered_access_view[pipeline][idx];
+}
+
void CDECL wined3d_device_set_cs_uav(struct wined3d_device *device, unsigned int idx,
struct wined3d_unordered_access_view *uav)
{
@@ -2870,6 +2882,14 @@ void CDECL wined3d_device_set_cs_uav(struct wined3d_device *device, unsigned int
wined3d_device_set_pipeline_unordered_access_view(device, WINED3D_PIPELINE_COMPUTE, idx, uav);
}
+struct wined3d_unordered_access_view * CDECL wined3d_device_get_cs_uav(const struct wined3d_device *device,
+ unsigned int idx)
+{
+ TRACE("device %p, idx %u.\n", device, idx);
+
+ return wined3d_device_get_pipeline_unordered_access_view(device, WINED3D_PIPELINE_COMPUTE, idx);
+}
+
void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *device,
unsigned int idx, struct wined3d_unordered_access_view *uav)
{
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 84ba5d4..92a61e7 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -56,6 +56,7 @@
@ cdecl wined3d_device_get_cs_cb(ptr long)
@ cdecl wined3d_device_get_cs_resource_view(ptr long)
@ cdecl wined3d_device_get_cs_sampler(ptr long)
+@ cdecl wined3d_device_get_cs_uav(ptr long)
@ cdecl wined3d_device_get_depth_stencil_view(ptr)
@ cdecl wined3d_device_get_device_caps(ptr ptr)
@ cdecl wined3d_device_get_display_mode(ptr long ptr ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 29a8431..1f93216 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2192,6 +2192,8 @@ struct wined3d_buffer * __cdecl wined3d_device_get_cs_cb(const struct wined3d_de
struct wined3d_shader_resource_view * __cdecl wined3d_device_get_cs_resource_view(const struct wined3d_device *device,
unsigned int idx);
struct wined3d_sampler * __cdecl wined3d_device_get_cs_sampler(const struct wined3d_device *device, unsigned int idx);
+struct wined3d_unordered_access_view * __cdecl wined3d_device_get_cs_uav(const struct wined3d_device *device,
+ unsigned int idx);
struct wined3d_rendertarget_view * __cdecl wined3d_device_get_depth_stencil_view(const struct wined3d_device *device);
HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps);
HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx,
--
2.10.2
More information about the wine-patches
mailing list