Repository navigation
Conversation
…the PC layout instead of being refused Measured by madhyn on the retail title with this pull request (ProjectLeonida#974 review): one of its start-up root signatures is past the console's inline graphics window (24 dwords from s8) and the compute one (28 from s4), so CreateRootSignature refused it outright and the title stopped with an unhandled exception before the frame loop it reached without this change. On the console such a signature goes to the argument block behind s[0:1], modelled for compute only (ROOT-SIG-SPILL-MODEL, ProjectLeonida#1009). Until it is for graphics, the graphics bind point keeps pack()'s layout for it (from s0, two dwords per table), what the layer did before the console layout, so no signature is worse off than on main. The new RootArgumentLayout::graphics_console tells address() which layout the table is in; a mesh shader still refuses such a signature. d3d12_mesh_test: a 30-constant signature is created and DispatchMesh with it invalidates the list.
|
@djrolfes #974 and this overlap in four files, all small: in write(state, *p, 0, std::uint32_t(va));
const bool console = is_compute(state) || state.layout->graphics_console;
if (!(console && type == rt::rootsig::ParamType::Table)) write(state, *p, 1, std::uint32_t(va >> 32));The rest is the |
|
Retail-title confirmation on Wine: the spilling builder signature is accepted and the first compute PSO path runs Build: Run: retail 1.0.2.1 package, Wine 11.17 on Arch Linux, RTX 3080 Ti, NVIDIA 595.112.07, Result:
This is the first confirmation of the model against the retail executable; the PR describes the synthetic suite and explicitly does not claim a title boot. No boot past the pool is claimed here either. Counts and call shapes only, no game data. |
|
Retail-title confirmation on native Windows / NVIDIA: the spilling compute signature is accepted, and the run stops at the same guest assert as on Wine Build: main 3295055 + local Windows build fixes (c84448a0) + this PR b477602 (merged clean, no conflicts) = dae56bb0. CMake/Ninja, MSVC 14.43.34808, native Windows 11 26200 x64 — no Wine. GPU: NVIDIA GeForce RTX 4060 Laptop GPU, driver 572.70. Run: retail 1.0.2.1 Xbox Series package, LEONIDA_D3D12=vulkan, LEONIDA_SKIP_INT3=1, --trace. Corpus: the 26,503-program translation (the directory in use holds 26,569 .spv files, i.e. 26,499 from this translation plus stale files from an earlier export). Result, same machine and same translation corpus both times: Without this PR: immediately after the first CreateComputePipelineState (device slot 62) the run logs root signature usable for graphics only: root parameter 8 does not fit in the user SGPRs from s4 (spill array not modelled). int3 at game_scarlett_master.exe+0x247af2d, skipped — also present before the PR. |
|
Tested b477602 on NVIDIA GeForce RTX 4060 (Ada), driver 617.42, Windows 11 Pro build 26200, native Windows (not Wine): pass. Built at this head with
AI-assisted (Claude Code ran the build and tests). No game files. |
|
Thank you for the independent native-Windows confirmation, @Gefik23. I am maintaining this PR rather than opening a replacement. A rebase onto current main 42537e7 is prepared locally in a separate worktree (candidate 54ab64cac; old tested b477602 remains preserved). Main now accepts compute spill layouts but still drops block-only argument values; this PR remains needed for the full argument block and immutable submission-retained uploads. Conflict resolution preserves main’s graphics/mesh windows, direct-heap delivery, title-VA rebasing, descriptor-table scan counts, async/skipped pipeline handling, and geometry-upload retention. The tests now also explicitly check that the table-descriptor count and new block offset remain distinct fields. Validation of the rebased candidate is starting; no old-head pass is being presented as a pass on the new tree. I will update this same PR with a lease-protected push only after the new tests complete. #1066 is already in the base, so the formerly known indirect-range failure will be checked again rather than carried forward as an exemption. AI-assisted. |
|
Follow-up to my earlier run: AI-assisted (Claude Code ran the test). No game files. |
b477602 to
1a85aad
Compare
|
Tested rebase pushed to the same branch with an explicit b477602 lease: head 1a85aad, base 42537e7. Old tested head remains preserved locally. Complete native and Windows cross builds pass; native validation 87 pass + 1 corpus skip, Wine targeted 37/37 (all six root tests and the now-fixed indirect-count/range test included), semantic 487 files / 6,279 tests pass, contract/line-ending 68 pass. No-game-data and diff checks pass. Clean merge-tree against newer main 3f81d46. Updated the PR body with exact evidence and limitations. The only rebase fixture correction replaces the old unresolved-pipeline rollback trigger with a real second-upload failure, because main now deliberately supports skipped/asynchronous pipelines. It asserts earlier unsubmitted allocation release. No production skip policy was changed. The new block_offset remains after table_descriptors, with a distinct-values assertion. RTX 3070 Ti / NVIDIA 620.73.04 / Linux / Wine 11.22; GPU validation native, not available through Wine. No title/world correctness claim. The separately tested retail candidate with #1558 and translator fixes is not included. AI-assisted. |
|
Maintenance update: the second rebase candidate 5421df174 on bcaa13d finished validation: complete native and Windows builds, native validation 90 pass + 1 corpus skip, targeted Wine 44/44, semantic 488 files / 6,287 tests, contract/line-ending 68 pass, scanner/diff checks clean. Added a regression that resolves a deferred pipeline shared by direct/indirect dispatches and checks all immutable root-block VAs survive. Main has since advanced to 490f5b9, so that tested candidate conflicts again. I am preserving it rather than pushing it as current-main compatible. A third isolated rebase is prepared locally (b1d154efa, validation pending). It retains main’s stateful indirect-draw path and clamp handling, adds compute snapshots in the moved record_indirect helper, preserves remember_table tracking, and retains both indirect-clamp and root-block submission owners. No untested force-push; remote remains 1a85aad until the new overlap is validated. Same PR/claim, AI-assisted. |
1a85aad to
0cc10a1
Compare
|
Third rebase validated and pushed to the SAME branch with an explicit 1a85aad lease: 0cc10a1 on 490f5b9. Clean merge-tree against 5da72d1 immediately before pushing. Complete native/Windows builds; native validation 99 pass + 1 corpus skip; expanded Wine overlap 62 pass + 1 explicit Microsoft-host comparison skip / 63; semantic 490 files / 6,310 tests; contract/line-ending 68 pass; scanner/diff checks pass. Retained the moved stateful indirect recording and compute snapshot hook, clamp preparation/emission/retention, table tracking, worker compile ticket and immutable root-block owners. Added direct/indirect deferred-worker coverage. The only latest fixture adaptation respects main’s unbacked-root-view zeroing and separately registers a synthetic, never-dereferenced alias to verify both address halves; no production safety guard was weakened. The skipped d3d12_indirect_zero host comparison is not a pass. RTX 3070 Ti / NVIDIA 620.73.04 / Linux, GCC 16.2.1 native and clang-cl/xwin + Wine 11.22. GPU validation native; no native Windows/MSVC run or title/world claim. Retail main validation remains separate and excludes this PR. AI-assisted. Updated the body with exact evidence. |
0cc10a1 to
e5551b8
Compare
|
Rebased onto Conflict resolution (
Portable Linux CPU-only verification (no GPU, Wine, native Windows, or retail runs in this pass):
AI-assisted, no game data. |
e5551b8 to
17a125c
Compare
|
Rebased onto Conflict resolution and consistency with
Portable Linux CPU-only verification (no GPU, Wine, native Windows, or retail runs in this pass):
AI-assisted, no game data. |
…a spill Measured on XboxBvhBuilder.dll's 52 programs (their own RTS0 chunks correlated with their disassembly): when a compute root signature does not fit s4..s31, the console puts its arguments in the block behind s[0:1] — every parameter, inline or not, in the inline layout's widths as bytes (root CBV/SRV/UAV 8 B, descriptor table 4 B, 32-bit constants 4 B each, no alignment). A fitting program reads the block too (its dwordx8/dwordx2 loads align to the same bytes), so the block carries the whole layout for every compute signature. The shader normalizes the 40-bit pointer itself (s3 = s1 & 0xff) and resolves its loads through the arena heap base, so no translator change is involved. pack_stage(Stage::Compute) now lays the block out instead of refusing: per-parameter block dwords, the first spilled parameter, and the block size; other stages keep the refusal (their spill is unmeasured). root_signature_test covers the measured shapes (the 9-parameter builder signature spanning 30 dwords, a fitting one, whole-parameter spills, and the mesh-stage refusal); root_sig_contract.py mirrors the same condition with its tests updated. Claimed in the coordination issue as ROOT-SIG-SPILL-MODEL (issue ubiquitarianism#14). AI-assisted.
Fill inline and block layouts with the correct sub-dword offsets; keep whole-tail compute spills and graphics refusals consistent with the contract tool. Upload immutable host-coherent blocks per dispatch execution, retain them on queue timeline slots, and reject missing upload support or allocation failure during preparation. The pointer is a bounded 40-bit console VA, not raw BDA. Add synthetic packing, replay, rollback/lifetime, native GPU and Windows COM readback tests. No translator change or title-level RT correctness claim. ROOT-SIG-SPILL-MODEL, coordination issue ubiquitarianism#14. AI-assisted.
17a125c to
25e5c4e
Compare
|
Rebased onto Conflict resolution (
Portable Linux CPU-only verification (no GPU, Wine, native Windows, or retail runs in this pass):
AI-assisted, no game data. |
Claimed: ROOT-SIG-SPILL-MODEL (coordination).
Depends on: #974, #1547, #1723 (merged; their layouts, pipeline workers and post-story queue/indirect paths are retained).
What and why
Compute root arguments need a packed memory block even for some signatures that fit inline. This is the full argument block, not merely a tail spill.
All 52 embedded builder headers already initialize s4 from WorkgroupId.x. No translator/system-value override is needed.
Tested rebase
Head
0cc10a1ec, based on490f5b9ec, replaces previously tested1a85aad9c. Earlier tested heads remain preserved. Clean merge-tree check against newer main5da72d19f. Same PR and remote branch; updated with an explicit old-head lease.Preserves main's graphics/mesh argument windows, heap-direct indexing, title-VA rebasing, table descriptor counts, asynchronous/skipped pipeline behavior and geometry retention.
block_offsetfollowstable_descriptors; a regression asserts they remain distinct. The rollback fixture now injects a genuine second-upload failure instead of assuming an unresolved pipeline must abort submission.The newer rebase also keeps main's stateful indirect-draw recording, clamp preparation/emission and submission retention, and
remember_tabletracking. Compute snapshots follow the movedrecord_indirecthelper. A regression resolves one deferred pipeline shared by direct/indirect dispatches and checks every root-block VA survives. The GPU fixture now retains main's unbacked-root-view zeroing control and uses an explicitly synthetic, never-dereferenced alias to probe both address halves.d3d12_indirect_zeroskips the Microsoft-host comparison under Wine; it is not counted as a pass.d3d12_indirect_dispatch_countnow passes with main's merged fix; its earlier failure is not being carried as a waived result.GPUs tested: NVIDIA RTX 3070 Ti 8 GiB, driver 620.73.04, Linux; Wine 11.22 for Windows tests. Windows validation layers are unavailable here; GPU validation ran natively. Native Windows/MSVC not tested. Independent native Windows RTX 4060 confirmation of the old head's six root tests remains historical evidence, not a test of this rebase.
Scope and limitations
No title RT correctness, world frame or gameplay is claimed. The separate retail validation tree testing #1558 and owned translator fixes does not contain this PR.
Spilling-table behavior extends the measured inline four-byte table width and remains unmeasured in a retail spilling-table program. Other driver-SGPR scalar conventions are not established by these tests. Graphics spill layout is unsupported.
The earlier incorrect CreateHeap attribution remains withdrawn in the correction; slot 61 belongs to #383, not this work.
AI-assisted: yes. No game content, shader listings, raw boot logs, captures, keys or decryption included.