Repository navigation
Translate 64-bit texture atomics and follow proven shader branches - #48
flapwarp78 wants to merge 1 commit into
Conversation
|
Tested
AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
I verified the texture-atomic change on a physical RTX 5070 (Windows 11, NVIDIA 621.01). On I used the register sequence in The device reported typed-resource and descriptor-heap 64-bit atomic support. The SDK DXIL validator accepted each emitted shader, the driver created each compute pipeline, and the queue fence reached 1 before readback. The 32-bit view used I also matched all nine distinct pixel shaders that had reported the 64-bit atomic error during a local mission-loading run. Offline translation on |
d55ca40 to
56f0072
Compare
|
Re-checked the new head
AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
checked: 56f0072 on Linux x86_64 (Debian, kernel 6.12), Rust 1.98.1 (rust-toolchain.toml), What I ran (throwaway worktree of the PR head, base 35b054e):
Review notes (none blocking):
Not verified: Windows/D3D12 runtime, any GPU, DXIL validation, the 628-shader scan (520 + 108), behavior of translated threaded shaders, bit values against DXC. |
|
Tested
No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
Tested with the title
Not tested
(Claude Code, Claude Opus 5.5: ran the title on each build and compared the logs program by program.) |
… lane count past 32 KiB) AnoHunted's Marvisak#459: a mesh shader whose declared vertex and primitive maxima take more than D3D12's 32 KiB of outputs declares the lane count instead, where that is lower. No textual conflict. Mechanical, crates/victory-shader/src/emit/mod.rs: git placed Marvisak#459's three test items at the end of the file, inside `atomic_tests` (Marvisak#48's module, which is last in this tree); they are moved to the end of `tests`, where Marvisak#459 has them, and its `emit` call passes `Target::ANY` (Marvisak#223's argument). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rol flow; waterfall loops proven) Marvisak#566 is stacked on Marvisak#307, which this tree holds as its first two commits (the tree's resource.rs was identical to ffa6635's). The merge so also brings Marvisak#307's last two commits, 077ec8b and 6285e19. Git found upstream main as the base, which sets Marvisak#307's own lines against themselves; each file was merged with ffa6635 as the base instead. - crates/victory-shader/src/resource.rs: Marvisak#566's, unchanged (the tree had no edits of its own there). - crates/victory-shader/src/emit/lower.rs: no conflict on that base. The tree's lowering is kept (Marvisak#307's waterfall arm of v_readfirstlane before the console-flow form, fetched_index through Marvisak#483's heap guard), with Marvisak#566's Source::LanePhi arms and tests. lane_heap_index joins the indices heap_index and fetched_index return, so each is already guarded. Marvisak#226's annotation test passes the per-lane form to track. - crates/victory-shader/src/structure.rs: both sides' additions kept: MAX_MEMO (Marvisak#288) with MAX_MEET, and in Structured the wave64 stack's execs, others and pairs with Marvisak#566's reach and paired_masks. paired_masks is filled last, since it takes the masks pairs reads. - crates/victory-shader/src/emit/mod.rs: translate keeps Marvisak#309's spill forwarding and Marvisak#223's target, structures first and passes the per-lane form to track as Marvisak#566 does. The threading retry of emit passes its own. The tests' helpers (Marvisak#223's, Marvisak#306's, Marvisak#459's, Marvisak#48's) pass it too. - apps/victory/src/translate.rs: Marvisak#566's arm (Source::LanePhi is no leaf); the tree's fix already counted Fetched as loaded, as 077ec8b does. - docs/architecture.md: no conflict on that base; Marvisak#566's text. - emit/image_tests.rs (Marvisak#160), emit/lane_read_loop_tests.rs (Marvisak#439), sgpr_spill.rs (Marvisak#309, Marvisak#320): track takes the per-lane form. Helpers that return the error keep the order of failures (resources, I/O, then structure). - emit/waterfall_tests.rs (new, Marvisak#566): lower::Parts gets the tree's target, console_cf and per_lane_only; the dispatch fills Marvisak#483's guard dwords. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A direct eight-word scalar load can supply the resource of an image atomic without exposing any descriptor words as values. Avoid emitting a float-annotated dimension query in that case while retaining reconstruction for scalar reads, PHIs, and other consumers. Refs: Marvisak#48, Marvisak#177, Marvisak#259
…ntains Marvisak#223) Conflicts: - crates/victory-shader/src/emit/lower.rs, Lower::new: shader-tracking (Marvisak#309) ignores the dead lane instructions of SGPR spills when deciding a compute program reads other lanes; Marvisak#233 splits that test into in-half reads (swizzles, DPP) and whole-wave reads. Marvisak#233's split is kept, with both of its lane-read tests over the live instructions only (a `live` closure over sgpr_spill::dead). Its other instruction scans (v_readfirstlane, permutes) stay over all instructions, as Marvisak#233 has them. - lower.rs, v_readfirstlane_b32: shader-tracking's (Marvisak#307) arm for a waterfall loop's read of a descriptor dword (each lane's own) and Marvisak#233's arm for the console flow (the console wave's first lane in EXEC) are both kept, the waterfall arm first: the waterfall's compares are taken as true per lane before anything else (Lower::valu), in the console flow too, so its reads must stay each lane's own. - crates/victory-shader/src/emit/mod.rs: module list (threading and split_tests) and test imports of both; the test import of bitcode::Attr stays removed as shader-opcodes left it (the tests take it from `super::*`). emit_program (split from emit by Marvisak#48 in the opcodes branch, for the retry after edge threading) takes and passes Marvisak#233's `target`. - crates/victory-gpu/src/shader_cache.rs: tests of both sides kept. Mechanical, for Marvisak#233's new arguments (no test checks changed): `target: Target::ANY, console_cf: false` in hand-built lower::Parts in emit/lower.rs tests (two), and Target::ANY as emit's last argument in emit/image_tests.rs, emit/mod.rs tests (two) and sgpr_spill.rs tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adapt the validated lowering from flapwarp78 (VIctory Marvisak#48) and Tarcisio (VIctory Marvisak#305), and key typed handles by both resource properties from Ortomanic (VIctory Marvisak#177). Gate the runtime on the typed and descriptor-heap capabilities and test both dwords against hardware. (cherry picked from commit 26cc0b15c12e6ac6339929754b01c4ce4660c26b)
What changed
Verification
Microsoft's DXIL validator accepted 628 shaders from a local shader-pack scan. Texture atomics recovered 520 translations, and the control-flow change recovered another 108. The first 520 outputs were byte-for-byte identical with the control-flow change applied.
The shader, game, and format suites passed 73 tests. The asset-policy check passed. Rendering in the game still needs a Windows D3D12 run.