wined3d: Use WINED3D_CS_QUEUE_MAP for WINED3D_CS_OP_UPDATE_SUB_RESOURCE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4dcdc80ad5
commit
e0e4f9bbcd
|
@ -2146,7 +2146,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
|||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
|
||||
op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
|
@ -2157,10 +2157,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
|||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
cs->ops->submit(cs, 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. */
|
||||
cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP);
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data)
|
||||
|
|
|
@ -4216,6 +4216,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
|||
return;
|
||||
}
|
||||
|
||||
wined3d_resource_wait_idle(resource);
|
||||
|
||||
wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue