mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 14:20:11 +01:00
r600g: Remove streamout-based buffer copy path
r600g is the only user of util_blitter_copy_buffer in tree, which implements
buffer copies with streamout. This path for r600g was added in 8ac9801669
("r600g: accelerate buffer copying"), a commit from 2012. At that point there
was no DMA path for buffer copies. Since then, a DMA path has been added,
conditional only on the kernel version -- not the hardware. It appears the
required kernel support has been mainline for at least 4 years now. Mesa 22.2
doesn't need to provide optimal performance on an old kernel -- for performance,
a DMA-capable kernel should be used, and for compatability, the CPU fallback
(used for unaligned buffers as it is) is still available. Remove the streamout
path "in the middle" that appears ~unused today.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17142>
This commit is contained in:
parent
f367c55573
commit
21f5c6ea87
1 changed files with 2 additions and 11 deletions
|
|
@ -575,19 +575,10 @@ static void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst
|
|||
{
|
||||
struct r600_context *rctx = (struct r600_context*)ctx;
|
||||
|
||||
if (rctx->screen->b.has_cp_dma) {
|
||||
if (rctx->screen->b.has_cp_dma)
|
||||
r600_cp_dma_copy_buffer(rctx, dst, dstx, src, src_box->x, src_box->width);
|
||||
}
|
||||
else if (rctx->screen->b.has_streamout &&
|
||||
/* Require 4-byte alignment. */
|
||||
dstx % 4 == 0 && src_box->x % 4 == 0 && src_box->width % 4 == 0) {
|
||||
|
||||
r600_blitter_begin(ctx, R600_COPY_BUFFER);
|
||||
util_blitter_copy_buffer(rctx->blitter, dst, dstx, src, src_box->x, src_box->width);
|
||||
r600_blitter_end(ctx);
|
||||
} else {
|
||||
else
|
||||
util_resource_copy_region(ctx, dst, 0, dstx, 0, 0, src, 0, src_box);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue