8000 Filament's Metal backend fails to compile on macOS with Xcode 15.x · Issue #8848 · google/filament · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Filament's Metal backend fails to compile on macOS with Xcode 15.x #8848
Open
@aGaneshBanda

Description

@aGaneshBanda

⚠️ Issues not using this template will be systematically closed.

Describe the bug
Filament's Metal backend fails to compile on macOS with Xcode 15.x (specifically SDK 15.4) due to the use of deprecated MTLPixelFormatPVRTC_* pixel formats and potentially MTLGPUFamilyMac1. The compiler treats these deprecation warnings as errors due to the -Werror,-Wdeprecated-declarations flag.

To Reproduce
Steps to reproduce the behavior:

  1. Environment:
    • macOS: [Specify your macOS version, e.g., Sonoma 15.0 Beta or later version corresponding to SDK 15.4]
    • Xcode: [Specify your Xcode version, e.g., Xcode 15.4]
    • SDK: MacOSX15.4.sdk
  2. Filament Version: v1.61.0 (though the issue was originally observed with v1.3.0 and persists even after attempting to upgrade and clean build.)
  3. Clone Filament:
    git clone [https://github.com/google/filament.git](https://github.com/google/filament.git)
    cd filament
    git checkout v1.61.0
  4. Attempt to build Filament's backend component:
    mkdir out && cd out
    cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release
    ninja
    (Alternatively, if the error appears when building a larger project that integrates Filament as a subproject, describe that build process instead).

Expected behavior
Filament's Metal backend should compile successfully on macOS with Xcode 15.x without deprecation errors, either by using non-deprecated Metal APIs or by appropriately suppressing specific deprecation warnings to avoid [-Werror,-Wdeprecated-declarations] failures.

Logs

In file included from /Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalDriver.mm:28:
/Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalEnums.h:226:18: error: 'MTLPixelFormatPVRTC_RGBA_2BPP_sRGB' is deprecated: first deprecated in macOS 15.0 - Usage of ASTC/ETC2/BC formats is recommended instead. [-Werror,-Wdeprecated-declarations]
226 | case MTLPixelFormatPVRTC_RGBA_2BPP_sRGB: return MTLPixelFormatPVRTC_RGBA_2BPP;
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:130:5: note: 'MTLPixelFormatPVRTC_RGBA_2BPP_sRGB' has been explicitly marked deprecated here
130 | MTLPixelFormatPVRTC_RGBA_2BPP_sRGB API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 165,
| ^
In file included from /Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalDriver.mm:28:
/Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalEnums.h:226:61: error: 'MTLPixelFormatPVRTC_RGBA_2BPP' is deprecated: first deprecated in macOS 15.0 - Usage of ASTC/ETC2/BC formats is recommended instead. [-Werror,-Wdeprecated-declarations]
226 | case MTLPixelFormatPVRTC_RGBA_2BPP_sRGB: return MTLPixelFormatPVRTC_RGBA_2BPP;
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:129:5: note: 'MTLPixelFormatPVRTC_RGBA_2BPP' has been explicitly marked deprecated here
129 | MTLPixelFormatPVRTC_RGBA_2BPP API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 164,
| ^
In file included from /Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalDriver.mm:28:
/Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalEnums.h:227:18: error: 'MTLPixelFormatPVRTC_RGBA_4BPP_sRGB' is deprecated: first deprecated in macOS 15.0 - Usage of ASTC/ETC2/BC formats is recommended instead. [-Werror,-Wdeprecated-declarations]
227 | case MTLPixelFormatPVRTC_RGBA_4BPP_sRGB: return MTLPixelFormatPVRTC_RGBA_4BPP;
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:132:5: note: 'MTLPixelFormatPVRTC_RGBA_4BPP_sRGB' has been explicitly marked deprecated here
132 | MTLPixelFormatPVRTC_RGBA_4BPP_sRGB API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 167,
| ^
In file included from /Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalDriver.mm:28:
/Users/ganeshbanda/work/customers/linklabs/echoDNAAnimation/libs/filament/filament/backend/src/metal/MetalEnums.h:227:61: error: 'MTLPixelFormatPVRTC_RGBA_4BPP' is deprecated: first deprecated in macOS 15.0 - Usage of ASTC/ETC2/BC formats is recommended instead. [-Werror,-Wdeprecated-declarations]
227 | case MTLPixelFormatPVRTC_RGBA_4BPP_sRGB: return MTLPixelFormatPVRTC_RGBA_4BPP;
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:131:5: note: 'MTLPixelFormatPVRTC_RGBA_4BPP' has been explicitly marked deprecated here
131 | MTLPixelFormatPVRTC_RGBA_4BPP API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 166,
| ^

Desktop (please complete the following information):

  • OS: macOS [Your macOS version, e.g., 14.x Sonoma]
  • GPU: [Your specific Mac's GPU, e.g., Apple M3 Max, AMD Radeon Pro 580] (This is a compilation issue, so GPU isn't strictly relevant, but good to include for completeness.)
  • Backend: Metal

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A

Additional context
This issue occurs when trying to compile Filament on newer macOS versions with recent Xcode SDKs. The MTLPixelFormatPVRTC_* pixel formats are deprecated in macOS 15.0, and MTLGPUFamilyMac1 is deprecated in macOS 13.0. The build system's -Werror flag then causes these warnings to halt compilation. While v1.61.0 of Filament is expected to handle these deprecations, the error persists, suggesting a potential regression or a very specific environment interaction.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0