From 1e7fa480a14584aa57215d57b9e2c775d515c7dd Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Fri, 8 Jan 2021 15:10:08 -0500 Subject: [PATCH] Make all textures support their guaranteed usages --- wgpu-core/src/instance.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs index e3bede82f6..19783199c5 100644 --- a/wgpu-core/src/instance.rs +++ b/wgpu-core/src/instance.rs @@ -263,7 +263,7 @@ impl Adapter { ))) .optimal_tiling; - let mut allowed_usages = wgt::TextureUsage::empty(); + let mut allowed_usages = format.describe().guaranteed_format_features.allowed_usages; if texture_format_properties.contains(hal::format::ImageFeature::SAMPLED) { allowed_usages |= wgt::TextureUsage::SAMPLED; } @@ -276,12 +276,6 @@ impl Adapter { if texture_format_properties.contains(hal::format::ImageFeature::DEPTH_STENCIL_ATTACHMENT) { allowed_usages |= wgt::TextureUsage::RENDER_ATTACHMENT; } - if texture_format_properties.contains(hal::format::ImageFeature::BLIT_SRC) { - allowed_usages |= wgt::TextureUsage::COPY_SRC; - } - if texture_format_properties.contains(hal::format::ImageFeature::BLIT_DST) { - allowed_usages |= wgt::TextureUsage::COPY_DST; - } let mut flags = wgt::TextureFormatFeatureFlags::empty(); if texture_format_properties.contains(hal::format::ImageFeature::STORAGE_ATOMIC) {