Shaders: Read uncompressed native records for embedded text shaders #1879
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1879
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1879"
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?
@rastapasta on GitHub · 2026-11-29 01:23 UTC · original
rastapasta:fix/shader-uncompressed-native-records→main· +148 −6 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCFixes three instances of the unsupported-program error reported in #154 and #517.
What it changes
One text vertex shader and two text pixel shaders in the title executable store their native programs in uncompressed
FSSMrecords (XDAT kind0x0c). The reader skipped those records and reported that all three containers lacked a supported shader stage. It now passes raw records directly to the existingFSSMparser. Packed0x0drecords reach the same parser after decompression.fuzeofficial (@fuzeofficlal) wrote the reader and its four synthetic regression tests. This port preserves their Git authorship. The original proposal was closed after a shader-archive scan found no examples. Original PR and closing note
How it was tested
victory shadersrun with an empty cachef9dfb7687d73cbvictory translate --validate --pipelines, each output passed Microsoft DXIL validation. Pairing the vertex shader with each pixel shader created both D3D12 graphics pipelines on a 32-lane NVIDIA RTX PRO 6000 Blackwell (Windows 11, driver 621.14).F2glyphs offscreen, once with the bitmap atlas and once with its signed-distance field. Both pairs drew the original placement, a moved and mirrored quad, and a blank atlas on NVIDIA and Microsoft WARP. Across 12 draws, all 46,080 pixels matched the independently computed glyph masks. The maximum absolute RGBA channel error was1.073e-6against a tolerance of0.0005, including partially covered glyph edges.cargo test --locked -p victory-shaderpassed 391 tests with 8 ignored. Clippy flags a manual checked division inemit/lower.rs, andcargo xtask policyflags that file’s size. Both findings are present on the parent.Checked for overlap
crates/victory-shader/src/native.rs. At each PR head, theXDATloop still selects only packed0x0dentries. This port also accepts raw0x0centries, which is what lets the existing parser read the three embedded text shaders.FSPXmetadata for an opt-in compute pipeline built from separate parts.VPP1path for shader programs assembled from separate pipeline parts. The reader selects it by the part’s own header.FSPXpath.0x1c8and0x218, and optionally builds a compute pipeline from those parts.The related project's broader geometry PR also carries a raw
FSSMreader. Marvisak/VIctory#1315@Melow-code on GitHub · 2026-11-29 04:59 UTC · original · reviewed
Checked the raw
FSSMpath on Linux,87d73cbmerged onto main568c5e5d: no objection.cargo test -p victory-formats -p victory-shader --lib: 57 and 280 passed (three of them mine), 0 failed.One change of behaviour, which the triage of Marvisak/VIctory#3116 already raised there: a 0x0c entry was skipped before, and now a bad one refuses the whole part, valid 0x0d programs included. I measured it: a part with a good packed vertex program and a raw record of another version gives
Err("unknown FSSM version"); with four bytes of padding after the raw record,Err("FSSM payload size disagrees"). A bad 0x0d entry is treated the same way, and the 25,701 unchanged cache payloads you report say no program the title already had is lost to it, so I would leave it.Not run: Windows, any card, the title's shaders. The 25,704 and 285 counts are yours, not checked here.
AI-assisted review (Claude Code).