mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-02 14:43:59 +08:00
radv: make sure the heap budget is less than or equal to the heap size
Reported by Hans-Kristian.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28575>
(cherry picked from commit 14ba56718f
)
This commit is contained in:
parent
0deacc982b
commit
a5d4638ed5
@ -1984,7 +1984,7 @@
|
||||
"description": "radv: make sure the heap budget is less than or equal to the heap size",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@ -2380,6 +2380,11 @@ radv_get_memory_budget_properties(VkPhysicalDevice physicalDevice,
|
||||
assert(heap == memory_properties->memoryHeapCount);
|
||||
}
|
||||
|
||||
/* The heapBudget value must be less than or equal to VkMemoryHeap::size for each heap. */
|
||||
for (uint32_t i = 0; i < memory_properties->memoryHeapCount; i++) {
|
||||
memoryBudget->heapBudget[i] = MIN2(memory_properties->memoryHeaps[i].size, memoryBudget->heapBudget[i]);
|
||||
}
|
||||
|
||||
/* The heapBudget and heapUsage values must be zero for array elements
|
||||
* greater than or equal to
|
||||
* VkPhysicalDeviceMemoryProperties::memoryHeapCount.
|
||||
|
Loading…
Reference in New Issue
Block a user