Repository navigation
Runtime: keep VK_KHR_surface extensions alongside VK_EXT_debug_utils on standalone device - #1038
LocranKing wants to merge 1 commit into
Conversation
|
Tested
Heads-up on overlap: #1027 (opened 05:57, before the claim here) makes the same device-file change: one One small thing in the test: the standalone device creates its own instance, so its validation messages never reach the test's AI-assisted (Claude Code). |
quackottu
left a comment
There was a problem hiding this comment.
Tested e7329e5 on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass
ctest -C RelWithDebInfo: 100% tests passed, 0 tests failed out of 47dxgi_swapchain_test(changed here): exit=0 validation=0 | [rt] d3d12: upload heaps in VRAM (DEVICE_LOCAL | HOST_VISIBLE, Resizable BAR)- 48 test programs in the build pass with 0 validation errors
- Not run (they take an input file, not covered here): vk_binary_occlusion_test
d3d12_clear_testfails (R8G8B8A8_UNORM/SNORM 0.5 ties and a D16 clear byte differ from WARP) exactly as onmain4a36bb1 here, so not from this PR; #521 addresses it
Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.
|
Thanks for testing on the RTX 3070 and catching the overlap with #1027, @Parakeet-Wheat! I missed #1027 when searching right before claiming. Agreed on both points: I'll mark |
|
Tested e7329e5 (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: #1027 (opened a few minutes earlier) makes the same fix in AI-assisted (Claude Code). No game files. |
…on standalone device
|
Rebased cleanly onto |
e7329e5 to
26f4840
Compare
|
Thanks. #1027 is merged and keeps the same VK_KHR_surface extensions on the standalone instance, so I'm closing this as a duplicate. |
Depends on: #1027
Claimed in #634: #634 (comment)
Cause
In
create_vulkan_device_standalone(runtime/shims/d3d12_vulkan_device.cpp:3175-3224), the instance-extension setup first addedVK_KHR_surfaceandVK_KHR_win32_surfaceintoinst_extsand assigned them toinstance_info, then re-enumerated instance extensions forVK_EXT_debug_utilsand overwroteinstance_info.enabledExtensionCount = 1/ppEnabledExtensionNames = &debug_utils.Whenever
VK_EXT_debug_utilswas available, that dropped the surface extensions while:3416still enabledVK_KHR_swapchainon the device:vkCreateDevicetriggered Vulkan validation errorVUID-vkCreateDevice-ppEnabledExtensionNames-01387(VK_KHR_swapchainmissing instance extensionVK_KHR_surface) on every standalone device run underLEONIDA_VK_VALIDATION=1(includingd3d12_vulkan_device_test).rt::d3d12::create_dxgi_factory->CreateSwapChainForHwndfailed on standalone devices becausevkCreateWin32SurfaceKHRwas not enabled on the instance.Fix
runtime/shims/d3d12_vulkan_device.cpp: enumerate instance extensions once intoinst_exts, appendingVK_EXT_debug_utilsalongsideVK_KHR_surfaceandVK_KHR_win32_surfaceinstead of overwritinginstance_info; gateVK_KHR_swapchainonhas_swapchain && has_surface_extsso a surface-less loader never requestsVK_KHR_swapchainwithoutVK_KHR_surface.runtime/test/dxgi_swapchain_test.cpp: add a standalone-device check (create_vulkan_device_standalone->create_dxgi_factory->CreateSwapChainForHwnd-> clear + transition ->Present).Tested
Windows 11 Build 26200, NVIDIA GeForce RTX 3060 Ti (driver 621.01, Vulkan 1.4.357), Vulkan SDK 1.4.363.0, MSVC 14.44.35207 (Ninja
RelWithDebInfoviascripts\build_runtime.ps1),LEONIDA_VK_VALIDATION=1,VK_LOADER_LAYERS_DISABLE=~implicit~:main(43d4703) with only the new test applied:dxgi_swapchain_testloggedValidation Error: [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ]and exited 1 withFAIL: standalone CreateSwapChainForHwnd;d3d12_vulkan_device_testalso loggedVUID-vkCreateDevice-ppEnabledExtensionNames-01387.dxgi_swapchain_test: PASS (caller-owned and standalone device paths, 0 Vulkan validation errors).d3d12_vulkan_device_test: PASS (0 Vulkan validation errors).d3d12_debug_markers_test: PASS (0 Vulkan validation errors).ctest --test-dir runtime/build --output-on-failure: 47/47 passed (100%) (gameinputdisabled without SDL3)./W4warnings in the changed files.AI-assisted. No game files.