Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 7 ++++--- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/wined3d_private.h | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 36bf39cf789..4dc4d7ae08f 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1551,16 +1551,17 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data) device_invalidate_state(cs->c.device, STATE_COLOR_KEY); }
-void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture) +void wined3d_device_context_emit_set_texture(struct wined3d_device_context *context, unsigned int stage, + struct wined3d_texture *texture) { struct wined3d_cs_set_texture *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; op->stage = stage; op->texture = texture;
- 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_resource_view(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index fc07c78bb43..e5e55150093 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1815,7 +1815,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i) { - wined3d_cs_emit_set_texture(device->cs, i, state->textures[i]); + wined3d_device_context_emit_set_texture(context, i, state->textures[i]); for (j = 0; j < WINED3D_HIGHEST_SAMPLER_STATE + 1; ++j) { wined3d_cs_emit_set_sampler_state(device->cs, i, j, state->sampler_states[i][j]); @@ -3960,7 +3960,7 @@ static void wined3d_device_set_texture(struct wined3d_device *device,
if (texture) wined3d_texture_incref(texture); - wined3d_cs_emit_set_texture(device->cs, stage, texture); + wined3d_device_context_emit_set_texture(&device->cs->c, stage, texture); if (prev) wined3d_texture_decref(prev);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d68262b8d31..79f9bd9899a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4759,7 +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(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture) 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, @@ -4827,6 +4826,8 @@ void wined3d_device_context_emit_set_stream_output(struct wined3d_device_context struct wined3d_buffer *buffer, unsigned int offset) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_stream_source(struct wined3d_device_context *context, unsigned int stream_idx, 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_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;