mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 02:00:35 +01:00
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:73f6bff07f("zink: fix mem info query to be more permissive") Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199> (cherry picked from commitc886ce2991)
This commit is contained in:
parent
d634d31c32
commit
260d1ecf1e
2 changed files with 3 additions and 3 deletions
|
|
@ -175,7 +175,7 @@
|
|||
"description": "zink: simplify else clause for mem info gathering",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "73f6bff07f1f3a5aa31e906cd69eeef58d95104c"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1647,7 +1647,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;
|
||||
|
|
@ -1661,7 +1661,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! */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue