Remove parameter layer and use origin.z in MACROs This change removes layer and use origin.z in MACROs EXPECT_TEXTURE_FLOAT_EQ and EXPECT_TEXTURE_EQ. It also removes parameter layer in MACROs' implementation functions AddTextureExpectation and AddTextureExpectationImpl and use origin.z instead in these functions. BUG: dawn:747 Change-Id: I0103524074c6c250fa2f85bf9c3abda8c8cd2197 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47000 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Yunchao He <yunchao.he@intel.com>
diff --git a/src/tests/end2end/DepthStencilCopyTests.cpp b/src/tests/end2end/DepthStencilCopyTests.cpp index 38e95c7..356c078 100644 --- a/src/tests/end2end/DepthStencilCopyTests.cpp +++ b/src/tests/end2end/DepthStencilCopyTests.cpp
@@ -300,7 +300,7 @@ queue.Submit(1, &commands); std::vector<uint32_t> colorData(width * height, 1u); - EXPECT_TEXTURE_EQ(colorData.data(), colorTexture, {0, 0}, {width, height}, 0, 0); + EXPECT_TEXTURE_EQ(colorData.data(), colorTexture, {0, 0}, {width, height}); } wgpu::ShaderModule mVertexModule; @@ -323,7 +323,7 @@ 0.3, 0.3, 0.0, 0.0, // 0.3, 0.3, 0.0, 0.0, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), depthTexture, {0, 0}, {kWidth, kHeight}, 0, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), depthTexture, {0, 0}, {kWidth, kHeight}, 0, wgpu::TextureAspect::DepthOnly); } @@ -348,7 +348,7 @@ 1u, 1u, 0u, 0u, // 1u, 1u, 0u, 0u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), depthStencilTexture, {0, 0}, {kWidth, kHeight}, 0, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), depthStencilTexture, {0, 0}, {kWidth, kHeight}, 0, wgpu::TextureAspect::StencilOnly); } @@ -373,7 +373,7 @@ 1u, 1u, 0u, 0u, // 1u, 1u, 0u, 0u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), depthStencilTexture, {0, 0}, {4, 4}, 1, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), depthStencilTexture, {0, 0}, {4, 4}, 1, wgpu::TextureAspect::StencilOnly); } @@ -391,7 +391,7 @@ 0.4, 0.4, 0.0, 0.0, // 0.4, 0.4, 0.0, 0.0, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), depthTexture, {0, 0}, {4, 4}, 1, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), depthTexture, {0, 0}, {4, 4}, 1, wgpu::TextureAspect::DepthOnly); } @@ -420,7 +420,7 @@ 3u, 3u, 1u, 1u, // 3u, 3u, 1u, 1u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, wgpu::TextureAspect::StencilOnly); } @@ -443,7 +443,7 @@ 3u, 3u, 1u, 1u, // 3u, 3u, 1u, 1u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, wgpu::TextureAspect::StencilOnly); } @@ -469,7 +469,7 @@ 3u, 3u, 1u, 1u, // 3u, 3u, 1u, 1u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {4, 4}, 1, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {4, 4}, 1, wgpu::TextureAspect::StencilOnly); } @@ -525,7 +525,7 @@ 3u, 3u, 1u, 1u, // 3u, 3u, 1u, 1u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, wgpu::TextureAspect::StencilOnly); // Check the depth @@ -574,7 +574,7 @@ 3u, 3u, 1u, 1u, // 3u, 3u, 1u, 1u, // }; - EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, 0, + EXPECT_TEXTURE_EQ(expectedData.data(), texture, {0, 0}, {kWidth, kHeight}, 0, wgpu::TextureAspect::StencilOnly); } @@ -673,7 +673,7 @@ // Copy back the stencil data and check it is correct. EXPECT_TEXTURE_EQ(expectedStencilData.data(), depthStencilTexture, {0, 0}, {kWidth, kHeight}, 0, - 0, wgpu::TextureAspect::StencilOnly); + wgpu::TextureAspect::StencilOnly); ExpectDepthData(depthStencilTexture, wgpu::TextureFormat::Depth24PlusStencil8, kWidth, kHeight, 0,