World mesh passes run their groups but the rasterizer receives no primitive #54
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/ThatRecompDev--five-star-recomp#54
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?
@Sr-0w on GitHub · 2026-11-26 03:59 UTC · original
In the world, the depth pre-pass, the G-buffer, the terrain and the impostor passes all run their mesh groups, yet the rasterizer receives no primitive from them. The lighting and the UI draw normally, so the world shows only its lights.
All runs below are on a retail game, an RX 7800 XT and build
397a2335, with the measurement tools of #52 and #53.Measured
Hardware counters (#53,
PIPELINE_STATISTICS1+OCCLUSIONaround each traced draw or ExecuteIndirect, 3 captured world frames):PS_DeferredTextured + MS_VS_TransformD,…StdNC + MS_VS_TransformTerrainNormalTint,PS_OctaSLODReZ + MS_VS_OctaSLOD(Wind),MS_VS_Transform_PositionOnlyThe pattern is the same on the clamp path (CS 64/128 for the clamp) and with
--mesh-launch. It also holds for the probe-instrumented variants of the same programs (66 of 66 draws).Mesh probe, same run and same programs (
--probe-pipeline MS_VS_Transform):MS_VS_TransformD_062b2704: 1,717 groups; vertices 4–128 and primitives 2–128 given toSetMeshOutputCounts; 0 of 175,704 primitives culled.(450.1, 123.8, 0.0481, 379.1). No w is 0 and nothing is NaN.The G-buffer target (2560x1440, format 29) has 0 non-black pixels after every traced ExecuteIndirect.
Ruled out
MS_VS_TransformD_c5fd36bb, the backend's DXIL and dxc's DXIL of the same translated HLSL have the same output signatures, the sameSV_CullPrimitive(I1, nointerpolation), 128/128 outputs, triangle topology and numthreads 128; only one shader-flag bit differs.SetMeshOutputCountsis called once, at the loop exit, from group-shared counts read after a barrier.Open question
The mesh programs declare primitives that are not culled and have valid positions, yet the hardware counts 0 primitives out of the mesh stage. The next step I can think of is to run one of these programs with captured inputs on WARP, or with dxc instead of the DXIL backend (
--shader-backend dxc), and see whether primitives come out.🤖 Generated with Claude Code
@Sr-0w on GitHub · 2026-11-26 05:04 UTC · original
Found and fixed in #55. On AMD (RX 7800 XT), once a primitive's SV_CullPrimitive has been written true, it stays culled: a later false is lost. Every translated mesh program initialised
cull = trueafter SetMeshOutputCounts, so on this GPU none of its primitives were ever drawn. The repository's native mesh cases reproduce it withFIVESTAR_TEST_ADAPTER=hardware. With the fix, the world's depth buffer and G-buffer fill.@ThatRecompDev on GitHub · 2026-11-26 07:30 UTC · original
fixed by #55, thanks for the counters, they made it obvious