radeonsi: map PIPE_USAGE_STREAM to VRAM if all VRAM is 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:49:28 -05:00
parent 913c06f501
commit 14f85e1874

View File

@@ -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. */