upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/opus_decoder/leonida_opus_decoder.h
diff options
context:
space:
mode:
authorTyrannys <80750971+Tyrannys@users.noreply.github.com>2026-11-26 02:27:26 -0600
committerTyrannys <80750971+Tyrannys@users.noreply.github.com>2026-11-26 02:27:26 -0600
commit7a761696dcef8cb2415c3000dfc3c4196675263b (patch)
treeb8647c0e4f1bf89e20e0fe4cec6feb6c900e3676 /runtime/opus_decoder/leonida_opus_decoder.h
parenta73a57e1339be072baf5522351c8ec7f1482b56b (diff)
indirect clamp: bound dispatch records by the device's maxComputeWorkGroupCount
The ExecuteIndirect argument clamp (indirect_clamp.comp) cut every dispatch record at a fixed 65,535 groups per dimension, Vulkan's guaranteed minimum. Devices report far more in x (NVIDIA: 2^31 - 1), so a one-dimensional indirect dispatch of more than 65,535 groups ran only its first 65,535 groups; the rest never wrote their output. The clamp now takes the device's maxComputeWorkGroupCount per axis in its push constants (88 bytes, was 72) and bounds dispatch records by that. The 2^20 groups-per-dispatch cap, the list budget and LEONIDA_INDIRECT_GROUP_BUDGET are unchanged; the product check now divides instead of multiplying, since x alone may exceed 65,535. Mesh dispatches keep 65,535 in x. indirect_clamp_test runs real indirect dispatches through the clamped scratch with a marker shader (one atomic per group): 70,000 x 1 x 1 ran 65,535 groups and left 4,465 unrun on main, and runs all 70,000 exactly once now; 65,535 x 1 x 1 and 1 x 65,535 x 1 (at the old limit) run exactly once on both. A size past the device's own limit is skipped. Idea from codec-d/cool_fox docs/findings.md ("Blocky patches: indirect dispatches cut at 65,535 groups"); idea only, no code taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/opus_decoder/leonida_opus_decoder.h')
0 files changed, 0 insertions, 0 deletions