mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
Stop using storage usage for sampling (#2703)
This commit is contained in:
parent
c12ae0880f
commit
fd954a2bd6
@ -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 {
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user