diff --git a/tests/tests/wgpu-gpu/texture_binding/mod.rs b/tests/tests/wgpu-gpu/texture_binding/mod.rs index 30864c037..74be773a6 100644 --- a/tests/tests/wgpu-gpu/texture_binding/mod.rs +++ b/tests/tests/wgpu-gpu/texture_binding/mod.rs @@ -2,9 +2,9 @@ use std::time::Duration; use wgpu::wgt::BufferDescriptor; use wgpu::{ include_wgsl, BindGroupDescriptor, BindGroupEntry, BindingResource, BufferUsages, - ComputePassDescriptor, ComputePipelineDescriptor, DownlevelFlags, Extent3d, Features, MapMode, - Origin3d, PollType, TexelCopyBufferInfo, TexelCopyBufferLayout, TexelCopyTextureInfo, - TextureAspect, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages, + ComputePassDescriptor, ComputePipelineDescriptor, DownlevelFlags, Extent3d, MapMode, Origin3d, + PollType, TexelCopyBufferInfo, TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect, + TextureDescriptor, TextureDimension, TextureFormat, TextureUsages, }; use wgpu_macros::gpu_test; use wgpu_test::{GpuTestConfiguration, TestParameters, TestingContext}; @@ -14,8 +14,7 @@ static TEXTURE_BINDING: GpuTestConfiguration = GpuTestConfiguration::new() .parameters( TestParameters::default() .test_features_limits() - .downlevel_flags(DownlevelFlags::WEBGPU_TEXTURE_FORMAT_SUPPORT) - .features(Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES), + .downlevel_flags(DownlevelFlags::WEBGPU_TEXTURE_FORMAT_SUPPORT), ) .run_sync(texture_binding); @@ -71,8 +70,7 @@ static SINGLE_SCALAR_LOAD: GpuTestConfiguration = GpuTestConfiguration::new() .parameters( TestParameters::default() .test_features_limits() - .downlevel_flags(DownlevelFlags::WEBGPU_TEXTURE_FORMAT_SUPPORT) - .features(Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES), + .downlevel_flags(DownlevelFlags::WEBGPU_TEXTURE_FORMAT_SUPPORT), ) .run_sync(single_scalar_load); diff --git a/wgpu-core/src/binding_model.rs b/wgpu-core/src/binding_model.rs index 76dbdfc55..1efa94338 100644 --- a/wgpu-core/src/binding_model.rs +++ b/wgpu-core/src/binding_model.rs @@ -37,8 +37,6 @@ use crate::{ pub enum BindGroupLayoutEntryError { #[error("Cube dimension is not expected for texture storage")] StorageTextureCube, - #[error("Read-write and read-only storage textures are not allowed by baseline webgpu, they require the native only feature TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES")] - StorageTextureReadWrite, #[error("Atomic storage textures are not allowed by baseline webgpu, they require the native only feature TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES")] StorageTextureAtomic, #[error("Arrays of bindings unsupported for this type of binding")] diff --git a/wgpu-core/src/device/resource.rs b/wgpu-core/src/device/resource.rs index 2a5e665ac..c169469e9 100644 --- a/wgpu-core/src/device/resource.rs +++ b/wgpu-core/src/device/resource.rs @@ -1989,17 +1989,6 @@ impl Device { error: BindGroupLayoutEntryError::StorageTextureAtomic, }); } - wgt::StorageTextureAccess::ReadOnly - | wgt::StorageTextureAccess::ReadWrite - if !self.features.contains( - wgt::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES, - ) => - { - return Err(binding_model::CreateBindGroupLayoutError::Entry { - binding: entry.binding, - error: BindGroupLayoutEntryError::StorageTextureReadWrite, - }); - } _ => (), } ( @@ -2009,16 +1998,8 @@ impl Device { ), match access { wgt::StorageTextureAccess::WriteOnly => WritableStorage::Yes, - wgt::StorageTextureAccess::ReadOnly => { - required_features |= - wgt::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES; - WritableStorage::No - } - wgt::StorageTextureAccess::ReadWrite => { - required_features |= - wgt::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES; - WritableStorage::Yes - } + wgt::StorageTextureAccess::ReadOnly => WritableStorage::No, + wgt::StorageTextureAccess::ReadWrite => WritableStorage::Yes, wgt::StorageTextureAccess::Atomic => { required_features |= wgt::Features::TEXTURE_ATOMIC; WritableStorage::Yes