feat(d3d12_x): add D3D12 descriptor heaps and descriptor creation #63
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!63
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/63/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 01:04 UTC · original
Dark3581:feat/descriptor-heaps→main· +1124 −14 · 16 files · 1 commits · merged 2026-11-23 01:07 UTCWhat
ID3D12DescriptorHeap, the device's descriptor creation and copies, and the command list calls that use descriptors:resources/DescriptorSizes.cpp: the four handle increments as a configuration where every value starts unset, so unset is distinguishable from 0. Translated shaders compute descriptor addresses with the console's increment compiled in, so these values have to be the console's, and nothing has given them yet. A heap whose size is unset is refused with that cause. A shader resource size must hold the eight-word image descriptor and a sampler size the four-word sampler descriptor, the key sizes the translator's lookup reads.objects/DescriptorHeap.cpp:GetGPUDescriptorHandleForHeapStartis the address shaders read descriptor words from; other heaps sit in CPU memory.GetDescand both handle getters use the MSVC-ABI handling from #60.objects/DescriptorWriter.cpp, which the device'sCreate*View,CreateSamplerandCopyDescriptors*will forward to:CopyDescriptorshandles source and destination ranges of different sizes.objects/CommandList.cpp:SetDescriptorHeaps.OMSetRenderTargets, which reads the descriptors at the call, as D3D12 does, including single-range handles and null views.ClearRenderTargetViewandClearDepthStencilView, with optional rectangles.Resource::View: the per-resource image view cache.Tested
Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer.
pso_probe descriptors-gpu --validate, 38 checks:CopyDescriptorsSimpleand multi-rangeCopyDescriptorsinto the shader-visible heap;VkSampler;OMSetRenderTargets(separate handles, then one range with a null view) andSetDescriptorHeaps;ClearRenderTargetView(full, then a rectangle) andClearDepthStencilViewread back with the expected colors and depth;0 validation errors. The test runs in the
pipeline_statetest.MinGW
ctest: 72 of 72. With MSVC 2022,descriptors-gpu,commandlist-gpuandresources-gpupass, and every target builds exceptab_gameinput, which needsgameinput.lib, which this machine doesn't have.python tools/check_conventions.pyanddebt_fold.py --check: ok.The test uses increments of 32, 16, 64 and 64 bytes. These are test values, not the console's.
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