diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index f32699c40cd..468819b604b 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1395,18 +1395,18 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void * device_invalidate_state(cs->c.device, STATE_INDEXBUFFER); } -void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer, +void wined3d_device_context_emit_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset) { struct wined3d_cs_set_index_buffer *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_INDEX_BUFFER; op->buffer = buffer; op->format_id = format_id; op->offset = offset; - 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_constant_buffer(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 12dae835cec..e6bfa90e026 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1556,7 +1556,7 @@ void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, state->index_buffer = buffer; state->index_format = format_id; state->index_offset = offset; - wined3d_cs_emit_set_index_buffer(device->cs, buffer, format_id, offset); + wined3d_device_context_emit_set_index_buffer(&device->cs->c, buffer, format_id, offset); if (prev_buffer) wined3d_buffer_decref(prev_buffer); } @@ -1795,7 +1795,8 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 state->streams[i].offset, state->streams[i].stride); } - wined3d_cs_emit_set_index_buffer(device->cs, state->index_buffer, state->index_format, state->index_offset); + wined3d_device_context_emit_set_index_buffer(context, state->index_buffer, + state->index_format, state->index_offset); wined3d_device_context_emit_set_predication(context, state->predicate, state->predicate_value); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e3c165716e1..7c43695e5f0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4754,8 +4754,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_feature_level(struct wined3d_cs *cs, enum wined3d_feature_level level) DECLSPEC_HIDDEN; -void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer, - enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) DECLSPEC_HIDDEN; @@ -4805,6 +4803,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_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, + enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_predication(struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context,