You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#188601 moved compute dispatch to 3D workgroup counts, but several backend differences remain in the dispatch contract that the Flutter GPU compute API will expose.
Changes
Remove the Vulkan specialization constant that overrides constant_id = 0 with maxComputeWorkGroupSize[0] on every compute pipeline. It silently clobbers any user constant with that id. Convert prefix_sum_test.comp to a literal local_size.
Validate the workgroup size against device limits when a compute pipeline is created, on Metal (the pipeline's maxTotalThreadsPerThreadgroup and the device's per-dimension maximum) and on Vulkan (maxComputeWorkGroupSize and maxComputeWorkGroupInvocations), and fail with a clear error.
Expose the limits on Capabilities: max workgroup invocations, max workgroup size, max workgroup count, max shared memory and the minimum storage-buffer offset alignment.
A dispatch with a zero count is a no-op on every backend instead of an error.
Bindings persist across dispatches within a pass on every backend. Vulkan currently resets the pipeline and bindings after each dispatch.
Fix the Metal compute pass pushing a debug group whose pop only happens in debug builds.
Testing
compute_unittests on Metal and Vulkan: a literal-size prefix sum, an oversized workgroup rejected at pipeline creation, a zero-count dispatch, and two dispatches sharing one set of bindings.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[Impeller] Settle the compute dispatch contract on Metal and Vulkan
[Impeller] Settle the compute dispatch contract on Metal and Vulkan
[Impeller] Settle the compute dispatch contract on Metal and Vulkan
[Flutter GPU] Compute shaders on Metal and Vulkan (flutter#193805)
[Flutter GPU] Compute shaders on Metal and Vulkan (flutter#193805)
github-actions commentedon Nov 9, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.