Removes deprecation period code for maxColorAttachmentBytesPerSample.

- Note that by default these are already errors, not warnings.

Change-Id: I33202a0cca8167c4c79e4aeee680b6b7cf1ff830
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128062
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/dawn/native/CommandValidation.cpp b/src/dawn/native/CommandValidation.cpp
index 5f002de..eff94f2 100644
--- a/src/dawn/native/CommandValidation.cpp
+++ b/src/dawn/native/CommandValidation.cpp
@@ -519,9 +519,8 @@
     }
     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 8a943a9..0b054b3 100644
--- a/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp
@@ -1145,7 +1145,7 @@
 
 // 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<wgpu::TextureFormat> formats;
         bool success;
@@ -1203,7 +1203,7 @@
         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 0c29f18..f7375ed 100644
--- a/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp
@@ -1450,7 +1450,7 @@
 
 // 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<wgpu::TextureFormat> formats;
         bool success;
@@ -1506,12 +1506,12 @@
         }
         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 05fecd9..eaf2558 100644
--- a/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp
@@ -1612,7 +1612,7 @@
 
 // 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<wgpu::TextureFormat>& formats) -> wgpu::ShaderModule {
         // Default type to use when formats.size() < kMaxColorAttachments.
@@ -1690,10 +1690,7 @@
 
     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 @@
         if (testCase.success) {
             device.CreateRenderPipeline(&descriptor);
         } else {
-            EXPECT_DEPRECATION_ERROR_OR_WARNING(device.CreateRenderPipeline(&descriptor));
+            ASSERT_DEVICE_ERROR(device.CreateRenderPipeline(&descriptor));
         }
     }
 }