这是indexloc提供的服务,不要输入任何密码
Skip to content

[Impeller] disable depth-stencil and MSAA for gaussian and downsample. #165137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions engine/src/flutter/impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ ContentContext::ContentContext(
.primitive_type = PrimitiveType::kTriangleStrip,
.color_attachment_pixel_format =
context_->GetCapabilities()->GetDefaultColorFormat()};
auto options_no_msaa_no_depth_stencil = ContentContextOptions{
.sample_count = SampleCount::kCount1,
.primitive_type = PrimitiveType::kTriangleStrip,
.color_attachment_pixel_format =
context_->GetCapabilities()->GetDefaultColorFormat(),
.has_depth_stencil_attachments = false};
const auto supports_decal = static_cast<Scalar>(
context_->GetCapabilities()->SupportsDecalSamplerAddressMode());

Expand Down Expand Up @@ -380,14 +386,14 @@ ContentContext::ContentContext(
clip_pipelines_.SetDefault(
options,
std::make_unique<ClipPipeline>(*context_, clip_pipeline_descriptor));
texture_downsample_pipelines_.CreateDefault(*context_,
options_trianglestrip);
texture_downsample_pipelines_.CreateDefault(
*context_, options_no_msaa_no_depth_stencil);
rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
texture_strict_src_pipelines_.CreateDefault(*context_, options);
tiled_texture_pipelines_.CreateDefault(*context_, options,
{supports_decal});
gaussian_blur_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
gaussian_blur_pipelines_.CreateDefault(
*context_, options_no_msaa_no_depth_stencil, {supports_decal});
border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
color_matrix_color_filter_pipelines_.CreateDefault(*context_,
options_trianglestrip);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ fml::StatusOr<RenderTarget> MakeDownsampleSubpass(
return pass.Draw().ok();
};
return renderer.MakeSubpass("Gaussian Blur Filter", pass_args.subpass_size,
command_buffer, subpass_callback);
command_buffer, subpass_callback,
/*msaa_enabled=*/false,
/*depth_stencil_enabled=*/false);
} else {
// This assumes we don't scale below 1/16.
Scalar edge = 1.0;
Expand Down Expand Up @@ -446,7 +448,9 @@ fml::StatusOr<RenderTarget> MakeDownsampleSubpass(
return pass.Draw().ok();
};
return renderer.MakeSubpass("Gaussian Blur Filter", pass_args.subpass_size,
command_buffer, subpass_callback);
command_buffer, subpass_callback,
/*msaa_enabled=*/false,
/*depth_stencil_enabled=*/false);
}
}

Expand Down Expand Up @@ -511,8 +515,9 @@ fml::StatusOr<RenderTarget> MakeBlurSubpass(
destination_target.value(), command_buffer,
subpass_callback);
} else {
return renderer.MakeSubpass("Gaussian Blur Filter", subpass_size,
command_buffer, subpass_callback);
return renderer.MakeSubpass(
"Gaussian Blur Filter", subpass_size, command_buffer, subpass_callback,
/*msaa_enabled=*/false, /*depth_stencil_enabled=*/false);
}
}

Expand Down