compute: buffer_store_format_* and the d16 forms with the format taken from the descriptor #1542
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1542
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?
@denn0x on GitHub · 2026-11-24 13:47 UTC · original
Problem
Measured on the 349 gfx1013 compute programs (device slot 67 pipelines) that the executable created in one run past start-up, and on the 627 dispatches of one busy frame after loading. 50 programs (69 of the busy frame's dispatches) stop at a formatted buffer store:
buffer_store_format_d16_x(49 dispatches),buffer_store_format_xyzw,buffer_store_format_d16_xyzw,buffer_store_format_xyz. The data format is in word 3 of the buffer descriptor, known only at run time.Proposal
Mirror the run-time
buffer_load_formatlowering: pass word 3 of the descriptor as an entry constant, read theformat (bits 18:12) in the shader and select the packing:
16_16_FLOAT,16_16_16_16_FLOAT:f32tof16pairs per dword.8_8_8_8_UNORM,16_16_UNORM,10_10_10_2_UNORM: saturate, scale, round and pack.InterlockedAnd/InterlockedOr(no 16-bit raw stores below SM 6.2).
Alternatives
A per-format specialisation chosen when the dispatch is recorded, at the cost of one pipeline per format.
Verification
A source-built gfx1013 fixture (LLVM 15
llvm-mc, as the existingcompute_store_check.pyandpixel_aot_check.pyfixtures) that uses the instructions, translated and dispatched on WARP, with the UAV read back and compared with
expected words. Include a negative control (an operand form or modifier the lowering refuses).
Checklist
AI-assisted (Claude Code).
@SimSalabimse on GitHub · 2026-11-24 14:41 UTC · original
I'd like to take this one: lower buffer_store_format_* and the d16 forms with the format read from the descriptor, with a source-built gfx1013 fixture dispatched on WARP (plus RTX 4070 Ti) and a negative control. I'll keep it to the store forms only.