diff --git a/src/dawn/native/CommandValidation.cpp b/src/dawn/native/CommandValidation.cpp index 5f002dec9a..eff94f2c9d 100644 --- a/src/dawn/native/CommandValidation.cpp +++ b/src/dawn/native/CommandValidation.cpp @@ -519,9 +519,8 @@ MaybeError ValidateColorAttachmentBytesPerSample(DeviceBase* device, } uint32_t maxColorAttachmentBytesPerSample = device->GetLimits().v1.maxColorAttachmentBytesPerSample; - // TODO(dawn:1522) Promote to DAWN_INVALID_IF after deprecation period. - DAWN_DEPRECATED_IF( - device, totalByteSize > maxColorAttachmentBytesPerSample, + DAWN_INVALID_IF( + totalByteSize > maxColorAttachmentBytesPerSample, "Total color attachment bytes per sample (%u) exceeds maximum (%u) with formats (%s).", totalByteSize, maxColorAttachmentBytesPerSample, TextureFormatsToString(formats)); diff --git a/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp index 8a943a998e..0b054b3682 100644 --- a/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp @@ -1145,7 +1145,7 @@ TEST_F(RenderBundleValidationTest, TextureFormats) { // Tests validation for per-pixel accounting for render targets. The tests currently assume that the // default maxColorAttachmentBytesPerSample limit of 32 is used. -TEST_P(DeprecationTests, RenderBundleColorFormatsBytesPerSample) { +TEST_F(RenderBundleValidationTest, RenderBundleColorFormatsBytesPerSample) { struct TestCase { std::vector formats; bool success; @@ -1203,7 +1203,7 @@ TEST_P(DeprecationTests, RenderBundleColorFormatsBytesPerSample) { if (testCase.success) { device.CreateRenderBundleEncoder(&descriptor); } else { - EXPECT_DEPRECATION_ERROR_OR_WARNING(device.CreateRenderBundleEncoder(&descriptor)); + ASSERT_DEVICE_ERROR(device.CreateRenderBundleEncoder(&descriptor)); } } } diff --git a/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp index 0c29f18ac1..f7375ed8ec 100644 --- a/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp @@ -1450,7 +1450,7 @@ TEST_F(RenderPassDescriptorValidationTest, ValidateDepthStencilAllAspects) { // Tests validation for per-pixel accounting for render targets. The tests currently assume that the // default maxColorAttachmentBytesPerSample limit of 32 is used. -TEST_P(DeprecationTests, RenderPassColorAttachmentBytesPerSample) { +TEST_F(RenderPassDescriptorValidationTest, RenderPassColorAttachmentBytesPerSample) { struct TestCase { std::vector formats; bool success; @@ -1506,12 +1506,12 @@ TEST_P(DeprecationTests, RenderPassColorAttachmentBytesPerSample) { } utils::ComboRenderPassDescriptor descriptor(colorAttachmentInfo); wgpu::CommandEncoder commandEncoder = device.CreateCommandEncoder(); + wgpu::RenderPassEncoder renderPassEncoder = commandEncoder.BeginRenderPass(&descriptor); + renderPassEncoder.End(); if (testCase.success) { - wgpu::RenderPassEncoder renderPassEncoder = commandEncoder.BeginRenderPass(&descriptor); - renderPassEncoder.End(); commandEncoder.Finish(); } else { - EXPECT_DEPRECATION_WARNING_ONLY(commandEncoder.BeginRenderPass(&descriptor)); + ASSERT_DEVICE_ERROR(commandEncoder.Finish()); } } } diff --git a/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp index 05fecd90e6..eaf2558356 100644 --- a/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp @@ -1612,7 +1612,7 @@ TEST_F(RenderPipelineValidationTest, MaxFragmentCombinedOutputResources) { // Tests validation for per-pixel accounting for render targets. The tests currently assume that the // default maxColorAttachmentBytesPerSample limit of 32 is used. -TEST_P(DeprecationTests, RenderPipelineColorAttachmentBytesPerSample) { +TEST_F(RenderPipelineValidationTest, RenderPipelineColorAttachmentBytesPerSample) { // Creates a fragment shader with maximum number of color attachments to enable testing. auto CreateShader = [&](const std::vector& formats) -> wgpu::ShaderModule { // Default type to use when formats.size() < kMaxColorAttachments. @@ -1690,10 +1690,7 @@ TEST_P(DeprecationTests, RenderPipelineColorAttachmentBytesPerSample) { for (const TestCase& testCase : kTestCases) { utils::ComboRenderPipelineDescriptor descriptor; - descriptor.vertex.module = utils::CreateShaderModule(device, R"( - @vertex fn main() -> @builtin(position) vec4f { - return vec4f(0.0, 0.0, 0.0, 1.0); - })"); + descriptor.vertex.module = vsModule; descriptor.vertex.entryPoint = "main"; descriptor.cFragment.module = CreateShader(testCase.formats); descriptor.cFragment.entryPoint = "main"; @@ -1704,7 +1701,7 @@ TEST_P(DeprecationTests, RenderPipelineColorAttachmentBytesPerSample) { if (testCase.success) { device.CreateRenderPipeline(&descriptor); } else { - EXPECT_DEPRECATION_ERROR_OR_WARNING(device.CreateRenderPipeline(&descriptor)); + ASSERT_DEVICE_ERROR(device.CreateRenderPipeline(&descriptor)); } } }