Skip to content

Commit

Permalink
Enable several depth stencil copy tests on OpenGL backend
Browse files Browse the repository at this point in the history
Bug: chromium:42241686
Test: dawn_end2end_tests
Change-Id: I60db470d0844364ac968041c8dfbc08e9ae66ddd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/213196
Commit-Queue: Jiawei Shao <[email protected]>
Reviewed-by: Loko Kung <[email protected]>
  • Loading branch information
Jiawei-Shao authored and Dawn LUCI CQ committed Nov 4, 2024
1 parent 61fbdc6 commit 980a9b0
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/dawn/tests/end2end/TextureZeroInitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,11 @@ TEST_P(TextureZeroInitTest, IndependentDepthStencilLoadAfterDiscard) {
EXPECT_EQ(true, native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1, 0,
1, WGPUTextureAspect_StencilOnly));

// TODO(crbug.com/dawn/439): Implement stencil copies on other platforms
if (IsMetal() || IsVulkan() || IsD3D12()) {
// Check by copy that the stencil data is 2.
std::vector<uint8_t> expected(kSize * kSize, 2);
EXPECT_LAZY_CLEAR(
0u, EXPECT_TEXTURE_EQ(expected.data(), depthStencilTexture, {0, 0}, {kSize, kSize},
0, wgpu::TextureAspect::StencilOnly));
}
// Check by copy that the stencil data is 2.
std::vector<uint8_t> expected(kSize * kSize, 2);
EXPECT_LAZY_CLEAR(
0u, EXPECT_TEXTURE_EQ(expected.data(), depthStencilTexture, {0, 0}, {kSize, kSize}, 0,
wgpu::TextureAspect::StencilOnly));
}

// Uninitialize only stencil
Expand Down Expand Up @@ -783,8 +780,8 @@ TEST_P(TextureZeroInitTest, IndependentDepthStencilLoadAfterDiscard) {
EXPECT_EQ(true, native::IsTextureSubresourceInitialized(depthStencilTexture.Get(), 0, 1, 0,
1, WGPUTextureAspect_StencilOnly));

// TODO(crbug.com/dawn/439): Implement stencil copies on other platforms
if (IsMetal() || IsVulkan() || IsD3D12()) {
// TODO(chromium:42241686): Fail on the Android devices using Mali GPUs (e.g. Pixel 6).
if (!(IsAndroid() && IsARM())) {
// Check by copy that the stencil data is 0.
std::vector<uint8_t> expected(kSize * kSize, 0);
EXPECT_LAZY_CLEAR(
Expand Down Expand Up @@ -914,9 +911,6 @@ TEST_P(TextureZeroInitTest, StencilCopyThenDiscardAndCopyToTextureThenReadByCopy
// Test that clear state is tracked independently for depth/stencil textures.
// Lazy clear of the stencil aspect via copy should not touch depth.
TEST_P(TextureZeroInitTest, IndependentDepthStencilCopyAfterDiscard) {
// TODO(crbug.com/dawn/439): Implement stencil copies on other platforms
DAWN_SUPPRESS_TEST_IF(!(IsMetal() || IsVulkan() || IsD3D12()));

// TODO(dawn:1549) Fails on Qualcomm-based Android devices.
DAWN_SUPPRESS_TEST_IF(IsAndroid() && IsQualcomm());

Expand Down

0 comments on commit 980a9b0

Please sign in to comment.