Skip to content

Commit ac0b5ca

Browse files
In the embedder Impeller render target, use a multisample texture for the depth buffer only if MSAA is supported (flutter/engine#56444)
Fixes flutter#158000
1 parent fcfdd62 commit ac0b5ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

engine/src/flutter/shell/platform/embedder/embedder.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,15 +1183,16 @@ MakeRenderTargetFromBackingStoreImpeller(
11831183
}
11841184

11851185
impeller::TextureDescriptor depth_stencil_texture_desc;
1186-
depth_stencil_texture_desc.type =
1187-
impeller::TextureType::kTexture2DMultisample;
11881186
depth_stencil_texture_desc.format = impeller::PixelFormat::kD24UnormS8Uint;
11891187
depth_stencil_texture_desc.size = size;
11901188
depth_stencil_texture_desc.usage = static_cast<impeller::TextureUsageMask>(
11911189
impeller::TextureUsage::kRenderTarget);
11921190
if (implicit_msaa) {
1191+
depth_stencil_texture_desc.type =
1192+
impeller::TextureType::kTexture2DMultisample;
11931193
depth_stencil_texture_desc.sample_count = impeller::SampleCount::kCount4;
11941194
} else {
1195+
depth_stencil_texture_desc.type = impeller::TextureType::kTexture2D;
11951196
depth_stencil_texture_desc.sample_count = impeller::SampleCount::kCount1;
11961197
}
11971198

0 commit comments

Comments
 (0)