Skip to content

Commit 7667c8a

Browse files
author
Jonah Williams
authored
[Impeller] remove warning about device transient depth+stencil. (flutter#51033)
I think this doesn't matter since use transient depth/stencil attachments now.
1 parent 6b857de commit 7667c8a

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

impeller/entity/entity_pass.cc

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -459,29 +459,11 @@ bool EntityPass::Render(ContentContext& renderer,
459459
// this method.
460460
auto color0 = root_render_target.GetColorAttachments().find(0u)->second;
461461

462-
// If a root stencil was provided by the caller, then verify that it has a
463-
// configuration which can be used to render this pass.
464462
auto stencil_attachment = root_render_target.GetStencilAttachment();
465463
auto depth_attachment = root_render_target.GetDepthAttachment();
466-
if (stencil_attachment.has_value() && depth_attachment.has_value()) {
467-
auto stencil_texture = stencil_attachment->texture;
468-
if (!stencil_texture) {
469-
VALIDATION_LOG << "The root RenderTarget must have a stencil texture.";
470-
return false;
471-
}
472-
473-
auto stencil_storage_mode =
474-
stencil_texture->GetTextureDescriptor().storage_mode;
475-
if (reads_from_onscreen_backdrop &&
476-
stencil_storage_mode == StorageMode::kDeviceTransient) {
477-
VALIDATION_LOG << "The given root RenderTarget stencil needs to be read, "
478-
"but it's marked as transient.";
479-
return false;
480-
}
481-
}
482-
// Setup a new root stencil with an optimal configuration if one wasn't
483-
// provided by the caller.
484-
else {
464+
if (!stencil_attachment.has_value() || !depth_attachment.has_value()) {
465+
// Setup a new root stencil with an optimal configuration if one wasn't
466+
// provided by the caller.
485467
root_render_target.SetupDepthStencilAttachments(
486468
*renderer.GetContext(), *renderer.GetContext()->GetResourceAllocator(),
487469
color0.texture->GetSize(),

0 commit comments

Comments
 (0)