vulkan: Fix state snapshot capture on Android - #30
Open
olehkuznetsov wants to merge 1 commit into
Open
Conversation
olehkuznetsov
force-pushed
the
fix-capture-and-frame-looping
branch
4 times, most recently
from
August 13, 2026 14:42
f9fe548 to
4b57b6c
Compare
- Initialize DeviceWrapper queue_family_indices from VkDeviceCreateInfo to track valid queue families during state snapshot. - Add GetValidQueueFamilyIndex validator to prevent VK_QUEUE_FAMILY_IGNORED / invalid indices from being passed to VulkanResourcesUtil. - Add VulkanResourcesUtil::SetQueue and register existing child queue handles during state snapshotting and import fd processing, avoiding unneeded vkGetDeviceQueue calls that crash the Android Vulkan loader. - Add RegisterDeviceQueues helper to deduplicate queue registration across state writer and capture manager.
olehkuznetsov
force-pushed
the
fix-capture-and-frame-looping
branch
from
August 13, 2026 17:15
4b57b6c to
fb5d0f8
Compare
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.
Summary
This PR addresses state snapshot capture crashes on Android (
vkGetDeviceQueueloader crashes and invalid queue family indexing):InitializeState<VkPhysicalDevice, DeviceWrapper, VkDeviceCreateInfo>initializeswrapper->queue_family_indicesfrompQueueCreateInfos.GetValidQueueFamilyIndexvalidator invulkan_handle_wrapper_util.hto preventVK_QUEUE_FAMILY_IGNORED(~0U),VK_QUEUE_FAMILY_EXTERNAL, or invalid queue family indices from being passed toVulkanResourcesUtil.VulkanResourcesUtil::SetQueueandRegisterDeviceQueuesto register existing validVkQueuehandles fromdevice_wrapper->child_queuesrather than callingvkGetDeviceQueueon Android (which crashes the Android Vulkan loader).Testing
unity_coop_200.gfxr) on Pixel 11 Pro Fold.