From 77d6549f55b2a0f9e98aa68210167022453f39b8 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 17 Mar 2021 19:45:13 -0500 Subject: [PATCH] wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_unordered_access_view(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 9 +++++---- dlls/wined3d/device.c | 5 +++-- dlls/wined3d/wined3d_private.h | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 8afa298b905..dbc242f1ba0 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1579,19 +1579,20 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con device_invalidate_state(cs->c.device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline)); } -void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline, - unsigned int view_idx, struct wined3d_unordered_access_view *view, unsigned int initial_count) +void wined3d_device_context_emit_set_unordered_access_view(struct wined3d_device_context *context, + enum wined3d_pipeline pipeline, unsigned int view_idx, struct wined3d_unordered_access_view *view, + unsigned int initial_count) { struct wined3d_cs_set_unordered_access_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_UNORDERED_ACCESS_VIEW; op->pipeline = pipeline; op->view_idx = view_idx; op->view = view; op->initial_count = initial_count; - 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_sampler(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c4700d2dc65..14a68b4f3b1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1915,7 +1915,8 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 { for (j = 0; j < MAX_UNORDERED_ACCESS_VIEWS; ++j) { - wined3d_cs_emit_set_unordered_access_view(device->cs, i, j, state->unordered_access_view[i][j], ~0); + wined3d_device_context_emit_set_unordered_access_view(context, i, j, + state->unordered_access_view[i][j], ~0); } } @@ -2697,7 +2698,7 @@ static void wined3d_device_set_pipeline_unordered_access_view(struct wined3d_dev if (uav) wined3d_unordered_access_view_incref(uav); state->unordered_access_view[pipeline][idx] = uav; - wined3d_cs_emit_set_unordered_access_view(device->cs, pipeline, idx, uav, initial_count); + wined3d_device_context_emit_set_unordered_access_view(&device->cs->c, pipeline, idx, uav, initial_count); if (prev) wined3d_unordered_access_view_decref(prev); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 877308e543b..0b71da8982c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4783,9 +4783,6 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, enum wined3d_texture_stage_state state, DWORD value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state, const struct wined3d_matrix *matrix) DECLSPEC_HIDDEN; -void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline, - unsigned int view_idx, struct wined3d_unordered_access_view *view, - unsigned int initial_count) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN; void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -4828,6 +4825,9 @@ void wined3d_device_context_emit_set_shader(struct wined3d_device_context *conte 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_unordered_access_view(struct wined3d_device_context *context, + enum wined3d_pipeline pipeline, unsigned int view_idx, struct wined3d_unordered_access_view *view, + unsigned int initial_count) 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; -- 2.11.4.GIT