Fog apply pass empties the lighting target: CS_ApplyCombinedDeferred multiplies by transmittance/in-scatter inputs with no writer #2045
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#2045
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@cobrajet302gt on GitHub · 2026-11-25 04:05 UTC · original
Scope note (2026-11-25, after automated triage): the zero-writer mechanism described below is the mechanism on the testers tree (
94e0ea5), where the fourCS_ReconstructRaymarch*writers are refused at translation ("an address from a phi") and the apply pass therefore runs on inputs nobody wrote. Onmain(940d32f) the writers translate and it is the apply pass itself (577248728544d74b) that fails validation — tracked in #2027 — so mainline's black world is properly owned by #841 / #2027; skipping apply changes nothing there (coil111's measurement). The cross-tree map in our comment below stays the working reference for why the same black output has different killing passes per tree. A separate issue for the "address from a phi" refusal class, with a reproduction, is in preparation.Symptom. On every tree that gets an in-world frame, the float lighting target holds real content after the lighting, SSS, light-volume, and sky passes, and is then emptied by one command list: the one containing
scattering_transmittance_system:CS_ApplyCombinedDeferred. Measured by @Gargalindis on the same card and tree by patching the lighting shaders to emit a constant light term (so the target has known content) and dumping the target after every command list in execution order: 19,059 non-zero pixels before the fog apply, 3 after, in two consecutive frames; with that pass skipped, 59k-130k non-zero pixels survive to the end of the frame. No render-target clear is involved (see the correction in #841 at 21:31 UTC: the earlier "cleared again" reading was wrong and was retracted with data).Why it zeroes. The shader ends with
store(in_scatter + scene * transmittance)on every pixel, and both of its 960x540 inputs — the transmittance LUT and the in-scattering buffer — have no writer anywhere in the trace. They read zero, so the multiply destroys the scene term that lighting just wrote. This is distinct from the meshlet-culling depth problem (image_gather4_lat the wrong level, #1535, branches in #1901's table): that one starves the depth-EQUAL test upstream; this one multiplies a live lighting result into nothing downstream. Both are needed for lit pixels; neither covers the other.What nobody has filed yet. I searched issues and PRs across the ecosystem tonight: the gather4 side has issues and two competing PRs; the missing transmittance/in-scatter writer pass has no issue and no PR at all. The scene has the symptom documented in #841 but no tracked defect for the cause.
Fix directions, from the trace alone:
scattering_transmittance_systemCS pair upstream; on host it never dispatches or translates), soCS_ApplyCombinedDeferredreads real LUTs.VICTORY_SKIP_PIPELINESby program digest). On @Gargalindis's instrumented runs that alone turns "lit pixels exist mid-frame" into "lit pixels reach frame end."Evidence policy. All numbers above are counts and pass names from public run logs; no game data, captures, or bytes. Credit to @Gargalindis for the instrumented per-list dump and the retraction that makes it conclusive; @lines9686-rgb and @KingKaom's depth-side work in the same thread bounds the other half of the zero.
Written with an AI assistant.
github-bot referenced this issue2026-11-26 05:02:51 +00:00
@r4tedx on GitHub · 2026-11-25 04:21 UTC · original
An offline data point on "no writer": which programs of
scattering_transmittance_systemthe translator refuses, per tree. Counts over the shader archive only (CPU,victory translate <shaders.rpf> --validate --list, 32-lane host where the tree has that switch); nothing was run in the title.On
integration/testersupdate 9 (94e0ea5) five of the system's programs do not translate (I have no count of update 10, whose wave changes may clear the fifth), and four of them are the pass that rebuilds the raymarched fog at a higher resolution:CS_ReconstructRaymarch_Lowdb967f7b25eba39aan address from a phiCS_ReconstructRaymarch_Highe1a4af1d3785a7aban address from a phiCS_ReconstructRaymarchClassifiedFulld9978c76c746d809an address from a phiCS_ReconstructRaymarchClassifiedNoAlpha982f3cccd5c04294an address from a phiCS_SortRayTilesa1bf269d5b19f025console wave64 lanes in a group of more than 64 threads(32-lane hosts only)The two apply programs translate there (
CS_ApplyCombinedDeferred577248728544d74b,CS_ApplyCombinedDeferredAddFogMode9f044cc2135ac16), as do the other 120-odd programs of the system. So on that tree the apply pass runs while a reconstruction pass in front of it is dropped. That makes the fourCS_ReconstructRaymarch*programs candidates for the missing writer of the 960x540 inputs. I have not shown that they are: it needs a trace that names the dropped dispatches. @Gargalindis, if your trace lists dropped or untranslated programs, are any of the four hashes above in it?On
main(940d32f) the picture is different. All fourCS_ReconstructRaymarch*programs andCS_SortRayTilestranslate and validate. Seven programs of the system fail the validator instead, all with the compute-stage message that #2027 is about (Entry function performs some operation that is incompatible with the shader stage), and the apply pass is among them:CS_ApplyCombinedDeferred,CS_ApplyCombinedDeferredAddFogModCS_ApplyDiffusionInScattering_HeatHaze,CS_IndirectApplyDiffusionInScattering_HeatHazeCS_DensityShadowMapMips,CS_DensityShadowBlur_H,CS_DensityShadowBlur_VSo a run on
mainand a run on the testers tree can show different halves of this: on the tree the apply pass runs on inputs nobody filled, onmainwhether the apply pass and the density shadow blur run at all depends on #2027 (I did not test what the runtime does with a module the validator rejects).For reference, the fork
fxceless/victory-gta6(004bf69), which several people report as lit, validates all four reconstruction programs in the same count; the one program of the system it does not isCS_Gather(a lane mask holding lanes elsewhere read as data).My whole-archive count of
main940d32falso reproduces the two totals already filed: 867 vertex programs atFlags must match usage(#1987) and 735 compute programs at the compute-stage message (#2027).A local copy of the title's shader archive was used for these counts, offline; only program names, hashes and refusal reasons are given here. AI-assisted.
@coil111 on GitHub · 2026-11-25 04:49 UTC · original
on main + #1849, RX 9070 XT/RADV: skipping 577248728544d74b changes nothing; snapshots per submission show the lighting target only ever holds sky, so on this tree the zero comes before the fog apply
@KingKaom on GitHub · 2026-11-25 05:05 UTC · original
In-game corroboration for the
mainrow of the table above — gatedmain(940d32f+ validator gate #1936), RX 9070 XT, ~36 min in-world (283 in-game validator refusals).CS_ApplyCombinedDeferred577248728544d74bis one of the in-game refusals:shader does not translate; its pipelines' draws are dropped ... Entry function performs some operation that is incompatible with the shader stage— verbatim the #2027 message @r4tedx listed formain— and the refusal happens at world entry (pipeline first bound, draws dropped, frame 1882).CS_ApplyCombinedDeferredAddFogMode9f044cc2135ac16was never requested in the run.CS_ReconstructRaymarchClassifiedFulld9978c76c746d809,CS_ReconstructRaymarchClassifiedNoAlpha982f3cccd5c04294andCS_SortRayTilesa1bf269d5b19f025translate and dispatch from that same frame (theLow/Highvariants are never requested here).So on a gated
maintree the multiply cannot be the emptier — the apply program never executes — while the reconstruction passes that could fill the two 960x540 inputs do run. A third tree shape alongside the testers tree and @coil111's: onmainthe consumer is dropped where the testers tree drops the writer.AI-assisted (Hermes Agent)
@cobrajet302gt on GitHub · 2026-11-25 05:09 UTC · original
Assembling the four independent measurements in this thread into one map — plus one orphan to flag and one dataset to attach.
The chain has two runtime shapes and one clean tree, all now explained at defect level:
94e0ea5(runtime: @Gargalindis's instrumented per-command-list dump): the apply pass runs while its two 960x540 inputs have no writer — because the fourCS_ReconstructRaymarch*writer candidates die at translation with an address from a phi (@r4tedx's offline table). The multiply then zeroes live lighting: 19,059 → 3 nonzero pixels.main940d32f+ validator gate #1936 (runtime: @KingKaom, 36 min in-world): the inversion — the reconstruction passes do run, and it is the consumerCS_ApplyCombinedDeferredthat is refused at frame 1882 with the #2027 compute-stage message. So the target never gets emptied here; on this tree shape it never gets the fog term at all (@coil111's per-submission snapshots showing sky-only content on main + #1849 are the matching symptom).CS_Gatherat a lane mask holding lanes elsewhere read as data, is the same defect family its2119b0e/9e49b8a/90228a7lane-mask-pair commits address. The lit-fork observation and the compiler data now agree.The orphan. A search across issues finds no issue for the "an address from a phi" refusal class at all (the closed #950 is a different PHI matter — substitution-chain perf). On the testers tree that refusal is the writers' kill-list, i.e. the root cause of this issue's empty inputs, and it currently has no number of its own. It deserves one; the four hashes are already in this thread.
What we can add, offline, from our side. Our posted corpus dataset (25,889 labeled programs — the same table that joined 1:1 against @fiestorra's 1,441-program translate sweep, and the source of the one-wave-64 group-shape histogram) carries per-program console
wavelabels and user-SGPR counts keyed to the FSSM containers. The bridge from those rows to the hashes in this thread is avictory translate --validate --listrun over our local copy of the archive on our Linux build; we'll run it and attach the label rows for the seven system programs named here — in particularCS_SortRayTiles(a1bf269d5b19f025), whose 32-lane-host refusal is exactly the console-wave64 axis our census measures corpus-wide (23,235 wave64-labeled vs 2,654 wave32 — that refusal class does not stop with one program).No game bytes, no captures; names, hashes, counts, and pass names only. Written with an AI assistant.
@Marvisak on GitHub · 2026-11-25 12:52 UTC · original
Automated triage for the maintainers.
The measurement behind this issue comes from a fork's testers branch (
94e0ea5), not frommain, and the comments show the two differ:CS_ReconstructRaymarch*programs are refused at translation ("an address from a phi"), so the fog apply pass runs on inputs nobody wrote.main(940d32f), those writers translate and dispatch, and it is the apply pass itself (577248728544d74b) that fails validation with the compute-stage message tracked in #2027 (implicit sampling in compute programs). On main + #1849, skipping the apply pass changes nothing; the lighting target holds only sky before it.So on
mainthere is no defect yet that matches the title of this issue; the black world it explains is tracked in #841, and the apply pass's refusal in #2027. If the "an address from a phi" refusal also matters onmainfor other programs, a separate issue with a synthetic reproduction would be the place for it.Generated by Claude Code
@cobrajet302gt on GitHub · 2026-11-25 12:54 UTC · original
Triage is right, and the scope note is now at the top of the issue body — this issue stays as the cross-tree mechanism map (which the triage itself re-derives correctly), with mainline's black world properly owned by #841 / #2027.
On the phi-class follow-up: @KingKaom's gated-main report above is already a non-synthetic sighting of the refusal on mainline-lineage code (
CS_ApplyCombinedDeferredrefused at frame 1882 under #1936's gating), which suggests the class matters on main wherever that program's translation is attempted. To make the separate issue reproducible rather than run-log-shaped, we'll attempt an offline pass this side: build the gated-main tree from the PR ref here on Linux and run the translator over our local archive, which should name every program refused for the same reason with digests — the strongest form of "synthetic" this side of writing a fixture by hand. If it lands clean, expect the issue with the digest list; if the offline path can't reach the class on mainline, we'll say so here instead and leave the class to the run evidence.Written with an AI assistant.
@cobrajet302gt on GitHub · 2026-11-25 12:58 UTC · original
Follow-up on the repro we committed above — the offline pass landed, and it answers three things at once.
Method: built the gated-main tree here (main
940d32f+ #1936, Linux/CachyOS, wine), ranvictory translate --validate --listover our local archive with the official Microsoftdxil.dll(v1.9.2609), 8 worker threads, ~2 min.Headline: all 26,084 distinct programs translate; 1,784 fail at emit or validation:
Flags must match usage(#1987)csstage (#2027)a register joining a lane mask and data, read as data, 36a descriptor read only as data, 8a lane mask read as data, 6a lane-mask join of an untracked mask, 5v_cvt_f32_f64, 3barycentrics read directly, 2v_permlanex16_b32, 1a descriptor chosen by control flowThe 867/735 counts reproduce the whole-archive table posted above digit-for-digit, on Linux, under the official validator.
The #2045 prediction confirms: both apply programs are in the cs-stage class —
CS_ApplyCombinedDeferred_1e5750b4(archive offset 0xd3fa3cd) andCS_ApplyCombinedDeferredAddFogMod_1e5750b4(0xd3fb834) — the writers (CS_ReconstructRaymarch*) translate and validate clean on this tree. That's the runtime refusal KingKaom saw at frame 1882, reproducible offline in one command.On the phi class specifically: it does not appear on gated-main offline — zero refusals carrying that message over the full archive. If it touches mainline at all, it's at a tree/branch we haven't carved, and per the triage we'll open the separate issue with a synthetic fixture only when one does. The 71-program output-size class is listed above in case it's already tracked; if not, it may warrant its own issue from someone who can attribute it to game content.
Written with an AI assistant.