Skip to content

vulkan: expose promoted core functions based on the physical device version - #3

Draft
manon-traverse wants to merge 1 commit into
v1.xfrom
pr-promoted-core-functions
Draft

vulkan: expose promoted core functions based on the physical device version#3
manon-traverse wants to merge 1 commit into
v1.xfrom
pr-promoted-core-functions

Conversation

@manon-traverse

Copy link
Copy Markdown
Collaborator

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 on RDCMIN(requestedVersion, physicalDeviceVersion), so vkGetDeviceProcAddr returned NULL for ~90 such functions and the app crashed calling a null pointer. Remote replay hit the same gating in Serialise_vkCreateDevice.

Fix

Gate promoted-function/extension exposure on the physical device's supported apiVersion (what the driver actually implements) in vkCreateInstance, vkCreateDevice, and Serialise_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.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant