No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1402
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1402/head"
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?
@MamaLeVrai on GitHub · 2026-11-24 17:46 UTC · original
MamaLeVrai:bundle/shader-high-yield→main· +1867 −160 · 10 files · 35 commits · closed without mergingOne PR in place of 4. The four open shader PRs that gain the most programs in #1247's offline benchmark on a retail dump (295, 520, 153 and 117 programs; none loses one), merged on top of the bundle #1319 (a descriptor read only as data, 64-bit image atomics, biased image samples with 16-bit coordinates, packed 16-bit pixel inputs). Every head is merged unchanged onto
mainplus #1319, and the result is built and tested together.What is inside
6d30fd71c78dae8362e3067aeaa70278092aChanges made while bundling
No PR needed a change of its own; four merges needed a hand resolution against the PRs of #1319. Each commit of the bundle is a plain merge of one PR head, with the resolution inside it.
descriptor_data(the use-site match moved into aSome((at, first))branch). #953 (in #1319) adds ans_buffer_loadarm to the old match. Resolution: the same arm, unchanged, inside the new match.emit/lower.rs. Both tests are kept.addr_dword/addr_val(at, k)helpers (a16 packs two components per VGPR); #563 (in #1319) adds cube gradients on the face coordinates (graded) and a_clclamp read after the coordinates. Resolution: the cube gradient loop runs overgradedwithaddr_dword(gradients are one 32-bit dword each even with a16, as #306's comment says), and the clamp isaddr_val(self, at, coords), the same dword as before without a16. There is no test of a16 together with cube gradients; that combination is the part of this resolution to look at.emit/lower.rs. Both are kept.e3067ae, a commit by wrothgaril at 20:36 UTC on Nov 24): two of #306's tests,compute_shader_implicit_sample_uses_valver_1_8_and_validatesandrow_interp_harmonizes_packed_elements_and_validates, failed with the stock Windows SDK'sdxil.dll, which is validator 1.7 (found by alexdeliu on an RX 9070, see #1495). The new head of #306 handles it itself: aValidator::version()query with a skip below validator 1.8, and PSV0 semantic names written per element (its commit message: "write PSV0 semantic names per element; skip valver 1.8 check on old validators"). I have no 1.7dxil.dllhere to confirm it on the stock SDK. An earlier version of this bundle had a commit of mine that did the same thing; it is reverted in the history, just before the merge of the new head, so nothing is duplicated.Left out, and why
Verification
Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):
cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --lockedmain: 342 passed, 6 ignored)The title was not run, so this says nothing about in-game effect. No game data is used or committed.
Re-verify in one go
To confirm that no component PR moved since this was built, compare each
Headabove withgh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.If this lands
The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
The console compiler spills scalars, lane-mask pairs among them, with v_writelane_b32 into constant lanes of a VGPR and restores them with v_readlane_b32 of the same lane. The restored pair was an opaque mask, so the selects, EXEC writes and joins that used it refused ("a select on an untracked mask", "an opaque lane mask", "a lane-mask join of an untracked mask"). structure now follows a constant-lane readlane back through a plain chain of writelanes to the scalar written to that lane, and gives the restored pair that scalar pair's mask. A chain with a phi or another write of the VGPR stays opaque (shortcut noted in code). Offline corpus, against fix/mask-phi-ballot (neither branch carries #585): vertex/pixel programs emitted 12250 -> 12269, compute 1443 -> 1452, "a lane-mask join of an untracked mask" 20 -> 0, "an opaque lane mask" 29 -> 8, "a conditional export" 8 -> 0. Synthetic pixel program fails before, lowers after. Stacked on fix/mask-phi-ballot (shares its test helper). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>Fixes 5 shader emission and DXIL container/validator issues in `victory-shader`, raising validated shaders across the test corpus from 21,983 to 22,159 (+176; 100% of emitted VS/PS/CS shaders now validate cleanly): 1. Biased 16-bit image samples (`emit/lower.rs`): - Remove the `a16` rejection on `image_sample_b` and separate 32-bit prefix operands (offsets, bias, comparison reference) from `a16`-packed tail operands (gradients, coordinates, explicit LOD) starting at `regs[first]`, matching GFX10 MIMG hardware operand layout. 2. Conservative depth `SV_Position` interpolation (`emit/mod.rs`): - Declare `SV_Position` with `linear_noperspective_centroid` (5) instead of `linear_noperspective` (4) in pixel shaders outputting `SV_DepthLessEqual` or `SV_DepthGreaterEqual` (kinds 18/19). 3. Per-row interpolation mode consistency (`emit/mod.rs`, `emit/lower.rs`): - Add `harmonize_row_interp()` so elements sharing a signature row always declare the same interpolation mode: rows containing integer attributes or `SV_IsFrontFace` propagate `nointerpolation` (1) to sibling elements, and after pixel-shader lowering unread siblings inherit the actual read mode of sibling elements in the same row. 4. Container signature row ordering (`emit/container.rs`): - Sort `ISG1`/`OSG1` rows stably by register only (`row`) rather than `(row, col)`, preserving DXIL element-ID order within a row so the container signature matches DXIL validator expectations byte for byte. 5. SM 6.6 compute-shader implicit derivatives (`emit/shader.rs`, `emit/container.rs`, `emit/lower.rs`): - Track compute shaders emitting implicit-derivative sampling ops and emit `dx.valver = 1.8` with `PSVRuntimeInfo3` (52 bytes, carrying `EntryFunctionName`), enabling validation and D3D12 compute PSO creation. Adds 5 unit + `dxil.dll` validation (+ D3D12 compute PSO) tests in `emit::tests`.PSV0 shared one string-table copy of a repeated semantic name (TEXCOORD0 and TEXCOORD1 pointing at the same "TEXCOORD"). DXC's PSV writer writes one copy per element, and validators before 1.8 compare PSV0 byte for byte, so any signature repeating a name was rejected there ("Pipeline State Validation does not match"); 1.8 compares the strings and accepted both. Checked against dxil.dll 1.7, 1.8 and 1.9. Validator::version() reads IDxcVersionInfo; the compute-derivative test skips dxil.dll validation when the validator predates 1.8, which rejects dx.valver 1.8 outright. Translated shaders never go through dxil.dll. Reported by @alexdeliu. Co-Authored-By: Claude Opus 5.5 <[email protected]>e3067ae(wrothgaril: PSV0 semantic names per element, skip on validators older than 1.8) 7e7c5be2db@sinan-cmyk on GitHub · 2026-11-24 18:12 UTC · original
Offline measurement on a retail dump, as asked in #1247
Result: +1,688 programs over
main, 0 programs lost. The hand-resolved merges did not cost a program on this data.Method: the same as #1247. I ran
victory translate --validate --listonshaders.rpffrom a retail dump (1.0.2.1), with dxil.dll 1.8.2502.11 (Windows SDK 10.0.26100). Then I compared the results program by program, 25,889 listed programs. I built each head in its own worktree and target dir, release profile.mainffe310e643aef6main2310409The sum holds, and it is larger. On top of #1319, the four PRs gain 1,403 programs. Measured one by one on
mainin #1247, they gained 1,085 (295 + 520 + 153 + 117). The difference comes from #1319: it moves 247 programs past the mask and scalar-read failures. These programs then stop at "a descriptor read only as data", and #1067 handles them too. Under that reason, the bundle gains 590 programs here; #1067 alone gained 295.What the four PRs gain on top of #1319, by the reason each program failed with on #1319:
The next wall. With this PR, the largest failure is "a descriptor's address or format read as data": 809 programs, against 92 on
mainand 653 on #1319. Most of these programs moved forward from other reasons. In the main → #1402 comparison:The next-largest failures are the lane-mask reasons (270 and 264), computed barycentrics (207), and SGPR addresses that are no root parameter (195).
Limits. These are counts of programs that translate and pass the validator offline. They do not tell whether the output is correct. I did not render anything or run the PR's tests. Shader names and data are left out per the asset policy.
AI-assisted (Claude Code). Measured on my own machine: Ryzen 7 7800X3D, RTX 4070 SUPER, Windows 11 25H2.
@MamaLeVrai on GitHub · 2026-11-24 19:23 UTC · original
New head
119b763: one commit on top that skips two of #306's tests whendxil.dllis older than validator 1.8 (they failed with the stock SDK's 1.7, reported by alexdeliu on #1495). See the PR text. The measurement above was on the previous head2310409; the commit only touches the validator wrapper and those two tests. AI-assisted (Claude Code); no game data.@YaBulochka on GitHub · 2026-11-24 19:51 UTC · original
Linux/RADV result from a retail run, measured, not estimated: this bundle plus #1319 removes the pixel-side walls completely, and leaves two compute classes.
Before (base
ffe310e+ #994 + #491 + #1583):63083c777948927a:a lane mask read as data is not supported;a402e650d0acbc92,46395a33fdf2a3fa: the same lane-mask error;a223e485dd8247a3:a packed input half no element holds is not supported.After #1319 + this bundle on the same tree:
63083c777948927atranslates (0 errors) - its draws stop being dropped;does not translatelines left are compute: 6 xa structured buffer of unknown stride is not supported(0452fc2d2e2fc4c3,17af15c4015cb4b6,1c4b3c0547e3e6fa,42f717f1b4d18e94,55679a0547649d0b,89d08e561897d4e5,9209777e8face9dd,fdd56d97a806bcca) and 3 ximage_gather4_l is not supported(0452fc2d2e2fc4c3,9f017d9011377efa,fc5e66f8f873d3bb).So on this title the pixel path is done: what is still black can no longer be blamed on a missing pixel translation. The next two walls are #704/#193 (unknown stride) and #160 (gather4_l); both conflict with #1548 in
descriptor/host.rsand with this bundle ingfx10/fields.rs, so I am testing them one at a time.Setup, for reproduction: Linux, Wine 11.22 in a Proton 11.0 prefix, vkd3d-proton from Proton, RADV from Mesa 26.3.1, RX 7600 XT;
VICTORY_PIPELINE_JOURNAL=1.@MamaLeVrai on GitHub · 2026-11-24 20:09 UTC · original
Thank you, YaBulochka: that is a very useful reading, pixel path done on this title and two compute walls left. Those two are what I try next on top of the stack: #193 with #704 (unknown stride) and #160 (
image_gather4_l), resolving the conflicts you name ingfx10/fields.rsanddescriptor/host.rs(and #1548). I will post the branch here and on #1495 when it passes the usual checks. The head of #1402 has since gained one commit (119b763, two of #306's tests skipped below validator 1.8); it touches only the validator wrapper and those tests. AI-assisted (Claude Code); no game data.@MamaLeVrai on GitHub · 2026-11-24 20:30 UTC · original
YaBulochka: the unknown-stride wall from your list is now #1644 (branch
bundle/stride-stack): #704 on #193, on top of #1511, both heads unchanged. They merge with the stack with no conflict besides the tests at the end ofemit/mod.rs(both sets kept) and one field,stride_table, in two test literals.cargo clippy(both runs) andcargo test --workspacepass here: 412 tests, two runs, on WARP and an RX 6950 XT. I did not run the title, so I cannot say how many of your 6unknown strideshaders translate now; aVICTORY_PIPELINE_JOURNAL=1run on that branch would show it.Left out: #160 (
image_gather4_l). It replaces the lowering's match on sample opcode names with a parsedSampleFormand conflicts with the stack in 13 hunks (emit/lower.rs10,gfx10/fields.rs2,emit/host.rs1). Making it agree with #563, #306 and #1004 is a design choice, not a mechanical merge, so I left it. #1548 conflicts with the view-heap sizing already on the stack indescriptor/host.rs.bundle/all(every bundle but #1632 and #1638, one tree) has #1644 now: 751 tests, both clippy runs clean.AI-assisted (Claude Code); no game data.
@sinan-cmyk on GitHub · 2026-11-24 20:31 UTC · original
PRs that add programs on top of this bundle (measured on the retail dump, stacked on head
2310409, program by program):emit/lower.rs; both tests kept. detailsv_cndmask_b32arm. Combined with #1423 it costs 1 program. details#1423 gained nothing on
mainalone. Its 214 programs need #1067, which is inside this PR. #1130, #1291, #1409 and #995 also conflict with this PR inemit/lower.rsoremit/mod.rs. Onmain, all of their gains are already among this bundle's gains.AI-assisted (Claude Code). No shader names or data are included, per the asset policy.
@MamaLeVrai on GitHub · 2026-11-24 22:06 UTC · original
Heads moved. #306 got a new commit from its author (
e3067ae) that handles the validator 1.7 case itself, so the bundle's own commit for it (119b763) is reverted and the new head is merged. The stack was brought forward by merging, in order: #14027e7c5be, #1492ea33d12, #150456f7da3, #15114ac9e91, #158960fa5d7, #15935996b87, #16448bf13c4, #16328de76a2, #1638ab4a6e6. Each passes clippy (both runs) andcargo test --workspace(two runs) here; test counts are unchanged. Any measurement on the earlier heads (sinan-cmyk's offline counts, for example) was made before #306's new commit. The loader bundle #1456 also has new heads of #214 and #324, andbundle/allis refreshed (754 tests).AI-assisted (Claude Code); no game data.
@Marvisak on GitHub · 2026-11-25 00:39 UTC · original
Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed