Skip to content

v0.30.22

Choose a tag to compare

@kolkov kolkov released this 16 Jul 09:06
889fb9a

What's Changed

Fixed

  • Metal MSAA texture storage mode crash on Intel Mac — use MTLGPUFamilyApple1 detection instead of hasUnifiedMemory for texture storage mode selection. Non-Apple GPU family devices (Intel/AMD) now always use MTLStorageModePrivate for textures. Apple Silicon keeps MTLStorageModeShared optimization for single-sample textures. Fixes #271.

Details

Intel integrated GPUs (e.g. Iris Plus 655) report hasUnifiedMemory=true but are NOT Apple GPU family. Metal spec requires MTLStorageModePrivate for multisample textures on non-Apple-family devices. Our previous code used hasUnifiedMemory to select MTLStorageModeShared for all textures, causing SIGABRT on the first frame when creating MSAA render targets.

The fix adds isAppleGPU detection via the existing DeviceSupportsFamily(device, MTLGPUFamilyApple1) infrastructure, which is the correct semantic check for storage mode capability. This preserves our MTLStorageModeShared optimization for single-sample textures on Apple Silicon (better than Rust wgpu-hal, which uses Private for all textures unconditionally).

Thanks to @AnyCPU for the detailed bug report with root cause analysis, patch, and regression test.

Full Changelog: v0.30.21...v0.30.22