From c886ce2991a5b6fec054810d0c891d599986593c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 4 Aug 2021 12:05:04 -0400 Subject: [PATCH] zink: simplify else clause for mem info gathering it doesn't matter if this is host-visible, it just has to not be device-local Fixes: 73f6bff07f1 ("zink: fix mem info query to be more permissive") Reviewed-by: Hoe Hao Cheng Part-of: --- src/gallium/drivers/zink/zink_screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 8a86828244b..16a68195cf7 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1652,7 +1652,7 @@ zink_query_memory_info(struct pipe_screen *pscreen, struct pipe_memory_info *inf /* VRAM */ info->total_device_memory += mem.memoryProperties.memoryHeaps[i].size / 1024; info->avail_device_memory += (budget.heapBudget[i] - budget.heapUsage[i]) / 1024; - } else if (mem.memoryProperties.memoryHeaps[i].flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { + } else { /* GART */ info->total_staging_memory += mem.memoryProperties.memoryHeaps[i].size / 1024; info->avail_staging_memory += (budget.heapBudget[i] - budget.heapUsage[i]) / 1024; @@ -1666,7 +1666,7 @@ zink_query_memory_info(struct pipe_screen *pscreen, struct pipe_memory_info *inf info->total_device_memory += screen->info.mem_props.memoryHeaps[i].size / 1024; /* free real estate! */ info->avail_device_memory += info->total_device_memory; - } else if (screen->info.mem_props.memoryHeaps[i].flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { + } else { /* GART */ info->total_staging_memory += screen->info.mem_props.memoryHeaps[i].size / 1024; /* free real estate! */