Skip to content

Commit

Permalink
metal: fix some supported limits
Browse files Browse the repository at this point in the history
  • Loading branch information
jinleili authored and kvark committed Apr 19, 2022
1 parent 6d7c092 commit 0b61a19
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ impl super::PrivateCapabilities {
max_varying_components: if device
.supports_feature_set(MTLFeatureSet::macOS_GPUFamily1_v1)
{
128
124
} else {
60
},
Expand All @@ -680,11 +680,7 @@ impl super::PrivateCapabilities {
} else {
512
},
max_total_threadgroup_memory: if device
.supports_feature_set(MTLFeatureSet::iOS_GPUFamily4_v2)
{
64 << 10
} else if Self::supports_any(
max_total_threadgroup_memory: if Self::supports_any(
device,
&[
MTLFeatureSet::iOS_GPUFamily4_v1,
Expand Down Expand Up @@ -833,13 +829,12 @@ impl super::PrivateCapabilities {
max_push_constant_size: 0x1000,
min_uniform_buffer_offset_alignment: self.buffer_alignment as u32,
min_storage_buffer_offset_alignment: self.buffer_alignment as u32,
//TODO: double-check how these match Metal feature set tables
max_inter_stage_shader_components: self.max_varying_components,
max_compute_workgroup_storage_size: self.max_total_threadgroup_memory,
max_compute_invocations_per_workgroup: self.max_threads_per_group,
max_compute_workgroup_size_x: 256,
max_compute_workgroup_size_y: 256,
max_compute_workgroup_size_z: 64,
max_compute_workgroup_size_x: self.max_threads_per_group,
max_compute_workgroup_size_y: self.max_threads_per_group,
max_compute_workgroup_size_z: self.max_threads_per_group,
max_compute_workgroups_per_dimension: 0xFFFF,
},
alignments: crate::Alignments {
Expand Down

0 comments on commit 0b61a19

Please sign in to comment.