diff --git a/src/dawn/native/d3d11/TextureD3D11.cpp b/src/dawn/native/d3d11/TextureD3D11.cpp index f0f6776d56..09d0019ee7 100644 --- a/src/dawn/native/d3d11/TextureD3D11.cpp +++ b/src/dawn/native/d3d11/TextureD3D11.cpp @@ -1122,7 +1122,7 @@ ResultOrError> Texture::GetStencilSRV( return {}; }; - // TODO(dawn:1705): Work out a way of GPU-GPU copy, rather than the CPU-GPU round trip. + // TODO(383779503): Work out a way of GPU-GPU copy, rather than the CPU-GPU round trip. GetDevice()->EmitWarningOnce("Sampling the stencil component is rather slow now."); DAWN_TRY(Read(commandContext, singleRange, {0, 0, 0}, size, bytesPerRow, rowsPerImage, callback)); diff --git a/src/dawn/tests/DawnTest.cpp b/src/dawn/tests/DawnTest.cpp index 9e828f8519..8755860ec2 100644 --- a/src/dawn/tests/DawnTest.cpp +++ b/src/dawn/tests/DawnTest.cpp @@ -484,11 +484,10 @@ void DawnTestEnvironment::SelectPreferredAdapterProperties(const native::Instanc wgpu::AdapterInfo info; adapter.GetInfo(&info); - // Skip non-OpenGLES compat adapters. Metal/Vulkan/D3D12 support + // Skip non-OpenGLES/D3D11 compat adapters. Metal/Vulkan/D3D12 support // core WebGPU. - // D3D11 is in an experimental state where it may support core. - // See crbug.com/dawn/1820 for determining d3d11 capabilities. - if (info.compatibilityMode && info.backendType != wgpu::BackendType::OpenGLES) { + if (info.compatibilityMode && info.backendType != wgpu::BackendType::OpenGLES && + info.backendType != wgpu::BackendType::D3D11) { continue; } diff --git a/src/dawn/tests/end2end/DepthBiasTests.cpp b/src/dawn/tests/end2end/DepthBiasTests.cpp index 2ed4f5f19b..8bbe56ce00 100644 --- a/src/dawn/tests/end2end/DepthBiasTests.cpp +++ b/src/dawn/tests/end2end/DepthBiasTests.cpp @@ -187,6 +187,10 @@ TEST_P(DepthBiasTests, PositiveBiasOnFloatWithClamp) { DAWN_TEST_UNSUPPORTED_IF(IsOpenGL()); DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); + // Depth bias clamp is not supported in compat mode. + // https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md#9-depth-bias-clamp-must-be-zero + DAWN_TEST_UNSUPPORTED_IF(IsCompatibilityMode()); + // Draw quad flat on z = 0.25 with 0.25 bias clamped at 0.125. RunDepthBiasTest(wgpu::TextureFormat::Depth32Float, 0, QuadAngle::Flat, kPointTwoFiveBiasForPointTwoFiveZOnFloat, 0, 0.125); @@ -225,6 +229,10 @@ TEST_P(DepthBiasTests, NegativeBiasOnFloatWithClamp) { DAWN_TEST_UNSUPPORTED_IF(IsOpenGL()); DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); + // Depth bias clamp is not supported in compat mode. + // https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md#9-depth-bias-clamp-must-be-zero + DAWN_TEST_UNSUPPORTED_IF(IsCompatibilityMode()); + // Draw quad flat on z = 0.25 with -0.25 bias clamped at -0.125. RunDepthBiasTest(wgpu::TextureFormat::Depth32Float, 0, QuadAngle::Flat, -kPointTwoFiveBiasForPointTwoFiveZOnFloat, 0, -0.125); @@ -344,6 +352,10 @@ TEST_P(DepthBiasTests, PositiveBiasOn24bitWithClamp) { DAWN_TEST_UNSUPPORTED_IF(IsOpenGL()); DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); + // Depth bias clamp is not supported in compat mode. + // https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md#9-depth-bias-clamp-must-be-zero + DAWN_TEST_UNSUPPORTED_IF(IsCompatibilityMode()); + // Draw quad flat on z = 0.25 with 0.25 bias clamped at 0.125. RunDepthBiasTest(wgpu::TextureFormat::Depth24PlusStencil8, 0.4f, QuadAngle::Flat, 0.25f * (1 << 25), 0, 0.1f); diff --git a/src/dawn/tests/end2end/MultisampledRenderingTests.cpp b/src/dawn/tests/end2end/MultisampledRenderingTests.cpp index 2ec4169cef..d73afa772d 100644 --- a/src/dawn/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/dawn/tests/end2end/MultisampledRenderingTests.cpp @@ -1717,6 +1717,9 @@ TEST_P(DawnLoadResolveTextureTest, TwoOutputsDrawThenLoadColor0) { // with DawnLoadResolveTexture feature if there are more than one attachment. DAWN_TEST_UNSUPPORTED_IF(HasResolveMultipleAttachmentInSeparatePassesToggle()); + // TODO(383731610): multiple outputs are not working in compat mode. + DAWN_SUPPRESS_TEST_IF(IsCompatibilityMode()); + auto multiSampledTexture1 = CreateTextureForRenderAttachment(kColorFormat, 4, 1, 1, /*transientAttachment=*/false, /*supportsTextureBinding=*/false); @@ -1798,6 +1801,9 @@ TEST_P(DawnLoadResolveTextureTest, TwoOutputsDrawThenLoadColor1) { // with DawnLoadResolveTexture feature if there are more than one attachment. DAWN_TEST_UNSUPPORTED_IF(HasResolveMultipleAttachmentInSeparatePassesToggle()); + // TODO(383731610): multiple outputs are not working in compat mode. + DAWN_SUPPRESS_TEST_IF(IsCompatibilityMode()); + auto multiSampledTexture1 = CreateTextureForRenderAttachment(kColorFormat, 4, 1, 1, /*transientAttachment=*/false, /*supportsTextureBinding=*/false); @@ -2134,6 +2140,9 @@ TEST_P(DawnLoadResolveTextureTest, TwoOutputsDrawWithDepthTestColor0AndColor1) { // Test rendering into a layer of a 2D array texture and load op=LoadOp::ExpandResolveTexture. TEST_P(DawnLoadResolveTextureTest, DrawThenLoad2DArrayTextureLayer) { + // Creating 2D view from 2D array texture is not supported in compat mode. + DAWN_TEST_UNSUPPORTED_IF(IsCompatibilityMode()); + auto multiSampledTexture = CreateTextureForRenderAttachment(kColorFormat, 4, 1, 1, /*transientAttachment=*/false, /*supportsTextureBinding=*/false); diff --git a/src/dawn/tests/end2end/QueueTests.cpp b/src/dawn/tests/end2end/QueueTests.cpp index 4f3c25ce64..5248242f5f 100644 --- a/src/dawn/tests/end2end/QueueTests.cpp +++ b/src/dawn/tests/end2end/QueueTests.cpp @@ -636,6 +636,10 @@ TEST_P(QueueWriteTextureTests, VaryingBytesPerRowCube) { // TODO(crbug.com/dawn/42241333): diagnose stencil8 failure on Angle Swiftshader DAWN_SUPPRESS_TEST_IF(format == wgpu::TextureFormat::Stencil8 && IsANGLESwiftShader()); + // TODO(383765096): D3D11 doesn't allow calling Gather() on R8_UINT + DAWN_SUPPRESS_TEST_IF(format == wgpu::TextureFormat::Stencil8 && IsD3D11() && + IsCompatibilityMode()); + constexpr uint32_t kWidth = 257; constexpr uint32_t kHeight = 257; @@ -691,6 +695,9 @@ TEST_P(QueueWriteTextureTests, VaryingArrayBytesPerRow) { // TODO(crbug.com/dawn/2095): Failing on ANGLE + SwiftShader, needs investigation. DAWN_SUPPRESS_TEST_IF(IsANGLESwiftShader()); + // TODO(383779503): reading stencil texture is too slow on D3D11. + DAWN_SUPPRESS_TEST_IF(IsD3D11() && GetParam().mTextureFormat == wgpu::TextureFormat::Stencil8); + constexpr uint32_t kWidth = 257; constexpr uint32_t kHeight = 129; constexpr uint32_t kLayers = 65; diff --git a/src/dawn/tests/end2end/RenderPassLoadOpTests.cpp b/src/dawn/tests/end2end/RenderPassLoadOpTests.cpp index eff93a6664..20b48eaba2 100644 --- a/src/dawn/tests/end2end/RenderPassLoadOpTests.cpp +++ b/src/dawn/tests/end2end/RenderPassLoadOpTests.cpp @@ -486,6 +486,10 @@ TEST_P(RenderPassLoadOpTests, LoadOpClearNormalizedFormatsOutOfBound) { // Test clearing multiple color attachments with different big signed and unsigned integers can // still work correctly. TEST_P(RenderPassLoadOpTests, LoadOpClearWithBig32BitIntegralValuesOnMultipleColorAttachments) { + // TODO(383733873): ApplyClearBigIntegerColorValueWithDraw workaround doesn't work with multiple + // outputs in compat mode. + DAWN_TEST_UNSUPPORTED_IF(IsD3D11() && IsCompatibilityMode()); + constexpr int32_t kMaxInt32RepresentableInFloat = 1 << std::numeric_limits::digits; constexpr int32_t kMinInt32RepresentableInFloat = -kMaxInt32RepresentableInFloat; @@ -685,6 +689,10 @@ TEST_P(RenderPassLoadOpTests, MixedUseOfLoadOpLoadAndLoadOpClearWithBigIntegerVa // TODO(crbug.com/dawn/2295): diagnose this failure on Pixel 4 OpenGLES DAWN_SUPPRESS_TEST_IF(IsOpenGLES() && IsAndroid() && IsQualcomm()); + // TODO(383733873): ApplyClearBigIntegerColorValueWithDraw workaround doesn't work with multiple + // outputs in compat mode. + DAWN_TEST_UNSUPPORTED_IF(IsD3D11() && IsCompatibilityMode()); + constexpr int32_t kMaxUInt32RepresentableInFloat = 1 << std::numeric_limits::digits; wgpu::TextureDescriptor textureDescriptor = {}; diff --git a/src/dawn/tests/end2end/TextureCorruptionTests.cpp b/src/dawn/tests/end2end/TextureCorruptionTests.cpp index 903d0e969e..ad5ec8b2fe 100644 --- a/src/dawn/tests/end2end/TextureCorruptionTests.cpp +++ b/src/dawn/tests/end2end/TextureCorruptionTests.cpp @@ -316,6 +316,10 @@ class TextureCorruptionTests : public DawnTestWithParams 4096 || height > 4096)); + // Pre-allocate textures. The incorrect write type may corrupt neighboring textures or // layers. std::vector textures; diff --git a/src/dawn/tests/end2end/VideoViewsTests.cpp b/src/dawn/tests/end2end/VideoViewsTests.cpp index 5011f05918..e3bd954339 100644 --- a/src/dawn/tests/end2end/VideoViewsTests.cpp +++ b/src/dawn/tests/end2end/VideoViewsTests.cpp @@ -524,6 +524,10 @@ class VideoViewsTests : public VideoViewsTestsBase { DAWN_TEST_UNSUPPORTED_IF(UsesWire()); DAWN_TEST_UNSUPPORTED_IF(!IsMultiPlanarFormatsSupported()); DAWN_TEST_UNSUPPORTED_IF(!IsFormatSupported()); + // TODO(382071071): compat mode doesn't allow different texture views to be used in + // a draw call. But the tests need texture views to sample and render to separate planes of + // a multiplanar texture. + DAWN_TEST_UNSUPPORTED_IF(IsCompatibilityMode()); mBackend = VideoViewsTestBackend::Create(); mBackend->OnSetUp(device); diff --git a/src/dawn/tests/white_box/SharedTextureMemoryTests.cpp b/src/dawn/tests/white_box/SharedTextureMemoryTests.cpp index 1268a20c23..070f4472dd 100644 --- a/src/dawn/tests/white_box/SharedTextureMemoryTests.cpp +++ b/src/dawn/tests/white_box/SharedTextureMemoryTests.cpp @@ -122,6 +122,10 @@ void SharedTextureMemoryTests::SetUp() { !SupportsFeatures(GetParam().mBackend->RequiredFeatures(GetAdapter().Get()))); // TODO(crbug.com/342213634): Crashes on ChromeOS volteer devices. DAWN_SUPPRESS_TEST_IF(IsChromeOS() && IsVulkan() && IsIntel() && IsBackendValidationEnabled()); + + // Compat cannot create 2D texture view from a 2D array texture. + DAWN_TEST_UNSUPPORTED_IF(IsCompatibilityMode() && GetParam().mLayerCount > 1); + GetParam().mBackend->SetUp(); }