Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/buffer.c | 2 +- dlls/wined3d/cs.c | 12 ++++++------ dlls/wined3d/device.c | 3 ++- dlls/wined3d/texture.c | 2 +- dlls/wined3d/wined3d_private.h | 6 +++--- 5 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 8fca81ec19c..ea21f85bc9e 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1047,7 +1047,7 @@ static void wined3d_buffer_init_data(struct wined3d_buffer *buffer, if (buffer->flags & WINED3D_BUFFER_USE_BO) { wined3d_box_set(&box, 0, 0, resource->size, 1, 0, 1); - wined3d_cs_emit_update_sub_resource(device->cs, resource, + wined3d_device_context_emit_update_sub_resource(&device->cs->c, resource, 0, &box, data->data, data->row_pitch, data->slice_pitch); } else diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3e74f868e58..32ea900e27d 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2522,13 +2522,13 @@ done: wined3d_resource_release(resource); }
-void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource, - unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, - unsigned int slice_pitch) +void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, + struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, + const void *data, unsigned int row_pitch, unsigned int slice_pitch) { struct wined3d_cs_update_sub_resource *op;
- op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_MAP); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP); op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; op->resource = resource; op->sub_resource_idx = sub_resource_idx; @@ -2539,10 +2539,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
wined3d_resource_acquire(resource);
- wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_MAP); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_MAP); /* The data pointer may go away, so we need to wait until it is read. * Copying the data may be faster if it's small. */ - wined3d_cs_finish(cs, WINED3D_CS_QUEUE_MAP); + wined3d_device_context_finish(context, WINED3D_CS_QUEUE_MAP); }
static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e62f560a0be..bd92632e306 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5149,7 +5149,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
wined3d_resource_wait_idle(resource);
- wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); + wined3d_device_context_emit_update_sub_resource(&device->cs->c, resource, + sub_resource_idx, box, data, row_pitch, depth_pitch); }
void CDECL wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 487f0806ce3..333002ebfd5 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -4259,7 +4259,7 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct for (i = 0; i < sub_count; ++i) { wined3d_texture_get_level_box(*texture, i % (*texture)->level_count, &box); - wined3d_cs_emit_update_sub_resource(device->cs, &(*texture)->resource, + wined3d_device_context_emit_update_sub_resource(&device->cs->c, &(*texture)->resource, i, &box, data[i].data, data[i].row_pitch, data[i].slice_pitch); } } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f00ef681215..34ec814685c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4753,9 +4753,6 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, 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; -void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource, - unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, - unsigned int slice_pitch) DECLSPEC_HIDDEN; void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object) DECLSPEC_HIDDEN; HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, @@ -4827,6 +4824,9 @@ void wined3d_device_context_emit_set_vertex_declaration(struct wined3d_device_co struct wined3d_vertex_declaration *declaration) 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; +void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, + struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, + const void *data, unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource) {