From 09c64ffe9fd8d52d097d84a349c5d4e67eb994f0 Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Tue, 27 Dec 2022 16:27:55 +0000 Subject: [PATCH] Remove redundant bitwise OR `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` (#7033) # Objective `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` was already included in `adapter.features()` on non-wasm target, and since it is the default value for `WgpuSettings.features`, the subsequent code will also combine into this feature: https://github.com/bevyengine/bevy/blob/b6066c30b6cfa7bffa598d45706dbe6e46ad24fc/crates/bevy_render/src/renderer/mod.rs#L155-L156 --- crates/bevy_render/src/renderer/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/renderer/mod.rs b/crates/bevy_render/src/renderer/mod.rs index 6f697ca7d0..aa362a3d9b 100644 --- a/crates/bevy_render/src/renderer/mod.rs +++ b/crates/bevy_render/src/renderer/mod.rs @@ -137,7 +137,7 @@ pub async fn initialize_renderer( let mut features = wgpu::Features::empty(); let mut limits = options.limits.clone(); if matches!(options.priority, WgpuSettingsPriority::Functionality) { - features = adapter.features() | wgpu::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES; + features = adapter.features(); if adapter_info.device_type == wgpu::DeviceType::DiscreteGpu { // `MAPPABLE_PRIMARY_BUFFERS` can have a significant, negative performance impact for // discrete GPUs due to having to transfer data across the PCI-E bus and so it