summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_buffer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-02-21 17:06:26 +0100
committerMarek Olšák <[email protected]>2013-03-01 13:46:32 +0100
commit58bd926d9e555e7be4af576fae60a65774d9d743 (patch)
tree114f61b33219cf3499e3fcbf3e623c4c9c577b49 /src/gallium/drivers/r600/r600_buffer.c
parent89e2898e9ecfcf93c337b99542b06892a8e30cbe (diff)
r600g: don't require dword alignment with CP DMA for buffer transfers
which is a leftover from the days when we used streamout to copy buffers Tested-by: Andreas Boll <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_buffer.c')
-rw-r--r--src/gallium/drivers/r600/r600_buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c
index 7574cd6c889..4dbe363da82 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -150,9 +150,10 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
}
else if ((usage & PIPE_TRANSFER_DISCARD_RANGE) &&
!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
- rctx->screen->has_streamout &&
- /* The buffer range must be aligned to 4. */
- box->x % 4 == 0 && box->width % 4 == 0) {
+ (rctx->screen->has_cp_dma ||
+ (rctx->screen->has_streamout &&
+ /* The buffer range must be aligned to 4 with streamout. */
+ box->x % 4 == 0 && box->width % 4 == 0))) {
assert(usage & PIPE_TRANSFER_WRITE);
/* Check if mapping this buffer would cause waiting for the GPU. */