Skip to content

Commit

Permalink
Fix int64 metal detection
Browse files Browse the repository at this point in the history
  • Loading branch information
atlv24 committed Apr 25, 2024
1 parent 6fb8ae8 commit 157e911
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,10 @@ impl super::PrivateCapabilities {
|| device.supports_family(MTLGPUFamily::Mac2)
|| device.supports_family(MTLGPUFamily::Apple7)),
// https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf#page=6
int64: family_check
&& (device.supports_family(MTLGPUFamily::Apple3)
|| device.supports_family(MTLGPUFamily::Metal3)),
// https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf#page=6
int64_atomics: family_check
&& ((device.supports_family(MTLGPUFamily::Apple8)
&& device.supports_family(MTLGPUFamily::Mac2))
Expand Down Expand Up @@ -895,7 +899,7 @@ impl super::PrivateCapabilities {
}
features.set(
F::SHADER_INT64,
self.msl_version >= MTLLanguageVersion::V2_3,
self.int64 && self.msl_version >= MTLLanguageVersion::V2_3,
);
features.set(
F::SHADER_INT64_ATOMIC_MIN_MAX,
Expand Down

0 comments on commit 157e911

Please sign in to comment.