Shader clean-up passes (1684989) cause black mosaic blocks in the prologue; VICTORY_SHADER_OPT=0 renders clean at the same fps (RTX 5060 Ti, Win10) #310
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#310
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?
@oz-stanislav-zhukov on GitHub · 2026-11-24 23:29 UTC · original
The shader clean-up passes (
1684989, on by default) produce black blocky mosaic artifacts in the prologue on my machine. WithVICTORY_SHADER_OPT=0the same scenes render clean, at the same frame rate.Setup
4e17478+ #22 (77aebdd, Agility SDK 1.620.2) + #58 (c5b12f1), release build, Series X profileVICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1 VICTORY_RELAY=1 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024VICTORY_SHADER_OPTunset (all passes). B:VICTORY_SHADER_OPT=0. Each with its own warm shader cache, same opening cutscene and the same prologue window shot compared.What differs (visual, checked by eye)
VICTORY_SHADER_OPT=0)Screenshots were taken but are no longer available, sorry.
Same in both
Speed (warm cache, prologue window shot, ~5,000 draws/frame)
The passes save ~15–20 ms of GPU time here (matches the ~20 ms in the commit message), but the frame is bound by preparation and copy-back, so the frame rate does not change.
Suggestion
Maybe default
VICTORY_SHADER_OPTto 0 until the pass that causes this is found, or bisect the bits (dead code, folding, reuse, branch facts, loads within a block, wave64 first-lane exchange). Happy to run a bisection on this machine if you say which values to try. The #22 author reports the passes also break rendering on their base, even the subsetVICTORY_SHADER_OPT=23.Hardware report for this machine: #148.
AI-assisted (Claude Code, Claude Opus 5.5); numbers from local logs, visuals confirmed by me.
@oz-stanislav-zhukov on GitHub · 2026-11-24 23:31 UTC · original
Related work I missed before opening this (not duplicates, same passes):
REUSE) shares resource handles across the whole program, which crashes the AMD compiler. Fixes in review: #195 (noREUSEfor compute programs) and #317 (annotateHandlekept local to its block). The #120 analysis notes that DXC's GVN doing the same is a known way to get pipelines refused on NVIDIA.DEADpass removes input reads,ISG1input usage and the barycentrics flag are not recomputed (see #53). That could give wrong pixel-shader inputs on NVIDIA, which may be what shows as blocks here.Next step on this machine, if useful: run the same scene with
VICTORY_SHADER_OPT=59(all passes exceptREUSE) and with #122 applied, to see which one removes the mosaic.AI-assisted (Claude Code, Claude Opus 5.5).
@ChatGepetao on GitHub · 2026-11-25 00:32 UTC · original
I reproduced a DXIL validation failure on current main (
a803c87) with a source-built pixel shader. I tested the same revision with #122 (442d7c25a) applied and built separately, using Microsoft's Linuxdxvfrom DXC 1.9.2609.VICTORY_SHADER_OPT0,4,581,59,63Flags must match usageWith
DEADenabled, this shader loses all of itsattributeAtVertexcalls. Main still emits the barycentrics flag (validator: declared4194304, actual0) and a TEXCOORD read mask of0x01. #122 clears both. A control that exports the interpolated value keeps the flag and validates under all six masks. The ordinary dead-channel fixture from #122 also changes from mask0x03to0x01under63. This version ofdxvaccepts both ordinary-fixture outputs.Synthetic fixture
This can be run through the existing
pixelhelper inemit::barycentric_testswithPERSP_CENTER. It uses constant interpolation weights and exports a constant, leaving the interpolated value unused.The synthetic failure establishes one effect of
DEAD. The in-game mosaic still needs a comparison. On the same revision and patch set, could you try59(all passes exceptREUSE) and58(all passes exceptDEAD) against63, then retry63with #122 applied separately? If both58and #122 clear the same blocks, that would help connect the metadata issue to this report.Tested on Linux with Rust 1.98.1. No title data was used. AI assisted with the fixture and report.
@SantannaCarlos on GitHub · 2026-11-25 02:52 UTC · original
RTX 4070 12 GB,
2119b0e, default mode: the mosaic shows up with the clean-up passes off too.Setup: Windows 11, RTX 4070 12 GB, 32 GB RAM, diagnostics build of
2119b0e, Series X profile. Every run starts from a copy of the same autosave at the cell window, with no input after the load. EachVICTORY_SHADER_OPTvalue gets its own shader cache (the value is part of the cache key), one 8-minute warm-up run, then one 8-minute measured run. Frames were saved at fixed offsets from the first world frame with 500 or more draws (VICTORY_CAPTURE_WORLD). No speed switches, no structure builder.New black 8x8 blocks in the presented frame against
VICTORY_SHADER_OPT=0(32,400 blocks per frame):VICTORY_SHADER_OPT0reference has the blocky mosaic itself: a strip of black and coloured square blocks along the bottom of the cell-window shot and in the bottom-right corner. With all passes on, the same offset is the cleanest of the four runs.VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1 VICTORY_RELAY=1 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1plus the card-buffer switches, on Windows 10 with #22. The late modes lose geometry and data on their own (#168, #89), so an A/B of0against all passes with exactly those switches would tell whether the passes add something there.0bcc069, no stale aliased pages left), so it is not that either.Two notes from an offline pass over the whole pack (
victory translate --validate, each value ofVICTORY_SHADER_OPT):0,1,2or59, and 251 to 274 with4,23or63. In a sample of 20 pixel programs, 12 do this with all passes and none with0. This is the pattern behind the AMD compiler crash (#120, #145, #317). It did not produce visible blocks on this card.Counts only; no game data.
@JRamos1993 on GitHub · 2026-11-25 03:47 UTC · original
Correction to my comment above: with more runs, the mosaic is not tied to the clean-up passes on this machine. It appears with
VICTORY_SHADER_OPT=0too, and it is absent in some runs with all passes. It varies from run to run within the same build. My earlier table compared one run per configuration, and that was not enough.Method: the same setup as above (RTX 5090,
main2119b0ediagnostics build, the same save restored before each run,VICTORY_KEYSEnter presses, 240 s runs, warm caches). Only runs that entered the world 57–75 s after start are counted; all of them get the same presses inside the cutscene.Every captured frame from 110 to 180 s after entering the world is scored on the bottom 12 % of the screen, the part of the window shot where the blocks appear. Two scores:
Before using them, I checked both against frames I had classified by eye. Clean frames score edge ≤ 0.042 and blue ≈ 0. A run counts as affected when its median is over 0.05 (edge) or 0.5 % (blue).
VICTORY_SHADER_OPT0(no passes)59(all butREUSE)mainWhat this means for this machine:
REUSEis not their cause here. Neither #122, #195 nor #317 removes them.This does not contradict the original report on a 5060 Ti and Windows 10. It only says that one run per setting cannot settle it.
AI use: Claude Code with Claude Opus 5.5 ran the title, wrote the two scores, checked them against hand-classified frames, and wrote this correction.
@JRamos1993 on GitHub · 2026-11-25 02:21 UTC · original · edited 2026-11-25 03:48 UTC
Corrected: with more runs this does not hold. The mosaic appears with
VICTORY_SHADER_OPT=0too, and varies from run to run; see #310. Kept below as posted.In-title bisect on an RTX 5090: with warm caches, turning off pass 4 (
REUSE) removes most of the mosaic in the prologue window shot. All passes off removes all of it. #122 does not change it.Setup:
main2119b0ediagnostics build; "+ #122" is #122 (442d7c2) merged onto it. Series X profile, no other switches.VICTORY_KEYSEnter presses into the prologue, 240–300 s.VICTORY_SHADER_OPTvalue builds its own shader and pipeline cache. Each configuration was run until a run ended with0 being made, and only that run is compared.VICTORY_SHADER_OPT63)59(all butREUSE)0(none)So on this machine pass 4 (
REUSE, "one instruction for one value") accounts for most of the blocks. Something else accounts for the small patch left with59.Two runs I am not counting as like-for-like:
0and59: the runs still had ~600 pipelines being made at the end. Those frames were missing draws, and the0one still had blocks. The rule of comparing only fully warm runs comes from there.58(DEADandREUSEoff): its final frame has no blocks, but that run reached the world about 40 s later than the others. In its final frame the room behind the character is lit (wall, posters, the jumpsuit's lettering), while every other run shows it black. That suggests a different point in the cutscene, so I don't draw a conclusion from it aboutDEADor the residual patch.Not tested: which other pass causes the residual patch;
4alone; AMD or Windows 10.AI use: Claude Code with Claude Opus 5.5 ran the builds and the title, compared the frames and wrote this.
@SkillIssueXO on GitHub · 2026-11-25 07:24 UTC · original
I reproduced a tile-aligned artifact at the prison window on current fork main
a26859f, with a desktop RTX 5070 Ti 16 GB, NVIDIA driver 621.40, 32 GB RAM, and Windows 11. I used the Series X profile, levels on demand enabled, late wait stage 2, DRED off, and the default shader optimizer. At the window, both walls, the wire mesh, and the yard rendered. Blocks remained along the bottom of the image. A separate run facing into the cell rendered the faces, bunks, and lighting without a comparable bottom grid.On
8dd30ab, the same grid was visible in the 2560×1440 HDR scene color before temporal resolve and spatial upscale. Ata26859f, I read back that HDR texture immediately before and after the sky pass in the affected view. The pass changed RGB in 291,245 pixels near the window and left every channel bit-identical across the bottom fifth and rightmost fifth. The artifacts were already present in the before capture. The window-facing sample averaged 3.68 FPS over 140 frames outside the capture. The runs kept the shader optimizer at its default, so they describe the location of the artifact with that configuration.AI-assisted testing and analysis.
@SantannaCarlos on GitHub · 2026-11-25 09:52 UTC · original
The lower-right part of the mosaic, at least on an RTX 4070 in the default mode, comes from a cut indirect dispatch: one lighting pass over classified tiles (
2dc364df5d3278b8) asks for 85,000 to 115,200 groups in x every frame, the clamp ran 65,535, and the tiles past that kept an earlier shot's content. #834 runs the rest in a second execution.Cell save, 8-minute runs, frames +200 to +700 after the first world frame: square blocks in the lower right of the window shot for the whole shot in 2 of 4 runs without it, in 0 of 3 with it. Frame time within noise; the card spends about 5 ms more a frame. Details and the table are in #834.
The reflection tiling program that #823 gets running (
2cc4c197ee29e291) was refused in all seven runs, with and without the split, so the blocks along the bottom that #823 reports may be a second cause.