radeonsi: only use staging for linear textures when all VRAM is not visible

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7951>
This commit is contained in:
Marek Olšák 2020-12-06 14:03:46 -05:00
parent 3404c3111e
commit 6fecdc6dda

View file

@ -1810,7 +1810,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.all_vram_visible))
use_staging_texture = true;
else if (usage & PIPE_MAP_READ)
use_staging_texture =