vello/vello_shaders
Arman Uguray 4f445c2e0a [vello_shaders] Provide workgroup shared memory allocation sizes
Naga traslates workgroup variable declarations to threadgroup
address-space entry-point parameters when generating MSL. Metal API
validation requires that the memory sizes for these parameters be set
explicitly by calling setThreadgroupMemoryLength:index on the
MTLComputeCommandEncoder.

The crate now calculates the required memory size for global workgroup
variables that are accessed by the entry point and provides them
alongside the binding list. This is abstracted separately from the
binding list.

While the current usage that we're aware of is limited to Metal, this
information is being provided as part of the generic ComputeShader type
instead of a MSL-specific type, as the information itself is computed
from the parsed WGSL IR and not specific to Metal.
2023-03-29 10:38:10 -07:00
..
src [vello_shaders] Provide workgroup shared memory allocation sizes 2023-03-29 10:38:10 -07:00
build.rs [vello_shaders] Provide workgroup shared memory allocation sizes 2023-03-29 10:38:10 -07:00
Cargo.toml [vello_shaders] Use thiserror::Error for the library Error type 2023-03-29 10:38:10 -07:00