mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
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> (cherry picked from commit72a88c77de)
This commit is contained in:
parent
5d130ac3ff
commit
c2682955ff
2 changed files with 3 additions and 3 deletions
|
|
@ -2596,7 +2596,7 @@
|
|||
"description": "zink: fix memory availability reporting",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ff4ba3d4a77320d1522c3a807661511b4cc075ab"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1706,11 +1706,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) {
|
||||
/* VRAM */
|
||||
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 {
|
||||
/* GART */
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue