tombox-xshader: GS output stream != 0 rejected #104
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator#104
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?
@Trwthh on GitHub · 2026-11-22 09:16 UTC · original
Component:
crates/tombox-xshader/src/hlsl.rsWhat happens: The EXP handler at line 5203-5204 rejects geometry shader exports with stream != 0:
Impact: Games using multi-stream geometry shaders (stream-out for particle systems, shadow volume extrusion, GPU-driven culling feedback) will fail shader translation. The RDNA2 EXP instruction encodes the stream index in bits [25:26], and GS shaders can emit to up to 4 output streams.
ISA reference: RDNA2 ISA manual, section 12.1 (EXP), stream field.
Suggested fix: Map each stream to a separate
SV_RenderTargetArrayIndexoutput or use D3D12 stream-output declarations. The HLSL[maxvertexcount]and stream append semantics need to route each stream index to the correctOutputStream<T>.@omonkeyz on GitHub · 2026-11-22 14:05 UTC · original
Confirmed as a gap, but the stream index comes from the s_sendmsg GS message (imm bits [9:8]) in emit_sendmsg, not from EXP. Streams 1-3 only feed stream-out, and the D3D12 layer has no stream-out path yet, so mapping them to SV_RenderTargetArrayIndex would be wrong. Until stream-out exists (PSO StreamOutput translation plus per-stream PointStream outputs), the translator keeps the explicit error rather than dropping those emits. The only GS among the 3515 cached title shaders uses stream 0. Tracked in docs/BLOCKERS.md (
d585b945). Leaving this open for the stream-out work.