mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #751] [MERGED] d3d12: SYNC_COPY waits for the CLEAR stage too, ordering WriteBufferImmediate before copies (OLD-10048) #789
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#789
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/751
Author: @abnalstlll-byte
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:restore/old-10048-sync-copy-clear-stage📝 Commits (1)
a744fa8d3d12: SYNC_COPY waits for the CLEAR stage too (D3D-838)📊 Changes
4 files changed (+91 additions, -5 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+5 -1)📝
runtime/src/vulkan_replay.h(+4 -1)📝
runtime/test/d3d12_state_map_test.cpp(+6 -2)📝
runtime/test/vk_command_replay_test.cpp(+76 -1)📄 Description
Restore old upstream PR 10048 (OLD-10048 / D3D-838).
An enhanced barrier's D3D12_BARRIER_SYNC_COPY mapped to VK_PIPELINE_STAGE_2_COPY_BIT only. Two D3D12 copy-scope commands are not Vulkan copies: WriteBufferImmediate is recorded as vkCmdUpdateBuffer and ResolveQueryData's never-written queries as vkCmdFillBuffer, and synchronization2 runs both in the CLEAR stage. A SYNC_COPY barrier after either therefore did not order it, and a copy after the barrier could read the word before the write landed.
vulkan_sync now maps SYNC_COPY to COPY | CLEAR. vk_command_replay_test part K records WriteBufferImmediate, a SYNC_COPY -> SYNC_COPY buffer barrier and a CopyBufferRegion of the written word; under LEONIDA_VK_VALIDATION=1 it is a read-after-write hazard without this change. d3d12_state_map_test and docs/d3d12_vulkan.md follow the new mapping.
Clean-room verified; zero game data.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.