Skip to content

Commit

Permalink
Metal: Only call supports_family when supported, and use Apple6 for A…
Browse files Browse the repository at this point in the history
…STC check
  • Loading branch information
superdump committed Feb 4, 2022
1 parent bf0fbf8 commit 974b5d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,10 @@ impl super::PrivateCapabilities {
format_bc: os_is_mac,
format_eac_etc: !os_is_mac
// M1 in macOS supports EAC/ETC2
|| device.supports_family(MTLGPUFamily::Apple7),
|| (family_check && device.supports_family(MTLGPUFamily::Apple7)),
format_astc: Self::supports_any(device, ASTC_PIXEL_FORMAT_FEATURES)
// A14/M1 always support ASTC
|| device.supports_family(MTLGPUFamily::Apple7),
// A13/A14/M1 and later always support ASTC
|| (family_check && device.supports_family(MTLGPUFamily::Apple6)),
format_any8_unorm_srgb_all: Self::supports_any(device, ANY8_UNORM_SRGB_ALL),
format_any8_unorm_srgb_no_write: !Self::supports_any(device, ANY8_UNORM_SRGB_ALL)
&& !os_is_mac,
Expand Down

0 comments on commit 974b5d3

Please sign in to comment.