summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2016-01-15 16:02:22 +0900
committerMichel Dänzer <[email protected]>2016-01-18 17:39:37 +0900
commitad20be1f30ef5d11bcacef38a921cb778c504dd2 (patch)
treef72346d870073d30f880f5a60692b50aad5b7e67 /src/gallium/drivers/radeon
parent0491dd1deb46ca77545322c53e90f86ae244cdae (diff)
gallium/radeon: Rename do_invalidate_resource to invalidate_buffer
And only call it from r600_invalidate_resource for buffer resources. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 6592c5bdeca..c7984c47304 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -210,8 +210,8 @@ static void r600_buffer_destroy(struct pipe_screen *screen,
}
static bool
-r600_do_invalidate_resource(struct r600_common_context *rctx,
- struct r600_resource *rbuffer)
+r600_invalidate_buffer(struct r600_common_context *rctx,
+ struct r600_resource *rbuffer)
{
/* In AMD_pinned_memory, the user pointer association only gets
* broken when the buffer is explicitly re-allocated.
@@ -236,7 +236,9 @@ void r600_invalidate_resource(struct pipe_context *ctx,
struct r600_common_context *rctx = (struct r600_common_context*)ctx;
struct r600_resource *rbuffer = r600_resource(resource);
- (void)r600_do_invalidate_resource(rctx, rbuffer);
+ /* We currently only do anyting here for buffers */
+ if (resource->target == PIPE_BUFFER)
+ (void)r600_invalidate_buffer(rctx, rbuffer);
}
static void *r600_buffer_get_transfer(struct pipe_context *ctx,
@@ -306,7 +308,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) {
assert(usage & PIPE_TRANSFER_WRITE);
- if (r600_do_invalidate_resource(rctx, rbuffer)) {
+ if (r600_invalidate_buffer(rctx, rbuffer)) {
/* At this point, the buffer is always idle. */
usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
}