diff --git a/src/dawn_native/RenderPipeline.cpp b/src/dawn_native/RenderPipeline.cpp index 8ad0b8f070..c1c33356d1 100644 --- a/src/dawn_native/RenderPipeline.cpp +++ b/src/dawn_native/RenderPipeline.cpp @@ -259,11 +259,6 @@ namespace dawn_native { blendFactor == wgpu::BlendFactor::SrcAlphaSaturated; } - bool BlendFactorContainsSrc(const wgpu::BlendFactor& blendFactor) { - return blendFactor == wgpu::BlendFactor::Src || - blendFactor == wgpu::BlendFactor::OneMinusSrc; - } - MaybeError ValidateColorTargetState( DeviceBase* device, const ColorTargetState* descriptor, @@ -312,13 +307,6 @@ namespace dawn_native { "Color blending factor is reading alpha but it is missing from " "fragment output"); } - if (descriptor->blend->alpha.srcFactor != wgpu::BlendFactor::Zero || - BlendFactorContainsSrc(descriptor->blend->alpha.dstFactor) || - BlendFactorContainsSrcAlpha(descriptor->blend->alpha.dstFactor)) { - return DAWN_VALIDATION_ERROR( - "Alpha blending factor is reading alpha but it is missing from " - "fragment output"); - } } } } else { diff --git a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp index 0809fe4c23..5efc8410d3 100644 --- a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp +++ b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp @@ -329,15 +329,7 @@ TEST_F(RenderPipelineValidationTest, FragmentOutputComponentCountCompatibility) if (BlendFactorContainsSrcAlpha( descriptor.cTargets[0].blend->color.srcFactor) || BlendFactorContainsSrcAlpha( - descriptor.cTargets[0].blend->color.dstFactor) || - descriptor.cTargets[0].blend->alpha.srcFactor != - wgpu::BlendFactor::Zero || - descriptor.cTargets[0].blend->alpha.dstFactor == - wgpu::BlendFactor::Src || - descriptor.cTargets[0].blend->alpha.dstFactor == - wgpu::BlendFactor::OneMinusSrc || - BlendFactorContainsSrcAlpha( - descriptor.cTargets[0].blend->alpha.dstFactor)) { + descriptor.cTargets[0].blend->color.dstFactor)) { valid = componentCount == 4; } } else {