summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-06-21 21:13:00 +0200
committerMarek Olšák <[email protected]>2016-06-25 23:13:42 +0200
commitd5383a7d3114aa5f81a704ff84f58de6b41f94bd (patch)
tree77fcb982312396216e5e3edabaaa2c5a7669e5db /src/gallium/drivers/radeonsi
parent81978c6febd43b8a88a4db09133f9659e15b492c (diff)
gallium/radeon: use r600_resource_reference
Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Vedran Miletić <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c6
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c4
3 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index f19e830c580..323204e2ab2 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -208,9 +208,7 @@ static bool si_setup_compute_scratch_buffer(struct si_context *sctx,
scratch_bo_size = sctx->compute_scratch_buffer->b.b.width0;
if (scratch_bo_size < scratch_needed) {
- pipe_resource_reference(
- (struct pipe_resource**)&sctx->compute_scratch_buffer,
- NULL);
+ r600_resource_reference(&sctx->compute_scratch_buffer, NULL);
sctx->compute_scratch_buffer =
si_resource_create_custom(&sctx->screen->b.b,
@@ -361,7 +359,7 @@ static void si_upload_compute_input(struct si_context *sctx,
radeon_emit(cs, S_008F04_BASE_ADDRESS_HI (kernel_args_va >> 32) |
S_008F04_STRIDE(0));
- pipe_resource_reference((struct pipe_resource**)&input_buffer, NULL);
+ r600_resource_reference(&input_buffer, NULL);
}
static void si_setup_tgsi_grid(struct si_context *sctx,
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index e95556bf117..78d14afe406 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -132,7 +132,7 @@ static void si_init_descriptors(struct si_descriptors *desc,
static void si_release_descriptors(struct si_descriptors *desc)
{
- pipe_resource_reference((struct pipe_resource**)&desc->buffer, NULL);
+ r600_resource_reference(&desc->buffer, NULL);
FREE(desc->list);
}
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index daef49d58b6..89490bd0c29 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1725,9 +1725,7 @@ static bool si_update_spi_tmpring_size(struct si_context *sctx)
if (scratch_needed_size > 0) {
if (scratch_needed_size > current_scratch_buffer_size) {
/* Create a bigger scratch buffer */
- pipe_resource_reference(
- (struct pipe_resource**)&sctx->scratch_buffer,
- NULL);
+ r600_resource_reference(&sctx->scratch_buffer, NULL);
sctx->scratch_buffer =
si_resource_create_custom(&sctx->screen->b.b,