Shaders: accept loose metadata version 0x0403 (same layout as v3, fixes #2362) #2478
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2478"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by erax4193 on 2026-11-29T13:25:53Z.
What
GDK builds shipping after v2026.11.29.01 send loose metadata with version
field
0x0403(03 04 00 00in memory, little-endian u32 = 1027) insteadof the previously-seen
0x0003. Theloose_metadata()parser hard-fails onany version other than 2 or 3, so
DeserializeComputePipelineStateXskipsthe pipeline entirely rather than falling back — which manifests as 195 draws
dropped every frame and ~5 FPS instead of the usual frame rate.
Closes #2362.
How
Examined the actual binary bytes from a game log that captured the hex dump
when
logwastrue(first four calls):Decoded the 0x158-byte blob:
u32_at(meta, 0)= 0x0403 — triggers the_ => Err(...)branchu32_at(meta, 4)= 0x144, and 0x144 + 0x14 = 0x158 ✓ →head = 0x14worksfrom = 0x38worksThe layout is byte-for-byte identical to version 3. The only change is the
version number itself — the low byte is 3, the second byte is 4.
Add
0x0403to the v3 match arm and extend the doc comment. Add a test thatconstructs a 0x0403 blob from the existing v3 fixture and confirms it parses
to the same record counts.
Test
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T09:14:06Z.
#3831 reports the same
0x0403rejection on the current release. I replayed it on Windows with Rust 1.98.1 using the repository's generated v3 metadata fixture and changing only the version field.41adb551accepted the v3 control and rejected0x0403withunknown loose metadata version.0f4bed5to current main as7d3add2, keeping the Git author. The two inputs then produced byte-identical compute containers. The parsed program had the expected[8, 8, 1]thread group and two resource records.b18eeb7. All threeloose_tests passed, and staged asset policy passed.The branch changes only
native.rs. If you want to bring just the parser fix and regression test up to current main, both commits are available here. Review branch@GeNiY256exe If you can test a build with these commits, could you repeat the same Series X scene and check whether the unknown-version messages and skipped draws go away? The matched Windows fixture checks container creation. The scene itself still needs a gameplay run.
Please retain the Git authors when cherry-picking or rebasing. If you fold in the regression test, please use
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T11:21:49Z.
I retested the exact
86d4a75head on native Windows. The native shader parser suite passed 22 tests, including all fourloose_checks with the generated0x0403fixture. The v3 and0x0403compute containers remain byte-identical and describe the same thread group and two resource records.I also ran the five newly ignored tests explicitly with app-local WARP available and
VICTORY_WARPunset, so the hardware probe remained separate.The CI job has passed both Clippy steps. The workspace test step was cancelled when the head advanced. There is also a separate result from #3898, where 26 unknown-version errors per run dropped to zero in a build that included this fix alongside other PRs.
Update on
cade613: the PR includes the container-equivalence regression with attribution. I ran the checked-in native suite on that exact commit, without adding the temporary fixture. All 21 tests passed, including the updated end-to-end container check. CI for cade613The CI test step on this exact head stopped on the existing shader cache switch-list assertion. Clean
41adb551reproduces the same error. Both corrections in the #3210 follow-up make all 11 shader-cache tests pass on GitHub's exact merge tree099b02alocally.AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by GeNiY256exe on 2026-11-30T11:33:43Z.
Nothing has changed for me.
I’m making edits native.rs
}
pub fn loose_metadata(meta: &[u8]) -> Result<LooseMetadata, ShaderError> {
let version = u32_at(meta, 0)?;
}
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by GeNiY256exe on 2026-11-30T11:37:41Z.
Great news! Judging by the log, our fallback worked—instead of "malformed shader: unknown loose metadata version," we now see:
text
metadata=["v1027 code dwords 0x80, 1 root parameters, 4 resources"] program=Some(Ok(960)) ...
This means the parser didn't crash; instead, it successfully returned metadata containing 1 root parameter and 4 resources. The pipeline was built (program=Some(Ok(...))), and the "malformed shader" error has disappeared for compute pipelines.
However, the artifacts likely remain, as the log still shows graphics pipelines with "make=false":
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.