summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-03-02 01:06:19 +0100
committerMarek Olšák <[email protected]>2017-03-17 18:30:21 +0100
commit04e6977e5d4b17951d3ed81cf872a0243f582e82 (patch)
tree3b1d76a090befcdb957f26e27e460da02f6a2df6 /src/gallium/drivers/radeon/r600_texture.c
parent03127bb6d5454002b3d9c3a542f3ff1a5f1e91d9 (diff)
gallium/radeon: reference pipe_resource in pipe_transfer
for threaded gallium Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 7ca112c636a..ec7a325d1e7 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1490,7 +1490,7 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
trans = CALLOC_STRUCT(r600_transfer);
if (!trans)
return NULL;
- trans->transfer.resource = texture;
+ pipe_resource_reference(&trans->transfer.resource, texture);
trans->transfer.level = level;
trans->transfer.usage = usage;
trans->transfer.box = *box;
@@ -1643,6 +1643,7 @@ static void r600_texture_transfer_unmap(struct pipe_context *ctx,
rctx->num_alloc_tex_transfer_bytes = 0;
}
+ pipe_resource_reference(&transfer->resource, NULL);
FREE(transfer);
}