vulkan: expose promoted core functions based on the physical device version - #3
Draft
manon-traverse wants to merge 1 commit into
Draft
vulkan: expose promoted core functions based on the physical device version#3manon-traverse wants to merge 1 commit into
manon-traverse wants to merge 1 commit into
Conversation
…ersion Apps may request a low VkApplicationInfo::apiVersion yet still call core functions that were promoted in a later version, relying on the driver providing them anyway (common on Android/Adreno). RenderDoc gated promoted function exposure on the app-requested version (RDCMIN of the requested and physical-device versions), so GetDeviceProcAddr returned NULL for those functions and the app crashed calling a null pointer; replay hit the same gating. Gate exposure on the physical device's supported apiVersion instead, matching the driver's actual behaviour - in vkCreateInstance, vkCreateDevice and Serialise_vkCreateDevice. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Expose promoted core Vulkan functions based on the physical device's supported version rather than the app-requested
apiVersion.Problem
Some apps set a low
VkApplicationInfo::apiVersion(e.g. 1.0/1.1) but still call core functions that were promoted in a later version (vkCmdBeginRendering,vkQueueSubmit2,vkCmdPipelineBarrier2,vkGetBufferDeviceAddress, …), relying on the driver providing them anyway — common on Android/Adreno. RenderDoc gated promoted-function exposure onRDCMIN(requestedVersion, physicalDeviceVersion), sovkGetDeviceProcAddrreturnedNULLfor ~90 such functions and the app crashed calling a null pointer. Remote replay hit the same gating inSerialise_vkCreateDevice.Fix
Gate promoted-function/extension exposure on the physical device's supported
apiVersion(what the driver actually implements) invkCreateInstance,vkCreateDevice, andSerialise_vkCreateDevice.Testing
Captured and remote-replayed a frame of a Vulkan-1.4 / apiVersion-1.0 Adreno title (Asphalt 9) on Android 16 — device creation no longer returns null function pointers and replay enumerates the frame (168 draws).
🤖 Draft opened on the Traverse-Research fork for internal human review before any upstream submission.