Fix int64 metal detection (#5604)

This commit is contained in:
vero 2024-04-24 20:13:26 -07:00 committed by GitHub
parent 671a2a8227
commit 34aab34c00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -817,6 +817,10 @@ impl super::PrivateCapabilities {
&& (device.supports_family(MTLGPUFamily::Metal3)
|| device.supports_family(MTLGPUFamily::Mac2)
|| device.supports_family(MTLGPUFamily::Apple7)),
// https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf#page=5
int64: family_check
&& (device.supports_family(MTLGPUFamily::Apple3)
|| device.supports_family(MTLGPUFamily::Metal3)),
}
}
@ -890,7 +894,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(

View File

@ -270,6 +270,7 @@ struct PrivateCapabilities {
has_unified_memory: Option<bool>,
timestamp_query_support: TimestampQuerySupport,
supports_simd_scoped_operations: bool,
int64: bool,
}
#[derive(Clone, Debug)]