Geometry shaders: the 195 "address in an SGPR that is no root parameter" failures are one merged ES+GS shader #138
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#138
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@arminkhaleghirod on GitHub · 2026-11-24 21:47 UTC · original
The largest translation failure class left on main (
4e17478,translate --validateover the whole title) is 195 ×resources: an address in an SGPR that is no root parameter. All 195 are the title's Gs programs, and they are builds of one geometry shader. Writing down what it is, so nobody fixes the error message and calls it done.What it is
s_barrier, then jumps into the GS half withs_setpc_b64.GS_EMIT/GS_CUT/GS_DONE. There's no export, so the runtime reads the output from LDS.s_load_dwordat +0xb8 from a pointer in user data 0/1. That looks like the runtime's own table, not a title resource. The value read becomes the LDS base of the GS output.Why not just accept the pointer
Resource tracking could take it in a few lines, but
io::raiseandemitonly run for Vs/Ps/Cs/Ms. The 195 would just drop out of the count with nothing translated, like the Es programs today.What real support needs
GS_EMIT/GS_CUTto DXIL stream emits. The output signature is in the container, but mapping LDS offsets to its rows needs the merged-stage stage data thatnative.rsdoesn't read yet.Static analysis only, no code yet.
@CDR-0000 on GitHub · 2026-11-24 22:15 UTC · original
Data point for prioritising: in six runs reaching the lit prologue, the title never binds a pipeline with a geometry stage.
RTX 3080 Ti, fork
main(4e17478/2119b0e), release and diag builds, with and withoutVICTORY_BVH_BUILDER=1(boot, menus, opening cutscene, prison-yard prologue; 60–245 s each). First-bind lines by stage in the latest run: compute 699, pixel 526, vertex 329, mesh 260, geometry 0 — and nono host pipeline: only vertex, mesh, pixel and compute stages are translatedrefusal in any of the six logs, which is what a draw with one of these pipelines would log today (pipeline/host.rs,HostPipeline::new).So the 195
GS_VoxelizeGeneric_*programs aren't on any path the fork currently reaches; full merged ES+GS support would show up in the translate count but not on screen until a scene that voxelizes is reached. If someone knows where the title uses them (a later mission, a settings toggle, the GI path once ray tracing works), that would tell us when it's worth doing.Written with Claude Code (Claude Opus 5.5); the runs are mine.
@avt0m4t48 on GitHub · 2026-11-24 22:16 UTC · original
I built three synthetic container tests on fork main
2119b0e. They confirm the native reader retains the ES record from the vertex container and the GS record from the geometry container. The ES barrier is followed by an indirect exit. A synthetic GS load through an unbound SGPR at0x44reproduces the reported resource error. The pipeline-facing translator still emits the ordinary VS and refuses a GS-only container. Source-built fixturecargo test --offline --locked -p victory-shader --lib merged_geometry_fixturepassed all three on Linux. The full shader suite passed 173 tests, with two ignored. The fixture isolates the current translator boundary. It uses illustrative LDS fields and does not establish the console LDS layout or in-game geometry usage.At the pipeline boundary both containers are available. A first pairing test can use two PSOs sharing a GS container with different ES records, so a future translation and cache key have to distinguish both inputs. The LDS field-to-signature mapping and runtime address provenance still need independent evidence. AI-assisted using Codex.
@Revens2 on GitHub · 2026-11-24 23:29 UTC · original
Step 1 is up as #309: the GS half of the merged stage now reads its SGPRs (user data 0/1 as the runtime table pointer), so the 'no root parameter' failure goes away for it and emission stops at an explicit 'GS emit' (counted on its own line in translate). Not measured over the title; not run in game. Remaining steps are #311 (stage data), #312 (ES half and LDS handoff), #313 (GS output, GS_EMIT/GS_CUT), #314 (pipeline path). Thanks to the comments above: with no geometry pipeline bound in the prologue runs, steps 4 and 5 will not show on screen until a scene that uses one.