summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-10-06 20:56:32 -0400
committerMarek Olšák <[email protected]>2018-10-16 17:23:25 -0400
commit5030adcbe05f2ae97826f645f43c612f774411e8 (patch)
treec6659395397bde594c9d883c04db4a8fda1b7281 /src/gallium/drivers
parent0b40fbc8796b8e204e7af45b3d39b67d20fb3da7 (diff)
radeonsi: use copy_buffer in buffer_do_flush_region directly
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_buffer.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c
index a03a94453a4..c7260e06ccf 100644
--- a/src/gallium/drivers/radeonsi/si_buffer.c
+++ b/src/gallium/drivers/radeonsi/si_buffer.c
@@ -521,18 +521,11 @@ static void si_buffer_do_flush_region(struct pipe_context *ctx,
struct r600_resource *rbuffer = r600_resource(transfer->resource);
if (stransfer->staging) {
- struct pipe_resource *dst, *src;
- unsigned soffset;
- struct pipe_box dma_box;
-
- dst = transfer->resource;
- src = &stransfer->staging->b.b;
- soffset = stransfer->offset + box->x % SI_MAP_BUFFER_ALIGNMENT;
-
- u_box_1d(soffset, box->width, &dma_box);
-
/* Copy the staging buffer into the original one. */
- ctx->resource_copy_region(ctx, dst, 0, box->x, 0, 0, src, 0, &dma_box);
+ si_copy_buffer((struct si_context*)ctx, transfer->resource,
+ &stransfer->staging->b.b, box->x,
+ stransfer->offset + box->x % SI_MAP_BUFFER_ALIGNMENT,
+ box->width);
}
util_range_add(&rbuffer->valid_buffer_range, box->x,