Skip to content

LATX, fix: Cover Vulkan proc-address wrappers - #401

Merged
LaurenIsACoder merged 2 commits into
lat-opensource:masterfrom
LaurenIsACoder:agent/vulkan-proc-address-wrappers
Aug 15, 2026
Merged

LATX, fix: Cover Vulkan proc-address wrappers#401
LaurenIsACoder merged 2 commits into
lat-opensource:masterfrom
LaurenIsACoder:agent/vulkan-proc-address-wrappers

Conversation

@LaurenIsACoder

Copy link
Copy Markdown
Contributor

Background

Vulkan applications do not necessarily import every command as an exported libvulkan.so.1 symbol. Extension commands are commonly requested at runtime through vkGetInstanceProcAddr or vkGetDeviceProcAddr.

The host Vulkan implementation can return a valid native function pointer for a supported command, but LAT can only expose that pointer to the x86 guest when the command has a known wrapper signature. If the signature is absent from wrappedvulkan_private.h, resolveSymbol() returns NULL even though the host lookup succeeded. A guest that later calls the returned entry point then fails through a null function pointer.

This was observed with Steam using DXVK when it requested vkCmdSetDescriptorBufferOffsets2EXT from VK_KHR_maintenance6.

Changes

  • Add the six VK_KHR_maintenance6 commands involved in the failing descriptor-buffer path.
  • Add another fifteen stable, platform-neutral Vulkan commands that the current host Vulkan implementation exposed during the same runtime coverage run.
  • Add the two exact generic bridge signatures required by those commands:
    • UFpu: a 64-bit result with pointer and 32-bit integer arguments.
    • iFpupppp: a 32-bit result with pointer, 32-bit integer, and four pointer arguments.
  • Keep platform-specific Android, Fuchsia, Metal, QNX, and similar APIs out of scope.

This PR is independent of the KZT host-pointer address-policy work: it fixes missing Vulkan proc-address metadata rather than guest/host virtual-address classification.

Validation

  • Checked every added prototype and return type against Khronos Vulkan-Headers 1.4.360.
  • Built latx-x86_64 successfully on LoongArch64.
  • Instrumented the Vulkan proc-address path: runtime-exposed commands without wrapper metadata decreased from 21 to 0 for the exercised Steam/DXVK startup.
  • Ran Wine 11.14 with Steam and DXVK 3.0.2 using default LATX_KZT=1 for 90 seconds:
    • Steam and steamwebhelper windows remained visible.
    • no access violation or fatal GPU-process exit;
    • no new crash dump.
  • test-kzt-address-policy passed.
  • git diff --check passed.

Scope

This covers the stable generic/Linux Vulkan entry points observed from the tested driver. It does not claim blanket support for every future, provisional, vendor-only, or non-Linux platform command in the Vulkan registry.

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Vulkan implementations may return supported extension entry points through vkGetInstanceProcAddr or vkGetDeviceProcAddr even when those names are not exported as ordinary symbols. Missing signature entries made LAT return NULL after the host had returned a valid function pointer.

Add the stable generic/Linux entry points observed during the Steam and DXVK coverage run. Add the two exact generic bridge shapes needed by those signatures.

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
@LaurenIsACoder
LaurenIsACoder marked this pull request as ready for review August 15, 2026 01:27
@LaurenIsACoder
LaurenIsACoder merged commit 1eedda7 into lat-opensource:master Aug 15, 2026
20 checks passed
@LaurenIsACoder
LaurenIsACoder deleted the agent/vulkan-proc-address-wrappers branch August 15, 2026 01:44
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