From 57770a47d5cbf422e9d817db6d118ae4d5326e42 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 16 Mar 2021 19:06:08 -0500 Subject: [PATCH] wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_sampler(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 8 ++++---- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 23360be76a9..8afa298b905 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1605,18 +1605,18 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data) device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING); } -void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, - UINT sampler_idx, struct wined3d_sampler *sampler) +void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int sampler_idx, struct wined3d_sampler *sampler) { struct wined3d_cs_set_sampler *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_SAMPLER; op->type = type; op->sampler_idx = sampler_idx; op->sampler = sampler; - 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_shader(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 512b995510a..5612e4bd0ce 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1903,7 +1903,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 wined3d_device_context_emit_set_constant_buffer(context, i, j, state->cb[i][j]); for (j = 0; j < MAX_SAMPLER_OBJECTS; ++j) { - wined3d_cs_emit_set_sampler(device->cs, i, j, state->sampler[i][j]); + wined3d_device_context_emit_set_sampler(context, i, j, state->sampler[i][j]); } for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j) { @@ -2313,7 +2313,7 @@ static void wined3d_device_set_sampler(struct wined3d_device *device, if (sampler) wined3d_sampler_incref(sampler); state->sampler[type][idx] = sampler; - wined3d_cs_emit_set_sampler(device->cs, type, idx, sampler); + wined3d_device_context_emit_set_sampler(&device->cs->c, type, idx, sampler); if (prev) wined3d_sampler_decref(prev); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d587f039569..19ef894021b 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_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, enum wined3d_sampler_state state, DWORD value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx, @@ -4821,6 +4819,8 @@ void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_c struct wined3d_depth_stencil_state *state, unsigned int stencil_ref) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *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,