Workaround Intel Mesa driver issue about T2B copy with stencil aspects

In the test DepthStencilCopyTests/FromStencilAspect we are writing into
gl_FragDepth but we disable the depth writing when creating the render
pipeline, which causes Intel Mesa driver hangs when the test is running
on it. In this patch we try to add workaround to this issue by enabling
the depth writing.

BUG=dawn:439
TEST=dawn_end2end_tests

Change-Id: I618246097a26ee62c830f0ac8dc1aa0ab4d224a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Jiawei Shao 2020-08-20 16:17:59 +00:00 committed by Commit Bot service account
parent f7123d7463
commit ab4e4feb01
1 changed files with 1 additions and 3 deletions

View File

@ -99,9 +99,6 @@ TEST_P(DepthStencilCopyTests, FromDepthAspect) {
// Test copying the stencil-only aspect into a buffer. // Test copying the stencil-only aspect into a buffer.
TEST_P(DepthStencilCopyTests, FromStencilAspect) { TEST_P(DepthStencilCopyTests, FromStencilAspect) {
// TODO(enga): Figure out why this fails on Linux Vulkan Intel
DAWN_SKIP_TEST_IF(IsLinux() && IsVulkan() && IsIntel());
// Create a stencil texture // Create a stencil texture
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;
@ -121,6 +118,7 @@ TEST_P(DepthStencilCopyTests, FromStencilAspect) {
renderPipelineDesc.vertexStage.module = mVertexModule; renderPipelineDesc.vertexStage.module = mVertexModule;
renderPipelineDesc.cFragmentStage.module = mFragmentModule; renderPipelineDesc.cFragmentStage.module = mFragmentModule;
renderPipelineDesc.cDepthStencilState.format = texDescriptor.format; renderPipelineDesc.cDepthStencilState.format = texDescriptor.format;
renderPipelineDesc.cDepthStencilState.depthWriteEnabled = true;
renderPipelineDesc.cDepthStencilState.stencilFront.passOp = renderPipelineDesc.cDepthStencilState.stencilFront.passOp =
wgpu::StencilOperation::IncrementClamp; wgpu::StencilOperation::IncrementClamp;
renderPipelineDesc.depthStencilState = &renderPipelineDesc.cDepthStencilState; renderPipelineDesc.depthStencilState = &renderPipelineDesc.cDepthStencilState;