Remove deprecated depth texture sampling path
Removes deprecated path for sampling depth textures with
float/unfilterable-float. Attempting to do so now results in a
validation error.
Bug: dawn:1021
Change-Id: I112f45e7227ab1caaf0d6ed203194295e7022db2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61861
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
diff --git a/src/dawn_native/BindGroup.cpp b/src/dawn_native/BindGroup.cpp
index 4f5f904..d32ddd1 100644
--- a/src/dawn_native/BindGroup.cpp
+++ b/src/dawn_native/BindGroup.cpp
@@ -150,15 +150,7 @@
}
if ((supportedTypes & requiredType) == 0) {
- if (IsSubset(SampleTypeBit::Depth, supportedTypes) != 0 &&
- IsSubset(requiredType,
- SampleTypeBit::Float | SampleTypeBit::UnfilterableFloat)) {
- device->EmitDeprecationWarning(
- "Using depth textures with 'float' or 'unfilterable-float' texture "
- "bindings is deprecated. Use 'depth' instead.");
- } else {
- return DAWN_VALIDATION_ERROR("Texture component type usage mismatch");
- }
+ return DAWN_VALIDATION_ERROR("Texture component type usage mismatch");
}
if (entry.textureView->GetDimension() != bindingInfo.texture.viewDimension) {
diff --git a/src/tests/unittests/validation/BindGroupValidationTests.cpp b/src/tests/unittests/validation/BindGroupValidationTests.cpp
index ca469c1..a53cb7d 100644
--- a/src/tests/unittests/validation/BindGroupValidationTests.cpp
+++ b/src/tests/unittests/validation/BindGroupValidationTests.cpp
@@ -472,12 +472,9 @@
DoTest(false, wgpu::TextureFormat::R32Float, wgpu::TextureSampleType::Uint);
DoTest(false, wgpu::TextureFormat::R32Float, wgpu::TextureSampleType::Sint);
- // Test that Depth32Float is only compatible with depth. float/unfilterable-float is deprecated.
- // TODO(crbug.com/dawn/1021): Disallow using float/unfilterable-float with depth textures.
- EXPECT_DEPRECATION_WARNING(
- DoTest(true, wgpu::TextureFormat::Depth32Float, wgpu::TextureSampleType::Float));
- EXPECT_DEPRECATION_WARNING(DoTest(true, wgpu::TextureFormat::Depth32Float,
- wgpu::TextureSampleType::UnfilterableFloat));
+ // Test that Depth32Float is only compatible with depth.
+ DoTest(false, wgpu::TextureFormat::Depth32Float, wgpu::TextureSampleType::Float);
+ DoTest(false, wgpu::TextureFormat::Depth32Float, wgpu::TextureSampleType::UnfilterableFloat);
DoTest(true, wgpu::TextureFormat::Depth32Float, wgpu::TextureSampleType::Depth);
DoTest(false, wgpu::TextureFormat::Depth32Float, wgpu::TextureSampleType::Uint);
DoTest(false, wgpu::TextureFormat::Depth32Float, wgpu::TextureSampleType::Sint);