Repository navigation
Conversation
|
Negative control on Windows 11 / RTX 2060 616.64 with Khronos synchronization validation. I copied only the byte-identical dxgi_swapchain_test.cpp from c54fe42 onto 561b65a and built it against the unmodified runtime. It failed with four WRITE_RACING_WRITE and READ_RACING_WRITE validation errors across native presentation and offscreen blitting. The same fixture passed on the PR. Separate follow-up for deferred D3D12 work. A synthetic guest queues Wait on an unsignalled fence, submits a frame, calls Present, and signals the fence from the CPU after Present returns. On c54fe42 later readback matches, but Vulkan reports WRITE_AFTER_PRESENT and use of a non-acquired swapchain image when the held draw is released. The case fixed here has already-submitted rendering. DXGI also needs to order Present behind work the runtime still holds in software. AI-assisted verification. |
SirKingg
left a comment
There was a problem hiding this comment.
Request changes: the Windows test build is broken. runtime/shims/dxgi_swapchain.h:116-119 adds a required maintenance1 constructor argument, but runtime/test/dxgi_swapchain_count_test.cpp:250-252 still supplies eight arguments. MSVC 19.44 reports C2661 building dxgi_swapchain_count_test. The fake Vulkan table also lacks the newly required vkQueueWaitIdle, vkCreateSemaphore and vkDestroySemaphore functions, so updating the argument alone would make load() fail instead of running the test.
Independent AI-assisted review and synthetic Windows 11 build 26300 testing at c54fe42, RTX 4070 Ti, NVIDIA 610.88, Vulkan SDK 1.4.363.0; no game files:
cmake -S runtime -B runtime\build-review -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfounder vcvars64: passed.cmake --build runtime\build-review --target dxgi_swapchain_test dxgi_swapchain_count_test dxgi_device_test vk_sync_validation_selftest -j 4: failed with the C2661 above. Building the same targets withoutdxgi_swapchain_count_testpassed.- With
LEONIDA_VK_VALIDATION=1andVK_LOADER_LAYERS_DISABLE=~implicit~,ctest --test-dir runtime\build-review -C RelWithDebInfo -R "^(dxgi_swapchain|dxgi_device)$" -V --timeout 120: both passed; swapchain reports zero validation errors. The test requested two graphics queues and uses the second Vulkan queue for the D3D queue. Its device enables only VK_KHR_swapchain, so this covers the no-maintenance fallback, not maintenance1. - With the same environment,
ctest --test-dir runtime\build-review -C RelWithDebInfo -R "^vk_sync_validation$" -V --timeout 120: passed; detected one deliberate write-after-write hazard and zero with a barrier. - A scratch copy of
dxgi_swapchain_test.cpp, built with the same MSVC libraries and modified only to enable VK_KHR_get_surface_capabilities2, VK_KHR_surface_maintenance1, VK_KHR_swapchain_maintenance1 and its feature and setinfo.swapchain_maintenance1=true, passed on this GPU with synchronization validation and zero reported errors, including present and resize. This is not a committed regression test.
One additional ordering concern remains unverified: VulkanQueue holds Wait-before-Signal work on the CPU, whereas VulkanSwapchain::present submits directly to the underlying VkQueue. Please check a queue Wait on an as-yet-unsignaled fence followed by rendering and Present: a raw queue submit or idle may bypass the held work. Failure injection for present/resize, queue lifetime after releasing application references, and a swapchain rendered through a different ResizeBuffers1 queue were not exercised here. No approval or merge.
Pass the maintenance1 flag and provide the queue idle and semaphore entry points required by the Vulkan loader. AI-assisted.
|
Tested the updated |
|
Tested
Side note: without Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com |
|
Tested e9678b9 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass, with one gap
AI-assisted (Claude Code). |
Claimed in the coordination issue.
A synthetic guest on main at 561b65a used the factory from its Xbox device’s DXGI adapter, created two direct queues, and presented immediately after drawing on the second. Khronos validation reported SYNC-HAZARD-WRITE-RACING-WRITE because the swapchain presented on the factory’s Vulkan queue.
The swapchain now uses the supplied direct queue for allocation and presentation. When swapchain_maintenance1 is enabled, a per-image semaphore orders the draw before presentation and a present fence covers resource retirement. Other devices wait for the rendering queue before Present. This uses the existing adapter-factory path and is independent of #2098.
Windows 11, MSVC 19.51, RTX 2060 driver 616.64, Khronos synchronization validation. The guest matched all 2,048 pixels and presented without the hazard. dxgi_swapchain now presents before the caller waits on a fence. dxgi_swapchain, dxgi_swapchain_count and dxgi_device passed. AI-assisted implementation and testing.