wined3d: Synchronise WINED3D_CS_OP_UNLOAD_RESOURCE resource access.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-08-10 18:44:46 +02:00 committed by Alexandre Julliard
parent 565cd2b84c
commit af54f9b93a
1 changed files with 3 additions and 0 deletions

View File

@ -1256,6 +1256,7 @@ static void wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *d
struct wined3d_resource *resource = op->resource;
resource->resource_ops->resource_unload(resource);
wined3d_resource_release(resource);
}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@ -1266,6 +1267,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
op->resource = resource;
wined3d_resource_acquire(resource);
cs->ops->submit(cs);
}