mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
radeonsi: do not use staging texture for APU
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 <yipeng.chen@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13306>
This commit is contained in:
parent
80efe661d7
commit
33484a327e
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue