Zebediah Figura : wined3d: Pass a wined3d_device_context to wind3d_cs_emit_set_shader_resource_view().

Alexandre Julliard julliard at winehq.org
Wed Mar 17 16:23:15 CDT 2021


Module: wine
Branch: master
Commit: e2c96d3453b30ced082457d834c92bd1e631750e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e2c96d3453b30ced082457d834c92bd1e631750e

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Mar 16 19:06:05 2021 -0500

wined3d: Pass a wined3d_device_context to wind3d_cs_emit_set_shader_resource_view().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/cs.c              | 8 ++++----
 dlls/wined3d/device.c          | 4 ++--
 dlls/wined3d/wined3d_private.h | 5 +++--
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index d8635bba8d7..23360be76a9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1546,18 +1546,18 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
         device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
 }
 
-void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
-        UINT view_idx, struct wined3d_shader_resource_view *view)
+void wined3d_device_context_emit_set_shader_resource_view(struct wined3d_device_context *context,
+        enum wined3d_shader_type type, unsigned int view_idx, struct wined3d_shader_resource_view *view)
 {
     struct wined3d_cs_set_shader_resource_view *op;
 
-    op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
+    op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
     op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
     op->type = type;
     op->view_idx = view_idx;
     op->view = view;
 
-    wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
+    wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
 }
 
 static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3feabbe79f1..08115cb0de2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1907,7 +1907,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
         }
         for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j)
         {
-            wined3d_cs_emit_set_shader_resource_view(device->cs, i, j, state->shader_resource_view[i][j]);
+            wined3d_device_context_emit_set_shader_resource_view(context, i, j, state->shader_resource_view[i][j]);
         }
     }
 
@@ -2256,7 +2256,7 @@ static void wined3d_device_set_shader_resource_view(struct wined3d_device *devic
     }
 
     state->shader_resource_view[type][idx] = view;
-    wined3d_cs_emit_set_shader_resource_view(device->cs, type, idx, view);
+    wined3d_device_context_emit_set_shader_resource_view(&device->cs->c, type, idx, view);
     if (prev)
     {
         wined3d_srv_bind_count_dec(prev);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4ad0c05d34a..d587f039569 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4770,8 +4770,6 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
         enum wined3d_render_state state, DWORD value) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
         struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
-        UINT view_idx, struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
         UINT sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -4827,6 +4825,9 @@ void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context
         unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN;
 void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
         struct wined3d_shader *shader) DECLSPEC_HIDDEN;
+void wined3d_device_context_emit_set_shader_resource_view(struct wined3d_device_context *context,
+        enum wined3d_shader_type type, unsigned int view_idx,
+        struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN;
 void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
         const struct wined3d_viewport *viewports) DECLSPEC_HIDDEN;
 




More information about the wine-cvs mailing list