Mesa (master): radeonsi: only use staging for linear textures when all VRAM is not visible

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 9 15:52:01 UTC 2020


Module: Mesa
Branch: master
Commit: 6fecdc6dda6da15d616a31900508214c81cd256e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fecdc6dda6da15d616a31900508214c81cd256e

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Dec  6 14:03:46 2020 -0500

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

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7951>

---

 src/gallium/drivers/radeonsi/si_texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index a16f007e4ae..68187f5e436 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -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 =



More information about the mesa-commit mailing list