Repository navigation
Runtime: the standalone Vulkan instance keeps its surface extensions next to debug utils - #1027
Conversation
|
Tested
Code read: right fix. Building one AI-assisted (Claude Code). |
|
Independent verification, AI-assisted (Codex). I built base
This reproduces the missing |
|
Tested 17a483b (on main) on AMD RDNA2 iGPU and RTX 5070: pass. Windows 11 Home 10.0.26300, MSVC 14.44.35207, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, Ninja RelWithDebInfo (
Overlap: #1038 makes the same fix in AI-assisted (Claude Code). No game files. |
…next to debug utils create_vulkan_device_standalone builds inst_exts with VK_KHR_surface and VK_KHR_win32_surface for DXGI presentation (D3D-2), then the D3D-24 block replaced the instance's extension list with VK_EXT_debug_utils alone whenever the loader has it, which it does wherever the Vulkan SDK is installed. The device still enabled VK_KHR_swapchain, so validation reported VUID-vkCreateDevice-ppEnabledExtensionNames-01387, and the instance had no surface extension for the DXGI swapchain. Both now go in one list, and VK_KHR_swapchain is enabled only when the surface extensions are on the instance.
17a483b to
ff69741
Compare
|
Rebased on 48ad23f (conflict with the ray-tracing extension lines, kept both). Retested ff69741 on RTX 5070, driver 621.24, Windows 11 Pro, Vulkan SDK 1.4.363.0, |
create_vulkan_device_standalone(runtime/shims/d3d12_vulkan_device.cpp) collectsVK_KHR_surfaceandVK_KHR_win32_surfaceininst_extsfor DXGI presentation (D3D-2). The D3D-24 debug-utils block that follows then overwroteenabledExtensionCount/ppEnabledExtensionNameswithVK_EXT_debug_utilsalone whenever the loader offers it, which it does wherever the Vulkan SDK is installed. So the instance lost its surface extensions. The device still enabledVK_KHR_swapchain, and two things followed:VUID-vkCreateDevice-ppEnabledExtensionNames-01387(VK_KHR_swapchainneedsVK_KHR_surface) on every standalone device. I saw it onmain43d4703 ind3d12_vulkan_device_test, and on Runtime: honor minimum LOD when sampling Texture2DArray views #974, which inherits it;The fix:
VK_KHR_swapchainis enabled only when the surface extensions made it onto the instance.Tested on Windows 11, RTX 5070 (driver 621.24), MSVC 14.44, Vulkan SDK 1.4.363.0,
LEONIDA_VK_VALIDATION=1, overlay layers off:main43d4703d3d12_vulkan_device_testvalidation errors…-01387)d3d12_vulkan_device_test/dxgi_swapchain_test/d3d12_fence_timing_testNo game files.
AI-assisted.
🤖 Generated with Claude Code