Stop using storage usage for sampling (#2703)

This commit is contained in:
Connor Fitzgerald 2022-05-29 19:52:41 -04:00 committed by GitHub
parent c12ae0880f
commit fd954a2bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View File

@ -1017,16 +1017,6 @@ impl<A: HalApi> Device<A> {
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<A: HalApi> Device<A> {
}
Ok((
wgt::TextureUsages::TEXTURE_BINDING,
view.sampled_internal_use,
hal::TextureUses::RESOURCE,
))
}
wgt::BindingType::StorageTexture {

View File

@ -385,8 +385,6 @@ pub struct TextureView<A: hal::Api> {
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,
}