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>
This commit is contained in:
parent
e53a7cc874
commit
e1bdfa8d32
|
@ -150,16 +150,8 @@ namespace dawn_native {
|
|||
}
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.textureView->GetDimension() != bindingInfo.texture.viewDimension) {
|
||||
return DAWN_VALIDATION_ERROR("Texture view dimension mismatch");
|
||||
|
|
|
@ -472,12 +472,9 @@ TEST_F(BindGroupValidationTest, TextureSampleType) {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue