mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1569] OLD-9794: fix(vulkan): use memory_type_order with OOM fallback in PredicateReducer::batch #1592
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#1592
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/1569
Author: @Tortoche
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:old-9794📝 Commits (1)
dd8625afix(vulkan): use memory_type_order with OOM fallback in PredicateReducer::batch📊 Changes
3 files changed (+306 additions, -9 deletions)
View changed files
📝
runtime/CMakeLists.txt(+6 -0)📝
runtime/src/vulkan_predicate.h(+11 -9)➕
runtime/test/predicate_alloc_test.cpp(+289 -0)📄 Description
Item ID:
OLD-9794Carries forward Draft
#71(old-pr/9794bytotonii/totonicpu, preserving original commit authorship atdd8625af6), rebased cleanly ontomain(364ab4eab).Claimed in
#14: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147781405AI-assisted: yes
Summary
runtime/src/vulkan_predicate.h(PredicateReducer::batch):leonida::memory_type_order(memory_, requirements.memoryTypeBits, 0, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, requirements.size)(runtime/src/vulkan_memory.h), filtering out heaps smaller thanrequirements.size(VUID-vkAllocateMemory-pAllocateInfo-01713).vkAllocateMemory()fails (e.g.,VK_ERROR_OUT_OF_DEVICE_MEMORY), resettingb->memory = VK_NULL_HANDLEon each failed attempt so~Batch()cleans up safely.runtime/test/predicate_alloc_test.cpp&runtime/CMakeLists.txt:predicate_alloc_test(registered aspredicate_allocunderif(TARGET Vulkan::Headers)), covering undersized-heap skip, OOM fallback, all-heaps-undersized failure, and all-types-OOM cleanup.Tests Executed (Linux x86_64, no retail game files / no Windows build)
ctest --test-dir runtime/build -C RelWithDebInfo: 71 Passed / 2 Skipped (shader_library_corpus,vk_sync_validation) / 0 Failed out of 73ctest --test-dir runtime/build -C RelWithDebInfo -E "^xdxr_build_check$" --output-on-failure: 70 Passed / 2 Skipped / 0 Failed out of 72 (includingpredicate_alloc1/1 andvk_predicate_capture1/1)ctest --test-dir runtime/build -C RelWithDebInfo -R "^xdxr_build_check$" --output-on-failure: 2/2 Passed (xdxr_build,xdxr_build_check)./runtime/build/predicate_alloc_test: OK (predicate_alloc_test: all checks passed)python3 -I tests/test_ci_registration.py: 16/16 passedpython3 -I tests/test_ctest_registration.py: 5/5 passedpython3 -I tests/test_text_write_line_endings.py: 3/3 passedpython3 -I scripts/check_no_game_data.py runtime/CMakeLists.txt runtime/src/vulkan_predicate.h runtime/test/predicate_alloc_test.cpp: OK (exit 0, zero game data)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.