feat(d3d12_x): add committed D3D12 resources on the buffer window and device memory #61
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!61
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/61/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-23 00:27 UTC · original
Dark3581:feat/resources→main· +567 −6 · 12 files · 1 commits · merged 2026-11-23 00:30 UTCWhat
ID3D12Resourcefor committed resources, the next object the command lists, descriptor heaps and device need:vulkan/BufferArena.cpp: first-fit allocation over the title buffer window (#36) with alignment, freed ranges merged with their neighbours.objects/Resource.cpp(Resource::CreateCommitted):GetGPUVirtualAddressis an address inside the window, the console address the translated shaders add the heap base to.Mapreturns the CPU pointer into the window for every heap type (default-heap buffers are in host memory for now: slow, correct). Zeroed at creation unlessD3D12_HEAP_FLAG_CREATE_NOT_ZEROED, as D3D12 committed resources are.VkImagefrom #49'sTranslateTextureDescin its own device-local memory, cleared to zero (block-compressed textures cannot be cleared that way and are not) and moved into its initial state's layout at creation, with #51'sInitializeTexture. No GPU address, not mappable.GetDesc(with the same MSVC-ABI handling as #60),GetHeapProperties.WriteToSubresourceandReadFromSubresourcestop the title.Resource::Buffer()andResource::Texture()give theBufferRefandTextureRefthe command recorder takes.vkCmdClearDepthStencilImage.Tested
Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer.
pso_probe arena-selftest: aligned allocations, refusals (zero size, non-power-of-two alignment, too large), free and double free, reuse of a freed range, coalescing back to one range.pso_probe resources-gpu --validate, 19 checks in a 64 MiB window: upload, readback and default buffers with aligned, distinct addresses below 4 GB inside the window; descriptions and heap properties; mapping and refusing subresource 1; a GPU copy between two buffer resources read back through the mapped readback buffer; new color and depth textures read back as zero; a released buffer's range is reused at the same address and comes back zeroed; four refusals; every range back in the arena at the end. 0 validation errors. Both run in thepipeline_statetest.ctest: 72 of 72. With MSVC 2022 the targets build andresources-gpupasses.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