Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions impeller/compiler/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static CompilerBackend CreateMSLCompiler(const spirv_cross::ParsedIR& ir,
// Metal to AIR must be updated as well.
sl_options.msl_version =
spirv_cross::CompilerMSL::Options::make_msl_version(1, 2);
sl_options.use_framebuffer_fetch_subpasses = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, well that turned out simpler than I was expecting!

sl_compiler->set_msl_options(sl_options);

// Sort the float and sampler uniforms according to their declared/decorated
Expand Down
18 changes: 18 additions & 0 deletions impeller/entity/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ impeller_shaders("modern_entity_shaders") {
"shaders/linear_gradient_ssbo_fill.frag",
"shaders/radial_gradient_ssbo_fill.frag",
"shaders/sweep_gradient_ssbo_fill.frag",
"shaders/blending/ios/framebuffer_blend.vert",
"shaders/blending/ios/framebuffer_blend_color.frag",
"shaders/blending/ios/framebuffer_blend_colorburn.frag",
"shaders/blending/ios/framebuffer_blend_colordodge.frag",
"shaders/blending/ios/framebuffer_blend_darken.frag",
"shaders/blending/ios/framebuffer_blend_difference.frag",
"shaders/blending/ios/framebuffer_blend_exclusion.frag",
"shaders/blending/ios/framebuffer_blend_hardlight.frag",
"shaders/blending/ios/framebuffer_blend_hue.frag",
"shaders/blending/ios/framebuffer_blend_lighten.frag",
"shaders/blending/ios/framebuffer_blend_luminosity.frag",
"shaders/blending/ios/framebuffer_blend_multiply.frag",
"shaders/blending/ios/framebuffer_blend_overlay.frag",
"shaders/blending/ios/framebuffer_blend_saturation.frag",
"shaders/blending/ios/framebuffer_blend_screen.frag",
"shaders/blending/ios/framebuffer_blend_softlight.frag",
]
}

Expand Down Expand Up @@ -123,6 +139,8 @@ impeller_component("entity") {
"contents/filters/srgb_to_linear_filter_contents.h",
"contents/filters/yuv_to_rgb_filter_contents.cc",
"contents/filters/yuv_to_rgb_filter_contents.h",
"contents/framebuffer_blend_contents.cc",
"contents/framebuffer_blend_contents.h",
"contents/gradient_generator.cc",
"contents/gradient_generator.h",
"contents/linear_gradient_contents.cc",
Expand Down
46 changes: 40 additions & 6 deletions impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,7 @@ ContentContext::ContentContext(std::shared_ptr<Context> context)
sweep_gradient_ssbo_fill_pipelines_[{}] =
CreateDefaultPipeline<SweepGradientSSBOFillPipeline>(*context_);
}
sweep_gradient_fill_pipelines_[{}] =
CreateDefaultPipeline<SweepGradientFillPipeline>(*context_);
rrect_blur_pipelines_[{}] =
CreateDefaultPipeline<RRectBlurPipeline>(*context_);
texture_blend_pipelines_[{}] =
CreateDefaultPipeline<BlendPipeline>(*context_);

blend_color_pipelines_[{}] =
CreateDefaultPipeline<BlendColorPipeline>(*context_);
blend_colorburn_pipelines_[{}] =
Expand Down Expand Up @@ -207,6 +202,45 @@ ContentContext::ContentContext(std::shared_ptr<Context> context)
CreateDefaultPipeline<BlendScreenPipeline>(*context_);
blend_softlight_pipelines_[{}] =
CreateDefaultPipeline<BlendSoftLightPipeline>(*context_);
#if FML_OS_IOS
framebuffer_blend_color_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendColorPipeline>(*context_);
framebuffer_blend_colorburn_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendColorBurnPipeline>(*context_);
framebuffer_blend_colordodge_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendColorDodgePipeline>(*context_);
framebuffer_blend_darken_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendDarkenPipeline>(*context_);
framebuffer_blend_difference_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendDifferencePipeline>(*context_);
framebuffer_blend_exclusion_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendExclusionPipeline>(*context_);
framebuffer_blend_hardlight_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendHardLightPipeline>(*context_);
framebuffer_blend_hue_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendHuePipeline>(*context_);
framebuffer_blend_lighten_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendLightenPipeline>(*context_);
framebuffer_blend_luminosity_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendLuminosityPipeline>(*context_);
framebuffer_blend_multiply_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendMultiplyPipeline>(*context_);
framebuffer_blend_overlay_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendOverlayPipeline>(*context_);
framebuffer_blend_saturation_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendSaturationPipeline>(*context_);
framebuffer_blend_screen_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendScreenPipeline>(*context_);
framebuffer_blend_softlight_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendSoftLightPipeline>(*context_);
#endif // FML_OS_IOS

sweep_gradient_fill_pipelines_[{}] =
CreateDefaultPipeline<SweepGradientFillPipeline>(*context_);
rrect_blur_pipelines_[{}] =
CreateDefaultPipeline<RRectBlurPipeline>(*context_);
texture_blend_pipelines_[{}] =
CreateDefaultPipeline<BlendPipeline>(*context_);
texture_pipelines_[{}] = CreateDefaultPipeline<TexturePipeline>(*context_);
tiled_texture_pipelines_[{}] =
CreateDefaultPipeline<TiledTexturePipeline>(*context_);
Expand Down
Loading