From fd954a2bd6e19e2954495e03ca171d4a1264a2d5 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Sun, 29 May 2022 19:52:41 -0400 Subject: [PATCH] Stop using storage usage for sampling (#2703) --- wgpu-core/src/device/mod.rs | 12 +----------- wgpu-core/src/resource.rs | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 24fa72e57..5dfe33f63 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -1017,16 +1017,6 @@ impl Device { format_features: texture.format_features, extent, samples: texture.desc.sample_count, - // once a storage - forever a storage - sampled_internal_use: if texture - .desc - .usage - .contains(wgt::TextureUsages::STORAGE_BINDING) - { - hal::TextureUses::RESOURCE | hal::TextureUses::STORAGE_READ - } else { - hal::TextureUses::RESOURCE - }, selector, life_guard: LifeGuard::new(desc.label.borrow_or_default()), }) @@ -1996,7 +1986,7 @@ impl Device { } Ok(( wgt::TextureUsages::TEXTURE_BINDING, - view.sampled_internal_use, + hal::TextureUses::RESOURCE, )) } wgt::BindingType::StorageTexture { diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index a47e064f4..d400338b5 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -385,8 +385,6 @@ pub struct TextureView { pub(crate) format_features: wgt::TextureFormatFeatures, pub(crate) extent: wgt::Extent3d, pub(crate) samples: u32, - /// Internal use of this texture view when used as `BindingType::Texture`. - pub(crate) sampled_internal_use: hal::TextureUses, pub(crate) selector: TextureSelector, pub(crate) life_guard: LifeGuard, }