Repository navigation
d3d12: give direct-indexed compute roots with tables the resource index map - #294
Conversation
…ex map
A compute root with descriptor tables and CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED
kept the guest root when its tables matched, so once descriptors were paged
every dispatch was skipped ("its root indexes the resource heap directly").
Its program can still pick resources by heap index, so it now takes the
index map like a bindless root, when the map's root SRV still fits.
Lanes: `bindless-table-compute` runs the `bindless-compute` program under
such a root in the `lanes-bindless-compute` suite. It fails without this
change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This matches what I measured on the RTX 5090 in #232: the culling chain is skipped with exactly that message. One thing to check before it lands: the translator drops a compute root's root constants when the runtime appends a private root SRV.
The fix is a translator change that ignores trailing space-32766 root SRVs when matching the guest root. It's on I'm also running this PR's full check on NVIDIA (RTX 5090) and will post the result here. |
|
Confirming on NVIDIA after the merge: |
|
The root-constants fix is now #296: full checks passed on AMD (RADV) and NVIDIA (RTX 5090), 132 gates each. With #294 on its own, the culling programs it unblocks would dispatch with zeroed root constants; with #296 they keep them. The NVIDIA run of this PR's head is queued here and I'll post it when it's done. |
Summary
A compute root that has descriptor tables and
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXEDgot no resource index map. #235 adds the map only for roots without tables (bindless_compute_root). When every table binding matched the guest's,reflected_rootreturnedTableLayout::Original. With a descriptor arena active,paged_layout_gapthen skipped every dispatch of such a pipeline:The program can still pick resources by heap index, so it needs the map just like a bindless root. In the simple/extended compute branch of
reflected_root, a root with the flag now sets the index map the same way #235 does (scalar_index = Some((0, 0)), visibility ALL). The translator already emitstb_heap_indexlookups whenever the root carries the map's SRV.The map's root SRV needs two of the root's 64 DWORDs. As in #235, a root without room keeps the guest root rather than failing to serialize (
heap_indexed_tabled_root: a table costs one DWORD, a root descriptor two).Draws are not changed: raster roots with the flag still go through the existing pixel-stage scalar-index path.
Verified on Lanes
New scenario
bindless-table-compute: thebindless-computeprogram (raw UAV store at logical heap slot 80) under a direct-indexed root that also has a bound table of four UAVs the program does not read. It runs inlanes-bindless-computewith the roomy and the constrained (64 resident) heap.Without the change:
FAIL lanes-bindless-table-compute-wide/-constrained, with the skip line above in the log. The four existing bindless trials pass.With the change: all six trials pass, no skipped dispatch, and the receipt finds
bound paged resource descriptor index map.python tuxbox.py checkpassed on this branchChanged behaviour is covered by a Lanes scenario (
bindless-table-compute)GPU, driver and backend: AMD Radeon RX 9070 XT, Mesa 26.3.1 (RADV), GE-Proton11-14, kernel 7.3.6.
Unit test:
tabled_compute_roots_that_index_the_heap_take_the_index_map(run with the Windows test binary under Wine: 2/2 incompute_table).In ProjectScarlett (not evidence, for context)
This does not fix the AMD intro fault of #232 on its own. With this change plus #258 (vkd3d-proton master 71cae091), the story intro still ends in a gfx ring timeout. The amdgpu devcoredump of that hang shows the same fault as before the change:
Faulty page starting at address: 0x0, status0x601431(SQC data read, permission fault). In that run the kernel log only showed the ring timeout, not the fault. Some compute dispatches are still skipped with the same reason, because their roots fall outside the simple/extended shapes (more tables, or tables after constants), and draws are still skipped too. Any of those may leave the data the faulting read depends on unwritten. This PR only removes the skip for the shape it covers.Related: #232, #235, #215, #289.
🤖 Generated with Claude Code