diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt index be00e2b07b3..9283f20f7a1 100644 --- a/filament/backend/CMakeLists.txt +++ b/filament/backend/CMakeLists.txt @@ -526,6 +526,8 @@ if (APPLE AND NOT IOS) add_executable(metal_utils_test test/MetalTest.mm) +target_compile_options(metal_utils_test PRIVATE "-fobjc-arc") + target_link_libraries(metal_utils_test PRIVATE backend getopt diff --git a/filament/backend/src/metal/MetalState.h b/filament/backend/src/metal/MetalState.h index 1e14cddc258..3948c78aec9 100644 --- a/filament/backend/src/metal/MetalState.h +++ b/filament/backend/src/metal/MetalState.h @@ -434,7 +434,7 @@ class MetalBufferBindings { private: static_assert(N <= 8); - std::array<__unsafe_unretained id, N> mBuffers = { nil }; + std::array<__weak id, N> mBuffers = { nil }; std::array mOffsets = { 0 }; utils::bitset8 mDirtyBuffers; utils::bitset8 mDirtyOffsets;