Repository navigation
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
Conversation
…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>
|
Tested Built No game files. AI-assisted (Claude Code). |
|
Tested
|
|
Tested
Like the RTX 5060 Ti run, this only covers the 1.3 path on hardware; the 1.2 branch is covered by the unit test only. AI-assisted (Claude Code). |
D3D-831. Claim: #7913 (comment) (@ABilenduke's finding, marked up for grabs).
What and why
VK_EXT_host_image_copydepends onVK_KHR_copy_commands2andVK_KHR_format_feature_flags2, which are core only from Vulkan 1.3.create_vulkan_device_standaloneenabled it whenever the device listed it, also on a Vulkan 1.2 device (the MoltenVK pathvulkan13_features.hsupports), 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.hhad 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 listsVK_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_commands2andVK_KHR_format_feature_flags2and thenVK_EXT_host_image_copy; on 1.3, onlyVK_EXT_host_image_copy.create_vulkan_device_standalone(runtime/shims/d3d12_vulkan_device.cpp) andvk_test_device.huse 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.ps1onmaindde82f27e+ this branch:vulkan13_features_test: all checks passed (new 1.2/1.3 host-copy cases included).ctest: 269 of 272 pass. The 3 failures fail the same way onmainwithout this change:d3d12_vulkan_device(tiles == 1, fixed by d3d12_vulkan_device: check PC CreateReservedResource2 behind the Xbox proxy, not through slot 78 #7125),d3d12_indirect_dispatch_count(cs_indirect_dispatch_count: read the root UAV from s4:s5, as #4312 moved it (#6162) #7133 / d3d12_indirect_dispatch_count: read root UAV from s4:s5 in cs_indirec… #6564),d3d12_depth_resolve("refused ... destination changed", reproduced onmainwith this change stashed).d3d12_subresource_copy_testwithLEONIDA_VK_VALIDATION=1: passes, host image copy still enabled on this 1.4 device.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