Shaders: read a geometry shader's limits from its container's PSV0 (#311) #385
No reviewers
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!385
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-385"
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?
@0xkn0wh3r3 on GitHub · 2026-11-25 00:14 UTC · original
0xkn0wh3r3:shaders/gs-psv0-info→main· +473 −0 · 4 files · 2 commits · openRefs #311. This covers the container-level fields. The fields that need the native records stay open there.
The title's containers carry the standard
PSV0part next toISG1/OSG1(runtime info version 3, with the shader stage tagged). For a geometry shader,PSV0holds the input primitive, the output topology, the stream mask, whetherSV_Positionis written and the vertex maximum. Those are some of the stage limits #311 asks for, in a documented layout. This addspsv::geometry, which reads them, and ashader-infoline that lists them per container and in the totals.It touches none of #309's files, so it applies with or without that PR.
Checked
PSV0writer (the built-in rectangle GS).PSV0parts written by DXC are kept in the tests, signature tables included: triangle strips out on one stream, and points out on two streams.u32::MAX), which is refused without a panic. Also the textshader-infoprints for a geometry shader.shader-infoon a container whose output topology was corrupted to a line list: it is listed undergeometry unreadablewith the reason, not dropped.gs_6_0shaders built with DXC (Windows SDK 10.0.26100), varying one declaration at a time: point, line, triangle, both adjacency inputs and 4-point patch input; point, line strip and triangle strip output; maximums of 3, 12 and 170; no position; two streams. Each reads back as declared.[instance(3)]reads the same as[instance(1)], which matches the earlier comment that the instance count is not inPSV0.shader-infofinds 15 in the executable, and none of them reads as geometry or fails to read. I dumped 10 of them by hand: each carriesPSV0with 52 bytes of runtime info, and the stage byte at info +0x18 is 1 for the vertex shader and 0 for the pixel shaders.cargo clippyin both CI configurations, andcargo test --workspace: 507 passed.A note on offsets: counted from the start of the runtime info, the stage is at 0x18 and the vertex maximum at 0x1a. The 28 and 30 in the earlier comment count from the start of the part, which begins with the 4-byte runtime-info size.
Not checked
victory shader-info --verbose <game dir>lists what each one declares.Still open in #311
The instance count, the LDS size, the output record layout in LDS, and the runtime table. They need the merged stage's native records.
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.