From 026a082daf59d8bc6490b86925c6f9d7705da1a5 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 12 May 2021 11:10:01 -0500 Subject: [PATCH] wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_texture_state(). 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 4dc4d7ae08f..a39ed1dbaf4 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1787,18 +1787,18 @@ static void wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void device_invalidate_state(cs->c.device, STATE_TEXTURESTAGE(op->stage, op->state)); } -void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, - enum wined3d_texture_stage_state state, DWORD value) +void wined3d_device_context_emit_set_texture_state(struct wined3d_device_context *context, unsigned int stage, + enum wined3d_texture_stage_state state, unsigned int value) { struct wined3d_cs_set_texture_state *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_TEXTURE_STATE; op->stage = stage; op->state = state; op->value = value; - 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_state(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e5e55150093..128dd330f89 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1826,7 +1826,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 { for (j = 0; j < WINED3D_HIGHEST_TEXTURE_STATE + 1; ++j) { - wined3d_cs_emit_set_texture_state(device->cs, i, j, state->texture_states[i][j]); + wined3d_device_context_emit_set_texture_state(context, i, j, state->texture_states[i][j]); } } @@ -3928,7 +3928,7 @@ static void wined3d_device_set_texture_stage_state(struct wined3d_device *device device->cs->c.state->texture_states[stage][state] = value; - wined3d_cs_emit_set_texture_state(device->cs, stage, state, value); + wined3d_device_context_emit_set_texture_state(&device->cs->c, stage, state, value); } static void wined3d_device_set_texture(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 79f9bd9899a..4740bb8799d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4759,8 +4759,6 @@ 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_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags) DECLSPEC_HIDDEN; -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_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -4828,6 +4826,8 @@ void wined3d_device_context_emit_set_stream_source(struct wined3d_device_context struct wined3d_buffer *buffer, unsigned int offset, unsigned int stride) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_texture(struct wined3d_device_context *context, unsigned int stage, struct wined3d_texture *texture) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_texture_state(struct wined3d_device_context *context, unsigned int stage, + enum wined3d_texture_stage_state state, unsigned int value) 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;