d3d12: slot 80 flag 0x20 gives the dispatch dimensions in threads, not groups #164
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/brcly--TuxBox#164
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?
@3kynox on GitHub · 2026-11-25 10:36 UTC · original
Summary
dispatch_flagged(#156) records a slot 80 call as an ordinary dispatch and ignores its flags word. The comment above it says the call carries the words of the hardware dispatch packet. Read as the hardware's dispatch initiator, the two flag values XboxBvhBuilder passes are not neutral:0x20USE_THREAD_DIMENSIONS0x8000CS_W32_ENSource:
COMPUTE_DISPATCH_INITIATOR__USE_THREAD_DIMENSIONS__SHIFT 0x5andCOMPUTE_DISPATCH_INITIATOR__CS_W32_EN__SHIFT 0xfin the Linux kernel'sdrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_sh_mask.h.With
USE_THREAD_DIMENSIONSset, X, Y and Z count threads, not thread groups. ProjectScarlett 1.0.2.1 calls slot 80 with:flags=0x20, counts(45, 1, 1)flags=0x8020, counts(1, 1, 1)Recorded as groups, the first call runs 45 whole thread groups where the builder asked for 45 threads. A program whose group size is above one then runs threads the builder never meant to start, and they can write past the end of its buffers.
What I have and have not checked
What a fix needs