feat(d3d12_x): record clears, copies and resolves on Vulkan #51
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!51
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/51/head"
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?
@Dark3581 on GitHub · 2026-11-22 22:03 UTC · original
Dark3581:feat/command-recorder→main· +1013 −4 · 12 files · 1 commits · merged 2026-11-22 22:07 UTCWhat
The data-moving half of command lists, from public D3D12 semantics:
commands/CommandRecorder.cpp, on a Vulkan command buffer:ClearRenderTargetandClearDepthStencil: whole views through a dynamic rendering pass with a clear load, or rectangles throughvkCmdClearAttachments(clamped to the view, empty ones skipped); depth and stencil chosen by the clear flags and the view's aspects.CopyBufferRegionwith bounds checks;CopyBufferToTextureandCopyTextureToBufferthrough placed footprints with an optional box;CopyTexturebetween subresources with a box;ResolveSubresourcefor multisampled color.COMMON);Transition,BufferTransitionandUnorderedAccessBarrierwrap #48's barriers;InitializeTexturemoves a new texture out ofUNDEFINEDinto its initial state's layout (validation caught that this was missing).commands/CopyLayout.cpp: texel and block sizes for every texture format, subresource index to mip, layer and plane, the desktop copyable-footprint rule (256-byte row pitch, 512-byte placement) and the footprint-to-VkBufferImageCopytranslation (row length in texels or blocks, block-aligned offsets, block-compressed edge blocks clamped to the mip, anything else past the mip refused).vkCmdBeginRendering,vkCmdEndRendering,vkCmdClearAttachmentsand the copy and resolve commands.Whether the console's
GetCopyableFootprintsmatches the desktop rule is unknown, so the debt fragment says the device must not answer a title with it until that is measured.Tested
Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer.
pso_probe commands-selftest: block sizes, subresource splits, mip extents, the footprints of a 3-mip 100x50 array (pitches, offsets, total size) and an 8x8 BC1 chain, three regions field by field (a mip, a box, a 2x2 BC edge mip), and 9 refusals.pso_probe commands-gpu --validaterecords one command buffer and reads 14 results back to host memory: a red clear and a green rectangle (inside, on and past its edge); an uploaded mip 1 read back byte for byte; a texture copy of the green square into a blue target (inside and past its edge); a depth clear of 0.25 with a 0.75 rectangle read back as floats; a 4x MSAA clear resolved to single-sampled; 16x16 BC1 blocks uploaded and read back byte for byte; a 4 KiB buffer copy; and a buffer copy past the end refused. 0 validation errors. Both run in thepipeline_statetest.ctest: 66 of 66. Thed3d12_xtargets also build with MSVC 2022.python tools/check_conventions.pyanddebt_fold.py --check: ok.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md