GPU: fix indirect mesh dispatches when the console supplies only X #996
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!996
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-996"
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?
@invismann on GitHub · 2026-11-28 10:54 UTC · original
invismann:fix/indirect-mesh-dispatch-x→main· +26 −34 · 2 files · 1 commits · merged 2026-11-29 08:16 UTCOn the Series X profile, some terrain rendered black even though its depth was present. A terrain tessellation batch submitted records such as
(1593, 0, 0). The console uses X as the mesh group count. Passing the zeros through to Direct3D 12 cancels the dispatch.The single-record and batched clamps now submit
(X, 1, 1)for valid mesh records and charge the list budget for X groups. The existing rejection of out-of-range X values stays in effect, including unused slots filled with0xffffffff.Before and after
I replayed the same Series X frame on an RTX 4090, replacing only the batched argument clamp. Each sample covers 80 by 40 pixels of the affected terrain. A pixel counts as near-black if all three RGB channels are below 16 out of 255.
Validation
(1593, 0, 0)case failed the WARP regression before the fix. The windowed and single-record paths now produce(1593, 1, 1). Batch coverage checks the dispatch arguments and budget, and the tests also check unused slots and preserved record padding.@CristianCiubancan on GitHub · 2026-11-28 12:22 UTC · original
Independent confirmation, found separately before I saw this PR.
On an RTX 5070 Ti (Series X profile) I recorded a frame at the beach where the sand and seabed vanish up close. The records the title's
meshlet_tessellation:CS_CalcChunkOffsetswrites for theMST_DS_TerrainTransformdraws read(2, 0, 0),(6, 0, 0),(4, 0, 0); other mesh draws in the same buffer read(x, 1, 1). After the clamp, the scratch copies still had y and z at zero.Replaying that frame with only the batched clamp replaced (y = z = 1):
The sandy bottom and seagrass are drawn across the whole view afterwards. This looks like the cause of #583, #701 and #765 (black beach, exposed seabed), which this PR could close.
@Maanekk on GitHub · 2026-11-28 16:42 UTC · original · approved these changes
@Marsietiss on GitHub · 2026-11-29 13:49 UTC · original
A result from normal play, to go with the replay test above.
What we tested: our fork has a port of this change, together with #1183 and a one-line change from another fork that keeps an X=0 record as (0,0,0). RTX 5080 16 GB, Ryzen 9 9950X3D, Series S mode, 1080p.
Result: our previous build had black squares along the shore. With these changes in, they were gone at the coastline spot we checked, by eye. Frame time at our separate heavy spot was about the same: 47.8 and 48.0 ms at about 6.7k draws, against 47.35 ms at about 7.0k draws on the previous build.
Limits: we tested the three changes together, in a build that also had other fixes, so we can't say how much came from this PR alone. The picture check was by eye, with no pixel counts. The frame times come from separate builds and slightly different draw counts, so they only show that we saw no large slowdown.