Write a 16-byte GFX10 raw buffer V# descriptor (48-bit BufferLocation, stride 0,
num_records = SizeInBytes, GFX10_FORMAT_32_UINT, OobSelect::raw) into the
32-byte CBV_SRV_UAV descriptor slot, zeroing the trailing 16 bytes (or the full
slot for a null description, zero BufferLocation, or zero SizeInBytes).
Verified on Windows 11 with RTX 5080 and Radeon Graphics in d3d12_compute_test:
64/64 dwords matched for CBV A, 32 in-bounds + 32 OOB-zero matched at +128, and
negative controls flipped 64/64 dwords for CBV B and null CBV.
AI Assisted.
- GPU address arena (docs 3.3), when the device has bufferDeviceAddress: one
host-visible, device-addressable buffer (LEONIDA_ARENA_MB, default 256,
max 4095 so VAs fit 32-bit table pointers). Default-heap buffers are
64 KiB-aligned ranges with VA = offset, zeroed through the mapping;
shader-visible descriptor heaps live there (CPU handle = mapping, GPU
handle = VA); upload/readback buffers get VA = device address - heap
base; GetGPUVirtualAddress returns these.
- CreateRootSignature on main's model (rt::rootsig): parse_rts0, then
pack() for each parameter's place in the 32 user-data dwords; what pack()
refuses is refused with its reason. CreateComputePipelineState (PC slot
11, Xbox slot 62 via the proxy) finds the shader by the SHA-256 of its
FSSM program in the translator's index (VulkanDeviceInfo::shader_dir or
LEONIDA_SHADERS); its FSSM blob is copied into the arena as the code base.
Shaders that declare set-0 bindings are refused with a log until the
bindless set exists (M2).
- Command list: root signatures (arguments cleared on change), pipeline
state, constant / root view / descriptor-table setters for compute and
graphics, SetDescriptorHeaps, Dispatch recording the user data as it is,
ClearState (which also resets #164's stencil references); misuse makes
Close return E_INVALIDARG.
- Test helper and standalone device enable bufferDeviceAddress.
Test: d3d12_compute_test (through the proxy) creates the root signature
from the PC serializer's blob and the PSO through slot 62 in the measured
(desc, 0, 0, riid, out) shape (28cf235) from a container shaped like the
game's, sets root constants, a root UAV and a table whose
application-written entry points at an upload buffer, runs two dispatches
that each keep their own arguments, and reads the results back: 64/64
twice. Its shader is GLSL written to the translator's push-constant and
address contract, compiled with glslangValidator. Clean under the Khronos
validation layer, as are the other GPU tests; 13/13 ctest.