Shaders: a merged geometry shader's raw user-data address is title memory #716
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/716"
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 adhd-speed on 2026-11-28T04:17:37Z.
Problem
victory translate --listwithVICTORY_HOST_MAX_WAVE=32reports 195GS_VoxelizeGenericfailures, all at the same load:with:
Root cause
The earlier diagnosis treated this as a table read at
table_offset_dwords: 184. That comparison was a unit error:0xb8is 184bytes (46 dwords), while 184 dwords is
0x2e0.The program's only
UsedResourcetable is at 584 dwords = 0x920,user_data 8, and it is read throughs16:In a merged ES-GS, user data starts at
s8;user_data 8iss16. Theprogram is therefore merged. The
0xb8load goes throughs8, which isuser_data 0in that placement. The layout has nouser_data 0parameter,and the
UsedResourcetable has no entry at 46 dwords. It is a raw address,not a table root.
Change
+8placement forGs;HwStage::user_sgpris unchangedin the net diff.
for
Gs, as compute programs already do. The0x920load stays a table;0xb8becomesMEMORY.s16/0x920/ 584 dwords;0xb8and the table0x920in the same program, expecting(MEMORY, 0)and(0, 0x920);s17.Verification
cargo test -p victory-shader: 296 passed, 5 ignored.cargo build --release --locked -p victorysucceeds.translate --liston the Xbox Series1.0.2.1corpus:an address in an SGPR that is no root parameter;no wave32 lowering for this wave64 programand 5a descriptor read only as data, unchanged.8cf49c6770ae0810:1 of 1 tracked, 2 scalaraccesses, one raw (
MEMORY) and one table (0x920).Scope
This fixes resource tracking and preload, not geometry pipeline emission.
translatestill lowers onlyVs/Ps/Cs/Ms, so the 195 still produceno host geometry pipelines; that remains a separate change. #659 stays open
for the emitter.
Standalone geometry shaders
The evidence in this title is a merged ES-GS. This change does not claim a
standalone
Gsplacement; if one appears, its placement must come frompipeline metadata rather than trying both offsets.
Refs #659.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T04:26:39Z.
Review: APPROVED
LGTM — verified on Windows:
cargo test -p victory-shader --lib native::(12/12) andresource::(40/40, includinga_standalone_geometry_shaders_table_pointer_is_at_s0anda_merged_geometry_shaders_table_pointer_is_at_s16) passednative.rs,resource.rs)cargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jptorres96 on 2026-11-28T09:16:30Z.
Tested on top of main:
cargo test -p victory-shader --lib→ 296 passed, 0 failed, 5 ignored. No regressions.Env: RTX 4080 SUPER (driver 621.01), Ryzen 5 5600X, Windows build 26300, rustc 1.98.1, DXC 1.9.2609.5 (
VICTORY_DXIL),--test-threads=1.VICTORY_INDIRECT_REST=1set to sidestep main's two indirect budget-test failures (fixed in #67), unrelated to this PR.