mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #2333] vulkan_memory_budget: saturate multi-heap uint64_t sums in sum_vram_budget #2337
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2337
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2333
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-vulkan-memory-budget-saturate📝 Commits (1)
6376bbcvulkan_memory_budget: saturate multi-heap uint64_t sums in sum_vram_budget📊 Changes
2 files changed (+60 additions, -3 deletions)
View changed files
📝
runtime/src/vulkan_memory_budget.h(+6 -3)➕
runtime/test/vulkan_memory_budget_test.cpp(+54 -0)📄 Description
Prevents
uint64_twraparound when summing multiple Vulkan memory heaps inleonida::sum_vram_budget()(runtime/src/vulkan_memory_budget.h):out.local_usage += ...,out.local_budget += ..., andout.shared_usage += ...could wrap around modulo2^{64}when summing large heap figures, even wrappinglocal_budgetto0and falsely markingout.available = false("VRAM n/a").UINT64_MAXcap) forlocal_usage,local_budget, andshared_usage.runtime/test/vulkan_memory_budget_test.cpp.Verification
g++ -std=c++20 -D_GLIBCXX_DEBUG -Wall -Wextra -Werror -pedantic -Wno-missing-field-initializers -Iruntime/src runtime/test/vulkan_memory_budget_test.cpppassedg++ -std=c++20 -fsanitize=address,undefined -Wall -Wextra -Werror -pedantic -Wno-missing-field-initializers -Iruntime/src runtime/test/vulkan_memory_budget_test.cpppassedsaturated.available, exit 1) against unmodifiedubiq/mainpython3 -I scripts/check_no_game_data.py runtime/src/vulkan_memory_budget.h runtime/test/vulkan_memory_budget_test.cppcleanClaimed in the coordination issue as: RT-VULKAN-MEMORY-BUDGET-SATURATE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194106445)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.