-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
backend: metalIssues with MetalIssues with Metaltype: enhancementNew feature or requestNew feature or request
Description
Metal passthrough shaders don't expose options like wg_memory_sizes
, which is required for threadgroup memory to my knowledge. Therefore, passthrough shaders can't use threadgroup memory.
It comes from this code in wgpu_hal::metal::Device::create_compute_pipeline
. This will also have an impact on mesh shaders when they arrive.
let cs = if let ShaderModuleSource::Passthrough(desc) = &module.source {
CompiledShader {
library: desc.library.clone(),
function: desc.function.clone(),
wg_size: MTLSize::new(
desc.num_workgroups.0 as u64,
desc.num_workgroups.1 as u64,
desc.num_workgroups.2 as u64,
),
wg_memory_sizes: vec![],
sized_bindings: vec![],
immutable_buffer_mask: 0,
}
} else {
self.load_shader(
&desc.stage,
&[],
desc.layout,
MTLPrimitiveTopologyClass::Unspecified,
naga::ShaderStage::Compute,
)?
};
I'm not exactly sure what sized_bindings
or immutable_buffer_mask
refer to, but they might cause their own limitations as well.
Metadata
Metadata
Assignees
Labels
backend: metalIssues with MetalIssues with Metaltype: enhancementNew feature or requestNew feature or request