From 14f85e1874a1f1c9c8f35906ac1e8dfca7f5a3e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 6 Dec 2020 14:49:28 -0500 Subject: [PATCH] radeonsi: map PIPE_USAGE_STREAM to VRAM if all VRAM is visible Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_buffer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c index 66ca3dcb64c..14c506980df 100644 --- a/src/gallium/drivers/radeonsi/si_buffer.c +++ b/src/gallium/drivers/radeonsi/si_buffer.c @@ -55,8 +55,12 @@ void si_init_resource_fields(struct si_screen *sscreen, struct si_resource *res, switch (res->b.b.usage) { case PIPE_USAGE_STREAM: - res->flags = RADEON_FLAG_GTT_WC; - FALLTHROUGH; + res->flags |= RADEON_FLAG_GTT_WC; + if (sscreen->info.all_vram_visible) + res->domains = RADEON_DOMAIN_VRAM; + else + res->domains = RADEON_DOMAIN_GTT; + break; case PIPE_USAGE_STAGING: /* Transfers are likely to occur more often with these * resources. */ -- 2.34.1