From de809c8f96ba18084873355a917fbdfc5426ea90 Mon Sep 17 00:00:00 2001 From: Vladas Zakrevskis <146100@gmail.com> Date: Wed, 29 May 2024 19:00:32 +0100 Subject: [PATCH] Fix missing family check flag (#5754) Co-authored-by: Jim Blandy Co-authored-by: Xiaopeng Li Co-authored-by: Connor Fitzgerald Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> Co-authored-by: Valaphee The Meerkat <32491319+valaphee@users.noreply.github.com> Co-authored-by: Andreas Reich --- CHANGELOG.md | 4 ++++ wgpu-hal/src/metal/adapter.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a13590d0b..ff3eb46b99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,10 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410) - Ensure render pipelines have at least 1 target. By @ErichDonGubler in [#5715](https://github.com/gfx-rs/wgpu/pull/5715) +#### Metal + +- Fix unrecognized selector crash on iOS 12. By @vladasz in [#5744](https://github.com/gfx-rs/wgpu/pull/5744). + #### Vulkan - Fix enablement of subgroup ops extension on Vulkan devices that don't support Vulkan 1.3. By @cwfitzgerald in [#5624](https://github.com/gfx-rs/wgpu/pull/5624). diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index 2f84be8859..0ffe37f5e7 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -736,7 +736,9 @@ impl super::PrivateCapabilities { 4 }, // Per https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf - max_color_attachment_bytes_per_sample: if device.supports_family(MTLGPUFamily::Apple4) { + max_color_attachment_bytes_per_sample: if family_check + && device.supports_family(MTLGPUFamily::Apple4) + { 64 } else { 32