mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
radeonsi: disable the L2 cache for CPU read mappings of buffers
for faster copying over PCIe and no need to flush L2 Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
This commit is contained in:
parent
7356144fe4
commit
c45a2145f5
1 changed files with 3 additions and 2 deletions
|
|
@ -479,8 +479,9 @@ static void *si_buffer_transfer_map(struct pipe_context *ctx, struct pipe_resour
|
|||
struct si_resource *staging;
|
||||
|
||||
assert(!(usage & (TC_TRANSFER_MAP_THREADED_UNSYNC | PIPE_TRANSFER_THREAD_SAFE)));
|
||||
staging = si_resource(pipe_buffer_create(ctx->screen, 0, PIPE_USAGE_STAGING,
|
||||
box->width + (box->x % SI_MAP_BUFFER_ALIGNMENT)));
|
||||
staging = si_aligned_buffer_create(ctx->screen, SI_RESOURCE_FLAG_UNCACHED,
|
||||
PIPE_USAGE_STAGING,
|
||||
box->width + (box->x % SI_MAP_BUFFER_ALIGNMENT), 256);
|
||||
if (staging) {
|
||||
/* Copy the VRAM buffer to the staging buffer. */
|
||||
si_sdma_copy_buffer(sctx, &staging->b.b, resource, box->x % SI_MAP_BUFFER_ALIGNMENT,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue