From 8e5ac75d45369b1e8693739d25b581db23043e0e Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Sat, 14 May 2022 09:06:06 +0800 Subject: [PATCH] metal: fix `Rgb9e5Ufloat` capabilities and `sampler_lod_average` support (#2656) --- wgpu-hal/src/metal/adapter.rs | 7 ++----- wgpu-hal/src/metal/mod.rs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index c11c98b4cd..53201c1472 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -202,7 +202,7 @@ impl crate::Adapter for super::Adapter { } else if pc.msaa_desktop { Tfc::SAMPLED_LINEAR } else { - Tfc::STORAGE + Tfc::SAMPLED_LINEAR | Tfc::COLOR_ATTACHMENT | Tfc::COLOR_ATTACHMENT_BLEND | Tfc::MULTISAMPLE @@ -523,10 +523,7 @@ impl super::PrivateCapabilities { MUTABLE_COMPARISON_SAMPLER_SUPPORT, ), sampler_clamp_to_border: Self::supports_any(device, SAMPLER_CLAMP_TO_BORDER_SUPPORT), - sampler_lod_average: { - // TODO: Clarify minimum macOS version with Apple (43707452) - version.at_least((10, 13), (9, 0)) - }, + sampler_lod_average: { version.at_least((11, 0), (9, 0)) }, base_instance: Self::supports_any(device, BASE_INSTANCE_SUPPORT), base_vertex_instance_drawing: Self::supports_any(device, BASE_VERTEX_INSTANCE_SUPPORT), dual_source_blending: Self::supports_any(device, DUAL_SOURCE_BLEND_SUPPORT), diff --git a/wgpu-hal/src/metal/mod.rs b/wgpu-hal/src/metal/mod.rs index 5c4f6338b0..540980a5a4 100644 --- a/wgpu-hal/src/metal/mod.rs +++ b/wgpu-hal/src/metal/mod.rs @@ -261,7 +261,7 @@ impl AdapterShared { Self { disabilities: PrivateDisabilities::new(&device), - private_caps: PrivateCapabilities::new(&device), + private_caps, device: Mutex::new(device), settings: Settings::default(), }