diff --git a/engine/src/flutter/ci/licenses_golden/licenses_flutter b/engine/src/flutter/ci/licenses_golden/licenses_flutter index a5338d8ac8..7ed7a51cbc 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_flutter +++ b/engine/src/flutter/ci/licenses_golden/licenses_flutter @@ -3134,13 +3134,42 @@ ORIGIN: ../../../flutter/impeller/entity/inline_pass_context.cc + ../../../flutt ORIGIN: ../../../flutter/impeller/entity/inline_pass_context.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/render_target_cache.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/render_target_cache.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend.glsl + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend.vert + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_color.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/blending/blend.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/blending/blend.vert + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/entity/shaders/blending/blend_select.glsl + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.frag + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.vert + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.vert + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/blending/porter_duff_blend.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/blending/porter_duff_blend.vert + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/border_mask_blur.frag + ../../../flutter/LICENSE @@ -3153,8 +3182,10 @@ ORIGIN: ../../../flutter/impeller/entity/shaders/conical_gradient_fill.frag + .. ORIGIN: ../../../flutter/impeller/entity/shaders/conical_gradient_ssbo_fill.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/debug/checkerboard.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/debug/checkerboard.vert + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.vert + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_decal.frag + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_nodecal.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/geometry/points.comp + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/geometry/uv.comp + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/glyph_atlas.frag + ../../../flutter/LICENSE @@ -5886,13 +5917,42 @@ FILE: ../../../flutter/impeller/entity/inline_pass_context.cc FILE: ../../../flutter/impeller/entity/inline_pass_context.h FILE: ../../../flutter/impeller/entity/render_target_cache.cc FILE: ../../../flutter/impeller/entity/render_target_cache.h -FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend.glsl FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend.vert +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_color.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag FILE: ../../../flutter/impeller/entity/shaders/blending/blend.frag FILE: ../../../flutter/impeller/entity/shaders/blending/blend.vert -FILE: ../../../flutter/impeller/entity/shaders/blending/blend_select.glsl -FILE: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.frag -FILE: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.vert +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.vert +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag +FILE: ../../../flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag FILE: ../../../flutter/impeller/entity/shaders/blending/porter_duff_blend.frag FILE: ../../../flutter/impeller/entity/shaders/blending/porter_duff_blend.vert FILE: ../../../flutter/impeller/entity/shaders/border_mask_blur.frag @@ -5905,8 +5965,10 @@ FILE: ../../../flutter/impeller/entity/shaders/conical_gradient_fill.frag FILE: ../../../flutter/impeller/entity/shaders/conical_gradient_ssbo_fill.frag FILE: ../../../flutter/impeller/entity/shaders/debug/checkerboard.frag FILE: ../../../flutter/impeller/entity/shaders/debug/checkerboard.vert -FILE: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.frag +FILE: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl FILE: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.vert +FILE: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_decal.frag +FILE: ../../../flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_nodecal.frag FILE: ../../../flutter/impeller/entity/shaders/geometry/points.comp FILE: ../../../flutter/impeller/entity/shaders/geometry/uv.comp FILE: ../../../flutter/impeller/entity/shaders/glyph_atlas.frag diff --git a/engine/src/flutter/impeller/base/comparable.h b/engine/src/flutter/impeller/base/comparable.h index 08780f75c5..1937aebf2e 100644 --- a/engine/src/flutter/impeller/base/comparable.h +++ b/engine/src/flutter/impeller/base/comparable.h @@ -8,8 +8,12 @@ #include #include #include +#include #include +#include "flutter/fml/hash_combine.h" +#include "flutter/fml/macros.h" + namespace impeller { struct UniqueID { diff --git a/engine/src/flutter/impeller/docs/specialization_constants.md b/engine/src/flutter/impeller/docs/specialization_constants.md deleted file mode 100644 index 1488bb2f35..0000000000 --- a/engine/src/flutter/impeller/docs/specialization_constants.md +++ /dev/null @@ -1,93 +0,0 @@ -# Specialization Constants - -A specialization constant is a named variable that is known to be constant at runtime but not when the shader is authored. These variables are bound to specific values when the shader is compiled on application start up and allow the backend to perform optimizations such as branch elimination and constant folding. - -Specialization constants have two possible benefits when used in a shader: - - * Improving performance, by removing branching and conditional code. - * Code organization/size, by removing the number of shader source files required. - -These goals are related: The number of shaders can be reduce by adding runtime branching to create more generic shaders. Alternatively, branching can be reduced by adding more specialized shader variants. Specialization constants provide a happy medium where the source files can be combined with branching but done so in a way that has no runtime cost. - -## Example Usage - -Consider the case of the "decal" texture sampling mode. This is implement via clamp-to-border with -a border color set to transparent black. While this functionality is well supported on the Metal and -Vulkan backends, the GLES backend needs to support devices that do not have this extension. As a -result, the following code was used to conditionally decal: - -```glsl -// Decal sample if necessary. -vec4 Sample(sampler2D sampler, vec2 coord) { -#ifdef GLES - return IPSampleDecal(sampler, coord) -#else - return texture(sampler, coord); -#endif -} -``` - -This works great as long as we know that the GLES backend can never do the decal sample mode. This is also "free" as the ifdef branch is evaluated in the compiler. But eventually, we added a runtime check for decal mode as we need to support this on GLES. So the code turned into (approximately) the following: - -```glsl -#ifdef GLES -uniform float supports_decal; -#endif - -// Decal sample if necessary. -vec4 Sample(sampler2D sampler, vec2 coord) { -#ifdef GLES - if (supports_decal) { - return texture(sampler, coord); - } - return IPSampleDecal(sampler, coord) -#else - return texture(sampler, coord); -#endif -} -``` - -Now we've got decal support, but we've also got new problems: - -* The code is actually quite messy. We have to track different uniform values depending on the backend. -* The GLES backend is still paying some cost for branching, even though we "know" that decal is or isn't supported when the shader is compiled. - -### Specialization constants to the rescue - -Instead of using a runtime check, we can create a specialization constant that is set when compiling the -shader. This constant will be `1` if decal is supported and `0` otherwise. - -```glsl -layout(constant_id = 0) const int supports_decal = 1; - -vec4 Sample(sampler2D sampler, vec2 coord) { - if (supports_decal) { - return texture(sampler, coord); - } - return IPSampleDecal(sampler, coord) -} - -``` - -Immediately we realize a number of benefits: - -* Code is the same across all backends -* Runtime branching cost is removed as the branch is compiled out. - - -## Implementation - -Only 32bit ints are supported as const values and can be used to represent: - -* true/false via 0/1. -* function selection, such as advanced blends. The specialization value maps to a specific blend function. For example, 0 maps to screen and 1 to overlay via a giant if/else macro. - -*AVOID* adding specialization constants for color values or anything more complex. - -Specialization constants are provided to the CreateDefault argument in content_context.cc and aren't a -part of variants. This is intentional: specialization constants shouldn't be used to create (potentially unlimited) runtime variants of a shader. - -Backend specific information: -* In the Metal backend, the specialization constants are mapped to a MTLFunctionConstantValues. See also: https://developer.apple.com/documentation/metal/using_function_specialization_to_build_pipeline_variants?language=objc -* In the Vulkan backend, the specialization constants are mapped to VkSpecializationINfo. See also: https://blogs.igalia.com/itoral/2018/03/20/improving-shader-performance-with-vulkans-specialization-constants/ -* In the GLES backend, the SPIRV Cross compiler will generate defines named `#ifdef SPIRV_CROSS_CONSTANT_i`, where i is the index of constant. The Impeller runtime will insert `#define SPIRV_CROSS_CONSTANT_i` in the header of the shader. \ No newline at end of file diff --git a/engine/src/flutter/impeller/entity/BUILD.gn b/engine/src/flutter/impeller/entity/BUILD.gn index 1aeb0ddda6..fbf674c69a 100644 --- a/engine/src/flutter/impeller/entity/BUILD.gn +++ b/engine/src/flutter/impeller/entity/BUILD.gn @@ -15,7 +15,21 @@ impeller_shaders("entity_shaders") { shaders = [ "shaders/blending/advanced_blend.vert", - "shaders/blending/advanced_blend.frag", + "shaders/blending/advanced_blend_color.frag", + "shaders/blending/advanced_blend_colorburn.frag", + "shaders/blending/advanced_blend_colordodge.frag", + "shaders/blending/advanced_blend_darken.frag", + "shaders/blending/advanced_blend_difference.frag", + "shaders/blending/advanced_blend_exclusion.frag", + "shaders/blending/advanced_blend_hardlight.frag", + "shaders/blending/advanced_blend_hue.frag", + "shaders/blending/advanced_blend_lighten.frag", + "shaders/blending/advanced_blend_luminosity.frag", + "shaders/blending/advanced_blend_multiply.frag", + "shaders/blending/advanced_blend_overlay.frag", + "shaders/blending/advanced_blend_saturation.frag", + "shaders/blending/advanced_blend_screen.frag", + "shaders/blending/advanced_blend_softlight.frag", "shaders/blending/blend.frag", "shaders/blending/blend.vert", "shaders/border_mask_blur.frag", @@ -26,7 +40,8 @@ impeller_shaders("entity_shaders") { "shaders/color_matrix_color_filter.vert", "shaders/conical_gradient_fill.frag", "shaders/gaussian_blur/gaussian_blur.vert", - "shaders/gaussian_blur/gaussian_blur.frag", + "shaders/gaussian_blur/gaussian_blur_noalpha_decal.frag", + "shaders/gaussian_blur/gaussian_blur_noalpha_nodecal.frag", "shaders/glyph_atlas.frag", "shaders/glyph_atlas_color.frag", "shaders/glyph_atlas.vert", @@ -100,8 +115,22 @@ impeller_shaders("framebuffer_blend_entity_shaders") { } shaders = [ - "shaders/blending/framebuffer_blend.vert", - "shaders/blending/framebuffer_blend.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", ] } diff --git a/engine/src/flutter/impeller/entity/contents/atlas_contents.cc b/engine/src/flutter/impeller/entity/contents/atlas_contents.cc index f92c3dbd34..34030ac95a 100644 --- a/engine/src/flutter/impeller/entity/contents/atlas_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/atlas_contents.cc @@ -262,6 +262,8 @@ bool AtlasContents::Render(const ContentContext& renderer, dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + frag_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, texture_, dst_sampler); diff --git a/engine/src/flutter/impeller/entity/contents/content_context.cc b/engine/src/flutter/impeller/entity/contents/content_context.cc index e8e947d791..560c9d8048 100644 --- a/engine/src/flutter/impeller/entity/contents/content_context.cc +++ b/engine/src/flutter/impeller/entity/contents/content_context.cc @@ -5,15 +5,15 @@ #include "impeller/entity/contents/content_context.h" #include +#include #include "impeller/base/strings.h" #include "impeller/core/formats.h" -#include "impeller/entity/contents/framebuffer_blend_contents.h" #include "impeller/entity/entity.h" #include "impeller/entity/render_target_cache.h" #include "impeller/renderer/command_buffer.h" -#include "impeller/renderer/pipeline_descriptor.h" #include "impeller/renderer/pipeline_library.h" +#include "impeller/renderer/render_pass.h" #include "impeller/renderer/render_target.h" #include "impeller/tessellator/tessellator.h" #include "impeller/typographer/typographer_context.h" @@ -197,8 +197,6 @@ ContentContext::ContentContext( .primitive_type = PrimitiveType::kTriangleStrip, .color_attachment_pixel_format = context_->GetCapabilities()->GetDefaultColorFormat()}; - const auto supports_decal = - context_->GetCapabilities()->SupportsDecalSamplerAddressMode(); #ifdef IMPELLER_DEBUG checkerboard_pipelines_.CreateDefault(*context_, options); @@ -219,108 +217,63 @@ ContentContext::ContentContext( } if (context_->GetCapabilities()->SupportsFramebufferFetch()) { - framebuffer_blend_color_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kColor), supports_decal}); - framebuffer_blend_colorburn_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kColorBurn), supports_decal}); + framebuffer_blend_color_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_colorburn_pipelines_.CreateDefault(*context_, + options_trianglestrip); framebuffer_blend_colordodge_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kColorDodge), supports_decal}); - framebuffer_blend_darken_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kDarken), supports_decal}); + *context_, options_trianglestrip); + framebuffer_blend_darken_pipelines_.CreateDefault(*context_, + options_trianglestrip); framebuffer_blend_difference_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kDifference), supports_decal}); - framebuffer_blend_exclusion_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kExclusion), supports_decal}); - framebuffer_blend_hardlight_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kHardLight), supports_decal}); - framebuffer_blend_hue_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kHue), supports_decal}); - framebuffer_blend_lighten_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kLighten), supports_decal}); + *context_, options_trianglestrip); + framebuffer_blend_exclusion_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_hardlight_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_hue_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_lighten_pipelines_.CreateDefault(*context_, + options_trianglestrip); framebuffer_blend_luminosity_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kLuminosity), supports_decal}); - framebuffer_blend_multiply_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kMultiply), supports_decal}); - framebuffer_blend_overlay_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kOverlay), supports_decal}); + *context_, options_trianglestrip); + framebuffer_blend_multiply_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_overlay_pipelines_.CreateDefault(*context_, + options_trianglestrip); framebuffer_blend_saturation_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kSaturation), supports_decal}); - framebuffer_blend_screen_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kScreen), supports_decal}); - framebuffer_blend_softlight_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kSoftLight), supports_decal}); + *context_, options_trianglestrip); + framebuffer_blend_screen_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_softlight_pipelines_.CreateDefault(*context_, + options_trianglestrip); } - blend_color_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kColor), supports_decal}); - blend_colorburn_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kColorBurn), supports_decal}); - blend_colordodge_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kColorDodge), supports_decal}); - blend_darken_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kDarken), supports_decal}); - blend_difference_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kDifference), supports_decal}); - blend_exclusion_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kExclusion), supports_decal}); - blend_hardlight_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kHardLight), supports_decal}); - blend_hue_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kHue), supports_decal}); - blend_lighten_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kLighten), supports_decal}); - blend_luminosity_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kLuminosity), supports_decal}); - blend_multiply_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kMultiply), supports_decal}); - blend_overlay_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kOverlay), supports_decal}); - blend_saturation_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kSaturation), supports_decal}); - blend_screen_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kScreen), supports_decal}); - blend_softlight_pipelines_.CreateDefault( - *context_, options_trianglestrip, - {static_cast(BlendSelectValues::kSoftLight), supports_decal}); + blend_color_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_colorburn_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_colordodge_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_darken_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_difference_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_exclusion_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_hardlight_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_hue_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_lighten_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_luminosity_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_multiply_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_overlay_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_saturation_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_screen_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_softlight_pipelines_.CreateDefault(*context_, options_trianglestrip); rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip); texture_blend_pipelines_.CreateDefault(*context_, options); texture_pipelines_.CreateDefault(*context_, options); position_uv_pipelines_.CreateDefault(*context_, options); tiled_texture_pipelines_.CreateDefault(*context_, options); - gaussian_blur_noalpha_decal_pipelines_.CreateDefault( - *context_, options_trianglestrip, {/*decal_specialization=*/1}); - gaussian_blur_noalpha_nodecal_pipelines_.CreateDefault( - *context_, options_trianglestrip, {/*decal_specialization=*/0}); + gaussian_blur_noalpha_decal_pipelines_.CreateDefault(*context_, + options_trianglestrip); + gaussian_blur_noalpha_nodecal_pipelines_.CreateDefault(*context_, + options_trianglestrip); border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip); morphology_filter_pipelines_.CreateDefault(*context_, options_trianglestrip); color_matrix_color_filter_pipelines_.CreateDefault(*context_, @@ -333,10 +286,9 @@ ContentContext::ContentContext( glyph_atlas_color_pipelines_.CreateDefault(*context_, options); geometry_color_pipelines_.CreateDefault(*context_, options); yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options_trianglestrip); - porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip, - {supports_decal}); - // GLES only shader that is unsupported on macOS. -#if defined(IMPELLER_ENABLE_OPENGLES) && !defined(FML_OS_MACOSX) + porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip); + // GLES only shader. +#ifdef IMPELLER_ENABLE_OPENGLES if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) { texture_external_pipelines_.CreateDefault(*context_, options); } diff --git a/engine/src/flutter/impeller/entity/contents/content_context.h b/engine/src/flutter/impeller/entity/contents/content_context.h index 5931abc1ab..de55d92e68 100644 --- a/engine/src/flutter/impeller/entity/contents/content_context.h +++ b/engine/src/flutter/impeller/entity/contents/content_context.h @@ -4,7 +4,6 @@ #pragma once -#include #include #include #include @@ -63,8 +62,9 @@ #include "impeller/entity/yuv_to_rgb_filter.frag.h" #include "impeller/entity/yuv_to_rgb_filter.vert.h" -#include "impeller/entity/gaussian_blur.frag.h" #include "impeller/entity/gaussian_blur.vert.h" +#include "impeller/entity/gaussian_blur_noalpha_decal.frag.h" +#include "impeller/entity/gaussian_blur_noalpha_nodecal.frag.h" #include "impeller/entity/position_color.vert.h" @@ -75,11 +75,39 @@ #include "impeller/entity/radial_gradient_ssbo_fill.frag.h" #include "impeller/entity/sweep_gradient_ssbo_fill.frag.h" -#include "impeller/entity/advanced_blend.frag.h" #include "impeller/entity/advanced_blend.vert.h" +#include "impeller/entity/advanced_blend_color.frag.h" +#include "impeller/entity/advanced_blend_colorburn.frag.h" +#include "impeller/entity/advanced_blend_colordodge.frag.h" +#include "impeller/entity/advanced_blend_darken.frag.h" +#include "impeller/entity/advanced_blend_difference.frag.h" +#include "impeller/entity/advanced_blend_exclusion.frag.h" +#include "impeller/entity/advanced_blend_hardlight.frag.h" +#include "impeller/entity/advanced_blend_hue.frag.h" +#include "impeller/entity/advanced_blend_lighten.frag.h" +#include "impeller/entity/advanced_blend_luminosity.frag.h" +#include "impeller/entity/advanced_blend_multiply.frag.h" +#include "impeller/entity/advanced_blend_overlay.frag.h" +#include "impeller/entity/advanced_blend_saturation.frag.h" +#include "impeller/entity/advanced_blend_screen.frag.h" +#include "impeller/entity/advanced_blend_softlight.frag.h" -#include "impeller/entity/framebuffer_blend.frag.h" #include "impeller/entity/framebuffer_blend.vert.h" +#include "impeller/entity/framebuffer_blend_color.frag.h" +#include "impeller/entity/framebuffer_blend_colorburn.frag.h" +#include "impeller/entity/framebuffer_blend_colordodge.frag.h" +#include "impeller/entity/framebuffer_blend_darken.frag.h" +#include "impeller/entity/framebuffer_blend_difference.frag.h" +#include "impeller/entity/framebuffer_blend_exclusion.frag.h" +#include "impeller/entity/framebuffer_blend_hardlight.frag.h" +#include "impeller/entity/framebuffer_blend_hue.frag.h" +#include "impeller/entity/framebuffer_blend_lighten.frag.h" +#include "impeller/entity/framebuffer_blend_luminosity.frag.h" +#include "impeller/entity/framebuffer_blend_multiply.frag.h" +#include "impeller/entity/framebuffer_blend_overlay.frag.h" +#include "impeller/entity/framebuffer_blend_saturation.frag.h" +#include "impeller/entity/framebuffer_blend_screen.frag.h" +#include "impeller/entity/framebuffer_blend_softlight.frag.h" #ifdef IMPELLER_ENABLE_OPENGLES #include "impeller/entity/texture_fill_external.frag.h" @@ -129,9 +157,11 @@ using PositionUVPipeline = using TiledTexturePipeline = RenderPipelineT; using GaussianBlurDecalPipeline = - RenderPipelineT; + RenderPipelineT; using GaussianBlurPipeline = - RenderPipelineT; + RenderPipelineT; using BorderMaskBlurPipeline = RenderPipelineT; using MorphologyFilterPipeline = @@ -162,82 +192,93 @@ using YUVToRGBFilterPipeline = RenderPipelineT; // Advanced blends -using BlendColorPipeline = - RenderPipelineT; +using BlendColorPipeline = RenderPipelineT; using BlendColorBurnPipeline = - RenderPipelineT; + RenderPipelineT; using BlendColorDodgePipeline = - RenderPipelineT; -using BlendDarkenPipeline = - RenderPipelineT; + RenderPipelineT; +using BlendDarkenPipeline = RenderPipelineT; using BlendDifferencePipeline = - RenderPipelineT; + RenderPipelineT; using BlendExclusionPipeline = - RenderPipelineT; + RenderPipelineT; using BlendHardLightPipeline = - RenderPipelineT; + RenderPipelineT; using BlendHuePipeline = - RenderPipelineT; + RenderPipelineT; using BlendLightenPipeline = - RenderPipelineT; + RenderPipelineT; using BlendLuminosityPipeline = - RenderPipelineT; + RenderPipelineT; using BlendMultiplyPipeline = - RenderPipelineT; + RenderPipelineT; using BlendOverlayPipeline = - RenderPipelineT; + RenderPipelineT; using BlendSaturationPipeline = - RenderPipelineT; -using BlendScreenPipeline = - RenderPipelineT; + RenderPipelineT; +using BlendScreenPipeline = RenderPipelineT; using BlendSoftLightPipeline = - RenderPipelineT; + RenderPipelineT; // Framebuffer Advanced Blends using FramebufferBlendColorPipeline = RenderPipelineT; + FramebufferBlendColorFragmentShader>; using FramebufferBlendColorBurnPipeline = RenderPipelineT; + FramebufferBlendColorburnFragmentShader>; using FramebufferBlendColorDodgePipeline = RenderPipelineT; + FramebufferBlendColordodgeFragmentShader>; using FramebufferBlendDarkenPipeline = RenderPipelineT; + FramebufferBlendDarkenFragmentShader>; using FramebufferBlendDifferencePipeline = RenderPipelineT; + FramebufferBlendDifferenceFragmentShader>; using FramebufferBlendExclusionPipeline = RenderPipelineT; + FramebufferBlendExclusionFragmentShader>; using FramebufferBlendHardLightPipeline = RenderPipelineT; + FramebufferBlendHardlightFragmentShader>; using FramebufferBlendHuePipeline = RenderPipelineT; + FramebufferBlendHueFragmentShader>; using FramebufferBlendLightenPipeline = RenderPipelineT; + FramebufferBlendLightenFragmentShader>; using FramebufferBlendLuminosityPipeline = RenderPipelineT; + FramebufferBlendLuminosityFragmentShader>; using FramebufferBlendMultiplyPipeline = RenderPipelineT; + FramebufferBlendMultiplyFragmentShader>; using FramebufferBlendOverlayPipeline = RenderPipelineT; + FramebufferBlendOverlayFragmentShader>; using FramebufferBlendSaturationPipeline = RenderPipelineT; + FramebufferBlendSaturationFragmentShader>; using FramebufferBlendScreenPipeline = RenderPipelineT; + FramebufferBlendScreenFragmentShader>; using FramebufferBlendSoftLightPipeline = RenderPipelineT; + FramebufferBlendSoftlightFragmentShader>; /// Geometry Pipelines using PointsComputeShaderPipeline = ComputePipelineBuilder; @@ -697,10 +738,8 @@ class ContentContext { } void CreateDefault(const Context& context, - const ContentContextOptions& options, - const std::initializer_list& constants = {}) { - auto desc = - PipelineT::Builder::MakeDefaultPipelineDescriptor(context, constants); + const ContentContextOptions& options) { + auto desc = PipelineT::Builder::MakeDefaultPipelineDescriptor(context); if (!desc.has_value()) { VALIDATION_LOG << "Failed to create default pipeline."; return; diff --git a/engine/src/flutter/impeller/entity/contents/filters/blend_filter_contents.cc b/engine/src/flutter/impeller/entity/contents/filters/blend_filter_contents.cc index 197b74d998..225f915f9a 100644 --- a/engine/src/flutter/impeller/entity/contents/filters/blend_filter_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/filters/blend_filter_contents.cc @@ -180,6 +180,8 @@ static std::optional AdvancedBlend( dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + blend_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); @@ -352,6 +354,8 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + blend_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); @@ -474,6 +478,8 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + frag_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); diff --git a/engine/src/flutter/impeller/entity/contents/framebuffer_blend_contents.h b/engine/src/flutter/impeller/entity/contents/framebuffer_blend_contents.h index ac5b57229f..db3b2ca628 100644 --- a/engine/src/flutter/impeller/entity/contents/framebuffer_blend_contents.h +++ b/engine/src/flutter/impeller/entity/contents/framebuffer_blend_contents.h @@ -4,31 +4,17 @@ #pragma once +#include #include +#include +#include "flutter/fml/macros.h" +#include "flutter/impeller/core/texture.h" #include "impeller/entity/contents/color_source_contents.h" #include "impeller/entity/entity.h" namespace impeller { -enum class BlendSelectValues { - kScreen = 0, - kOverlay, - kDarken, - kLighten, - kColorDodge, - kColorBurn, - kHardLight, - kSoftLight, - kDifference, - kExclusion, - kMultiply, - kHue, - kSaturation, - kColor, - kLuminosity, -}; - class FramebufferBlendContents final : public ColorSourceContents { public: FramebufferBlendContents(); diff --git a/engine/src/flutter/impeller/entity/entity_unittests.cc b/engine/src/flutter/impeller/entity/entity_unittests.cc index ca1604ab3d..dff54d1738 100644 --- a/engine/src/flutter/impeller/entity/entity_unittests.cc +++ b/engine/src/flutter/impeller/entity/entity_unittests.cc @@ -2536,39 +2536,6 @@ TEST_P(EntityTest, AdvancedBlendCoverageHintIsNotResetByEntityPass) { } } -TEST_P(EntityTest, SpecializationConstantsAreAppliedToVariants) { - auto content_context = - ContentContext(GetContext(), TypographerContextSkia::Make()); - - auto default_color_burn = content_context.GetBlendColorBurnPipeline( - {.has_stencil_attachment = false}); - auto alt_color_burn = content_context.GetBlendColorBurnPipeline( - {.has_stencil_attachment = true}); - - ASSERT_NE(default_color_burn, alt_color_burn); - ASSERT_EQ(default_color_burn->GetDescriptor().GetSpecializationConstants(), - alt_color_burn->GetDescriptor().GetSpecializationConstants()); - - auto decal_supported = static_cast( - GetContext()->GetCapabilities()->SupportsDecalSamplerAddressMode()); - std::vector expected_constants = {5, decal_supported}; - ASSERT_EQ(default_color_burn->GetDescriptor().GetSpecializationConstants(), - expected_constants); -} - -TEST_P(EntityTest, BlurSpecializationConstantValuesAreExpected) { - auto content_context = - ContentContext(GetContext(), TypographerContextSkia::Make()); - - auto decal_pipeline = content_context.GetGaussianBlurDecalPipeline({}); - auto nodecal_pipeline = content_context.GetGaussianBlurPipeline({}); - - ASSERT_EQ(decal_pipeline->GetDescriptor().GetSpecializationConstants()[0], - /*decal_specialization*/ 1); - ASSERT_EQ(nodecal_pipeline->GetDescriptor().GetSpecializationConstants()[0], - /*decal_specialization*/ 0); -} - } // namespace testing } // namespace impeller diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl similarity index 79% rename from engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.frag rename to engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl index 258ab66c39..9a11dce29f 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl @@ -6,10 +6,6 @@ #include #include #include -#include "blend_select.glsl" - -layout(constant_id = 0) const int blend_type = 0; -layout(constant_id = 1) const int supports_decal = 1; uniform BlendInfo { float16_t dst_input_alpha; @@ -29,14 +25,17 @@ in vec2 v_src_texture_coords; out f16vec4 frag_color; f16vec4 Sample(f16sampler2D texture_sampler, vec2 texture_coords) { - if (supports_decal > 0.0) { +#ifdef IMPELLER_TARGET_OPENGLES + if (blend_info.supports_decal_sampler_address_mode > 0.0) { return texture(texture_sampler, texture_coords); + } else { + return IPHalfSampleDecal(texture_sampler, texture_coords); } - return IPHalfSampleDecal(texture_sampler, texture_coords); +#else + return texture(texture_sampler, texture_coords); +#endif } -AdvancedBlend(blend_type); - void main() { f16vec4 dst_sample = Sample(texture_sampler_dst, // sampler v_dst_texture_coords // texture coordinates @@ -51,7 +50,6 @@ void main() { ) * blend_info.src_input_alpha; - f16vec3 blend_result = Blend(dst.rgb, src.rgb); - f16vec4 blended = mix(src, f16vec4(blend_result, dst.a), dst.a); + f16vec4 blended = mix(src, f16vec4(Blend(dst.rgb, src.rgb), dst.a), dst.a); frag_color = mix(dst_sample, blended, src.a); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag new file mode 100644 index 0000000000..20ca9499bb --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_color.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendColor(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag new file mode 100644 index 0000000000..a57d5c5501 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colorburn.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendColorBurn(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag new file mode 100644 index 0000000000..8766c01fd0 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_colordodge.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendColorDodge(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag new file mode 100644 index 0000000000..4f423b5559 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_darken.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendDarken(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag new file mode 100644 index 0000000000..9e3a927ddb --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_difference.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendDifference(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag new file mode 100644 index 0000000000..e8e3911817 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_exclusion.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendExclusion(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag new file mode 100644 index 0000000000..96a94de56f --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hardlight.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendHardLight(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag new file mode 100644 index 0000000000..5f2afb6332 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_hue.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendHue(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag new file mode 100644 index 0000000000..fa421d7ae1 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_lighten.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendLighten(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag new file mode 100644 index 0000000000..c4ee5598f1 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_luminosity.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendLuminosity(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag new file mode 100644 index 0000000000..bda2e1ed44 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_multiply.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendMultiply(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag new file mode 100644 index 0000000000..5def270326 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_overlay.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendOverlay(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag new file mode 100644 index 0000000000..2122b57a0b --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_saturation.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendSaturation(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag new file mode 100644 index 0000000000..98690c3ab5 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_screen.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendScreen(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag new file mode 100644 index 0000000000..130f02807b --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend_softlight.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendSoftLight(dst, src); +} + +#include "advanced_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/blend_select.glsl b/engine/src/flutter/impeller/entity/shaders/blending/blend_select.glsl deleted file mode 100644 index 3040382f35..0000000000 --- a/engine/src/flutter/impeller/entity/shaders/blending/blend_select.glsl +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include -#include -#include - -// kScreen = 0, -// kOverlay, -// kDarken, -// kLighten, -// kColorDodge, -// kColorBurn, -// kHardLight, -// kSoftLight, -// kDifference, -// kExclusion, -// kMultiply, -// kHue, -// kSaturation, -// kColor, -// kLuminosity, -// Note, this isn't a switch as GLSL ES 1.0 does not support them. -#define AdvancedBlend(blend_type) \ - f16vec3 Blend(f16vec3 dst, f16vec3 src) { \ - if (blend_type == 0) { \ - return IPBlendScreen(dst, src); \ - } else if (blend_type == 1) { \ - return IPBlendOverlay(dst, src); \ - } else if (blend_type == 2) { \ - return IPBlendDarken(dst, src); \ - } else if (blend_type == 3) { \ - return IPBlendLighten(dst, src); \ - } else if (blend_type == 4) { \ - return IPBlendColorDodge(dst, src); \ - } else if (blend_type == 5) { \ - return IPBlendColorBurn(dst, src); \ - } else if (blend_type == 6) { \ - return IPBlendHardLight(dst, src); \ - } else if (blend_type == 7) { \ - return IPBlendSoftLight(dst, src); \ - } else if (blend_type == 8) { \ - return IPBlendDifference(dst, src); \ - } else if (blend_type == 9) { \ - return IPBlendExclusion(dst, src); \ - } else if (blend_type == 10) { \ - return IPBlendMultiply(dst, src); \ - } else if (blend_type == 11) { \ - return IPBlendHue(dst, src); \ - } else if (blend_type == 12) { \ - return IPBlendSaturation(dst, src); \ - } else if (blend_type == 13) { \ - return IPBlendColor(dst, src); \ - } else if (blend_type == 14) { \ - return IPBlendLuminosity(dst, src); \ - } else { \ - return f16vec3(0.0hf); \ - } \ - } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/framebuffer_blend.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl similarity index 74% rename from engine/src/flutter/impeller/entity/shaders/blending/framebuffer_blend.frag rename to engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl index 076a4d7b25..67bd9cad83 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/framebuffer_blend.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl @@ -8,10 +8,6 @@ #include #include #include -#include "blend_select.glsl" - -layout(constant_id = 0) const int blend_type = 0; -layout(constant_id = 1) const int supports_decal = 1; layout(set = 0, binding = 0, @@ -33,14 +29,14 @@ in vec2 v_src_texture_coords; out vec4 frag_color; vec4 Sample(sampler2D texture_sampler, vec2 texture_coords) { - if (supports_decal > 1) { - return texture(texture_sampler, texture_coords); - } +// gles 2.0 is the only backend without native decal support. +#ifdef IMPELLER_TARGET_OPENGLES return IPSampleDecal(texture_sampler, texture_coords); +#else + return texture(texture_sampler, texture_coords); +#endif } -AdvancedBlend(blend_type); - void main() { f16vec4 dst = f16vec4(ReadDestination()); f16vec4 src = f16vec4(Sample(texture_sampler_src, // sampler @@ -48,7 +44,6 @@ void main() { )) * frag_info.src_input_alpha; - f16vec3 blend_result = Blend(dst.rgb, src.rgb); - f16vec4 blended = mix(src, f16vec4(blend_result, dst.a), dst.a); + f16vec4 blended = mix(src, f16vec4(Blend(dst.rgb, src.rgb), dst.a), dst.a); frag_color = vec4(mix(dst, blended, src.a)); } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/framebuffer_blend.vert b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.vert similarity index 100% rename from engine/src/flutter/impeller/entity/shaders/blending/framebuffer_blend.vert rename to engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend.vert diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag new file mode 100644 index 0000000000..4798cca350 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_color.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendColor(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag new file mode 100644 index 0000000000..4c53c2b7ab --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colorburn.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendColorBurn(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag new file mode 100644 index 0000000000..d07de5925d --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_colordodge.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendColorDodge(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag new file mode 100644 index 0000000000..e2e42f2385 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_darken.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendDarken(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag new file mode 100644 index 0000000000..b2d26ca8e6 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_difference.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendDifference(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag new file mode 100644 index 0000000000..6358bcc2ac --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_exclusion.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendExclusion(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag new file mode 100644 index 0000000000..19a370b7da --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hardlight.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendHardLight(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag new file mode 100644 index 0000000000..653e570dd7 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_hue.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendHue(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag new file mode 100644 index 0000000000..93b5bcaa7d --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_lighten.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendLighten(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag new file mode 100644 index 0000000000..93cb15f3bb --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_luminosity.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendLuminosity(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag new file mode 100644 index 0000000000..bc6621ae07 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_multiply.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendMultiply(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag new file mode 100644 index 0000000000..2238c38b70 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_overlay.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendOverlay(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag new file mode 100644 index 0000000000..e731de1562 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_saturation.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendSaturation(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag new file mode 100644 index 0000000000..f8f2d569f0 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_screen.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendScreen(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag new file mode 100644 index 0000000000..1902dafa42 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/blending/ios/framebuffer_blend_softlight.frag @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#include +#include + +f16vec3 Blend(f16vec3 dst, f16vec3 src) { + return IPBlendSoftLight(dst, src); +} + +#include "framebuffer_blend.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/blending/porter_duff_blend.frag b/engine/src/flutter/impeller/entity/shaders/blending/porter_duff_blend.frag index 0d140e754e..7e3498ff0d 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/porter_duff_blend.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/porter_duff_blend.frag @@ -9,8 +9,6 @@ precision mediump float; #include #include -layout(constant_id = 0) const int supports_decal = 1; - uniform f16sampler2D texture_sampler_dst; uniform FragInfo { @@ -21,6 +19,7 @@ uniform FragInfo { float16_t dst_coeff_src_color; float16_t input_alpha; float16_t output_alpha; + float supports_decal_sampler_address_mode; } frag_info; @@ -30,10 +29,15 @@ in f16vec4 v_color; out f16vec4 frag_color; f16vec4 Sample(f16sampler2D texture_sampler, vec2 texture_coords) { - if (supports_decal > 0.0) { +#ifdef IMPELLER_TARGET_OPENGLES + if (frag_info.supports_decal_sampler_address_mode > 0.0) { return texture(texture_sampler, texture_coords); + } else { + return IPHalfSampleDecal(texture_sampler, texture_coords); } - return IPHalfSampleDecal(texture_sampler, texture_coords); +#else + return texture(texture_sampler, texture_coords); +#endif } void main() { diff --git a/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.frag b/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl similarity index 94% rename from engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.frag rename to engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl index 5e19d71fbf..a40797aec1 100644 --- a/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.frag +++ b/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl @@ -18,8 +18,6 @@ #include #include -layout(constant_id = 0) const int decal_specialization = 0; - uniform f16sampler2D texture_sampler; uniform BlurInfo { @@ -35,10 +33,11 @@ uniform BlurInfo { blur_info; f16vec4 Sample(f16sampler2D tex, vec2 coords) { - if (decal_specialization == 1) { - return IPHalfSampleDecal(tex, coords); - } +#if ENABLE_DECAL_SPECIALIZATION + return IPHalfSampleDecal(tex, coords); +#else return texture(tex, coords); +#endif } in vec2 v_texture_coords; diff --git a/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_decal.frag b/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_decal.frag new file mode 100644 index 0000000000..7bb1045e19 --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_decal.frag @@ -0,0 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#define ENABLE_DECAL_SPECIALIZATION 1 + +#include "gaussian_blur.glsl" diff --git a/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_nodecal.frag b/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_nodecal.frag new file mode 100644 index 0000000000..79d708e1da --- /dev/null +++ b/engine/src/flutter/impeller/entity/shaders/gaussian_blur/gaussian_blur_noalpha_nodecal.frag @@ -0,0 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +precision mediump float; + +#define ENABLE_DECAL_SPECIALIZATION 0 + +#include "gaussian_blur.glsl" diff --git a/engine/src/flutter/impeller/renderer/backend/gles/BUILD.gn b/engine/src/flutter/impeller/renderer/backend/gles/BUILD.gn index edace2b7aa..f9db5b0313 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/BUILD.gn +++ b/engine/src/flutter/impeller/renderer/backend/gles/BUILD.gn @@ -20,7 +20,6 @@ impeller_component("gles_unittests") { "test/mock_gles.cc", "test/mock_gles.h", "test/mock_gles_unittests.cc", - "test/specialization_constants_unittests.cc", ] deps = [ ":gles", diff --git a/engine/src/flutter/impeller/renderer/backend/gles/pipeline_library_gles.cc b/engine/src/flutter/impeller/renderer/backend/gles/pipeline_library_gles.cc index 85316e386d..b0190826e5 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/pipeline_library_gles.cc +++ b/engine/src/flutter/impeller/renderer/backend/gles/pipeline_library_gles.cc @@ -33,19 +33,6 @@ static std::string GetShaderInfoLog(const ProcTableGLES& gl, GLuint shader) { return log_string; } -static std::string GetShaderSource(const ProcTableGLES& gl, GLuint shader) { - // Arbitrarily chosen size that should be larger than most shaders. - // Since this only fires on compilation errors the performance shouldn't - // matter. - auto data = static_cast(malloc(10240)); - GLsizei length; - gl.GetShaderSource(shader, 10240, &length, data); - - auto result = std::string{data, static_cast(length)}; - free(data); - return result; -} - static void LogShaderCompilationFailure(const ProcTableGLES& gl, GLuint shader, const std::string& name, @@ -76,7 +63,10 @@ static void LogShaderCompilationFailure(const ProcTableGLES& gl, stream << " shader for '" << name << "' with error:" << std::endl; stream << GetShaderInfoLog(gl, shader) << std::endl; stream << "Shader source was: " << std::endl; - stream << GetShaderSource(gl, shader) << std::endl; + stream << std::string{reinterpret_cast( + source_mapping.GetMapping()), + source_mapping.GetSize()} + << std::endl; VALIDATION_LOG << stream.str(); } @@ -115,10 +105,8 @@ static bool LinkProgram( fml::ScopedCleanupClosure delete_frag_shader( [&gl, frag_shader]() { gl.DeleteShader(frag_shader); }); - gl.ShaderSourceMapping(vert_shader, *vert_mapping, - descriptor.GetSpecializationConstants()); - gl.ShaderSourceMapping(frag_shader, *frag_mapping, - descriptor.GetSpecializationConstants()); + gl.ShaderSourceMapping(vert_shader, *vert_mapping); + gl.ShaderSourceMapping(frag_shader, *frag_mapping); gl.CompileShader(vert_shader); gl.CompileShader(frag_shader); diff --git a/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.cc b/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.cc index afdb620163..2541424ad9 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.cc @@ -6,7 +6,6 @@ #include -#include "fml/closure.h" #include "impeller/base/allocation.h" #include "impeller/base/comparable.h" #include "impeller/base/validation.h" @@ -139,53 +138,14 @@ bool ProcTableGLES::IsValid() const { return is_valid_; } -void ProcTableGLES::ShaderSourceMapping( - GLuint shader, - const fml::Mapping& mapping, - const std::vector& defines) const { - if (defines.empty()) { - const GLchar* sources[] = { - reinterpret_cast(mapping.GetMapping())}; - const GLint lengths[] = {static_cast(mapping.GetSize())}; - ShaderSource(shader, 1u, sources, lengths); - return; - } - const auto& shader_source = ComputeShaderWithDefines(mapping, defines); - if (!shader_source.has_value()) { - VALIDATION_LOG << "Failed to append constant data to shader"; - return; - } - +void ProcTableGLES::ShaderSourceMapping(GLuint shader, + const fml::Mapping& mapping) const { const GLchar* sources[] = { - reinterpret_cast(shader_source->c_str())}; - const GLint lengths[] = {static_cast(shader_source->size())}; + reinterpret_cast(mapping.GetMapping())}; + const GLint lengths[] = {static_cast(mapping.GetSize())}; ShaderSource(shader, 1u, sources, lengths); } -// Visible For testing. -std::optional ProcTableGLES::ComputeShaderWithDefines( - const fml::Mapping& mapping, - const std::vector& defines) const { - auto shader_source = std::string{ - reinterpret_cast(mapping.GetMapping()), mapping.GetSize()}; - - // Look for the first newline after the '#version' header, which impellerc - // will always emit as the first line of a compiled shader. - auto index = shader_source.find('\n'); - if (index == std::string::npos) { - VALIDATION_LOG << "Failed to append constant data to shader"; - return std::nullopt; - } - - std::stringstream ss; - for (auto i = 0u; i < defines.size(); i++) { - ss << "#define SPIRV_CROSS_CONSTANT_ID_" << i << " " << defines[i] << '\n'; - } - auto define_string = ss.str(); - shader_source.insert(index + 1, define_string); - return shader_source; -} - const DescriptionGLES* ProcTableGLES::GetDescription() const { return description_.get(); } diff --git a/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.h b/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.h index dfe0fd657d..848f3d9705 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.h +++ b/engine/src/flutter/impeller/renderer/backend/gles/proc_table_gles.h @@ -184,7 +184,6 @@ struct GLProc { PROC(UseProgram); \ PROC(VertexAttribPointer); \ PROC(Viewport); \ - PROC(GetShaderSource); \ PROC(ReadPixels); #define FOR_EACH_IMPELLER_GLES3_PROC(PROC) PROC(BlitFramebuffer); @@ -232,14 +231,7 @@ class ProcTableGLES { bool IsValid() const; - /// @brief Set the source for the attached [shader]. - /// - /// Optionally, [defines] may contain a string value that will be - /// append to the shader source after the version marker. This can be used to - /// support static specialization. For example, setting "#define Foo 1". - void ShaderSourceMapping(GLuint shader, - const fml::Mapping& mapping, - const std::vector& defines = {}) const; + void ShaderSourceMapping(GLuint shader, const fml::Mapping& mapping) const; const DescriptionGLES* GetDescription() const; @@ -259,11 +251,6 @@ class ProcTableGLES { void PopDebugGroup() const; - // Visible For testing. - std::optional ComputeShaderWithDefines( - const fml::Mapping& mapping, - const std::vector& defines) const; - private: bool is_valid_ = false; std::unique_ptr description_; diff --git a/engine/src/flutter/impeller/renderer/backend/gles/shader_library_gles.h b/engine/src/flutter/impeller/renderer/backend/gles/shader_library_gles.h index b2acd22281..cd1ed53a7d 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/shader_library_gles.h +++ b/engine/src/flutter/impeller/renderer/backend/gles/shader_library_gles.h @@ -30,7 +30,7 @@ class ShaderLibraryGLES final : public ShaderLibrary { ShaderFunctionMap functions_ IPLR_GUARDED_BY(functions_mutex_); bool is_valid_ = false; - explicit ShaderLibraryGLES( + ShaderLibraryGLES( const std::vector>& shader_libraries); // |ShaderLibrary| diff --git a/engine/src/flutter/impeller/renderer/backend/gles/test/specialization_constants_unittests.cc b/engine/src/flutter/impeller/renderer/backend/gles/test/specialization_constants_unittests.cc deleted file mode 100644 index 8285c13780..0000000000 --- a/engine/src/flutter/impeller/renderer/backend/gles/test/specialization_constants_unittests.cc +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "flutter/testing/testing.h" // IWYU pragma: keep -#include "fml/mapping.h" -#include "gtest/gtest.h" -#include "impeller/renderer/backend/gles/proc_table_gles.h" -#include "impeller/renderer/backend/gles/test/mock_gles.h" - -namespace impeller { -namespace testing { - -TEST(SpecConstant, CanCreateShaderWithSpecializationConstant) { - auto mock_gles = MockGLES::Init(); - auto& proc_table = mock_gles->GetProcTable(); - auto shader_source = - "#version 100\n" - "#ifndef SPIRV_CROSS_CONSTANT_ID_0\n" - "#define SPIRV_CROSS_CONSTANT_ID_0 1\n" - "#endif\n" - "void main() { return vec4(0.0); }"; - auto test_shader = std::make_shared(shader_source); - - auto result = proc_table.ComputeShaderWithDefines(*test_shader, {0}); - - auto expected_shader_source = - "#version 100\n" - "#define SPIRV_CROSS_CONSTANT_ID_0 0\n" - "#ifndef SPIRV_CROSS_CONSTANT_ID_0\n" - "#define SPIRV_CROSS_CONSTANT_ID_0 1\n" - "#endif\n" - "void main() { return vec4(0.0); }"; - - if (!result.has_value()) { - GTEST_FAIL() << "Expected shader source"; - } - ASSERT_EQ(result.value(), expected_shader_source); -} - -TEST(SpecConstant, CanCreateShaderWithSpecializationConstantMultipleValues) { - auto mock_gles = MockGLES::Init(); - auto& proc_table = mock_gles->GetProcTable(); - auto shader_source = - "#version 100\n" - "#ifndef SPIRV_CROSS_CONSTANT_ID_0\n" - "#define SPIRV_CROSS_CONSTANT_ID_0 1\n" - "#endif\n" - "void main() { return vec4(0.0); }"; - auto test_shader = std::make_shared(shader_source); - - auto result = - proc_table.ComputeShaderWithDefines(*test_shader, {0, 1, 2, 3, 4, 5}); - - auto expected_shader_source = - "#version 100\n" - "#define SPIRV_CROSS_CONSTANT_ID_0 0\n" - "#define SPIRV_CROSS_CONSTANT_ID_1 1\n" - "#define SPIRV_CROSS_CONSTANT_ID_2 2\n" - "#define SPIRV_CROSS_CONSTANT_ID_3 3\n" - "#define SPIRV_CROSS_CONSTANT_ID_4 4\n" - "#define SPIRV_CROSS_CONSTANT_ID_5 5\n" - "#ifndef SPIRV_CROSS_CONSTANT_ID_0\n" - "#define SPIRV_CROSS_CONSTANT_ID_0 1\n" - "#endif\n" - "void main() { return vec4(0.0); }"; - - if (!result.has_value()) { - GTEST_FAIL() << "Expected shader source"; - } - ASSERT_EQ(result.value(), expected_shader_source); -} - -} // namespace testing -} // namespace impeller diff --git a/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.h b/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.h index 06489545e9..5b333c2268 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.h +++ b/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.h @@ -27,7 +27,7 @@ class PipelineLibraryMTL final : public PipelineLibrary { PipelineMap pipelines_; ComputePipelineMap compute_pipelines_; - explicit PipelineLibraryMTL(id device); + PipelineLibraryMTL(id device); // |PipelineLibrary| bool IsValid() const override; diff --git a/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.mm b/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.mm index c7c180aa57..98895ce336 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.mm +++ b/engine/src/flutter/impeller/renderer/backend/metal/pipeline_library_mtl.mm @@ -4,7 +4,6 @@ #include "impeller/renderer/backend/metal/pipeline_library_mtl.h" -#include #include #include "flutter/fml/build_config.h" @@ -29,25 +28,14 @@ static MTLRenderPipelineDescriptor* GetMTLRenderPipelineDescriptor( descriptor.label = @(desc.GetLabel().c_str()); descriptor.rasterSampleCount = static_cast(desc.GetSampleCount()); - const auto& constants = desc.GetSpecializationConstants(); for (const auto& entry : desc.GetStageEntrypoints()) { if (entry.first == ShaderStage::kVertex) { - if (constants.empty()) { - descriptor.vertexFunction = - ShaderFunctionMTL::Cast(*entry.second).GetMTLFunction(); - } else { - descriptor.vertexFunction = ShaderFunctionMTL::Cast(*entry.second) - .GetMTLFunctionSpecialized(constants); - } + descriptor.vertexFunction = + ShaderFunctionMTL::Cast(*entry.second).GetMTLFunction(); } if (entry.first == ShaderStage::kFragment) { - if (constants.empty()) { - descriptor.fragmentFunction = - ShaderFunctionMTL::Cast(*entry.second).GetMTLFunction(); - } else { - descriptor.fragmentFunction = ShaderFunctionMTL::Cast(*entry.second) - .GetMTLFunctionSpecialized(constants); - } + descriptor.fragmentFunction = + ShaderFunctionMTL::Cast(*entry.second).GetMTLFunction(); } } diff --git a/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.h b/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.h index 9ed1fff86c..c47eaf6799 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.h +++ b/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.h @@ -21,18 +21,13 @@ class ShaderFunctionMTL final id GetMTLFunction() const; - id GetMTLFunctionSpecialized( - const std::vector& constants) const; - private: friend class ShaderLibraryMTL; id function_ = nullptr; - id library_ = nullptr; ShaderFunctionMTL(UniqueID parent_library_id, id function, - id library, std::string name, ShaderStage stage); diff --git a/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.mm b/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.mm index 589c0ff7f6..04751af1b8 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.mm +++ b/engine/src/flutter/impeller/renderer/backend/metal/shader_function_mtl.mm @@ -8,37 +8,13 @@ namespace impeller { ShaderFunctionMTL::ShaderFunctionMTL(UniqueID parent_library_id, id function, - id library, std::string name, ShaderStage stage) : ShaderFunction(parent_library_id, std::move(name), stage), - function_(function), - library_(library) {} + function_(function) {} ShaderFunctionMTL::~ShaderFunctionMTL() = default; -id ShaderFunctionMTL::GetMTLFunctionSpecialized( - const std::vector& constants) const { - MTLFunctionConstantValues* constantValues = - [[MTLFunctionConstantValues alloc] init]; - size_t index = 0; - for (const auto value : constants) { - int copied_value = value; - [constantValues setConstantValue:&copied_value - type:MTLDataTypeInt - atIndex:index]; - index++; - } - NSError* error = nil; - auto result = [library_ newFunctionWithName:@(GetName().data()) - constantValues:constantValues - error:&error]; - if (error != nil) { - return nil; - } - return result; -} - id ShaderFunctionMTL::GetMTLFunction() const { return function_; } diff --git a/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.h b/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.h index c401696c7e..5b1bc7c75c 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.h +++ b/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.h @@ -39,7 +39,7 @@ class ShaderLibraryMTL final : public ShaderLibrary { ShaderFunctionMap functions_; bool is_valid_ = false; - explicit ShaderLibraryMTL(NSArray>* libraries); + ShaderLibraryMTL(NSArray>* libraries); // |ShaderLibrary| std::shared_ptr GetFunction(std::string_view name, diff --git a/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.mm b/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.mm index 45eb5d5e3c..94fb1e335b 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.mm +++ b/engine/src/flutter/impeller/renderer/backend/metal/shader_library_mtl.mm @@ -55,7 +55,6 @@ std::shared_ptr ShaderLibraryMTL::GetFunction( ShaderKey key(name, stage); id function = nil; - id library = nil; { ReaderLock lock(libraries_mutex_); @@ -65,8 +64,7 @@ std::shared_ptr ShaderLibraryMTL::GetFunction( } for (size_t i = 0, count = [libraries_ count]; i < count; i++) { - library = libraries_[i]; - function = [library newFunctionWithName:@(name.data())]; + function = [libraries_[i] newFunctionWithName:@(name.data())]; if (function) { break; } @@ -83,7 +81,7 @@ std::shared_ptr ShaderLibraryMTL::GetFunction( } auto func = std::shared_ptr(new ShaderFunctionMTL( - library_id_, function, library, {name.data(), name.size()}, stage)); + library_id_, function, {name.data(), name.size()}, stage)); functions_[key] = func; return func; diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.cc b/engine/src/flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.cc index 8fa14a2e3b..8022f7edb4 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.cc +++ b/engine/src/flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.cc @@ -278,15 +278,7 @@ std::unique_ptr PipelineLibraryVK::CreatePipeline( //---------------------------------------------------------------------------- /// Shader Stages /// - const auto& constants = desc.GetSpecializationConstants(); - - std::vector> map_entries( - desc.GetStageEntrypoints().size()); - std::vector specialization_infos( - desc.GetStageEntrypoints().size()); std::vector shader_stages; - - size_t entrypoint_count = 0; for (const auto& entrypoint : desc.GetStageEntrypoints()) { auto stage = ToVKShaderStageFlagBits(entrypoint.first); if (!stage.has_value()) { @@ -294,31 +286,12 @@ std::unique_ptr PipelineLibraryVK::CreatePipeline( << desc.GetLabel(); return nullptr; } - - std::vector& entries = - map_entries[entrypoint_count]; - for (auto i = 0u; i < constants.size(); i++) { - vk::SpecializationMapEntry entry; - entry.offset = (i * sizeof(int32_t)); - entry.size = sizeof(int32_t); - entry.constantID = i; - entries.emplace_back(entry); - } - - vk::SpecializationInfo& specialization_info = - specialization_infos[entrypoint_count]; - specialization_info.setMapEntries(map_entries[entrypoint_count]); - specialization_info.setPData(constants.data()); - specialization_info.setDataSize(sizeof(int32_t) * constants.size()); - vk::PipelineShaderStageCreateInfo info; info.setStage(stage.value()); info.setPName("main"); info.setModule( ShaderFunctionVK::Cast(entrypoint.second.get())->GetModule()); - info.setPSpecializationInfo(&specialization_info); shader_stages.push_back(info); - entrypoint_count++; } pipeline_info.setStages(shader_stages); diff --git a/engine/src/flutter/impeller/renderer/pipeline_builder.h b/engine/src/flutter/impeller/renderer/pipeline_builder.h index 293a2b7e17..593df8057f 100644 --- a/engine/src/flutter/impeller/renderer/pipeline_builder.h +++ b/engine/src/flutter/impeller/renderer/pipeline_builder.h @@ -48,10 +48,8 @@ struct PipelineBuilder { /// context, a pipeline descriptor. /// static std::optional MakeDefaultPipelineDescriptor( - const Context& context, - const std::vector& constants = {}) { + const Context& context) { PipelineDescriptor desc; - desc.SetSpecializationConstants(constants); if (InitializePipelineDescriptorDefaults(context, desc)) { return {std::move(desc)}; } diff --git a/engine/src/flutter/impeller/renderer/pipeline_descriptor.cc b/engine/src/flutter/impeller/renderer/pipeline_descriptor.cc index 22ee4c30c4..eef517b30c 100644 --- a/engine/src/flutter/impeller/renderer/pipeline_descriptor.cc +++ b/engine/src/flutter/impeller/renderer/pipeline_descriptor.cc @@ -4,9 +4,6 @@ #include "impeller/renderer/pipeline_descriptor.h" -#include - -#include "impeller/base/comparable.h" #include "impeller/core/formats.h" #include "impeller/renderer/shader_function.h" #include "impeller/renderer/shader_library.h" @@ -64,8 +61,7 @@ bool PipelineDescriptor::IsEqual(const PipelineDescriptor& other) const { winding_order_ == other.winding_order_ && cull_mode_ == other.cull_mode_ && primitive_type_ == other.primitive_type_ && - polygon_mode_ == other.polygon_mode_ && - specialization_constants_ == other.specialization_constants_; + polygon_mode_ == other.polygon_mode_; } PipelineDescriptor& PipelineDescriptor::SetLabel(std::string label) { @@ -281,14 +277,4 @@ PolygonMode PipelineDescriptor::GetPolygonMode() const { return polygon_mode_; } -void PipelineDescriptor::SetSpecializationConstants( - std::vector values) { - specialization_constants_ = std::move(values); -} - -const std::vector& PipelineDescriptor::GetSpecializationConstants() - const { - return specialization_constants_; -} - } // namespace impeller diff --git a/engine/src/flutter/impeller/renderer/pipeline_descriptor.h b/engine/src/flutter/impeller/renderer/pipeline_descriptor.h index 1045ea8fbd..3d0eddf880 100644 --- a/engine/src/flutter/impeller/renderer/pipeline_descriptor.h +++ b/engine/src/flutter/impeller/renderer/pipeline_descriptor.h @@ -4,10 +4,17 @@ #pragma once +#include +#include #include #include #include +#include +#include +#include +#include "flutter/fml/hash_combine.h" +#include "flutter/fml/macros.h" #include "impeller/base/comparable.h" #include "impeller/core/formats.h" #include "impeller/core/shader_types.h" @@ -124,10 +131,6 @@ class PipelineDescriptor final : public Comparable { PolygonMode GetPolygonMode() const; - void SetSpecializationConstants(std::vector values); - - const std::vector& GetSpecializationConstants() const; - private: std::string label_; SampleCount sample_count_ = SampleCount::kCount1; @@ -146,7 +149,6 @@ class PipelineDescriptor final : public Comparable { back_stencil_attachment_descriptor_; PrimitiveType primitive_type_ = PrimitiveType::kTriangle; PolygonMode polygon_mode_ = PolygonMode::kFill; - std::vector specialization_constants_; }; } // namespace impeller diff --git a/engine/src/flutter/impeller/renderer/shader_function.cc b/engine/src/flutter/impeller/renderer/shader_function.cc index 7aa8053bd5..b51a4888d0 100644 --- a/engine/src/flutter/impeller/renderer/shader_function.cc +++ b/engine/src/flutter/impeller/renderer/shader_function.cc @@ -19,10 +19,6 @@ ShaderStage ShaderFunction::GetStage() const { return stage_; } -const std::string& ShaderFunction::GetName() const { - return name_; -} - // |Comparable| std::size_t ShaderFunction::GetHash() const { return fml::HashCombine(parent_library_id_, name_, stage_); diff --git a/engine/src/flutter/impeller/renderer/shader_function.h b/engine/src/flutter/impeller/renderer/shader_function.h index 280c64d117..2a06608849 100644 --- a/engine/src/flutter/impeller/renderer/shader_function.h +++ b/engine/src/flutter/impeller/renderer/shader_function.h @@ -4,7 +4,6 @@ #pragma once -#include #include "flutter/fml/hash_combine.h" #include "flutter/fml/macros.h" #include "impeller/base/comparable.h" @@ -19,8 +18,6 @@ class ShaderFunction : public Comparable { ShaderStage GetStage() const; - const std::string& GetName() const; - // |Comparable| std::size_t GetHash() const override; diff --git a/engine/src/flutter/impeller/tools/malioc.json b/engine/src/flutter/impeller/tools/malioc.json index bcf00df0a7..4e61378f06 100644 --- a/engine/src/flutter/impeller/tools/malioc.json +++ b/engine/src/flutter/impeller/tools/malioc.json @@ -1,77 +1,4 @@ { - "flutter/impeller/entity/advanced_blend.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/advanced_blend.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.46875, - 0.46875, - 0.015625, - 0.0, - 0.0, - 0.5, - 0.5 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arith_total", - "arith_fma" - ], - "shortest_path_cycles": [ - 0.40625, - 0.40625, - 0.09375, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.46875, - 0.46875, - 0.09375, - 0.0, - 0.0, - 0.5, - 0.5 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 10, - "work_registers_used": 16 - } - } - } - }, "flutter/impeller/entity/advanced_blend.vert.vkspv": { "Mali-G78": { "core": "Mali-G78", @@ -184,6 +111,1103 @@ } } }, + "flutter/impeller/entity/advanced_blend_color.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_color.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 87, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.609375, + 0.609375, + 0.15625, + 0.125, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.34375, + 0.34375, + 0.203125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "total_cycles": [ + 0.609375, + 0.609375, + 0.203125, + 0.125, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 12 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_colorburn.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_colorburn.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.296875, + 0.28125, + 0.296875, + 0.1875, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.34375, + 0.25, + 0.34375, + 0.1875, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.34375, + 0.28125, + 0.34375, + 0.1875, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 14 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_colordodge.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_colordodge.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.296875, + 0.25, + 0.296875, + 0.1875, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.34375, + 0.21875, + 0.34375, + 0.1875, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.34375, + 0.25, + 0.34375, + 0.1875, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 12 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_darken.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_darken.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.1875, + 0.1875, + 0.0625, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.15625, + 0.15625, + 0.109375, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.1875, + 0.1875, + 0.109375, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 11 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_difference.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_difference.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.234375, + 0.234375, + 0.03125, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.203125, + 0.203125, + 0.078125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.234375, + 0.234375, + 0.078125, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 11 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_exclusion.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_exclusion.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.296875, + 0.296875, + 0.03125, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.265625, + 0.265625, + 0.078125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.296875, + 0.296875, + 0.078125, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 11 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_hardlight.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_hardlight.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.46875, + 0.46875, + 0.09375, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.4375, + 0.4375, + 0.140625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.46875, + 0.46875, + 0.140625, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 10, + "work_registers_used": 13 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_hue.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_hue.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 90, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.71875, + 0.71875, + 0.328125, + 0.1875, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.34375, + 0.34375, + 0.34375, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "total_cycles": [ + 0.71875, + 0.71875, + 0.40625, + 0.1875, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 12 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_lighten.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_lighten.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.1875, + 0.1875, + 0.0625, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.15625, + 0.15625, + 0.109375, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.1875, + 0.1875, + 0.109375, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 11 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_luminosity.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_luminosity.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 87, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.609375, + 0.609375, + 0.15625, + 0.125, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.34375, + 0.34375, + 0.203125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "total_cycles": [ + 0.609375, + 0.609375, + 0.203125, + 0.125, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 12 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_multiply.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_multiply.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.203125, + 0.203125, + 0.03125, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.171875, + 0.171875, + 0.078125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.203125, + 0.203125, + 0.078125, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 11 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_overlay.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_overlay.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.46875, + 0.46875, + 0.09375, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.4375, + 0.4375, + 0.140625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.46875, + 0.46875, + 0.140625, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 10, + "work_registers_used": 13 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_saturation.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_saturation.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 90, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.71875, + 0.71875, + 0.328125, + 0.1875, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.34375, + 0.34375, + 0.34375, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "total_cycles": [ + 0.71875, + 0.71875, + 0.40625, + 0.1875, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 12 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_screen.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_screen.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.265625, + 0.265625, + 0.03125, + 0.0, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.234375, + 0.234375, + 0.078125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.265625, + 0.265625, + 0.078125, + 0.0, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 10 + } + } + } + }, + "flutter/impeller/entity/advanced_blend_softlight.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/advanced_blend_softlight.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.800000011920929, + 0.800000011920929, + 0.234375, + 0.1875, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.762499988079071, + 0.762499988079071, + 0.28125, + 0.1875, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "total_cycles": [ + 0.800000011920929, + 0.800000011920929, + 0.28125, + 0.1875, + 0.0, + 0.5, + 0.5 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 14, + "work_registers_used": 22 + } + } + } + }, "flutter/impeller/entity/blend.frag.vkspv": { "Mali-G78": { "core": "Mali-G78", @@ -1153,79 +2177,6 @@ } } }, - "flutter/impeller/entity/gaussian_blur.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/gaussian_blur.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - null - ], - "longest_path_cycles": [ - null, - null, - null, - null, - null, - null, - null - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" - ], - "shortest_path_cycles": [ - 0.140625, - 0.0625, - 0.140625, - 0.0625, - 0.0, - 0.0, - 0.0 - ], - "total_bound_pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt" - ], - "total_cycles": [ - 0.265625, - 0.265625, - 0.265625, - 0.125, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 10, - "work_registers_used": 15 - } - } - } - }, "flutter/impeller/entity/gaussian_blur.vert.vkspv": { "Mali-G78": { "core": "Mali-G78", @@ -1338,10 +2289,10 @@ } } }, - "flutter/impeller/entity/gles/advanced_blend.frag.gles": { + "flutter/impeller/entity/gaussian_blur_noalpha_decal.frag.vkspv": { "Mali-G78": { "core": "Mali-G78", - "filename": "flutter/impeller/entity/gles/advanced_blend.frag.gles", + "filename": "flutter/impeller/entity/gaussian_blur_noalpha_decal.frag.vkspv", "has_side_effects": false, "has_uniform_computation": true, "modifies_coverage": false, @@ -1351,21 +2302,20 @@ "uses_late_zs_update": false, "variants": { "Main": { - "fp16_arithmetic": 0, + "fp16_arithmetic": 42, "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + null ], "longest_path_cycles": [ - 0.46875, - 0.46875, - 0.0625, - 0.0, - 0.0, - 0.5, - 0.5 + null, + null, + null, + null, + null, + null, + null ], "pipelines": [ "arith_total", @@ -1378,80 +2328,108 @@ ], "shortest_path_bound_pipelines": [ "arith_total", - "arith_fma" + "arith_cvt" ], "shortest_path_cycles": [ - 0.40625, - 0.40625, 0.109375, + 0.03125, + 0.109375, + 0.0625, 0.0, 0.0, + 0.0 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_cvt", + "arith_sfu" + ], + "total_cycles": [ + 0.3125, + 0.203125, + 0.3125, + 0.3125, + 0.0, 0.25, 0.25 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 10, + "work_registers_used": 16 + } + } + } + }, + "flutter/impeller/entity/gaussian_blur_noalpha_nodecal.frag.vkspv": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gaussian_blur_noalpha_nodecal.frag.vkspv", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 35, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + null + ], + "longest_path_cycles": [ + null, + null, + null, + null, + null, + null, + null + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.109375, + 0.03125, + 0.109375, + 0.0625, + 0.0, + 0.0, + 0.0 ], "total_bound_pipelines": [ "varying", "texture" ], "total_cycles": [ - 0.46875, - 0.46875, - 0.140625, + 0.203125, + 0.203125, + 0.203125, + 0.125, 0.0, - 0.0, - 0.5, - 0.5 + 0.25, + 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 12, - "work_registers_used": 24 - } - } - }, - "Mali-T880": { - "core": "Mali-T880", - "filename": "flutter/impeller/entity/gles/advanced_blend.frag.gles", - "has_uniform_computation": false, - "type": "Fragment", - "variants": { - "Main": { - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "arithmetic" - ], - "longest_path_cycles": [ - 2.9700000286102295, - 2.0, - 2.0 - ], - "pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arithmetic" - ], - "shortest_path_cycles": [ - 2.640000104904175, - 1.0, - 1.0 - ], - "total_bound_pipelines": [ - "arithmetic" - ], - "total_cycles": [ - 3.3333332538604736, - 2.0, - 2.0 - ] - }, - "thread_occupancy": 100, - "uniform_registers_used": 2, - "work_registers_used": 4 + "uniform_registers_used": 10, + "work_registers_used": 13 } } } @@ -1613,6 +2591,1763 @@ } } }, + "flutter/impeller/entity/gles/advanced_blend_color.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_color.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.609375, + 0.609375, + 0.46875, + 0.5, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.34375, + 0.34375, + 0.265625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.609375, + 0.609375, + 0.578125, + 0.5, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_color.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 9.569999694824219, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 4.949999809265137, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 11.0, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 3 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_colorburn.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_colorburn.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "longest_path_cycles": [ + 0.637499988079071, + 0.28125, + 0.637499988079071, + 0.5625, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.40625, + 0.25, + 0.40625, + 0.1875, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.75, + 0.28125, + 0.75, + 0.5625, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 26 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_colorburn.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 10.229999542236328, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 7.590000152587891, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 11.666666984558105, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_colordodge.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_colordodge.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "longest_path_cycles": [ + 0.625, + 0.25, + 0.625, + 0.5625, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.390625, + 0.21875, + 0.390625, + 0.1875, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.737500011920929, + 0.25, + 0.737500011920929, + 0.5625, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 24 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_colordodge.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 10.229999542236328, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 7.590000152587891, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 11.666666984558105, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_darken.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_darken.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.40625, + 0.1875, + 0.40625, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.171875, + 0.15625, + 0.171875, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.515625, + 0.1875, + 0.515625, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_darken.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 5.28000020980835, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 2.309999942779541, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 6.333333492279053, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_difference.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_difference.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.375, + 0.234375, + 0.375, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.203125, + 0.203125, + 0.140625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.484375, + 0.234375, + 0.484375, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_difference.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 5.610000133514404, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 2.640000104904175, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 6.666666507720947, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_exclusion.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_exclusion.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.375, + 0.28125, + 0.375, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma", + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.25, + 0.25, + 0.140625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.484375, + 0.28125, + 0.484375, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_exclusion.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 5.610000133514404, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 2.640000104904175, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 6.666666507720947, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_hardlight.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_hardlight.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.453125, + 0.453125, + 0.421875, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.421875, + 0.421875, + 0.1875, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.53125, + 0.453125, + 0.53125, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 10, + "work_registers_used": 24 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_hardlight.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 6.599999904632568, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 3.9600000381469727, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 8.0, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 4 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_hue.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_hue.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.71875, + 0.71875, + 0.625, + 0.5625, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.40625, + 0.34375, + 0.40625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.78125, + 0.71875, + 0.78125, + 0.5625, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_hue.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 11.220000267028809, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 5.610000133514404, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 13.0, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 3 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_lighten.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_lighten.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.40625, + 0.1875, + 0.40625, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.171875, + 0.15625, + 0.171875, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.515625, + 0.1875, + 0.515625, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_lighten.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 5.28000020980835, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 2.309999942779541, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 6.333333492279053, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_luminosity.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_luminosity.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.609375, + 0.609375, + 0.46875, + 0.5, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.34375, + 0.34375, + 0.265625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.609375, + 0.609375, + 0.578125, + 0.5, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_luminosity.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 9.569999694824219, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 4.949999809265137, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 11.0, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 3 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_multiply.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_multiply.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.375, + 0.203125, + 0.375, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.171875, + 0.171875, + 0.140625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.484375, + 0.203125, + 0.484375, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_multiply.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 5.610000133514404, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 2.640000104904175, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 6.666666507720947, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_overlay.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_overlay.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.453125, + 0.453125, + 0.4375, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.421875, + 0.421875, + 0.203125, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.546875, + 0.453125, + 0.546875, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 10, + "work_registers_used": 24 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_overlay.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 6.929999828338623, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 3.9600000381469727, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 8.0, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 4 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_saturation.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_saturation.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.71875, + 0.71875, + 0.625, + 0.5625, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt" + ], + "shortest_path_cycles": [ + 0.40625, + 0.34375, + 0.40625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.78125, + 0.71875, + 0.78125, + 0.5625, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_saturation.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 11.550000190734863, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 5.610000133514404, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 13.0, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 3 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_screen.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_screen.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "varying", + "texture" + ], + "longest_path_cycles": [ + 0.375, + 0.25, + 0.375, + 0.375, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "varying", + "texture" + ], + "shortest_path_cycles": [ + 0.21875, + 0.21875, + 0.140625, + 0.0, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.484375, + 0.25, + 0.484375, + 0.375, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 20 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_screen.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 5.610000133514404, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 2.640000104904175, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 6.666666507720947, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 2 + } + } + } + }, + "flutter/impeller/entity/gles/advanced_blend_softlight.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/advanced_blend_softlight.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 100, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "longest_path_cycles": [ + 0.75, + 0.75, + 0.578125, + 0.5625, + 0.0, + 0.5, + 0.5 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_fma" + ], + "shortest_path_cycles": [ + 0.71875, + 0.71875, + 0.34375, + 0.1875, + 0.0, + 0.25, + 0.25 + ], + "total_bound_pipelines": [ + "texture" + ], + "total_cycles": [ + 0.75, + 0.75, + 0.6875, + 0.5625, + 0.0, + 0.5, + 1.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 14, + "work_registers_used": 30 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/advanced_blend_softlight.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "arithmetic" + ], + "longest_path_cycles": [ + 9.569999694824219, + 2.0, + 2.0 + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 6.599999904632568, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 10.666666984558105, + 2.0, + 4.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 2, + "work_registers_used": 4 + } + } + } + }, "flutter/impeller/entity/gles/blend.frag.gles": { "Mali-G78": { "core": "Mali-G78", @@ -3011,123 +5746,6 @@ } } }, - "flutter/impeller/entity/gles/gaussian_blur.frag.gles": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/gles/gaussian_blur.frag.gles", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - null - ], - "longest_path_cycles": [ - null, - null, - null, - null, - null, - null, - null - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" - ], - "shortest_path_cycles": [ - 0.09375, - 0.0625, - 0.09375, - 0.0625, - 0.0, - 0.0, - 0.0 - ], - "total_bound_pipelines": [ - "arith_total", - "arith_fma" - ], - "total_cycles": [ - 0.28125, - 0.28125, - 0.25, - 0.125, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 10, - "work_registers_used": 19 - } - } - }, - "Mali-T880": { - "core": "Mali-T880", - "filename": "flutter/impeller/entity/gles/gaussian_blur.frag.gles", - "has_uniform_computation": false, - "type": "Fragment", - "variants": { - "Main": { - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - null - ], - "longest_path_cycles": [ - null, - null, - null - ], - "pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arithmetic" - ], - "shortest_path_cycles": [ - 1.649999976158142, - 1.0, - 0.0 - ], - "total_bound_pipelines": [ - "arithmetic" - ], - "total_cycles": [ - 3.6666667461395264, - 1.0, - 1.0 - ] - }, - "thread_occupancy": 100, - "uniform_registers_used": 1, - "work_registers_used": 4 - } - } - } - }, "flutter/impeller/entity/gles/gaussian_blur.vert.gles": { "Mali-G78": { "core": "Mali-G78", @@ -3285,6 +5903,242 @@ } } }, + "flutter/impeller/entity/gles/gaussian_blur_noalpha_decal.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/gaussian_blur_noalpha_decal.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 70, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + null + ], + "longest_path_cycles": [ + null, + null, + null, + null, + null, + null, + null + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt", + "arith_sfu" + ], + "shortest_path_cycles": [ + 0.0625, + 0.03125, + 0.0625, + 0.0625, + 0.0, + 0.0, + 0.0 + ], + "total_bound_pipelines": [ + "arith_total", + "arith_sfu" + ], + "total_cycles": [ + 0.3125, + 0.234375, + 0.296875, + 0.3125, + 0.0, + 0.25, + 0.25 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 19 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/gaussian_blur_noalpha_decal.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + null + ], + "longest_path_cycles": [ + null, + null, + null + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 1.649999976158142, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 5.0, + 1.0, + 1.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 1, + "work_registers_used": 4 + } + } + } + }, + "flutter/impeller/entity/gles/gaussian_blur_noalpha_nodecal.frag.gles": { + "Mali-G78": { + "core": "Mali-G78", + "filename": "flutter/impeller/entity/gles/gaussian_blur_noalpha_nodecal.frag.gles", + "has_side_effects": false, + "has_uniform_computation": true, + "modifies_coverage": false, + "reads_color_buffer": false, + "type": "Fragment", + "uses_late_zs_test": false, + "uses_late_zs_update": false, + "variants": { + "Main": { + "fp16_arithmetic": 66, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + null + ], + "longest_path_cycles": [ + null, + null, + null, + null, + null, + null, + null + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "varying", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arith_total", + "arith_cvt", + "arith_sfu" + ], + "shortest_path_cycles": [ + 0.0625, + 0.03125, + 0.0625, + 0.0625, + 0.0, + 0.0, + 0.0 + ], + "total_bound_pipelines": [ + "varying", + "texture" + ], + "total_cycles": [ + 0.234375, + 0.234375, + 0.1875, + 0.125, + 0.0, + 0.25, + 0.25 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 8, + "work_registers_used": 19 + } + } + }, + "Mali-T880": { + "core": "Mali-T880", + "filename": "flutter/impeller/entity/gles/gaussian_blur_noalpha_nodecal.frag.gles", + "has_uniform_computation": false, + "type": "Fragment", + "variants": { + "Main": { + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + null + ], + "longest_path_cycles": [ + null, + null, + null + ], + "pipelines": [ + "arithmetic", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "arithmetic" + ], + "shortest_path_cycles": [ + 1.649999976158142, + 1.0, + 0.0 + ], + "total_bound_pipelines": [ + "arithmetic" + ], + "total_cycles": [ + 3.6666667461395264, + 1.0, + 1.0 + ] + }, + "thread_occupancy": 100, + "uniform_registers_used": 1, + "work_registers_used": 2 + } + } + } + }, "flutter/impeller/entity/gles/glyph_atlas.frag.gles": { "Mali-G78": { "core": "Mali-G78",