Skip to content

d3d12: enable VK_EXT_host_image_copy on a Vulkan 1.2 device only with VK_KHR_copy_commands2 and VK_KHR_format_feature_flags2 (D3D-831) - #8152

Open
marso006 wants to merge 1 commit into
ItsNotRexed:mainfrom
marso006:fix/d3d831-host-image-copy-deps
Open

marso006 wants to merge 1 commit into
ItsNotRexed:mainfrom
marso006:fix/d3d831-host-image-copy-deps

Conversation

@marso006

Copy link
Copy Markdown

D3D-831. Claim: #7913 (comment) (@ABilenduke's finding, marked up for grabs).

What and why

VK_EXT_host_image_copy depends on VK_KHR_copy_commands2 and VK_KHR_format_feature_flags2, which are core only from Vulkan 1.3. create_vulkan_device_standalone enabled it whenever the device listed it, also on a Vulkan 1.2 device (the MoltenVK path vulkan13_features.h supports), and never enabled the two dependencies. That breaks VUID-vkCreateDevice-ppEnabledExtensionNames-01387, and a strict driver refuses the device (E_FAIL). runtime/test/vk_test_device.h had the same code.

Change

  • Vulkan13Features (which already knows 1.2 from 1.3 and enables the 1.2 extensions for dynamic rendering and synchronization2) gets two members:
    • host_image_copy_available(extensions): true on 1.3 when the device lists VK_EXT_host_image_copy; on 1.2 only when it also lists both dependencies.
    • add_host_image_copy_extensions(list): on 1.2, VK_KHR_copy_commands2 and VK_KHR_format_feature_flags2 and then VK_EXT_host_image_copy; on 1.3, only VK_EXT_host_image_copy.
  • create_vulkan_device_standalone (runtime/shims/d3d12_vulkan_device.cpp) and vk_test_device.h use both. A 1.2 device without the dependencies takes the existing staging-copy path (the "no VK_EXT_host_image_copy" line), as a device without the extension already does.
  • vulkan13_features_test (CPU-only) checks both members on 1.3 and 1.2: with all three extensions, only the host copy, and each dependency missing.

On a 1.3 device nothing changes. No docs change, no game files.

Tested

Windows 11, NVIDIA GeForce RTX 5060 Ti, driver 617.42 (a Vulkan 1.4 device), Vulkan SDK 1.4.363.0, VS 2026, scripts/build_runtime.ps1 on main dde82f27e + this branch:

I have no Vulkan 1.2 device here, so the 1.2 path is covered by the unit test, not by hardware. A MoltenVK / CrossOver check would be welcome.

AI-assisted (Claude Code, Claude Opus 5.5).

🤖 Generated with Claude Code

…pendencies (D3D-831)

VK_EXT_host_image_copy depends on VK_KHR_copy_commands2 and
VK_KHR_format_feature_flags2, which are core only from Vulkan 1.3. On a 1.2
device (the MoltenVK path vulkan13_features.h supports) the layer enabled it
alone, which breaks VUID-vkCreateDevice-ppEnabledExtensionNames-01387, and a
strict driver refuses the device.

Vulkan13Features::host_image_copy_available() now requires both extensions on
a 1.2 device, and add_host_image_copy_extensions() enables them ahead of
VK_EXT_host_image_copy (only the extension itself on 1.3). Both the layer's
create_vulkan_device_standalone and the tests' vk_test_device.h use them.
vulkan13_features_test checks the 1.2 and 1.3 cases.

Co-Authored-By: Claude Opus 5.5 <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