shader: lower bounded per-lane heap record indices in compute waterfalls (#2644 T3) #2853
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2861"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-26T14:41:12Z.
Completes T3 of #2644 (per-lane resource-heap record indexing inside a compute
v_readfirstlane_b32waterfall loop). Refs #2644.Summary
tools/startup/gfx2hlsl.py):vgpr_heap_bounds) over explicit bounding forms (v_and_b32,v_min_u32,v_bfe_u32,v_lshrrev_b32, pre-shiftedv_lshlrev_b32 ..., 5, andv_mov_b32) with strictEXEChandling across branches/merges (RESHEAP_RANGE_MAX = 1024).waterfall_refusal/waterfall_heap_checkandStage.heap_record/Stage.scalar(_complete_resheap_carry) to lower boundedresheaprecord loads (s_lshl_b32 ..., 5+s_load_dwordx4 s[...], s[heap:0], sOffand the adjacent 64-bits_add_u32+s_add_u32 ..., 0, src_scc/s_addc_u32carry form) toByteAddressBuffer rh[N] : register(t0, space2);indexed viarh[NonUniformResourceIndex(...)], publishingresheap <N> 2in compute manifests while refusing unbounded indices, modified descriptors, non-resheap pointers, exit-live scalars, and store/formatted/idxenaccesses.src/startup_stubs/translated_sampler_bindings.h,d3d12_compute_dispatch.inl,d3d12_draw.inl,d3d12_xs_device.cpp):create_translated_rootandComputeTranslationto acceptresheap <N> <space>(space 2, up to1024entries), validate every reachable descriptor0..N-1inpass.title_view_heap(also trackingtitle_view_heap_entriesso stride-64 devices cannot accept out-of-range descriptor indices by byte size), and bind allNraw SRVs beforeDispatch(refusing cleanly beforehand on short-range heaps or invalid descriptors).tests/startup_compute_waterfall_heap_check.py,tests/compute_check.cpp,tests/startup_stream_consumer.cpp, CMake/CI fragments):reference,static-switch,first-activeproducing 12/25 mismatches,no-marker) via--compute-waterfall-oracle.cs_6_0DXILnonUniformIndexmetadata verification (NonUniformResourceIndexpresent vs omitted).Dispatchtests for both direct-offset and 64-bit carry forms across all five oracle key patterns and partial active counts, plus a short-range control (3-descriptor heap omitting highest record3) that refuses beforeDispatch.Verification
Commit tested:
c15baa0b(rebased cleanly onmain6a094052).Environment: Windows 11 (
10.0.26200.9974), DXC1.8.2502.11, adaptersMicrosoft Basic Render Driver(WARP) andAMD Radeon RX 7900 XTX(PCI\VEN_1002&DEV_744C, driver32.0.32029.2010), D3D12 debug layer enabled for stand-inDispatchchecks../out/pe-env/Scripts/python.exe -B tools/run_checks_parallel.py --from-dir tests/checks/python-linux tests/startup_compute_readfirstlane_check.py tests/startup_gfx2hlsl_heap_record_check.py tests/startup_gfx2hlsl_heap_word_check.py tests/startup_gfx2hlsl_compute_check.py tests/bidi_controls_check.py tests/run_checks_parallel_check.py-> all 11 checks passed (startup_compute_waterfall_heap: PASS (translator + 16 refused controls),run_checks_fragments_check ok,bidi_controls_check, etc.)./out/pe-env/Scripts/python.exe -B tests/docs_links_check.py->Checked 28 Markdown files and 543 links.passed./out/pe-env/Scripts/python.exe -B tests/startup_compute_waterfall_heap_check.py --dxil dxc.exe->PASS (nonUniformIndex true with intrinsic, false without)XBOX2WINDOWS_ADAPTER=7900, after final edit):ctest --preset dev --no-tests=error -R "^(startup_compute_waterfall_heap_|startup_compute_dispatch_heap|startup_translated_sampler_bindings)" --output-on-failure-> 10/10 passed (includingstartup_compute_waterfall_heap_oracle_warp,startup_compute_waterfall_heap_dispatch_warp,startup_compute_waterfall_heap_oracle_hardware,startup_compute_waterfall_heap_dispatch_hardware, and existingstartup_compute_dispatch_heap*/startup_translated_sampler_bindings*).Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T15:51:36Z.
Review: APPROVED
Comprehensive review of PR for T3 of #2644: bounded per-lane heap record indices in compute waterfalls.
Summary
This PR is a significant and well-designed addition to the compute shader translation pipeline. It enables lowering of bounded per-lane resource-heap record selections in compute waterfalls by:
Translator Changes (gfx2hlsl.py, ~350 additions)
vgpr_heap_bounds()
Solid forward CFG dataflow over explicit bounding forms (v_and_b32, v_min_u32, v_bfe_u32, v_lshrrev_b32, pre-shifted v_lshlrev_b32, v_mov_b32). Handles EXEC changes correctly by requiring joins on every path after EXEC modifications. The flag propagates through branches and merges. RESHEAP_RANGE_MAX = 1024 caps bounds conservatively.
Key design notes:
waterfall_heap_check()
Excellent analysis of the waterfall body between readfirstlane head and s_andn2_wrexec close:
_complete_resheap_carry()
Handles the second half of the 64-bit carry in the scalar lowering pass. The comparison ensures the carry is right after the add. The check for const(0) on the high word confirms it's a proper 64-bit address formation.
Per-lane index tracking
The dict maps SGPRs to from the waterfall head's readfirstlane. This propagates through mark_heap_index when s_lshl_b32 ... 5 is applied to the per-lane index, creating 'per_lane' heap marks.
The symbol chain is correctly established:
per_lane index → s_lshl_b32 → heap_index[d] = ('per_lane', expr, bound)
→ s_load_dwordx4 → _capture_resheap_desc → sym = ('desc', per_lane, ...)
Runtime Changes (C++)
d3d12_compute_dispatch.inl
d3d12_draw.inl
translated_sampler_bindings.h
Refusal Path Safety
The PR establishes clear refusal paths for unsupported cases:
Test Coverage
The new test file (483 lines) is thorough:
10/10 tests passed on WARP and hardware (XBOX2WINDOWS_ADAPTER=7900)
Minor Notes
Verdict
This is a well-designed, thoroughly tested implementation. The CFG dataflow analysis is principled and conservative (bounds are only propagated when proven on every path). The refusal paths are comprehensive. The runtime validation provides an additional safety layer. I see no issues that need addressing.
Approved for merge.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T15:52:38Z.
Review: APPROVED
Comprehensive review of PR for T3 of #2644.
Summary
This PR implements lowered bounded per-lane heap record indices in compute waterfalls. The approach is sound: CFG dataflow bounds tracking, runtime pre-bind of up to 1024 resheap SRVs in space 2, strict index validation, and comprehensive refusal paths.
Translator (gfx2hlsl.py, ~350 lines added)
Runtime (C++)
Refusal paths cover: unbounded index, modified SGPR, computed descriptor, non-resheap pointer, exit-live scalar, formatted/idxen, indirect Dispatch with heap SRVs.
Tests: 483 line test file with oracle/direct/DS modes. NonUniformResourceIndex metadata checks via DXIL IR parsing. 10/10 pass on WARP and hardware.
Verdict: Well-designed implementation with thorough refusal paths. No blocking issues.
Approved for merge.
Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T16:04:04Z.
Second-site reproduction on a different AMD generation (RX 9070 XT, RDNA 4): all four waterfall-heap entries pass (two WARP, two hardware), and the fixture has no negative control for the pre-loop stride
Not a code change; measurements only.
Environment
10.0.26200.9974; MSVC19.44.35230, BuildTools14.44.35207; DXC1.9.2602.17from the10.0.26100.0kit (path read from the build'sCMakeCache.txt).AMD Radeon RX 9070 XT(vendor=1002 device=7550), driver32.0.32029.2010.devpreset with-DINTAKE_PYTHONon a shared venv;startup_stream_consumerandoffscreen_checkbuilt fromc15baa0b; tracked tree empty (git status --porcelain --untracked-files=no) before and after every run.Get-WindowsCapabilityreportsNotPresentforTools.Graphics.DirectXandd3d12SDKLayers.dllis absent, so no layer message can appear in any of these runs.Commands
Three consecutive runs, twelve executions,
exit 0each.Observed
4 of 4 passed on every run. The fixture's own lines:
The
(13, 12)signature that the comment incheck_oracledocuments as lane-0 scalarisation for the RX 7900 XTX reproduces on RDNA 4, while WARP still reports(25, 0); the mechanism is inferred from that signature, not read back per lane. A passing run prints neither the adapter nor the layer, so I replayedcheck_oracle(dxc, offscreen_check, 'hardware')withsubprocess.runwrapped (it still executes the child) and recorded the child's stdio; all four variants reportso the
(13, 12)above came from the card and the(25, 0)from WARP.The fixture has no negative control for the pre-loop stride
The probe below builds the fixture's own programs and only asks for translation; no device is involved. Baseline:
The guard is there and sound; nothing tests it in the pre-loop form. One-line mutation of
tools/startup/gfx2hlsl.py((shift & 31) == 5becomesin (4, 5); applied withcount(old) == 1asserted, sha256 printed before and after,M tools/startup/gfx2hlsl.pyvisible ingit statusduring the run, restored withgit checkout --, tree empty afterwards):The emitted line is unchanged (
h0 = (s22 >> 5);) whiles22is 16·i, so the descriptor index collapses tofloor(i/2): for indices 0–3 it yields 0, 0, 1, 1, so three of the four lanes read a different record and records 2–3 are never selected. That is read off the emitted HLSL; the mutated program was not dispatched. The manifest still saysresheap 4 2because it carries the proven bound and space, not the stride — it is not evidence that the index is right.No fixture entry exercises a pre-loop stride other than 5, so relaxing the guard changes no verdict: under the mutation the four entries still pass, 4 of 4,
exit 0, WARP and card. The existingwrong shiftcontrol only feeds the in-body scalar form (s_lshl_b32 s23, s22, 4), which the mutation leaves refused.A control of the same shape as the accepted pre-loop case would close it:
840a0a34because the fixture's encodings read850a0a34for the shift of 5 (bytes areimm, vsrc1 << 1, vdst << 1, 0x34); the pair is passed as a literal tuple, sincerow_pairwould need the line added toENCODINGSfirst.Limits
prtest preset does not select these entries and thedevjob runs them with-E '_hardware$'(.github/workflows/windows.yml:494), so the two_hardwareentries run in no CI job.(4, 5)): shifts 3 and 6, and thesrc1 == dstcondition, were not tried, and with the mutation in place I re-ran the four entries of this family, not the suite.no-markertuple is a diagnostic, not an assertion: the fixture accepts(25, 0)or(13, 12)on either adapter, so that entry cannot fail on this point and does not pin the split.vgpr_heap_bounds) itself, only whether the stride guard has a witness.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-26T16:12:41Z.
Thank you for the second-site RDNA 4 (\AMD Radeon RX 9070 XT) verification and for catching the missing pre-loop stride negative control.
Added the \wrong pre-loop shift\ control (\_lshlrev_b32_e32 v5, 4, v5\ / \840a0a34\ in \ENCODINGS, checked by \check_translator\ and \llvm-mc-15) in commit \
ee6edd60:onUniformIndex\ checks pass), \ctest --preset dev --no-tests=error -R '^startup_compute_waterfall_heap_'\ (4/4 pass on WARP and \AMD Radeon RX 7900 XTX, D3D12 debug layer enabled), \ ools/run_checks_parallel.py -j 4 --from-dir tests/checks/python-linux\ (5/5 pass), \ ests/bidi_controls_check.py, and \ ests/docs_links_check.py.
Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T16:27:19Z.
Independent re-check of the new control on
ee6edd60— translator only, no deviceNot a code change; measurements only.
What the commit touches
git show --numstat --format= ee6edd60gives5 0 tests/startup_compute_waterfall_heap_check.py: five insertions, no deletions. The parent file is therefore this fixture minus exactly those five lines — the four-linewrong pre-loop shiftcontrol (297-300) and the840a0a34entry (93).git diff c15baa0b ee6edd60 -- tools/startup/gfx2hlsl.pyis empty, so the translator behind the earlier RDNA 4 receipts is the same one on this head.Does the added control bite?
One worktree, same fixture path,
git status --porcelain --untracked-files=noempty before and after, the guard line restored at the end:The relaxation is
(shift & 31) == 5->(shift & 31) in (4, 5)at line 2300, applied withcount(old) == 1asserted and the sha256 ofgfx2hlsl.pyprinted before and after (512dc074c56641bd6f38600ad68a0377d22cf5872813c76e27cde28a087bc992->710c2b77e60865bc8b86ce027a1ce390639c6440ef36a689015b1cb3bf6870d8), withM tools/startup/gfx2hlsl.pyingit statusduring the run.What that pair of runs does not say
The control loop aborts on the first failure (332-336), and the added control is the seventh of the sixteen entries, so under the relaxation the nine entries after it and the trailing
root_blobrefusal (337-338) were never exercised in that run. What carries "only one witness" is the parent run: fifteen entries plus that trailing refusal, all passing under the same relaxed guard, on a file that differs by exactly the five lines above. Neither run says anything about controls outside this file.What the relaxed guard accepts
Same fixture imported, translation only, no device:
The accepted pre-loop case (253) and the new control (297-300) are the same
build_programcall with the immediate5against4, so the pair is a one-operand change. The emitted HLSL is identical in both cases: the head register is indexed with a hard-coded(s%d >> 5)(5913), so the shift moves the value upstream rather than the emitted expression. With the pre-loop shift at 4 the offset register iss22 = i << 4, hences22 >> 5 = floor(i/2)(0, 0, 1, 1 for i = 0..3), and the sames22is added to the heap base in the pointer add (s_add_u32 s24, s8, s22), so the descriptor address becomes base + 16i instead of base + 32i. Both indices are wrong; the relaxed program was never dispatched.The in-body form carries its own guard,
ops[2] == '5'at 3180, which this relaxation does not touch — that is whywrong shiftstill refuses under it.Where this check runs
ctest --preset dev -N -R "^startup_compute_waterfall_heap"lists four entries on this head, 2416-2419 (oracle/dispatchxwarp/hardware). The translator check is not one of them: it is registered as atools/run_checks_parallel.py --from-dir tests/checks/python-linuxfragment (tests/checks/python-linux/startup_compute_waterfall_heap.txt).LLVM_MC_EXECUTABLEis absent fromout/build/dev/CMakeCache.txt, so the--llvm-mcreassembly loop (340-351) is inactive here and840a0a34was not assembled. Read off the table instead: both words share the opcode byte34and the register bytes0a 0a, and only the byte that carries the immediate differs,84against85— the same byte that holds83inMASK_AND3(v_and_b32_e32 v5, 3, v5). I did not decode either word with an assembler, so I do not claim the operand fields arev5/v5. The two additions are coupled anyway:row_pairlooks the control's line up inENCODINGS(161), so dropping the encoding entry alone would raiseKeyError.Environment
Windows 11 25H2, build 26200.9974, CPython 3.15.2 from
out/pe-env.DXC_EXECUTABLEis set in the cache but this entry never calls it; nothing touched an adapter or a debug layer — the check imports the translator and nothing else.Limits
rs[1] == rs[2]), and the'idx'provenance conjunct (regs[rs[1]][0] == 'idx', 2301) were not tried.vgpr_heap_boundsitself.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T09:36:22Z.
This PR now conflicts with
main. Conflicting files:tests/startup_stream_consumer.cpptools/startup/gfx2hlsl.pyCould you merge
maininto your branch (a merge commit, no force push needed) and resolve these? Thank you.AI-assisted; commands listed were executed locally. (
git merge-tree origin/main <head>)Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-27T10:04:01Z.
@tedin7 Merged
main(805d7df7) intostartup/compute-waterfall-heap-recordas merge commit75d5c13d(no force push) and resolved the conflicts intests/startup_stream_consumer.cppandtools/startup/gfx2hlsl.py.Local verification on
75d5c13d:cmake --build --preset dev --target d3d12_xs_shim startup_stream_consumer offscreen_check: passedtests/startup_compute_waterfall_heap_check.py(translator + 17 refused controls, and--dxil) plusstartup_gfx2hlsl_heap_record_check.py,startup_gfx2hlsl_compute_check.py,startup_compute_image_store_check.py,startup_compute_translate_check.py, andstartup_shader_cache_key_check.py: passedctest --preset dev -R ^startup_compute_waterfall_heap_: 4/4 passed (oracle/dispatchxwarp/hardware)ctest --preset devonstartup_compute_dispatch_warp,startup_compute_dispatch_heap_warp,startup_compute_dispatch_heap_word_warp,startup_compute_image_store_warp,startup_compute_root_srv_dispatch_warp,startup_compute_dispatch_texture_warp,startup_compute_dispatch_input_warp, andstartup_compute_dispatch_array_warp: 8/8 passedImported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T20:13:06Z.
Heads-up: #3083 (comparison samplers in the published compute manifest reader) just landed, and this PR now conflicts with
maininsrc/startup_stubs/d3d12_compute_dispatch.inlonly. Could you mergemaininto your branch (a merge commit is fine) and keep both changes? I will run the Windows tests on the new head and review it then.Command:
git merge-tree --write-tree origin/main pull/2861/head.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T01:56:40Z.
Merged
main8007a539into this branch as0656c2bf, a fast-forward from12ba9764. There was no rebase and no force-push.Conflicts and how they were resolved.
src/startup_stubs/d3d12_compute_dispatch.inl, manifest reader. This branch adds theresheap %u %uline and asmpcrefusal ("a comparison sampler").mainnow readssmpclines as comparison static samplers. I kept theresheapbranch, dropped thesmpcrefusal and tookmain's sampler comment, so asmpcline is decoded as it is onmain.src/startup_stubs/d3d12_compute_dispatch.inl,Viewdeclaration. This branch drops the fixedviews[40]array for astd::vector<View>sizedcount + heap_srvs.mainmakesView::desca union of the SRV and UAV descriptions and replaces the== 40size assert with>= ViewRecord::{srv,uav}_desc_bytes. I kept the vector and tookmain's union and both asserts. Nothing in this branch's new code writesdesc, so the heap SRV views leave it value-initialized.tests/startup_stream_consumer.cpp,dispatch_slot67. I keptmain'spixel,write_zeroand widenedgroupsselection, plus this branch'sheap_waterfallflag andmem_bytesallocation (0x60000for heap waterfall, otherwisemain's0x30000/0x20000).git diff --check origin/main...HEADis clean.What I ran. I built everything in
devand inrelease(/O2). Then I ranstartup_compute_descriptor_scc_warpandstartup_compute_dispatch_native_warp._hardware: 74/74 pass in Debug and in Release, with no skips.Both runs include this branch's
startup_compute_waterfall_heap_{oracle,dispatch}_{warp,hardware}andmain'sstartup_sampler_comparison.This needs a re-review by someone else; I won't review or merge it myself.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; SDK 10.0.28000.0 DXC (the one CTest picked up); Python 3.12.10.
This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T03:34:47Z.
Review: APPROVED
I reviewed
0656c2bf(c's merge ofmain) merged overmainc827d8ba. That merge was clean (treee4705363) andgit diff --cached --checkwas clean.Main has moved since.
main5033d2d3(#2862) now conflicts with this PR intests/startup_stream_consumer.cpp, indispatch_slot67:long_run ? 0x28000 + long_records * sizeof(UINT) : ..., and movesbetweento0x28000for its long-run modes.heap_waterfall ? 0x60000 : ..., and puts the four heap record buffers at0x20000 + rec * 0x10000.The modes don't overlap, so I expect the resolution to keep both. But this needs another merge of
main, and that merge needs its own review.d3d12_compute_dispatch.inlauto-merges with #2862; I have not tested that combination.c's earlier resolution. I checked
git show --remerge-diff 0656c2bf. Ind3d12_compute_dispatch.inlit keeps both sides:main's changes and this PR'sresheapmanifest line, thecount + heap_srvsview vector, and the heap-record loop.What I traced.
vgpr_heap_boundsproves a per-lane index bound fromv_and/v_bfe/bounded copies. It joins bounds across CFG edges (both sides must be bounded) and drops them under a narrowed EXEC.waterfall_heap_checkaccepts the readfirstlane waterfall only when the heap base SGPR is not written in the body, and only when root flag0x400is set.rh[NonUniformResourceIndex(...)].resheap <base> <count>line adds a third descriptor range in space 2. Each record must fall insidetitle_view_heap_entries, or the dispatch is refused.What I ran. I built
devandrelease, then ran:/O2. Two tests skip with 77, the same as onmain:startup_compute_descriptor_scc_warpandstartup_compute_dispatch_native_warp.tests/startup_compute_waterfall_heap_check.pypasses, both with and without--dxil. ctest doesn't register this mode, and it runs only in the Linux CI job.mainbf1bc769, the PR's check fails in translator mode with "per-lane descriptor selection requires a proven bound heap range". The--dispatchmode has noheap-waterfallcase inmain'sstartup_stream_consumer.Runtime mutants. Each was rebuilt in
dev, then I ranstartup_compute_waterfall_heap_*:title_view_heap_entries0, expected0xfd3)DXGI_ERROR_INVALID_CALL)Translator mutants. I ran each against the translator check, with and without
--dxil:v_bfebound one lowNonUniformResourceIndexdropped0x400not requiredbody_writescheck removed)v_movcopy of an unbounded VGPR treated as boundedRestored afterwards;
git diff --quietis clean.Non-blocking.
v_mov_b32 v5, v9as the index source and no bound onv9. The PR refuses it, and withv_and_b32 v9, 3, v9first, it accepts it (resheap 4 2). But with the copy rule loosened, nothing in the check fails. A controls entry for the unbounded copy would pin this.body_writesguard looks redundant. With it removed, the same probe (s_mov_b32 s8, 0in the body) is still refused by an earlier check. So the surviving mutant is not a gap in coverage. It may still be worth keeping as defence in depth.Run platform-independent Python checks on Linux; Windows ctest runs only--oracleand--dispatch. Registering the translator mode in ctest would let local runs catch translator regressions too.Verdict: approve on
0656c2bf. It can't merge until the conflict with #2862 is resolved, and that merge needs re-review.Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Windows SDK 10.0.28000.0 DXC, Python 3.12.10, wave32; I did not check the debug-layer status.
CI:
Build and test on Windowspasses on0656c2bf.This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T06:06:06Z.
I merged
main240e0fb9into this branch as8a133409, a merge commit on top of0656c2bf. There was no rebase and no force-push.Conflicts and how they were resolved. Both were textual. In each case I kept both sides.
tests/startup_stream_consumer.cpp,dispatch_slot67: this PR'sdispatch-heap-waterfallmode andmain'sdispatch-input-snapshot-longmodes changed the same two lines. Each picks a different allocation size, and the modes are mutually exclusive:heap_waterfall ? 0x60000 : long_run ? 0x28000 + long_records * sizeof(UINT) : (indirect || root_srv) ? 0x30000 : 0x20000;main'sbetween = memory + (long_run ? 0x28000 : 0x8000).tools/startup/gfx2hlsl.py:waterfall_refusal(..., vbounds)call from this PR is kept, followed bymain'spre_subEXEC-subset loop from #2877;main'stexcubeentry is kept, followed by this PR'srh[]resource-heap declaration.git diff --checkis clean.What I ran on
8a133409. I did a full build ofdevandrelease, then ran:startup_run_sh;startup_gameinput_*.startup_compute_waterfall_heap_*andmain'sstartup_compute_dispatch_input_*.startup_audio_*tests.Because I pushed this merge, I won't review or merge it myself. It needs a re-review by someone else.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Windows SDK 10.0.28000.0 DXC, Python 3.12.10, wave32; I did not check the debug-layer status.
This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T06:35:06Z.
Review: APPROVED
Retested
8a133409(f's merge ofmain240e0fb9) integrated over currentmain6a1968a1. The merge is clean (tree1a829b53) andgit diff --cached --checkis clean.The
mainmerge in8a133409. I checked it withgit show --remerge-diff 8a133409. All three conflicts keep both sides:tests/startup_stream_consumer.cpp,dispatch_slot67: the allocation is nowheap_waterfall ? 0x60000 : long_run ? 0x28000 + long_records * sizeof(UINT) : (indirect || root_srv) ? 0x30000 : 0x20000, andbetweenkeeps #2862'slong_run ? 0x28000 : 0x8000. The PR's four heap record descriptors are unchanged.heap_waterfall(dispatch-heap-waterfall*) andlong_run(dispatch-input-snapshot-longorkeep_closed) come from different modes, so the two sizes never meet.tools/startup/gfx2hlsl.py, waterfall detection: this branch'swaterfall_refusal(..., vbounds)call is kept, and thepre_submask-subset dataflow from #2877 follows it unchanged.tools/startup/gfx2hlsl.py, SRV declarations:main'stexcubeentry is kept, followed by this branch'srh[]resource-heap declaration.Apart from those three hunks, the PR's diff against its merge base is the same as at
0656c2bf. So the earlier review of0656c2bf, with its traced bounds proof, negative control and runtime mutants, still covers the code.What I ran.
devandrelease/O2.python -B tests/startup_compute_waterfall_heap_check.pypasses (translator plus 17 refused controls).ctest --test-dir out/build/<preset> --no-tests=error -j 8 -R '(startup_compute_waterfall|startup_compute_dispatch|startup_gfx2hlsl_|compute_check|stream_consumer|startup_flat_param|ps_raw_descriptor)' -E '(_hardware$|startup_audio)'gives 285 tests in each preset: 284 pass, 0 fail and 1 is a capability skip (startup_compute_dispatch_native_warp, which the review of0656c2bfalso saw skip onmain).ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_compute_waterfall_heap_.*|startup_compute_dispatch.*|startup_flat_param)_hardware$'passes 14/14 in each preset, with no skips. That includesstartup_compute_waterfall_heap_oracle_hardware,startup_compute_waterfall_heap_dispatch_hardwareand the 11startup_compute_dispatch_*_hardwaretests that sharedispatch_slot67.ctest --test-dir out/build/dev --no-tests=error -j 8 -E '(startup_audio|_hardware$)'gives 2042 tests: 1982 pass, 0 fail and 60 are capability skips.Verdict: approve on
8a133409.Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; DXC 1.9.2602.17; Python 3.12.10; wave32; debug layer off.
CI:
Build and test on Windows,Assemble and translate gfx1013 fixturesandRun platform-independent Python checks on Linuxpass on8a133409.This reply was AI-assisted.