Skip to content

Commit

Permalink
Argument Buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Dec 23, 2024
1 parent 36c0f51 commit 793f047
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,6 @@ const RESOURCE_HEAP_SUPPORT: &[MTLFeatureSet] = &[
MTLFeatureSet::macOS_GPUFamily1_v3,
];

const ARGUMENT_BUFFER_SUPPORT: &[MTLFeatureSet] = &[
MTLFeatureSet::iOS_GPUFamily1_v4,
MTLFeatureSet::tvOS_GPUFamily1_v3,
MTLFeatureSet::macOS_GPUFamily1_v3,
];

const MUTABLE_COMPARISON_SAMPLER_SUPPORT: &[MTLFeatureSet] = &[
MTLFeatureSet::iOS_GPUFamily3_v1,
MTLFeatureSet::macOS_GPUFamily1_v1,
Expand Down Expand Up @@ -610,7 +604,7 @@ impl super::PrivateCapabilities {
},
msaa_apple7: family_check && device.supports_family(MTLGPUFamily::Apple7),
resource_heaps: Self::supports_any(device, RESOURCE_HEAP_SUPPORT),
argument_buffers: Self::supports_any(device, ARGUMENT_BUFFER_SUPPORT),
argument_buffers: device.argument_buffers_support(),
shared_textures: !os_is_mac,
mutable_comparison_samplers: Self::supports_any(
device,
Expand Down Expand Up @@ -907,7 +901,9 @@ impl super::PrivateCapabilities {
| F::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING
| F::UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING
| F::PARTIALLY_BOUND_BINDING_ARRAY,
self.msl_version >= MTLLanguageVersion::V3_0 && self.supports_arrays_of_textures,
self.msl_version >= MTLLanguageVersion::V3_0
&& self.supports_arrays_of_textures
&& self.argument_buffers as u64 >= metal::MTLArgumentBuffersTier::Tier2 as u64,
);
features.set(
F::SHADER_INT64,
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/metal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ struct PrivateCapabilities {
msaa_apple3: bool,
msaa_apple7: bool,
resource_heaps: bool,
argument_buffers: bool,
argument_buffers: metal::MTLArgumentBuffersTier,
shared_textures: bool,
mutable_comparison_samplers: bool,
sampler_clamp_to_border: bool,
Expand Down

0 comments on commit 793f047

Please sign in to comment.