From 949e91bbba29ed366d4048ea7305c0b0dc7a6d81 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 20 Jul 2023 13:47:16 -0700 Subject: [PATCH] [Impeller] Provide fragment uniform data through varyings for solid color, glyph atlas, texture shaders. (flutter/engine#43838) From experimentation, providing these values through varyings runs substantially faster on Pixel devices. Alternative solutions to use f16 or push constants did not improve things substantially. These subset of shaders are used very heavily and so they benefit from this change more substantially. I don't think this is applicable to all shaders as there is going to be an additional varying interpolation cost. See also: [go/impeller-slow-fragment-shader](http://goto.google.com/impeller-slow-fragment-shader) --- .../compiler/shader_lib/impeller/types.glsl | 6 + .../entity/contents/atlas_contents.cc | 5 +- .../impeller/entity/contents/clip_contents.cc | 12 +- .../entity/contents/solid_color_contents.cc | 6 +- .../impeller/entity/contents/text_contents.cc | 5 +- .../entity/contents/texture_contents.cc | 5 +- .../entity/contents/tiled_texture_contents.cc | 7 +- .../entity/contents/vertices_contents.cc | 5 +- .../impeller/entity/entity_unittests.cc | 7 +- .../impeller/entity/shaders/glyph_atlas.frag | 9 +- .../impeller/entity/shaders/glyph_atlas.vert | 5 + .../entity/shaders/glyph_atlas_color.frag | 9 +- .../impeller/entity/shaders/solid_fill.frag | 7 +- .../impeller/entity/shaders/solid_fill.vert | 4 + .../impeller/entity/shaders/texture_fill.frag | 8 +- .../impeller/entity/shaders/texture_fill.vert | 3 + .../entity/shaders/tiled_texture_fill.frag | 4 +- .../renderer/compute_subgroup_unittests.cc | 18 +- engine/src/flutter/impeller/tools/malioc.json | 451 ++++++++++-------- 19 files changed, 303 insertions(+), 273 deletions(-) diff --git a/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl b/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl index ad1a0e86cf9..b0ce4188d08 100644 --- a/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl +++ b/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl @@ -9,6 +9,12 @@ #extension GL_AMD_gpu_shader_half_float_fetch : enable #extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable +#ifdef IMPELLER_TARGET_OPENGLES +#define IMPELLER_MAYBE_FLAT +#else +#define IMPELLER_MAYBE_FLAT flat +#endif + #ifndef IMPELLER_TARGET_METAL_IOS precision mediump sampler2D; diff --git a/engine/src/flutter/impeller/entity/contents/atlas_contents.cc b/engine/src/flutter/impeller/entity/contents/atlas_contents.cc index b88fee0c205..bfdfd16aa12 100644 --- a/engine/src/flutter/impeller/entity/contents/atlas_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/atlas_contents.cc @@ -338,16 +338,13 @@ bool AtlasTextureContents::Render(const ContentContext& renderer, frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * entity.GetTransformation(); frame_info.texture_sampler_y_coord_scale = texture->GetYCoordScale(); - - FS::FragInfo frag_info; - frag_info.alpha = alpha_; + frame_info.alpha = alpha_; auto options = OptionsFromPassAndEntity(pass, entity); cmd.pipeline = renderer.GetTexturePipeline(options); cmd.stencil_reference = entity.GetStencilDepth(); cmd.BindVertices(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); - FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); FS::BindTextureSampler(cmd, texture, renderer.GetContext()->GetSamplerLibrary()->GetSampler( parent_.GetSamplerDescriptor())); diff --git a/engine/src/flutter/impeller/entity/contents/clip_contents.cc b/engine/src/flutter/impeller/entity/contents/clip_contents.cc index f7663312a9d..65b05e86924 100644 --- a/engine/src/flutter/impeller/entity/contents/clip_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/clip_contents.cc @@ -80,16 +80,13 @@ bool ClipContents::Render(const ContentContext& renderer, const Entity& entity, RenderPass& pass) const { using VS = ClipPipeline::VertexShader; - using FS = ClipPipeline::FragmentShader; VS::FrameInfo info; Command cmd; - FS::FragInfo frag_info; // The color really doesn't matter. - frag_info.color = Color::SkyBlue(); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); + info.color = Color::SkyBlue(); auto options = OptionsFromPassAndEntity(pass, entity); cmd.stencil_reference = entity.GetStencilDepth(); @@ -182,7 +179,6 @@ bool ClipRestoreContents::Render(const ContentContext& renderer, const Entity& entity, RenderPass& pass) const { using VS = ClipPipeline::VertexShader; - using FS = ClipPipeline::FragmentShader; Command cmd; cmd.label = "Restore Clip"; @@ -208,13 +204,9 @@ bool ClipRestoreContents::Render(const ContentContext& renderer, VS::FrameInfo info; info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()); + info.color = Color::SkyBlue(); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(info)); - FS::FragInfo frag_info; - // The color really doesn't matter. - frag_info.color = Color::SkyBlue(); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - pass.AddCommand(std::move(cmd)); return true; } diff --git a/engine/src/flutter/impeller/entity/contents/solid_color_contents.cc b/engine/src/flutter/impeller/entity/contents/solid_color_contents.cc index 02ecbf67365..8a2ceadacfa 100644 --- a/engine/src/flutter/impeller/entity/contents/solid_color_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/solid_color_contents.cc @@ -54,7 +54,6 @@ bool SolidColorContents::Render(const ContentContext& renderer, const Entity& entity, RenderPass& pass) const { using VS = SolidFillPipeline::VertexShader; - using FS = SolidFillPipeline::FragmentShader; Command cmd; cmd.label = "Solid Fill"; @@ -75,12 +74,9 @@ bool SolidColorContents::Render(const ContentContext& renderer, VS::FrameInfo frame_info; frame_info.mvp = geometry_result.transform; + frame_info.color = GetColor().Premultiply(); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); - FS::FragInfo frag_info; - frag_info.color = GetColor().Premultiply(); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - if (!pass.AddCommand(std::move(cmd))) { return false; } diff --git a/engine/src/flutter/impeller/entity/contents/text_contents.cc b/engine/src/flutter/impeller/entity/contents/text_contents.cc index 339bb275491..bbb2524abb5 100644 --- a/engine/src/flutter/impeller/entity/contents/text_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/text_contents.cc @@ -125,6 +125,7 @@ bool TextContents::Render(const ContentContext& renderer, frame_info.is_translation_scale = entity.GetTransformation().IsTranslationScaleOnly(); frame_info.entity_transform = entity.GetTransformation(); + frame_info.text_color = ToVector(color.Premultiply()); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); @@ -143,10 +144,6 @@ bool TextContents::Render(const ContentContext& renderer, } sampler_desc.mip_filter = MipFilter::kNearest; - FS::FragInfo frag_info; - frag_info.text_color = ToVector(color.Premultiply()); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - FS::BindGlyphAtlasSampler( cmd, // command atlas->GetTexture(), // texture diff --git a/engine/src/flutter/impeller/entity/contents/texture_contents.cc b/engine/src/flutter/impeller/entity/contents/texture_contents.cc index 553d53c0c96..1dbc8a5a2b5 100644 --- a/engine/src/flutter/impeller/entity/contents/texture_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/texture_contents.cc @@ -135,9 +135,7 @@ bool TextureContents::Render(const ContentContext& renderer, frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * entity.GetTransformation(); frame_info.texture_sampler_y_coord_scale = texture_->GetYCoordScale(); - - FS::FragInfo frag_info; - frag_info.alpha = GetOpacity(); + frame_info.alpha = GetOpacity(); Command cmd; cmd.label = "Texture Fill"; @@ -155,7 +153,6 @@ bool TextureContents::Render(const ContentContext& renderer, cmd.stencil_reference = entity.GetStencilDepth(); cmd.BindVertices(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); - FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); FS::BindTextureSampler(cmd, texture_, renderer.GetContext()->GetSamplerLibrary()->GetSampler( sampler_descriptor_)); diff --git a/engine/src/flutter/impeller/entity/contents/tiled_texture_contents.cc b/engine/src/flutter/impeller/entity/contents/tiled_texture_contents.cc index c5172b71ca7..8ef9b6d78cb 100644 --- a/engine/src/flutter/impeller/entity/contents/tiled_texture_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/tiled_texture_contents.cc @@ -136,6 +136,7 @@ bool TiledTextureContents::Render(const ContentContext& renderer, VS::FrameInfo frame_info; frame_info.mvp = geometry_result.transform; frame_info.texture_sampler_y_coord_scale = texture_->GetYCoordScale(); + frame_info.alpha = GetOpacityFactor(); Command cmd; cmd.label = uses_emulated_tile_mode ? "TiledTextureFill" : "TextureFill"; @@ -158,13 +159,7 @@ bool TiledTextureContents::Render(const ContentContext& renderer, FS::FragInfo frag_info; frag_info.x_tile_mode = static_cast(x_tile_mode_); frag_info.y_tile_mode = static_cast(y_tile_mode_); - frag_info.alpha = GetOpacityFactor(); FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); - } else { - TextureFillFragmentShader::FragInfo frag_info; - frag_info.alpha = GetOpacityFactor(); - TextureFillFragmentShader::BindFragInfo( - cmd, host_buffer.EmplaceUniform(frag_info)); } if (color_filter_) { diff --git a/engine/src/flutter/impeller/entity/contents/vertices_contents.cc b/engine/src/flutter/impeller/entity/contents/vertices_contents.cc index 75c6b2ea3b6..353e28e112e 100644 --- a/engine/src/flutter/impeller/entity/contents/vertices_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/vertices_contents.cc @@ -144,12 +144,9 @@ bool VerticesUVContents::Render(const ContentContext& renderer, frame_info.mvp = geometry_result.transform; frame_info.texture_sampler_y_coord_scale = snapshot->texture->GetYCoordScale(); + frame_info.alpha = alpha_ * snapshot->opacity; VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); - FS::FragInfo frag_info; - frag_info.alpha = alpha_ * snapshot->opacity; - FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); - FS::BindTextureSampler(cmd, snapshot->texture, renderer.GetContext()->GetSamplerLibrary()->GetSampler( snapshot->sampler_descriptor)); diff --git a/engine/src/flutter/impeller/entity/entity_unittests.cc b/engine/src/flutter/impeller/entity/entity_unittests.cc index 05818e84270..b8c4975c13e 100644 --- a/engine/src/flutter/impeller/entity/entity_unittests.cc +++ b/engine/src/flutter/impeller/entity/entity_unittests.cc @@ -857,7 +857,6 @@ TEST_P(EntityTest, BlendingModeOptions) { auto draw_rect = [&context, &pass, &world_matrix]( Rect rect, Color color, BlendMode blend_mode) -> bool { using VS = SolidFillPipeline::VertexShader; - using FS = SolidFillPipeline::FragmentShader; VertexBufferBuilder vtx_builder; { @@ -884,14 +883,10 @@ TEST_P(EntityTest, BlendingModeOptions) { VS::FrameInfo frame_info; frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * world_matrix; + frame_info.color = color.Premultiply(); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); - FS::FragInfo frag_info; - frag_info.color = color.Premultiply(); - FS::BindFragInfo(cmd, - pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - return pass.AddCommand(std::move(cmd)); }; diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag index fbd7d3afeb9..9a9b71780dd 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag @@ -8,16 +8,13 @@ precision mediump float; uniform f16sampler2D glyph_atlas_sampler; -uniform FragInfo { - f16vec4 text_color; -} -frag_info; - in highp vec2 v_uv; +IMPELLER_MAYBE_FLAT in f16vec4 v_text_color; + out f16vec4 frag_color; void main() { f16vec4 value = texture(glyph_atlas_sampler, v_uv); - frag_color = value.aaaa * frag_info.text_color; + frag_color = value.aaaa * v_text_color; } diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert index d21f75a10dd..c677997e726 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert @@ -3,12 +3,14 @@ // found in the LICENSE file. #include +#include uniform FrameInfo { mat4 mvp; mat4 entity_transform; vec2 atlas_size; vec2 offset; + f16vec4 text_color; float is_translation_scale; } frame_info; @@ -23,6 +25,8 @@ in vec2 glyph_position; out vec2 v_uv; +IMPELLER_MAYBE_FLAT out f16vec4 v_text_color; + mat4 basis(mat4 m) { return mat4(m[0][0], m[0][1], m[0][2], 0.0, // m[1][0], m[1][1], m[1][2], 0.0, // @@ -77,4 +81,5 @@ void main() { gl_Position = frame_info.mvp * position; v_uv = uv_origin + unit_position * uv_size; + v_text_color = frame_info.text_color; } diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas_color.frag b/engine/src/flutter/impeller/entity/shaders/glyph_atlas_color.frag index e33c31f7542..293329b764f 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas_color.frag +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas_color.frag @@ -8,16 +8,13 @@ precision mediump float; uniform f16sampler2D glyph_atlas_sampler; -uniform FragInfo { - f16vec4 text_color; -} -frag_info; - in highp vec2 v_uv; +IMPELLER_MAYBE_FLAT in f16vec4 v_text_color; + out f16vec4 frag_color; void main() { f16vec4 value = texture(glyph_atlas_sampler, v_uv); - frag_color = value * frag_info.text_color.aaaa; + frag_color = value * v_text_color.aaaa; } diff --git a/engine/src/flutter/impeller/entity/shaders/solid_fill.frag b/engine/src/flutter/impeller/entity/shaders/solid_fill.frag index 0001edc7412..ed376a71d85 100644 --- a/engine/src/flutter/impeller/entity/shaders/solid_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/solid_fill.frag @@ -6,13 +6,10 @@ precision mediump float; #include -uniform FragInfo { - f16vec4 color; -} -frag_info; +IMPELLER_MAYBE_FLAT in f16vec4 v_color; out f16vec4 frag_color; void main() { - frag_color = frag_info.color; + frag_color = v_color; } diff --git a/engine/src/flutter/impeller/entity/shaders/solid_fill.vert b/engine/src/flutter/impeller/entity/shaders/solid_fill.vert index 4d8e67e74a2..76733804d6e 100644 --- a/engine/src/flutter/impeller/entity/shaders/solid_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/solid_fill.vert @@ -6,11 +6,15 @@ uniform FrameInfo { mat4 mvp; + f16vec4 color; } frame_info; in vec2 position; +IMPELLER_MAYBE_FLAT out f16vec4 v_color; + void main() { + v_color = frame_info.color; gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0); } diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill.frag b/engine/src/flutter/impeller/entity/shaders/texture_fill.frag index f61bf342a00..c520b4701ce 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill.frag @@ -9,17 +9,13 @@ precision mediump float; uniform f16sampler2D texture_sampler; -uniform FragInfo { - float16_t alpha; -} -frag_info; - in highp vec2 v_texture_coords; +IMPELLER_MAYBE_FLAT in float16_t v_alpha; out f16vec4 frag_color; void main() { f16vec4 sampled = texture(texture_sampler, v_texture_coords, kDefaultMipBiasHalf); - frag_color = sampled * frag_info.alpha; + frag_color = sampled * v_alpha; } diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill.vert b/engine/src/flutter/impeller/entity/shaders/texture_fill.vert index 0dbc6fd4bfa..26e5f73f713 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill.vert @@ -8,6 +8,7 @@ uniform FrameInfo { mat4 mvp; float texture_sampler_y_coord_scale; + float16_t alpha; } frame_info; @@ -15,9 +16,11 @@ in vec2 position; in vec2 texture_coords; out vec2 v_texture_coords; +IMPELLER_MAYBE_FLAT out float16_t v_alpha; void main() { gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0); + v_alpha = frame_info.alpha; v_texture_coords = IPRemapCoords(texture_coords, frame_info.texture_sampler_y_coord_scale); } diff --git a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag index 46d4d63183f..5e8413ef98f 100644 --- a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag @@ -12,11 +12,11 @@ uniform f16sampler2D texture_sampler; uniform FragInfo { float16_t x_tile_mode; float16_t y_tile_mode; - float16_t alpha; } frag_info; in highp vec2 v_texture_coords; +IMPELLER_MAYBE_FLAT in float16_t v_alpha; out f16vec4 frag_color; @@ -27,5 +27,5 @@ void main() { frag_info.x_tile_mode, // x tile mode frag_info.y_tile_mode // y tile mode ) * - frag_info.alpha; + v_alpha; } diff --git a/engine/src/flutter/impeller/renderer/compute_subgroup_unittests.cc b/engine/src/flutter/impeller/renderer/compute_subgroup_unittests.cc index 39e5fac2587..84bc953ddc3 100644 --- a/engine/src/flutter/impeller/renderer/compute_subgroup_unittests.cc +++ b/engine/src/flutter/impeller/renderer/compute_subgroup_unittests.cc @@ -131,7 +131,6 @@ TEST_P(ComputeSubgroupTest, PathPlayground) { } using VS = SolidFillPipeline::VertexShader; - using FS = SolidFillPipeline::FragmentShader; Command cmd; cmd.label = "Draw Stroke"; @@ -164,13 +163,10 @@ TEST_P(ComputeSubgroupTest, PathPlayground) { auto world_matrix = Matrix::MakeScale(GetContentScale()); frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * world_matrix; + frame_info.color = Color::Red().Premultiply(); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); - FS::FragInfo frag_info; - frag_info.color = Color::Red().Premultiply(); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - if (!pass.AddCommand(std::move(cmd))) { return false; } @@ -339,7 +335,6 @@ TEST_P(ComputeSubgroupTest, LargePath) { } using VS = SolidFillPipeline::VertexShader; - using FS = SolidFillPipeline::FragmentShader; Command cmd; cmd.label = "Draw Stroke"; @@ -372,13 +367,10 @@ TEST_P(ComputeSubgroupTest, LargePath) { auto world_matrix = Matrix::MakeScale(GetContentScale()); frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * world_matrix; + frame_info.color = Color::Red().Premultiply(); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); - FS::FragInfo frag_info; - frag_info.color = Color::Red().Premultiply(); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - if (!pass.AddCommand(std::move(cmd))) { return false; } @@ -427,7 +419,6 @@ TEST_P(ComputeSubgroupTest, QuadAndCubicInOnePath) { } using VS = SolidFillPipeline::VertexShader; - using FS = SolidFillPipeline::FragmentShader; Command cmd; cmd.label = "Draw Stroke"; @@ -460,13 +451,10 @@ TEST_P(ComputeSubgroupTest, QuadAndCubicInOnePath) { auto world_matrix = Matrix::MakeScale(GetContentScale()); frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * world_matrix; + frame_info.color = Color::Red().Premultiply(); VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); - FS::FragInfo frag_info; - frag_info.color = Color::Red().Premultiply(); - FS::BindFragInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info)); - if (!pass.AddCommand(std::move(cmd))) { return false; } diff --git a/engine/src/flutter/impeller/tools/malioc.json b/engine/src/flutter/impeller/tools/malioc.json index edbfb7f89f6..cb9684572c2 100644 --- a/engine/src/flutter/impeller/tools/malioc.json +++ b/engine/src/flutter/impeller/tools/malioc.json @@ -7394,8 +7394,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.03125, @@ -7403,7 +7402,7 @@ 0.03125, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "pipelines": [ @@ -7416,8 +7415,7 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ 0.03125, @@ -7425,12 +7423,11 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "total_bound_pipelines": [ - "varying", - "texture" + "varying" ], "total_cycles": [ 0.03125, @@ -7438,13 +7435,13 @@ 0.03125, 0.0, 0.0, - 0.25, + 0.5, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 6, + "uniform_registers_used": 4, "work_registers_used": 19 } } @@ -7494,7 +7491,7 @@ ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 0, "work_registers_used": 2 } } @@ -7555,7 +7552,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 44, + "uniform_registers_used": 48, "work_registers_used": 32 }, "Varying": { @@ -7568,9 +7565,9 @@ "longest_path_cycles": [ 0.15625, 0.15625, + 0.0625, 0.0, - 0.0, - 4.0, + 5.0, 0.0 ], "pipelines": [ @@ -7587,9 +7584,9 @@ "shortest_path_cycles": [ 0.15625, 0.15625, + 0.0625, 0.0, - 0.0, - 4.0, + 5.0, 0.0 ], "total_bound_pipelines": [ @@ -7598,16 +7595,16 @@ "total_cycles": [ 0.15625, 0.15625, + 0.0625, 0.0, - 0.0, - 4.0, + 5.0, 0.0 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 14, - "work_registers_used": 11 + "uniform_registers_used": 18, + "work_registers_used": 16 } } }, @@ -7624,8 +7621,8 @@ "load_store" ], "longest_path_cycles": [ - 6.929999828338623, - 7.0, + 7.260000228881836, + 8.0, 0.0 ], "pipelines": [ @@ -7637,21 +7634,21 @@ "load_store" ], "shortest_path_cycles": [ - 5.940000057220459, - 7.0, + 6.269999980926514, + 8.0, 0.0 ], "total_bound_pipelines": [ "arithmetic" ], "total_cycles": [ - 9.0, - 7.0, + 9.333333015441895, + 8.0, 0.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 11, + "uniform_registers_used": 13, "work_registers_used": 3 } } @@ -7674,8 +7671,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.03125, @@ -7683,7 +7679,7 @@ 0.03125, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "pipelines": [ @@ -7696,8 +7692,7 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ 0.03125, @@ -7705,12 +7700,11 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "total_bound_pipelines": [ - "varying", - "texture" + "varying" ], "total_cycles": [ 0.03125, @@ -7718,7 +7712,7 @@ 0.03125, 0.0, 0.0, - 0.25, + 0.5, 0.25 ] }, @@ -7774,7 +7768,7 @@ ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 0, "work_registers_used": 2 } } @@ -9446,16 +9440,15 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "longest_path_cycles": [ - 0.0625, - 0.0, - 0.0625, + 0.03125, 0.0, + 0.03125, 0.0, 0.0, + 0.25, 0.0 ], "pipelines": [ @@ -9468,36 +9461,34 @@ "texture" ], "shortest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "shortest_path_cycles": [ - 0.03125, - 0.0, - 0.03125, 0.0, 0.0, 0.0, + 0.0, + 0.0, + 0.25, 0.0 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "total_cycles": [ - 0.0625, - 0.0, - 0.0625, + 0.03125, 0.0, + 0.03125, 0.0, 0.0, + 0.25, 0.0 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 2, - "work_registers_used": 18 + "uniform_registers_used": 0, + "work_registers_used": 19 } } }, @@ -9511,11 +9502,12 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "arithmetic" + "arithmetic", + "load_store" ], "longest_path_cycles": [ 1.0, - 0.0, + 1.0, 0.0 ], "pipelines": [ @@ -9524,24 +9516,25 @@ "texture" ], "shortest_path_bound_pipelines": [ - "arithmetic" + "arithmetic", + "load_store" ], "shortest_path_cycles": [ 1.0, - 0.0, + 1.0, 0.0 ], "total_bound_pipelines": [ - "arithmetic" + "load_store" ], "total_cycles": [ 0.6666666865348816, - 0.0, + 1.0, 0.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 0, "work_registers_used": 2 } } @@ -9602,8 +9595,59 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 20, + "uniform_registers_used": 24, "work_registers_used": 32 + }, + "Varying": { + "fp16_arithmetic": null, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "load_store" + ], + "longest_path_cycles": [ + 0.0625, + 0.0, + 0.0625, + 0.0, + 2.0, + 0.0 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "load_store" + ], + "shortest_path_cycles": [ + 0.0625, + 0.0, + 0.0625, + 0.0, + 2.0, + 0.0 + ], + "total_bound_pipelines": [ + "load_store" + ], + "total_cycles": [ + 0.0625, + 0.0, + 0.0625, + 0.0, + 2.0, + 0.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 12, + "work_registers_used": 7 } } }, @@ -9621,7 +9665,7 @@ ], "longest_path_cycles": [ 2.640000104904175, - 3.0, + 4.0, 0.0 ], "pipelines": [ @@ -9634,7 +9678,7 @@ ], "shortest_path_cycles": [ 2.640000104904175, - 3.0, + 4.0, 0.0 ], "total_bound_pipelines": [ @@ -9642,12 +9686,12 @@ ], "total_cycles": [ 2.6666667461395264, - 3.0, + 4.0, 0.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 5, + "uniform_registers_used": 6, "work_registers_used": 2 } } @@ -10064,8 +10108,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.046875, @@ -10073,7 +10116,7 @@ 0.046875, 0.0, 0.0, - 0.25, + 0.375, 0.25 ], "pipelines": [ @@ -10086,8 +10129,7 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ 0.03125, @@ -10095,12 +10137,11 @@ 0.015625, 0.0, 0.0, - 0.25, + 0.375, 0.25 ], "total_bound_pipelines": [ - "varying", - "texture" + "varying" ], "total_cycles": [ 0.046875, @@ -10108,13 +10149,13 @@ 0.046875, 0.0, 0.0, - 0.25, + 0.375, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 4, + "uniform_registers_used": 2, "work_registers_used": 19 } } @@ -10164,7 +10205,7 @@ ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 0, "work_registers_used": 2 } } @@ -10236,9 +10277,9 @@ "load_store" ], "longest_path_cycles": [ + 0.03125, 0.015625, - 0.015625, - 0.015625, + 0.03125, 0.0, 3.0, 0.0 @@ -10255,9 +10296,9 @@ "load_store" ], "shortest_path_cycles": [ + 0.03125, 0.015625, - 0.015625, - 0.015625, + 0.03125, 0.0, 3.0, 0.0 @@ -10266,9 +10307,9 @@ "load_store" ], "total_cycles": [ + 0.03125, 0.015625, - 0.015625, - 0.015625, + 0.03125, 0.0, 3.0, 0.0 @@ -10295,7 +10336,7 @@ ], "longest_path_cycles": [ 2.9700000286102295, - 5.0, + 6.0, 0.0 ], "pipelines": [ @@ -10308,7 +10349,7 @@ ], "shortest_path_cycles": [ 2.9700000286102295, - 5.0, + 6.0, 0.0 ], "total_bound_pipelines": [ @@ -10316,7 +10357,7 @@ ], "total_cycles": [ 3.0, - 5.0, + 6.0, 0.0 ] }, @@ -10344,16 +10385,15 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "longest_path_cycles": [ - 0.265625, - 0.03125, - 0.265625, - 0.0, - 0.0, 0.25, + 0.03125, + 0.25, + 0.0, + 0.0, + 0.375, 0.25 ], "pipelines": [ @@ -10366,29 +10406,27 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ - 0.0625, + 0.046875, 0.03125, - 0.0625, + 0.046875, 0.0, 0.0, - 0.25, + 0.375, 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "total_cycles": [ - 0.265625, - 0.03125, - 0.265625, - 0.0, - 0.0, 0.25, + 0.03125, + 0.25, + 0.0, + 0.0, + 0.375, 0.25 ] }, @@ -10413,7 +10451,7 @@ ], "longest_path_cycles": [ 3.299999952316284, - 1.0, + 2.0, 1.0 ], "pipelines": [ @@ -10422,11 +10460,11 @@ "texture" ], "shortest_path_bound_pipelines": [ - "arithmetic" + "load_store" ], "shortest_path_cycles": [ 1.3200000524520874, - 1.0, + 2.0, 0.0 ], "total_bound_pipelines": [ @@ -10434,7 +10472,7 @@ ], "total_cycles": [ 3.6666667461395264, - 1.0, + 2.0, 1.0 ] }, @@ -10839,7 +10877,7 @@ "core": "Mali-G78", "filename": "flutter/impeller/entity/glyph_atlas.frag.vkspv", "has_side_effects": false, - "has_uniform_computation": true, + "has_uniform_computation": false, "modifies_coverage": false, "reads_color_buffer": false, "type": "Fragment", @@ -10851,8 +10889,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.03125, @@ -10860,7 +10897,7 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "pipelines": [ @@ -10873,8 +10910,7 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ 0.03125, @@ -10882,12 +10918,11 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "total_bound_pipelines": [ - "varying", - "texture" + "varying" ], "total_cycles": [ 0.03125, @@ -10895,13 +10930,13 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 6, + "uniform_registers_used": 4, "work_registers_used": 6 } } @@ -10962,7 +10997,7 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 52, + "uniform_registers_used": 56, "work_registers_used": 32 }, "Varying": { @@ -10975,9 +11010,9 @@ "longest_path_cycles": [ 0.15625, 0.15625, + 0.0625, 0.0, - 0.0, - 4.0, + 5.0, 0.0 ], "pipelines": [ @@ -10994,9 +11029,9 @@ "shortest_path_cycles": [ 0.15625, 0.15625, + 0.0625, 0.0, - 0.0, - 4.0, + 5.0, 0.0 ], "total_bound_pipelines": [ @@ -11005,16 +11040,16 @@ "total_cycles": [ 0.15625, 0.15625, + 0.0625, 0.0, - 0.0, - 4.0, + 5.0, 0.0 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 44, - "work_registers_used": 11 + "uniform_registers_used": 48, + "work_registers_used": 13 } } } @@ -11024,7 +11059,7 @@ "core": "Mali-G78", "filename": "flutter/impeller/entity/glyph_atlas_color.frag.vkspv", "has_side_effects": false, - "has_uniform_computation": true, + "has_uniform_computation": false, "modifies_coverage": false, "reads_color_buffer": false, "type": "Fragment", @@ -11036,8 +11071,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.03125, @@ -11045,7 +11079,7 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "pipelines": [ @@ -11058,8 +11092,7 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ 0.03125, @@ -11067,12 +11100,11 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ], "total_bound_pipelines": [ - "varying", - "texture" + "varying" ], "total_cycles": [ 0.03125, @@ -11080,14 +11112,14 @@ 0.0, 0.0, 0.0, - 0.25, + 0.5, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 4, - "work_registers_used": 4 + "work_registers_used": 6 } } } @@ -12408,7 +12440,7 @@ "core": "Mali-G78", "filename": "flutter/impeller/entity/solid_fill.frag.vkspv", "has_side_effects": false, - "has_uniform_computation": true, + "has_uniform_computation": false, "modifies_coverage": false, "reads_color_buffer": false, "type": "Fragment", @@ -12420,16 +12452,15 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "longest_path_cycles": [ - 0.0625, - 0.0, - 0.0625, 0.0, 0.0, 0.0, + 0.0, + 0.0, + 0.25, 0.0 ], "pipelines": [ @@ -12442,36 +12473,34 @@ "texture" ], "shortest_path_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "shortest_path_cycles": [ - 0.0625, - 0.0, - 0.0625, 0.0, 0.0, 0.0, + 0.0, + 0.0, + 0.25, 0.0 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt" + "varying" ], "total_cycles": [ - 0.0625, - 0.0, - 0.0625, 0.0, 0.0, 0.0, + 0.0, + 0.0, + 0.25, 0.0 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 5 + "uniform_registers_used": 0, + "work_registers_used": 3 } } } @@ -12531,8 +12560,59 @@ }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 28, + "uniform_registers_used": 32, "work_registers_used": 32 + }, + "Varying": { + "fp16_arithmetic": null, + "has_stack_spilling": false, + "performance": { + "longest_path_bound_pipelines": [ + "load_store" + ], + "longest_path_cycles": [ + 0.0625, + 0.0, + 0.0625, + 0.0, + 2.0, + 0.0 + ], + "pipelines": [ + "arith_total", + "arith_fma", + "arith_cvt", + "arith_sfu", + "load_store", + "texture" + ], + "shortest_path_bound_pipelines": [ + "load_store" + ], + "shortest_path_cycles": [ + 0.0625, + 0.0, + 0.0625, + 0.0, + 2.0, + 0.0 + ], + "total_bound_pipelines": [ + "load_store" + ], + "total_cycles": [ + 0.0625, + 0.0, + 0.0625, + 0.0, + 2.0, + 0.0 + ] + }, + "stack_spill_bytes": 0, + "thread_occupancy": 100, + "uniform_registers_used": 24, + "work_registers_used": 7 } } } @@ -12871,7 +12951,7 @@ "core": "Mali-G78", "filename": "flutter/impeller/entity/texture_fill.frag.vkspv", "has_side_effects": false, - "has_uniform_computation": true, + "has_uniform_computation": false, "modifies_coverage": false, "reads_color_buffer": false, "type": "Fragment", @@ -12883,8 +12963,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.03125, @@ -12892,7 +12971,7 @@ 0.015625, 0.0, 0.0, - 0.25, + 0.375, 0.25 ], "pipelines": [ @@ -12905,8 +12984,7 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying", - "texture" + "varying" ], "shortest_path_cycles": [ 0.03125, @@ -12914,12 +12992,11 @@ 0.015625, 0.0, 0.0, - 0.25, + 0.375, 0.25 ], "total_bound_pipelines": [ - "varying", - "texture" + "varying" ], "total_cycles": [ 0.03125, @@ -12927,14 +13004,14 @@ 0.015625, 0.0, 0.0, - 0.25, + 0.375, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 5 + "uniform_registers_used": 2, + "work_registers_used": 6 } } } @@ -13005,9 +13082,9 @@ "load_store" ], "longest_path_cycles": [ + 0.046875, 0.015625, - 0.015625, - 0.015625, + 0.046875, 0.0, 3.0, 0.0 @@ -13024,9 +13101,9 @@ "load_store" ], "shortest_path_cycles": [ + 0.046875, 0.015625, - 0.015625, - 0.015625, + 0.046875, 0.0, 3.0, 0.0 @@ -13035,9 +13112,9 @@ "load_store" ], "total_cycles": [ + 0.046875, 0.015625, - 0.015625, - 0.015625, + 0.046875, 0.0, 3.0, 0.0 @@ -13046,7 +13123,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 22, - "work_registers_used": 8 + "work_registers_used": 10 } } } @@ -13068,10 +13145,7 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "arith_total", - "arith_cvt", - "varying", - "texture" + "varying" ], "longest_path_cycles": [ 0.25, @@ -13079,7 +13153,7 @@ 0.25, 0.0625, 0.0, - 0.25, + 0.375, 0.25 ], "pipelines": [ @@ -13100,14 +13174,11 @@ 0.140625, 0.0625, 0.0, - 0.25, + 0.375, 0.0 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt", - "varying", - "texture" + "varying" ], "total_cycles": [ 0.25, @@ -13115,14 +13186,14 @@ 0.25, 0.0625, 0.0, - 0.25, + 0.375, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 4, - "work_registers_used": 7 + "work_registers_used": 8 } } }