summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-02-01 14:59:28 +0100
committerMarek Olšák <[email protected]>2014-02-04 20:19:16 +0100
commit08f0344cf395b7ceee20c4c4030946c9334895bc (patch)
tree203dcb726cab0df312fb48325b2f0c957aec4c42 /src/gallium/drivers
parent796e2fba8cc21f8e190bc143b6209ca417c54976 (diff)
r600g,radeonsi: skip busy-checking for DISCARD_RANGE if it has been done already
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 1a9a5dd4332..5b9282539e9 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -243,8 +243,12 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
data += box->x % R600_MAP_BUFFER_ALIGNMENT;
return r600_buffer_get_transfer(ctx, resource, level, usage, box,
ptransfer, data, staging, offset);
+ } else {
+ return NULL; /* error, shouldn't occur though */
}
}
+ /* At this point, the buffer is always idle (we checked it above). */
+ usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
}
data = r600_buffer_map_sync_with_rings(rctx, rbuffer, usage);