diff options
| author | Rüzgar Koray Genç <koray_genc1@hotmail.com> | 2026-11-23 21:17:24 -0800 |
|---|---|---|
| committer | Rüzgar Koray Genç <koray_genc1@hotmail.com> | 2026-11-23 21:50:58 -0800 |
| commit | 6e81b921996cd60f8fa67b5e1247a5b96af51066 (patch) | |
| tree | d810ca9181ce32798de72413979d81f765c4ad05 /runtime/src/thread_stacks.cpp | |
| parent | 8f481cf16f261c7f37458aeb45e8f4e19994146d (diff) | |
Every submission starts with a full memory barrier (ExecuteCommandLists boundary)
D3D12 ends every ExecuteCommandLists with its work done and its writes
visible to the next one on the queue (implicit state decay relies on it), so
a list may touch memory an earlier submission wrote without any barrier: two
submissions copying into one buffer, say. Vulkan orders submissions on a
queue only by what their barriers say, and nothing in a VulkanQueue's command
buffer ordered it after the previous one. Synchronization validation
reported it on leonida/work: vk_queue_test's back-to-back copies into one
buffer, WRITE_AFTER_WRITE between submissions (10 errors, the test failed
under LEONIDA_VK_VALIDATION=1).
execute_now now records an ALL_COMMANDS -> ALL_COMMANDS memory barrier
(MEMORY_WRITE -> MEMORY_READ | MEMORY_WRITE) right after
vkBeginCommandBuffer.
Test: vk_queue_test 4b counts the command buffers begun and those whose first
barrier is that one, over two submissions each on the direct and the copy
queue: 4 of 4 (0 before). Under LEONIDA_VK_VALIDATION=1 the whole test now
has 0 validation errors (RTX 3080 Laptop).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions