From cc7028ba3f5467ffb7edaccd7e9385c4b5cab4ba Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Fri, 21 Apr 2023 11:15:39 +0000 Subject: [PATCH] d3d11: suppress BufferMappedAtCreationTests.NonMappable* BufferBase uses a staging buffer to upload data for non-mappable buffer created with mappedAtCreation. However BufferBase doesn't unmap staging buffer before copy data from it. But d3d11 debug layer complain this illegal usage. It causes test failures. Bug: dawn:1772 Change-Id: Id1c386ac7c45f41487f9cc7ef4e431eab87ba1c2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128480 Kokoro: Kokoro Reviewed-by: Corentin Wallez Commit-Queue: Peng Huang --- src/dawn/tests/end2end/BufferTests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dawn/tests/end2end/BufferTests.cpp b/src/dawn/tests/end2end/BufferTests.cpp index 1467e4f5a0..db1d8427a7 100644 --- a/src/dawn/tests/end2end/BufferTests.cpp +++ b/src/dawn/tests/end2end/BufferTests.cpp @@ -789,6 +789,10 @@ TEST_P(BufferMappedAtCreationTests, MapReadUsageSmall) { // Test that the simplest mappedAtCreation works for non-mappable buffers. TEST_P(BufferMappedAtCreationTests, NonMappableUsageSmall) { + // ID3D11DeviceContext::CopySubresourceRegion doesn't allow copying between mapped buffers. + // TODO(dawn:1772): enable this test for D3D11 + DAWN_SUPPRESS_TEST_IF(IsD3D11() && IsBackendValidationEnabled()); + uint32_t myData = 4239; wgpu::Buffer buffer = BufferMappedAtCreationWithData(wgpu::BufferUsage::CopySrc, {myData}); UnmapBuffer(buffer); @@ -830,6 +834,10 @@ TEST_P(BufferMappedAtCreationTests, MapReadUsageLarge) { // Test mappedAtCreation for a large non-mappable buffer TEST_P(BufferMappedAtCreationTests, NonMappableUsageLarge) { + // ID3D11DeviceContext::CopySubresourceRegion doesn't allow copying between mapped buffers. + // TODO(dawn:1772): enable this test for D3D11 + DAWN_SUPPRESS_TEST_IF(IsD3D11() && IsBackendValidationEnabled()); + constexpr uint64_t kDataSize = 1000 * 1000; std::vector myData; for (uint32_t i = 0; i < kDataSize; ++i) {