Remove float filterable texture types support as blendable
Now that the float32-blendable feature has been enabled by default since
Chrome 132, we can now remove the incorrect support as blendable for
float filterable texture types.
Bug: 364987733
Change-Id: Icd0c61ed781daf585207bb269503a2cabcd9be32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/221955
Commit-Queue: Fr <beaufort.francois@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/native/RenderPipeline.cpp b/src/dawn/native/RenderPipeline.cpp
index 8123ce8..19fa172 100644
--- a/src/dawn/native/RenderPipeline.cpp
+++ b/src/dawn/native/RenderPipeline.cpp
@@ -29,9 +29,7 @@
#include <algorithm>
#include <cmath>
-#include <string>
-#include "absl/strings/str_format.h"
#include "dawn/common/BitSetIterator.h"
#include "dawn/common/Enumerator.h"
#include "dawn/common/ityp_array.h"
@@ -41,7 +39,6 @@
#include "dawn/native/CommandValidation.h"
#include "dawn/native/Commands.h"
#include "dawn/native/Device.h"
-#include "dawn/native/Instance.h"
#include "dawn/native/InternalPipelineStore.h"
#include "dawn/native/ObjectContentHasher.h"
#include "dawn/native/ObjectType_autogen.h"
@@ -521,17 +518,8 @@
DAWN_INVALID_IF(!format->IsColor() || !format->isRenderable,
"Color format (%s) is not color renderable.", format->format);
- if (descriptor.blend && !format->isBlendable) {
- DAWN_INVALID_IF(
- !(format->GetAspectInfo(Aspect::Color).supportedSampleTypes & SampleTypeBit::Float),
- "Blending is enabled but color format (%s) is not blendable.", format->format);
-
- std::string warning = absl::StrFormat(
- "Blending for color format (%s) requires the %s feature. Enabling "
- "blendability with %s was an implementation bug and is deprecated.",
- format->format, ToAPI(Feature::Float32Blendable), ToAPI(Feature::Float32Filterable));
- device->EmitWarningOnce(warning.c_str());
- }
+ DAWN_INVALID_IF(descriptor.blend && !format->isBlendable,
+ "Blending is enabled but color format (%s) is not blendable.", format->format);
if (!fragmentWritten) {
DAWN_INVALID_IF(
diff --git a/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp
index 5388913..3cda8ca 100644
--- a/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp
@@ -549,30 +549,6 @@
}
}
-class Float32FilterableValidationTest : public RenderPipelineValidationTest {
- protected:
- std::vector<wgpu::FeatureName> GetRequiredFeatures() override {
- return {wgpu::FeatureName::Float32Filterable};
- }
-};
-
-// TODO(crbug.com/364987733): Remove this test once float filterable texture types
-// are not considered blendable.
-// Tests that blending a float32 color formats without the float32-blendable feature
-// is still valid with the float32-filterable feature.
-TEST_F(Float32FilterableValidationTest, Float32BlendableFormatsWithoutFeature) {
- for (const auto f32Format : {wgpu::TextureFormat::R32Float, wgpu::TextureFormat::RG32Float,
- wgpu::TextureFormat::RGBA32Float}) {
- utils::ComboRenderPipelineDescriptor descriptor;
- descriptor.vertex.module = vsModule;
- descriptor.cFragment.module = fsModule;
- descriptor.cTargets[0].blend = &descriptor.cBlends[0];
- descriptor.cTargets[0].format = f32Format;
-
- device.CreateRenderPipeline(&descriptor);
- }
-}
-
// Tests that the format of the color state descriptor must match the output of the fragment shader.
TEST_F(RenderPipelineValidationTest, FragmentOutputFormatCompatibility) {
std::vector<std::vector<std::string>> kScalarTypeLists = {// Float scalar types