[PATCH 7/7] wined3d: Implement wined3d_device_get_cs_sampler().

Guillaume Charifi guillaume.charifi at sfr.fr
Sun Jan 29 07:43:48 CST 2017


Signed-off-by: Guillaume Charifi <guillaume.charifi at sfr.fr>
---
 dlls/wined3d/device.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 47701f1..0b617b6 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2874,6 +2874,19 @@ void CDECL wined3d_device_set_cs_sampler(struct wined3d_device *device, UINT idx
     wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_COMPUTE, idx, sampler);
 }
 
+struct wined3d_sampler * CDECL wined3d_device_get_cs_sampler(const struct wined3d_device *device, UINT idx)
+{
+    TRACE("device %p, idx %u.\n", device, idx);
+
+    if (idx >= MAX_SAMPLER_OBJECTS)
+    {
+        WARN("Invalid sampler index %u.\n", idx);
+        return NULL;
+    }
+
+    return device->state.sampler[WINED3D_SHADER_TYPE_COMPUTE][idx];
+}
+
 void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *device,
         unsigned int idx, struct wined3d_unordered_access_view *uav)
 {
-- 
Guillaume Charifi <guillaume.charifi at sfr.fr>




More information about the wine-patches mailing list