From 1351637b599bc1f36636c2d8d21552aada6aabab Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 1 Nov 2024 14:03:19 -0700 Subject: [PATCH] [impeller] use greater equal rather than greater depth compare. (flutter/engine#56310) Marking ready for review for golden testing Fixes https://github.com/flutter/flutter/issues/153504 Fixes some other ones too? It seems like metal and vulkan are already behaving like they are using greater equal depth compare. GL behaves correctly like greater compare, but that leads to rendering bugs. Just switch it to greater equal --- engine/src/flutter/impeller/entity/contents/contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/impeller/entity/contents/contents.cc b/engine/src/flutter/impeller/entity/contents/contents.cc index 7a07da9d13..60998616fe 100644 --- a/engine/src/flutter/impeller/entity/contents/contents.cc +++ b/engine/src/flutter/impeller/entity/contents/contents.cc @@ -26,7 +26,7 @@ ContentContextOptions OptionsFromPass(const RenderPass& pass) { FML_DCHECK(pass.HasDepthAttachment() == pass.HasStencilAttachment()); opts.has_depth_stencil_attachments = has_depth_stencil_attachments; - opts.depth_compare = CompareFunction::kGreater; + opts.depth_compare = CompareFunction::kGreaterEqual; opts.stencil_mode = ContentContextOptions::StencilMode::kIgnore; return opts; }