Repository navigation
Shaders: fix GFX10 independent a16/g16 gradient dword packing in fields.rs with 21 tests - #1209
geiyiliyabumo wants to merge 2 commits into
Conversation
|
Tested at head The a16 rule here matches what I found independently from LLVM's GFX10 assembler tests ( The |
|
Heads-up on a silent miscompilation hazard if
Verified across all four |
…-cube-shaders Shaders: fix GFX10 independent a16/g16 gradient fields and cube gradients (Marvisak#1209, Marvisak#563)
|
Thanks @shortselow-byte and @fuzeofficlal for verifying the RDNA2 \�16/_g16\ rule and flagging the \emit/lower.rs\ consumer mismatch! Folded the \Lower::image\ fix into this PR so decoding and lowering stay aligned:
Re-verified \gfx10::fields\ (21/21 passed), \emit::lower\ (11/11 passed), \cargo clippy -p victory-shader --all-targets -- -D warnings, and \cargo xtask policy. AI-assisted; synthetic tests only, no game files. |
|
I ran an offline A/B comparison of Each run processed 26,503 containers and validated 21,724 shaders (12,155 vertex/pixel, 1,417 compute, and 8,152 mesh). All 25,889 listed outcomes matched by archive offset and stage across the four runs, with zero validation gains or losses. I also ran the same four synthetic 2D These results cover the original AI use : Assisted by GPT 6.2 Sol. |
|
I ran the same synthetic 2D texture fixture against The test-only commit is directly on |
|
Thanks @andrewpozdnakov7-jpg for the independent A/B verification on AI-assisted; synthetic tests only, no game files. |
|
Automated triage for the maintainers. Merge candidate. This makes a16 and g16 independent for image gradients. Generated by Claude Code |
|
Rebased cleanly onto \main\ (\ccfb029), preserving cube 2D-per-direction gradients, \image_sample_d_cl, and \op == 81\ level-query coordinate count alongside independent \�16/\g16\ unpacking. \cargo test -p victory-shader --locked fields::tests, \cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings, and \cargo xtask policy\ all pass. |
ae0b48e to
351a162
Compare
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f, cargo test -p victory-shader --locked.
165 passed / 0 failed / 2 ignored. GFX10 independent a16/g16 gradient dword packing fixed in field… — +21 new tests, the largest test addition in the old backlog; gradient packing is exactly the kind of subtle encoding that needs this coverage.
…dword packing in fields.rs with 21 tests
…dword packing in fields.rs with 21 tests
|
Automated triage for the maintainers, second look (a review against current Closing as a duplicate of #2372, which carries this PR's two commits unchanged (identical patch ids) and adds the lowering of If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
… changed, leave the texture's state as the list left it, and land with no remap under way Gone through again after fxceless/victory-fork issue Marvisak#1209 (RTX 3050 laptop: with the copy back the boat moves, then the process dies reading null in VCRUNTIME, called from the title's own code, three times): - A landing wrote the whole span of the texture's console layout back, with the bytes it had read before tiling where no subresource lies (padding, the tail, a texture the title placed inside the span). Bytes the title wrote there in between were rolled back. Only the runs that the tiled texels changed are written now (runs under 64 bytes apart joined); the per-frame KB counts those. - The copy moved the texture to the copy-source state and left it there; a later list whose shaders reach it by index without naming it found it so. The list's own state is put back after the copy, and a read state that holds the copy's needs no barrier (fxceless pull request Marvisak#1170). - The texture to buffer read-backs now land with the runtime held off its remapping, as the texture copies do: a page found there stays there until the row is written. Checked and sound: a failed or null Map returns before any pointer is used; the read-back buffer and the host texture are held by the list until it is reset, which is after its landing; a release, a new texture at the same memory or a remap takes the copy's ticket, and the landing checks it under the tickets' lock; copy_mapped writes nothing where the destination is not there at every exit (the processor's copy hands faults to the kernel's, and a failed kernel copy into memory not all mapped returns); levels and layers of no bytes cannot occur (a level has at least one texel, a span of none is not tracked). Tests on the software adapter: a texture released between close and run (its copy is dropped, nothing lands) and the state after the copy; a host test that a copy into memory that went writes nothing and does not fault. The crash in Marvisak#1209 is in the title's code; whether the rolled-back bytes were its cause is not known. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Closes #1116
Full verification details and change notes are documented in #1116 (commit
bcce91f, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.