Repository navigation
Fix application info and device creation cleanup - #185
Merged
solidpixel merged 1 commit intoOct 22, 2026
Merged
Conversation
[AI-generated 🤖] Accept omitted application info and treat API version zero as Vulkan 1.0. Create application info in the owned safe copy before version promotion, without modifying the caller's input. If Device construction or publication fails after the Vulkan device has been created, release the tracking lock, clean up the underlying device with the original allocator, and clear the output handle. Translate allocation failures to VK_ERROR_OUT_OF_HOST_MEMORY and other exceptions to VK_ERROR_INITIALIZATION_FAILED.
Rob-Hughes-Arm
marked this pull request as ready for review
September 14, 2026 13:43
solidpixel
self-requested a review
October 22, 2026 15:36
solidpixel
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The shared creation paths have two failure-handling gaps:
VkInstanceCreateInfo::pApplicationInfomay legally be null, but the framework dereferences it when reading the API version and when updating the safe copy for version promotion. An explicitapiVersionof zero is also treated as version 0.0 instead of Vulkan 1.0.vkCreateDevicecall succeeds, constructing the layer'sDevicewrapper or publishing it in the global store can throw. Without rollback, the underlying device remains alive without a usable layer wrapper, and the output handle is left populated.Changes
VK_ERROR_OUT_OF_HOST_MEMORYfor allocation failures andVK_ERROR_INITIALIZATION_FAILEDfor other construction/publication exceptions.Successful device publication is unchanged. Driver destruction remains outside the tracking lock.