Folded code tables stop before the VGPR-bases trailer (Xid 13 at world entry) #3695
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3695"
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 stasadance on 2026-11-30T04:12:52Z.
Fixes #3050, #3358
What it changes
A folded wave64 program's code ends with its VGPR-bases trailer. A constant table the shader reads by lane index (
code_dword) was taken from its start to the end of the code, so it took that trailer in too: forc1eee35dbc50a9efthat was 16,579 dwords instead of 69. NVIDIA puts a table that size in per-thread local memory, and the dispatch faults: Xid 13 at world entry.The table now stops before the trailer (
fold.rsrecords where the trailer starts,lower.rsbounds the table there). Unfolded programs are unchanged.How it was tested
cargo testpassed for the crates it touches: yes,cargo test -p victory-shader --lib(Linux host: 295 passed; the Windows-only emit tests not run). Windows clippy reports the same 4 errors as current main (lower/analysis.rs,lower.rs:594,native.rs:1655), none in this diff.Checked for overlap
code_dword), #3427 and #2278 (folding hangs / Xid 13, possibly the same oversized table).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by VibeCodeGuy on 2026-11-30T23:04:15Z.
Offline corpus check (every shader container in a v1.0.2.1 dump: 25,699 unique programs),
maine1251c31againstmain+ this PR at3aa991c3.The 8 changed programs
c1eee35dbc50a9efCsGpuParticleUpdate:CS_UpdateSkinnedAttachMeshTreeParticles6b638f32efd6f858CsInstanceCulling:CS_Tree_BatchCullReflectda96a8117d87567aCsInstanceCulling:CS_Tree_BatchNoCull0a5d4f9047b3dce4Csindirect_light_probes:CS_IrradianceCache_IntegrateIrradianceSHb2711644ca5566ccCsscattering_transmittance_system:CS_Gather0903802745985664Csscattering_transmittance_system:CS_Gather_Reference0ffd3b911e35e7d0Cssr_denoising:CS_TemporalResolve1_Opaque_FrameStatistics6547aeeef562cc81Cssr_denoising:CS_TemporalResolve1_OpaqueHow:
victory translate <dump> --validate --listbuilt for each side (release, cross-built with cargo-xwin, run under Wine),VICTORY_HOST_WAVE=32, plus the four shader-cache-key settingsplaystarts with (VICTORY_EARLY_DEPTH=1,VICTORY_NAN_SCRUB=1,VICTORY_BVH_MISS=1,VICTORY_SAMPLED_MARKS=1). Validator:dxil.dllfrom DXC v1.9.2609. "Changed" compares translate'semittedhash of each module and its bindings. There was no GPU on this side, so no host pipelines were made and nothing was run on a card. Onmainthe same run has 72 failures: 71 mesh programs over the 32 KiB output limit (the known shortcut inmesh_prologue) andCS_TraceShadowRays_FullAdaptive(#2993).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.