Shaders: a merged geometry shader's raw user-data address is title memory #716
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!716
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@adhd-speed on GitHub · 2026-11-28 04:17 UTC · original
adhd-speed:fix/gs-voxelize-table-pointer→main· +95 −6 · 1 files · 1 commits · merged 2026-11-29 00:24 UTCProblem
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.
@Dukestar69 on GitHub · 2026-11-28 04:26 UTC · original · approved these changes
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).
3e3b7e0792toa1ba435d1cShaders: a geometry shader's user data starts at s0, or s8 when mergedto Shaders: a merged geometry shader's raw user-data address is title memory@jptorres96 on GitHub · 2026-11-28 09:16 UTC · original
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.