From e350f50b2fb6eb58b491e26f24b3b06720d147ec Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Sat, 3 Sep 2022 11:28:26 +0800 Subject: [PATCH] metal: remove PrivateCapabilities's `format_rgb10a2_unorm_surface` field (#2981) * metal: remove PrivateCapabilities's format_rgb10a2_unorm_surface field * Update CHANGELOG --- CHANGELOG.md | 1 + wgpu-hal/src/metal/adapter.rs | 3 +-- wgpu-hal/src/metal/mod.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9af5fc6ab..025546054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ the same every time it is rendered, we now warn if it is missing. #### Metal - Add the missing `msg_send![view, retain]` call within `from_view` by @jinleili in [#2976](https://github.com/gfx-rs/wgpu/pull/2976) - Fix `max_buffer` `max_texture` and `max_vertex_buffers` limits by @jinleili in [#2978](https://github.com/gfx-rs/wgpu/pull/2978) +- Remove PrivateCapabilities's `format_rgb10a2_unorm_surface` field by @jinleili in [#2981](https://github.com/gfx-rs/wgpu/pull/2981) #### Vulkan - Fix `astc_hdr` formats support by @jinleili in [#2971]](https://github.com/gfx-rs/wgpu/pull/2971) diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index cbe7486f5..82e2f1f07 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -286,7 +286,7 @@ impl crate::Adapter for super::Adapter { wgt::TextureFormat::Bgra8UnormSrgb, wgt::TextureFormat::Rgba16Float, ]; - if self.shared.private_caps.format_rgb10a2_unorm_surface { + if self.shared.private_caps.format_rgb10a2_unorm_all { formats.push(wgt::TextureFormat::Rgb10a2Unorm); } @@ -580,7 +580,6 @@ impl super::PrivateCapabilities { format_rgba8_srgb_no_write: !Self::supports_any(device, RGBA8_SRGB), format_rgb10a2_unorm_all: Self::supports_any(device, RGB10A2UNORM_ALL), format_rgb10a2_unorm_no_write: !Self::supports_any(device, RGB10A2UNORM_ALL), - format_rgb10a2_unorm_surface: os_is_mac, format_rgb10a2_uint_color: !Self::supports_any(device, RGB10A2UINT_COLOR_WRITE), format_rgb10a2_uint_color_write: Self::supports_any(device, RGB10A2UINT_COLOR_WRITE), format_rg11b10_all: Self::supports_any(device, RG11B10FLOAT_ALL), diff --git a/wgpu-hal/src/metal/mod.rs b/wgpu-hal/src/metal/mod.rs index 9daa6385f..dee9467e7 100644 --- a/wgpu-hal/src/metal/mod.rs +++ b/wgpu-hal/src/metal/mod.rs @@ -180,7 +180,6 @@ struct PrivateCapabilities { format_rgba8_srgb_no_write: bool, format_rgb10a2_unorm_all: bool, format_rgb10a2_unorm_no_write: bool, - format_rgb10a2_unorm_surface: bool, format_rgb10a2_uint_color: bool, format_rgb10a2_uint_color_write: bool, format_rg11b10_all: bool,