From 33484a327e7dd9102c49ed11d138d9bf1cd683ca Mon Sep 17 00:00:00 2001 From: "Yipeng Chen (Jasber)" Date: Tue, 12 Oct 2021 16:37:24 +0800 Subject: [PATCH] radeonsi: do not use staging texture for APU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to fix serious performance drop of texture_upload/ texture_resue relative items in chromeos glbench test. Staging texture is not efficient for CPU uploading. Signed-off-by: Jasber Chen Reviewed-by: Marek Olšák Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index d335128c3ab..35a74509a22 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1771,7 +1771,7 @@ static void *si_texture_transfer_map(struct pipe_context *ctx, struct pipe_resou /* Tiled textures need to be converted into a linear texture for CPU * access. The staging texture is always linear and is placed in GART. * - * Always use a staging texture for VRAM, so that we don't map it and + * dGPU use a staging texture for VRAM, so that we don't map it and * don't relocate it to GTT. * * Reading from VRAM or GTT WC is slow, always use the staging @@ -1781,7 +1781,7 @@ static void *si_texture_transfer_map(struct pipe_context *ctx, struct pipe_resou * is busy. */ if (!tex->surface.is_linear || (tex->buffer.flags & RADEON_FLAG_ENCRYPTED) || - (tex->buffer.domains & RADEON_DOMAIN_VRAM && + (tex->buffer.domains & RADEON_DOMAIN_VRAM && sctx->screen->info.has_dedicated_vram && !sctx->screen->info.smart_access_memory)) use_staging_texture = true; else if (usage & PIPE_MAP_READ)