zink: fix memory availability reporting
this shouldn't report the budgeted available memory, it should return
the total memory, as that's what this api expects
Fixes: ff4ba3d4a7
("zink: support PIPE_CAP_QUERY_MEMORY_INFO")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13849>
This commit is contained in:

committed by
Marge Bot

parent
5f140a723d
commit
72a88c77de
@@ -1746,11 +1746,11 @@ zink_query_memory_info(struct pipe_screen *pscreen, struct pipe_memory_info *inf
|
|||||||
if (mem.memoryProperties.memoryHeaps[i].flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) {
|
if (mem.memoryProperties.memoryHeaps[i].flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) {
|
||||||
/* VRAM */
|
/* VRAM */
|
||||||
info->total_device_memory += mem.memoryProperties.memoryHeaps[i].size / 1024;
|
info->total_device_memory += mem.memoryProperties.memoryHeaps[i].size / 1024;
|
||||||
info->avail_device_memory += (budget.heapBudget[i] - budget.heapUsage[i]) / 1024;
|
info->avail_device_memory += (mem.memoryProperties.memoryHeaps[i].size - budget.heapUsage[i]) / 1024;
|
||||||
} else {
|
} else {
|
||||||
/* GART */
|
/* GART */
|
||||||
info->total_staging_memory += mem.memoryProperties.memoryHeaps[i].size / 1024;
|
info->total_staging_memory += mem.memoryProperties.memoryHeaps[i].size / 1024;
|
||||||
info->avail_staging_memory += (budget.heapBudget[i] - budget.heapUsage[i]) / 1024;
|
info->avail_staging_memory += (mem.memoryProperties.memoryHeaps[i].size - budget.heapUsage[i]) / 1024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* evictions not yet supported in vulkan */
|
/* evictions not yet supported in vulkan */
|
||||||
|
Reference in New Issue
Block a user