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!1638
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1638/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 20:16 UTC · original
MamaLeVrai:bundle/nvidia-stack→main· +12472 −850 · 42 files · 140 commits · closed without mergingOne PR in place of 12. The tree Impre-visible ran on a GTX 1660 under Linux (their report on #1589) as one branch, checked: wave64 compute on 32-lane hosts (#189, as merged in #1589) plus the list of the world-run stack of #1632 and #1523 (NVIDIA hosts: widen unsupported 16-bit targets, size the view heap to the host's limit). In their run on #1589 the compute pipelines refused by the host went from 111 to 0, with no device removal. Every head is merged unchanged onto
mainplus #1589, and the result is built and tested together.What is inside
873548f2dbfe5d2dab001226617951ceb1eb08e4c897587b42ecd19687a195863be4e0489d84135fa370c61bff946edfe7131a4692a1Changes made while bundling
No PR was edited. Everything below is a separate commit or the body of a merge commit. The list is the one of #1632 (see there for #1077, #1175, #1516 and #542) and the same kinds of overlap came up again, plus the new ones of #189 and #1523:
root_uavs: #1077 adds the field toHostShader; the literals in three tests that other PRs of the stack add (cs_with_wave_sizeinemit/host.rsfrom #189,validate_and_create_cs_psoinemit/shader.rs, the root view test) get it.keep_dynamic), so #1077'sself.dynamic.push(..)for a root UAV becomeslist.keep_dynamic(heap, index, 1).const RENDER_TARGETinhost_texture; the second one is dropped. #1040's testhost_texture_drops_unsupported_uav_flag_for_b5g5r5a1assumed that every adapter refuses a typed UAV on B5G5R5A1_UNORM, wherehost_textureonly drops what the adapter refuses (an RX 6950 XT accepts it, so it failed onmainplus #1040 alone); it now asks the adapter withCheckFeatureSupport.valu_tests.rs, both kept; a test of #1516 buildsPartswithout #189'soptionsfield and now has it.bound_raw_offset) is applied to the stack's one raw-view branch (SRV range, UAV range or heap buffer, #1015 and #1055); the test helper it adds needed the structured program as the fourth argument ofresource::track(#801),optionsonParts(#189) androot_uavsonHostShader(#1077).#302 and #489 are inside #1077's own commits and are not marked as merged by this bundle.
Left out, and why
385dad2) leaves the 16-bit part to #89 and keeps only the view-heap sizing; the author found that the host's cap on NVIDIA (1,000,000 slots, debug layer ID 645) leaves the search nothing to find. This branch keeps the head that was run (946edfe, with the 16-bit widening), because that is the tree the reports measured; a tree without #1523 would not be the one they tested.mask_dwordinemit/lower.rs): two different rewrites of the same code. Impre-visible left it out of their tree for the same reason, and it is in #1632, which does not contain #189. Which of the two to keep, or how to join them, is for the authors and the maintainer.v_readfirstlanein divergent control flow (64), a structured buffer of unknown stride (56), LDS accesses without a uniform fence in split wave64 (40), a 64-lane ballot in divergent control flow (35), an address not from a root parameter (29); the final image was still dark.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
ffe310e) into up/pixel-barycentrics 3bc83d0d7bDXIL allows at most two SV_Barycentrics input elements, one perspective and one linear. A program reading both perspective center and centroid I/J as values declared two perspective elements, which the validator refuses ("There can only be up to two input attributes of SV_Barycentrics with different perspective interpolation mode"). The second mode of the same kind is now an Unsupported reason rather than a second element. Reusing the first element would hand centroid reads center weights (or the reverse), which differ on edge pixels: a silent wrong value. Before this PR such reads were refused anyway. Test: center + centroid values are refused; centroid alone still translates with one element. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66The 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]>A descriptor built around a root descriptor's address with unordered access was refused in emit ("a root UAV or typed root view"). With the spill table read (#302, #489), 11 of the 34 compute programs with spilled root arguments that Grand Theft Auto VI's world dispatches stopped there, among them the one dropping the most dispatches per frame in our runs. The translated shader now declares u<slot> in the root-view space (RWByteAddressBuffer, PSV0 kind 7). The host binds it as a one-view table: a raw view with unordered access of the title buffer's host copy from the root address, at most 1 MiB, refreshed before the submission and copied back after it like a table's buffer view. Without a host copy, or off 16 bytes, the view is null. The shader cache stores the new list. Offline over those 34 programs (victory translate --validate --pipelines, RTX 3080, dxil.dll 1.9.2609): 0 emitted before, 7 emitted and validated after, 6 of them with a host pipeline (the seventh is a wave64 program this card refuses). Co-Authored-By: Claude Fable 5.2 <[email protected]>AI-generated & verified with Gemini 4 Neon (not written by a human engineer). s_add_i32, s_addk_i32, and s_sub_i32 previously left SCC as Val::Missing("the carry of a scalar operation"), causing any shader that reads SCC after these instructions (e.g. via s_cselect_b32 or s_cbranch_scc*) to fail lowering. Compute 32-bit two's-complement signed overflow directly in i32 (no i64 capability required), matching the AMD RDNA2 ISA: - s_add_i32 / s_addk_i32: ((a ^ r) & (b ^ r)) <s 0 - s_sub_i32: ((a ^ b) & (a ^ r)) <s 0 Verified with synthetic GPU + WARP + dxil.dll tests in valu_tests.rs on NVIDIA GeForce RTX 3060 Ti (Windows 11, Rust 1.98.1). No game data used. Co-Authored-By: Gemini 4 Neon <[email protected]>AI-generated & verified with Gemini 4 Neon (High Mode) — not written by a human engineer. `packed16` in `lower.rs` previously rejected `v.clamp` on all packed 16-bit integer instructions with `Err("modifiers on a packed integer operation")`. Under the AMD RDNA2 ISA (VOP3P), `clamp` on `v_pk_add_u16`, `v_pk_sub_u16`, `v_pk_mad_u16`, `v_pk_add_i16`, `v_pk_sub_i16`, and `v_pk_mad_i16` saturates each 16-bit lane to `[0, 65535]` (unsigned) or `[-32768, 32767]` (signed). Because `packed16` computes each lane in 32 bits (`u16*u16+u16 <= u32::MAX`, `i16*i16+i16` fits in `i32`), saturation is exact in 32-bit integer compares before masking to 16 bits. Non-saturating packed integer ops keep rejecting `clamp`. Verified with synthetic GPU + WARP + dxil.dll tests in `valu_tests.rs` on NVIDIA GeForce RTX 3060 Ti (Windows 11, Rust 1.98.1). No game data used. Co-Authored-By: Gemini 4 Neon (High Mode) <[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`.344704e028' into trial/shader-lowering-c 7b1455c40b5d6889e8be' into trial/shader-lowering-c d053700ea19483b1a962' into trial/shader-lowering-c 77e3d29e32645391bcce' into trial/shader-lowering-c 34826e71f2f47ebd83f3' into trial/shader-lowering-c 3cc282bc5d5ecb6abe76' into trial/shader-lowering-c f0f7e136c54b8a1ca6dd' into trial/shader-lowering-c d146ad8e931052a90a40' into trial/shader-lowering-c bea7e635068d67fa5b00' into trial/shader-lowering-c ada65a7ef93d71ad1a65' into trial/shader-lowering-c a95185b5f77b57e8e8da' into trial/shader-lowering-c a8a631bd6e41b2472e13' into trial/shader-lowering-c 0443f28edb393320dfa8' into trial/shader-lowering-c a624dc74ead25783b8d8' into trial/shader-lowering-c 6a1fcd41f2bf873ffd3b' into trial/shader-lowering-c c75ee332c7d160854be0' into trial/shader-lowering-c 5fb25849d47dffb2a6c2' into trial/shader-lowering-c 483258bff6ba53233923' into trial/shader-lowering-c df1fb77f525be1fe4b65' into trial/shader-lowering-c 1470fadc336a9cc8fef8' into trial/shader-lowering-c 8263ed574aea633e723d' into trial/shader-dxil4 0c7da166ed9459c12d2e' into trial/shader-dxil4 89bd94d284ad330155a5' into trial/shader-dxil4 bb85b04761428725aaed' into trial/shader-dxil4 538fb4b8eebd59ba346d' into trial/shader-dxil4 fcc5fb18e3bfe5d2dab2' into trial/nvidia-stack2 17a53cc3a60012266175' into trial/nvidia-stack2 bc412727a7951ceb1eb8' into trial/nvidia-stack2 976bc22b0108e4c89757' into trial/nvidia-stack2 a16a81d96887b42ecd18' into trial/nvidia-stack2 ab62e298079687a19581' into trial/nvidia-stack2 e056fe91f7370c61bffc' into trial/nvidia-stack2 c2a1815642PSV0 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@ryotdev on GitHub · 2026-11-24 20:27 UTC · original
Tested
0be02a18through the first story title card on Windows, RTX 5070, driver 610.88, Series X 1.0.2.1. Built from source with diagnostics, a fresh shader cache and automatic wave-mode selection. The runtime selectedEmulate. I saw zero compute PSOs rejected by D3D12 with E_INVALIDARG.For context, an earlier clean upstream revision (
d2a4bae) on this machine had 117 distinct compute PSOs rejected with E_INVALIDARG. I matched all 117 to their translated DXIL. Each required exactly 64 lanes. CheckFeatureSupport reports a minimum and maximum of 32 on this adapter. Of those same shaders, this run showed 20 with working host pipelines and 45 explicitly refused during translation. I couldn't establish an outcome for the other 52. This wasn't a comparison against the immediate base of the bundle.Still blocked at the first 3D scene. DRED showed one list stopped at command 795 of 2283, in a series of DispatchMesh calls, followed by two lists that hadn't started. Removal reason was DXGI_ERROR_DEVICE_HUNG. No per-mesh marker identified the shader. The last captured normal frame showed the opening story card. No pipeline skips or forced render target.
AI-assisted test and analysis. Happy to compare the same setup against a specific follow-up fix.
@MamaLeVrai on GitHub · 2026-11-24 20:39 UTC · original
ryotdev: thank you. 117 compute PSOs rejected for 64 lanes at
d2a4baedown to none on a 32-lane card is what #1589 is for, and matching all 117 to their translated DXIL is a solid confirmation of the cause.For the hang in the DispatchMesh run (command 795 of 2283) two diagnostics PRs that this tree does not have are the next step, so I built the same tree with them: branch
bundle/nvidia-crumbsonMamaLeVrai/VIctory, which is #1638 at0be02a1plus #1081 and #279. Clippy (both runs) andcargo test --workspacepass here (466 tests, two runs). It is a test tree; no PR is open for it.in_flightinvictory-gpu/src/host.rs). In a long run of DispatchMesh calls between two barriers those first 12 can be commands that had finished, which may be why no marker named a shader in your report.VICTORY_SHADER_DUMP=<dir>writes each shader's container and DXIL under its hash, so a hash the report names can be read withdxc -dumpbin.VICTORY_SHADER_BREADCRUMBS=1(diagnostics build) each loop keeps its iteration count in host memory; after a removal the report lists the five loops that counted most, with the pipelines that use them. Its author's note says the per-frame cost is not measured.To run it: a diagnostics build with
VICTORY_D3D12_DRED=1andVICTORY_SHADER_BREADCRUMBS=1, then post the removal report (thea list stopped at command ...text and anyshader breadcrumbs:line). #1081 meets #1638 in seven small hunks (both add a field toPartsand to its test literals); all are kept. I have not run the title.AI-assisted (Claude Code); no game data.
@Bullet18x on GitHub · 2026-11-24 20:56 UTC · original
First NVIDIA run of this bundle: RTX 5090 (32-lane waves), driver 621.40, Windows 11 Pro 10.0.28000, Rust 1.98.1, head
0be02a18e, clean worktree, game-data tests skipped.cargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo clippy --workspace --all-targets --all-features --locked -- -D warnings: cleancargo test --workspace --locked --no-fail-fast: 459 passed, 2 failed, 6 ignored (plaincargo teststops at the first failing crate: 103 passed, 1 failed)1.
resource::tests::host_texture_drops_unsupported_uav_flag_for_b5g5r5a1(resource.rs:2022:left: true, right: false). NVIDIA-only, from #1040's test meeting #1523 in this tree:widened()asks the adapter about format 86 (B5G5R5A1_UNORM); on this NVIDIA driver it has no typed UAV store, sohost_textureturns the format intoWIDE(87, B8G8R8A8_UNORM) before #1040's flag check (resource.rs:919).supports(86, TYPED_UNORDERED_ACCESS_VIEW)→ false, and expects the flag dropped.On AMD 86 is not widened, which is why the RX 6950 XT run is green. Suggested fix: compare against the format the texture was created with, i.e.
supports(d.Format.0 as u32, ...)instead of the literal 86 (or skip the check whenwidened(86)).2.
emit::wave64_tests::gpu::gpu_128_threads_ds_swizzle_and_dpp_row_mask(from #189): only its WARP pass fails (Wave32, warp=true ... output mismatch); the hardware pass on the 5090 passes. Also fails onwave64-189andall; likely this Windows Insider build's WARP (a GTX 1060 / Windows 10 run passes it). Details on #189.The title itself was not run on this exact bundle. (Runs of #189 and #1523 alone on this machine: #1586.)
AI use: Claude Code (Claude Opus 5.5) ran the commands, traced the failure and wrote this; I checked it.
@sinan-cmyk on GitHub · 2026-11-24 21:19 UTC · original
Offline shader counts on a retail dump
Result: +226 programs over #1402 (head
119b763), 0 lost. Head0be02a1, compared with #1402 at119b763: 23,412 → 23,638 validated.These are exactly the 226 programs that #1504 gains on top of #1492 (measured there). #1504 is in this bundle's history. So the bundle's other changes, wave64 compute and the world-run list, change no offline count. That fits: their effect is on the runtime side (pipelines the host refuses, device removal), which an offline
translate --validatedoes not show.Method:
victory translate --validate --listonshaders.rpf(1.0.2.1), dxil.dll 1.8.2502.11, compared program by program (25,889 programs). AI-assisted (Claude Code). No shader names or data are included, per the asset policy.@Marvisak on GitHub · 2026-11-25 01:22 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.
@Marvisak on GitHub · 2026-11-25 01:32 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:README.md,apps/victory/src/translate.rs,crates/victory-gpu/src/capture.rs,crates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/draw.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Pull request closed