From 0e6143504c0fa60038f3b181438600e1c5c12bf7 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 19 Apr 2024 13:48:18 -0700 Subject: [PATCH] [Impeller] organize texture shaders / delete blend.frag + external_texture_fill (flutter/engine#52137) * Deletes blend.frag/vert . This was identical to the existing texture_fill shader. * Move alpha to frag info and stop passing as varying. ~~* Deletes strict src rect fragment shader. We should be able to compute the UVs on the CPU, which is trivial since this is only used for rectangular draws.~~ * Deletes external texture fill in favor of tiled texture external fill. The former shader is marginally faster, but we don't use it since we don't correctly check for the right extensions needed for non-emulated sampling modes with external textures on GLES. Easier to just always use emulated tile modes --- .../ci/licenses_golden/licenses_flutter | 6 - engine/src/flutter/impeller/entity/BUILD.gn | 5 +- .../entity/contents/atlas_contents.cc | 6 +- .../entity/contents/content_context.cc | 4 - .../entity/contents/content_context.h | 23 - .../contents/filters/blend_filter_contents.cc | 12 +- .../filters/gaussian_blur_filter_contents.cc | 6 +- .../entity/contents/texture_contents.cc | 39 +- .../entity/contents/tiled_texture_contents.cc | 9 +- .../entity/contents/vertices_contents.cc | 4 +- .../entity/shaders/blending/blend.frag | 24 - .../entity/shaders/blending/blend.vert | 23 - .../impeller/entity/shaders/texture_fill.frag | 8 +- .../impeller/entity/shaders/texture_fill.vert | 3 - .../entity/shaders/texture_fill_external.frag | 16 - .../shaders/texture_fill_strict_src.frag | 4 +- .../entity/shaders/tiled_texture_fill.frag | 16 +- .../shaders/tiled_texture_fill_external.frag | 4 +- engine/src/flutter/impeller/tools/malioc.json | 853 +++--------------- 19 files changed, 187 insertions(+), 878 deletions(-) delete mode 100644 engine/src/flutter/impeller/entity/shaders/blending/blend.frag delete mode 100644 engine/src/flutter/impeller/entity/shaders/blending/blend.vert delete mode 100644 engine/src/flutter/impeller/entity/shaders/texture_fill_external.frag diff --git a/engine/src/flutter/ci/licenses_golden/licenses_flutter b/engine/src/flutter/ci/licenses_golden/licenses_flutter index 5f46b12511..b52c469b2f 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_flutter +++ b/engine/src/flutter/ci/licenses_golden/licenses_flutter @@ -40372,8 +40372,6 @@ ORIGIN: ../../../flutter/impeller/entity/render_target_cache.cc + ../../../flutt 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.vert + ../../../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 @@ -40418,7 +40416,6 @@ ORIGIN: ../../../flutter/impeller/entity/shaders/solid_fill.frag + ../../../flut ORIGIN: ../../../flutter/impeller/entity/shaders/solid_fill.vert + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill.vert + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill_external.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill_strict_src.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/tiled_texture_fill.frag + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/entity/shaders/tiled_texture_fill_external.frag + ../../../flutter/LICENSE @@ -43255,8 +43252,6 @@ 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.vert -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 @@ -43301,7 +43296,6 @@ FILE: ../../../flutter/impeller/entity/shaders/solid_fill.frag FILE: ../../../flutter/impeller/entity/shaders/solid_fill.vert FILE: ../../../flutter/impeller/entity/shaders/texture_fill.frag FILE: ../../../flutter/impeller/entity/shaders/texture_fill.vert -FILE: ../../../flutter/impeller/entity/shaders/texture_fill_external.frag FILE: ../../../flutter/impeller/entity/shaders/texture_fill_strict_src.frag FILE: ../../../flutter/impeller/entity/shaders/tiled_texture_fill.frag FILE: ../../../flutter/impeller/entity/shaders/tiled_texture_fill_external.frag diff --git a/engine/src/flutter/impeller/entity/BUILD.gn b/engine/src/flutter/impeller/entity/BUILD.gn index d2c3428fd1..42d0a32a3f 100644 --- a/engine/src/flutter/impeller/entity/BUILD.gn +++ b/engine/src/flutter/impeller/entity/BUILD.gn @@ -16,8 +16,6 @@ impeller_shaders("entity_shaders") { shaders = [ "shaders/blending/advanced_blend.vert", "shaders/blending/advanced_blend.frag", - "shaders/blending/blend.frag", - "shaders/blending/blend.vert", "shaders/border_mask_blur.frag", "shaders/border_mask_blur.vert", "shaders/clip.frag", @@ -41,10 +39,9 @@ impeller_shaders("entity_shaders") { "shaders/gradients/sweep_gradient_fill.frag", "shaders/texture_fill.frag", "shaders/texture_fill.vert", - "shaders/texture_fill_external.frag", - "shaders/texture_fill_strict_src.frag", "shaders/tiled_texture_fill.frag", "shaders/tiled_texture_fill_external.frag", + "shaders/texture_fill_strict_src.frag", "shaders/vertices.frag", "shaders/blending/porter_duff_blend.frag", "shaders/blending/porter_duff_blend.vert", diff --git a/engine/src/flutter/impeller/entity/contents/atlas_contents.cc b/engine/src/flutter/impeller/entity/contents/atlas_contents.cc index 9e01411f56..f8171692f2 100644 --- a/engine/src/flutter/impeller/entity/contents/atlas_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/atlas_contents.cc @@ -405,12 +405,16 @@ bool AtlasTextureContents::Render(const ContentContext& renderer, VS::FrameInfo frame_info; frame_info.mvp = entity.GetShaderTransform(pass); frame_info.texture_sampler_y_coord_scale = texture->GetYCoordScale(); - frame_info.alpha = alpha_; auto options = OptionsFromPassAndEntity(pass, entity); pass.SetPipeline(renderer.GetTexturePipeline(options)); pass.SetVertexBuffer(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(pass, host_buffer.EmplaceUniform(frame_info)); + + FS::FragInfo frag_info; + frag_info.alpha = alpha_; + + FS::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info)); FS::BindTextureSampler(pass, texture, renderer.GetContext()->GetSamplerLibrary()->GetSampler( parent_.GetSamplerDescriptor())); diff --git a/engine/src/flutter/impeller/entity/contents/content_context.cc b/engine/src/flutter/impeller/entity/contents/content_context.cc index 1a7a8a9b02..bd3e05c135 100644 --- a/engine/src/flutter/impeller/entity/contents/content_context.cc +++ b/engine/src/flutter/impeller/entity/contents/content_context.cc @@ -421,7 +421,6 @@ ContentContext::ContentContext( {static_cast(BlendSelectValues::kSoftLight), supports_decal}); rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip); - texture_blend_pipelines_.CreateDefault(*context_, options); texture_strict_src_pipelines_.CreateDefault(*context_, options); position_uv_pipelines_.CreateDefault(*context_, options); tiled_texture_pipelines_.CreateDefault(*context_, options); @@ -448,9 +447,6 @@ ContentContext::ContentContext( {supports_decal}); // GLES only shader that is unsupported on macOS. #if defined(IMPELLER_ENABLE_OPENGLES) && !defined(FML_OS_MACOSX) - if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) { - texture_external_pipelines_.CreateDefault(*context_, options); - } if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) { tiled_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 bd4dfb7ad3..361cd6650d 100644 --- a/engine/src/flutter/impeller/entity/contents/content_context.h +++ b/engine/src/flutter/impeller/entity/contents/content_context.h @@ -29,8 +29,6 @@ #include "impeller/entity/checkerboard.vert.h" #endif // IMPELLER_DEBUG -#include "impeller/entity/blend.frag.h" -#include "impeller/entity/blend.vert.h" #include "impeller/entity/border_mask_blur.frag.h" #include "impeller/entity/border_mask_blur.vert.h" #include "impeller/entity/clip.frag.h" @@ -84,7 +82,6 @@ #include "impeller/entity/framebuffer_blend.vert.h" #ifdef IMPELLER_ENABLE_OPENGLES -#include "impeller/entity/texture_fill_external.frag.h" #include "impeller/entity/tiled_texture_fill_external.frag.h" #endif // IMPELLER_ENABLE_OPENGLES @@ -127,8 +124,6 @@ using SweepGradientSSBOFillPipeline = SweepGradientSsboFillFragmentShader>; using RRectBlurPipeline = RenderPipelineHandle; -using BlendPipeline = - RenderPipelineHandle; using TexturePipeline = RenderPipelineHandle; using TextureStrictSrcPipeline = @@ -261,10 +256,6 @@ using PointsComputeShaderPipeline = ComputePipelineBuilder; using UvComputeShaderPipeline = ComputePipelineBuilder; #ifdef IMPELLER_ENABLE_OPENGLES -using TextureExternalPipeline = - RenderPipelineHandle; - using TiledTextureExternalPipeline = RenderPipelineHandle; @@ -468,11 +459,6 @@ class ContentContext { return GetPipeline(solid_fill_pipelines_, opts); } - std::shared_ptr> GetBlendPipeline( - ContentContextOptions opts) const { - return GetPipeline(texture_blend_pipelines_, opts); - } - std::shared_ptr> GetTexturePipeline( ContentContextOptions opts) const { return GetPipeline(texture_pipelines_, opts); @@ -484,13 +470,6 @@ class ContentContext { } #ifdef IMPELLER_ENABLE_OPENGLES - std::shared_ptr> GetTextureExternalPipeline( - ContentContextOptions opts) const { - FML_DCHECK(GetContext()->GetBackendType() == - Context::BackendType::kOpenGLES); - return GetPipeline(texture_external_pipelines_, opts); - } - std::shared_ptr> GetTiledTextureExternalPipeline( ContentContextOptions opts) const { FML_DCHECK(GetContext()->GetBackendType() == @@ -947,11 +926,9 @@ class ContentContext { mutable Variants sweep_gradient_ssbo_fill_pipelines_; mutable Variants rrect_blur_pipelines_; - mutable Variants texture_blend_pipelines_; mutable Variants texture_pipelines_; mutable Variants texture_strict_src_pipelines_; #ifdef IMPELLER_ENABLE_OPENGLES - mutable Variants texture_external_pipelines_; mutable Variants tiled_texture_external_pipelines_; #endif // IMPELLER_ENABLE_OPENGLES 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 93550da403..3497c5bdd8 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 @@ -505,8 +505,8 @@ static std::optional PipelineBlend( std::optional foreground_color, ColorFilterContents::AbsorbOpacity absorb_opacity, std::optional alpha) { - using VS = BlendPipeline::VertexShader; - using FS = BlendPipeline::FragmentShader; + using VS = TexturePipeline::VertexShader; + using FS = TexturePipeline::FragmentShader; auto dst_snapshot = inputs[0]->GetSnapshot("PipelineBlend(Dst)", renderer, entity); @@ -552,7 +552,7 @@ static std::optional PipelineBlend( const std::unique_ptr& sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( input->sampler_descriptor); - FS::BindTextureSamplerSrc(pass, input->texture, sampler); + FS::BindTextureSampler(pass, input->texture, sampler); auto size = input->texture->GetSize(); VertexBufferBuilder vtx_builder; @@ -572,7 +572,7 @@ static std::optional PipelineBlend( input->texture->GetYCoordScale(); FS::FragInfo frag_info; - frag_info.input_alpha = + frag_info.alpha = absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes ? input->opacity : 1.0; @@ -584,7 +584,7 @@ static std::optional PipelineBlend( // Draw the first texture using kSource. options.blend_mode = BlendMode::kSource; - pass.SetPipeline(renderer.GetBlendPipeline(options)); + pass.SetPipeline(renderer.GetTexturePipeline(options)); if (!add_blend_command(dst_snapshot)) { return true; } @@ -593,7 +593,7 @@ static std::optional PipelineBlend( if (inputs.size() >= 2) { options.blend_mode = blend_mode; - pass.SetPipeline(renderer.GetBlendPipeline(options)); + pass.SetPipeline(renderer.GetTexturePipeline(options)); for (auto texture_i = inputs.begin() + 1; texture_i < inputs.end(); texture_i++) { diff --git a/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index 3d324233b5..9ac17dff21 100644 --- a/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -95,7 +95,9 @@ fml::StatusOr MakeDownsampleSubpass( TextureFillVertexShader::FrameInfo frame_info; frame_info.mvp = Matrix::MakeOrthographic(ISize(1, 1)); frame_info.texture_sampler_y_coord_scale = 1.0; - frame_info.alpha = 1.0; + + TextureFillFragmentShader::FragInfo frag_info; + frag_info.alpha = 1.0; BindVertices(pass, host_buffer, { @@ -111,6 +113,8 @@ fml::StatusOr MakeDownsampleSubpass( linear_sampler_descriptor.min_filter = MinMagFilter::kLinear; TextureFillVertexShader::BindFrameInfo( pass, host_buffer.EmplaceUniform(frame_info)); + TextureFillFragmentShader::BindFragInfo( + pass, host_buffer.EmplaceUniform(frag_info)); TextureFillFragmentShader::BindTextureSampler( pass, input_texture, renderer.GetContext()->GetSamplerLibrary()->GetSampler( diff --git a/engine/src/flutter/impeller/entity/contents/texture_contents.cc b/engine/src/flutter/impeller/entity/contents/texture_contents.cc index f2f10207bf..d48b4b6eaa 100644 --- a/engine/src/flutter/impeller/entity/contents/texture_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/texture_contents.cc @@ -13,7 +13,8 @@ #include "impeller/entity/entity.h" #include "impeller/entity/texture_fill.frag.h" #include "impeller/entity/texture_fill.vert.h" -#include "impeller/entity/texture_fill_external.frag.h" +#include "impeller/entity/texture_fill_strict_src.frag.h" +#include "impeller/entity/tiled_texture_fill_external.frag.h" #include "impeller/geometry/constants.h" #include "impeller/renderer/render_pass.h" #include "impeller/renderer/vertex_buffer_builder.h" @@ -113,8 +114,8 @@ bool TextureContents::Render(const ContentContext& renderer, using VS = TextureFillVertexShader; using FS = TextureFillFragmentShader; - using FSStrictSrc = TextureFillStrictSrcFragmentShader; - using FSExternal = TextureFillExternalFragmentShader; + using FSExternal = TiledTextureFillExternalFragmentShader; + using FSStrict = TextureFillStrictSrcFragmentShader; if (destination_rect_.IsEmpty() || source_rect_.IsEmpty() || texture_ == nullptr || texture_->GetSize().IsEmpty()) { @@ -129,7 +130,6 @@ bool TextureContents::Render(const ContentContext& renderer, Rect::MakeSize(texture_->GetSize()).Project(source_rect); VertexBufferBuilder vertex_builder; - auto destination_rect = capture.AddRect("Destination rect", destination_rect_); vertex_builder.AddVertices({ @@ -144,7 +144,6 @@ bool TextureContents::Render(const ContentContext& renderer, VS::FrameInfo frame_info; frame_info.mvp = entity.GetShaderTransform(pass); frame_info.texture_sampler_y_coord_scale = texture_->GetYCoordScale(); - frame_info.alpha = capture.AddScalar("Alpha", GetOpacity()); #ifdef IMPELLER_DEBUG if (label_.empty()) { @@ -163,7 +162,7 @@ bool TextureContents::Render(const ContentContext& renderer, std::shared_ptr> pipeline; #ifdef IMPELLER_ENABLE_OPENGLES if (is_external_texture) { - pipeline = renderer.GetTextureExternalPipeline(pipeline_options); + pipeline = renderer.GetTiledTextureExternalPipeline(pipeline_options); } #endif // IMPELLER_ENABLE_OPENGLES @@ -178,11 +177,27 @@ bool TextureContents::Render(const ContentContext& renderer, pass.SetVertexBuffer(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(pass, host_buffer.EmplaceUniform(frame_info)); + if (is_external_texture) { + FSExternal::FragInfo frag_info; + frag_info.x_tile_mode = + static_cast(sampler_descriptor_.width_address_mode); + frag_info.y_tile_mode = + static_cast(sampler_descriptor_.height_address_mode); + frag_info.alpha = capture.AddScalar("Alpha", GetOpacity()); + + auto sampler_descriptor = sampler_descriptor_; + // OES_EGL_image_external states that only CLAMP_TO_EDGE is valid, so + // we emulate all other tile modes here by remapping the texture + // coordinates. + sampler_descriptor.width_address_mode = SamplerAddressMode::kClampToEdge; + sampler_descriptor.height_address_mode = SamplerAddressMode::kClampToEdge; + + FSExternal::BindFragInfo(pass, host_buffer.EmplaceUniform((frag_info))); FSExternal::BindSAMPLEREXTERNALOESTextureSampler( pass, texture_, renderer.GetContext()->GetSamplerLibrary()->GetSampler( - sampler_descriptor_)); + sampler_descriptor)); } else if (strict_source_rect_enabled_) { // For a strict source rect, shrink the texture coordinate range by half a // texel to ensure that linear filtering does not sample anything outside @@ -190,14 +205,18 @@ bool TextureContents::Render(const ContentContext& renderer, auto strict_texture_coords = Rect::MakeSize(texture_->GetSize()).Project(source_rect.Expand(-0.5)); - FSStrictSrc::FragInfo frag_info; + FSStrict::FragInfo frag_info; frag_info.source_rect = Vector4(strict_texture_coords.GetLTRB()); - FSStrictSrc::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info)); - FSStrictSrc::BindTextureSampler( + frag_info.alpha = capture.AddScalar("Alpha", GetOpacity()); + FSStrict::BindFragInfo(pass, host_buffer.EmplaceUniform((frag_info))); + FSStrict::BindTextureSampler( pass, texture_, renderer.GetContext()->GetSamplerLibrary()->GetSampler( sampler_descriptor_)); } else { + FS::FragInfo frag_info; + frag_info.alpha = capture.AddScalar("Alpha", GetOpacity()); + FS::BindFragInfo(pass, host_buffer.EmplaceUniform((frag_info))); FS::BindTextureSampler( pass, texture_, renderer.GetContext()->GetSamplerLibrary()->GetSampler( 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 b8baa2fef8..de6497033a 100644 --- a/engine/src/flutter/impeller/entity/contents/tiled_texture_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/tiled_texture_contents.cc @@ -6,6 +6,7 @@ #include "fml/logging.h" #include "impeller/entity/contents/content_context.h" +#include "impeller/entity/texture_fill.frag.h" #include "impeller/entity/texture_fill.vert.h" #include "impeller/entity/tiled_texture_fill.frag.h" #include "impeller/entity/tiled_texture_fill_external.frag.h" @@ -132,7 +133,6 @@ bool TiledTextureContents::Render(const ContentContext& renderer, VS::FrameInfo frame_info; frame_info.texture_sampler_y_coord_scale = texture_->GetYCoordScale(); - frame_info.alpha = GetOpacityFactor(); PipelineBuilderMethod pipeline_method; @@ -170,12 +170,19 @@ bool TiledTextureContents::Render(const ContentContext& renderer, FSExternal::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(); FSExternal::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info)); } else if (uses_emulated_tile_mode) { 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(pass, host_buffer.EmplaceUniform(frag_info)); + } else { + TextureFillFragmentShader::FragInfo frag_info; + frag_info.alpha = GetOpacityFactor(); + TextureFillFragmentShader::BindFragInfo( + pass, host_buffer.EmplaceUniform(frag_info)); } if (is_external_texture) { diff --git a/engine/src/flutter/impeller/entity/contents/vertices_contents.cc b/engine/src/flutter/impeller/entity/contents/vertices_contents.cc index 2db730e4e8..9aeaa83023 100644 --- a/engine/src/flutter/impeller/entity/contents/vertices_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/vertices_contents.cc @@ -169,9 +169,11 @@ 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(pass, host_buffer.EmplaceUniform(frame_info)); + FS::FragInfo frag_info; + frag_info.alpha = alpha_ * snapshot->opacity; + FS::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info)); FS::BindTextureSampler(pass, snapshot->texture, renderer.GetContext()->GetSamplerLibrary()->GetSampler( snapshot->sampler_descriptor)); diff --git a/engine/src/flutter/impeller/entity/shaders/blending/blend.frag b/engine/src/flutter/impeller/entity/shaders/blending/blend.frag deleted file mode 100644 index d8eb5b806f..0000000000 --- a/engine/src/flutter/impeller/entity/shaders/blending/blend.frag +++ /dev/null @@ -1,24 +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. - -precision mediump float; - -#include -#include - -uniform f16sampler2D texture_sampler_src; - -uniform FragInfo { - float16_t input_alpha; -} -frag_info; - -in vec2 v_texture_coords; - -out f16vec4 frag_color; - -void main() { - frag_color = - texture(texture_sampler_src, v_texture_coords) * frag_info.input_alpha; -} diff --git a/engine/src/flutter/impeller/entity/shaders/blending/blend.vert b/engine/src/flutter/impeller/entity/shaders/blending/blend.vert deleted file mode 100644 index f8a08ecee3..0000000000 --- a/engine/src/flutter/impeller/entity/shaders/blending/blend.vert +++ /dev/null @@ -1,23 +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 - -uniform FrameInfo { - mat4 mvp; - float texture_sampler_y_coord_scale; -} -frame_info; - -in vec2 vertices; -in vec2 texture_coords; - -out vec2 v_texture_coords; - -void main() { - gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0); - v_texture_coords = - IPRemapCoords(texture_coords, frame_info.texture_sampler_y_coord_scale); -} diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill.frag b/engine/src/flutter/impeller/entity/shaders/texture_fill.frag index 9bebdeb539..bd9dbd30c3 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill.frag @@ -9,13 +9,17 @@ precision mediump float; uniform f16sampler2D texture_sampler; +uniform FragInfo { + float 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, float16_t(kDefaultMipBias)); - frag_color = sampled * v_alpha; + frag_color = sampled * float16_t(frag_info.alpha); } diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill.vert b/engine/src/flutter/impeller/entity/shaders/texture_fill.vert index baf56360fe..0dbc6fd4bf 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill.vert @@ -8,7 +8,6 @@ uniform FrameInfo { mat4 mvp; float texture_sampler_y_coord_scale; - float16_t alpha; } frame_info; @@ -16,11 +15,9 @@ in vec2 position; in vec2 texture_coords; out vec2 v_texture_coords; -IMPELLER_MAYBE_FLAT out mediump 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/texture_fill_external.frag b/engine/src/flutter/impeller/entity/shaders/texture_fill_external.frag deleted file mode 100644 index b402c113eb..0000000000 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill_external.frag +++ /dev/null @@ -1,16 +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. - -uniform sampler2D SAMPLER_EXTERNAL_OES_texture_sampler; - -in vec2 v_texture_coords; -in float v_alpha; - -out vec4 frag_color; - -void main() { - vec4 sampled = - texture(SAMPLER_EXTERNAL_OES_texture_sampler, v_texture_coords); - frag_color = sampled * v_alpha; -} diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag b/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag index 6381598be8..0165250b8a 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag @@ -11,11 +11,11 @@ uniform f16sampler2D texture_sampler; uniform FragInfo { vec4 source_rect; + float alpha; } frag_info; in highp vec2 v_texture_coords; -IMPELLER_MAYBE_FLAT in float16_t v_alpha; out f16vec4 frag_color; @@ -26,5 +26,5 @@ void main() { frag_info.source_rect.w)); f16vec4 sampled = texture(texture_sampler, texture_coords, float16_t(kDefaultMipBias)); - frag_color = sampled * v_alpha; + frag_color = sampled * float16_t(frag_info.alpha); } 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 5e8413ef98..747bb646da 100644 --- a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag @@ -10,22 +10,22 @@ precision mediump float; uniform f16sampler2D texture_sampler; uniform FragInfo { - float16_t x_tile_mode; - float16_t y_tile_mode; + float x_tile_mode; + float y_tile_mode; + float alpha; } frag_info; in highp vec2 v_texture_coords; -IMPELLER_MAYBE_FLAT in float16_t v_alpha; out f16vec4 frag_color; void main() { frag_color = - IPHalfSampleWithTileMode(texture_sampler, // sampler - v_texture_coords, // texture coordinates - frag_info.x_tile_mode, // x tile mode - frag_info.y_tile_mode // y tile mode + IPHalfSampleWithTileMode(texture_sampler, // sampler + v_texture_coords, // texture coordinates + float16_t(frag_info.x_tile_mode), // x tile mode + float16_t(frag_info.y_tile_mode) // y tile mode ) * - v_alpha; + float16_t(frag_info.alpha); } diff --git a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill_external.frag b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill_external.frag index b0ece73193..7d744553ab 100644 --- a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill_external.frag +++ b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill_external.frag @@ -11,11 +11,11 @@ uniform sampler2D SAMPLER_EXTERNAL_OES_texture_sampler; uniform FragInfo { float x_tile_mode; float y_tile_mode; + float alpha; } frag_info; in vec2 v_texture_coords; -in float v_alpha; out vec4 frag_color; @@ -26,5 +26,5 @@ void main() { frag_info.x_tile_mode, // x tile mode frag_info.y_tile_mode // y tile mode ) * - v_alpha; + frag_info.alpha; } diff --git a/engine/src/flutter/impeller/tools/malioc.json b/engine/src/flutter/impeller/tools/malioc.json index a94fac3acc..a0e3a966be 100644 --- a/engine/src/flutter/impeller/tools/malioc.json +++ b/engine/src/flutter/impeller/tools/malioc.json @@ -184,191 +184,6 @@ } } }, - "flutter/impeller/entity/blend.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/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": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.03125, - 0.03125, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.03125, - 0.03125, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.03125, - 0.03125, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 4 - } - } - } - }, - "flutter/impeller/entity/blend.vert.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/blend.vert.vkspv", - "has_uniform_computation": true, - "type": "Vertex", - "variants": { - "Position": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 0.125, - 0.125, - 0.0, - 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.125, - 0.125, - 0.0, - 0.0, - 2.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 0.125, - 0.125, - 0.0, - 0.0, - 2.0, - 0.0 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 30, - "work_registers_used": 32 - }, - "Varying": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.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.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 22, - "work_registers_used": 8 - } - } - } - }, "flutter/impeller/entity/border_mask_blur.frag.vkspv": { "Mali-G78": { "core": "Mali-G78", @@ -1428,286 +1243,6 @@ } } }, - "flutter/impeller/entity/gles/blend.frag.gles": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/gles/blend.frag.gles", - "has_side_effects": false, - "has_uniform_computation": false, - "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.03125, - 0.03125, - 0.03125, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.03125, - 0.03125, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.03125, - 0.03125, - 0.03125, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 19 - } - } - }, - "Mali-T880": { - "core": "Mali-T880", - "filename": "flutter/impeller/entity/gles/blend.frag.gles", - "has_uniform_computation": false, - "type": "Fragment", - "variants": { - "Main": { - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "longest_path_cycles": [ - 1.0, - 1.0, - 1.0 - ], - "pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "shortest_path_cycles": [ - 1.0, - 1.0, - 1.0 - ], - "total_bound_pipelines": [ - "load_store", - "texture" - ], - "total_cycles": [ - 0.6666666865348816, - 1.0, - 1.0 - ] - }, - "thread_occupancy": 100, - "uniform_registers_used": 1, - "work_registers_used": 2 - } - } - } - }, - "flutter/impeller/entity/gles/blend.vert.gles": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/gles/blend.vert.gles", - "has_uniform_computation": true, - "type": "Vertex", - "variants": { - "Position": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 0.140625, - 0.140625, - 0.0, - 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.140625, - 0.140625, - 0.0, - 0.0, - 2.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 0.140625, - 0.140625, - 0.0, - 0.0, - 2.0, - 0.0 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 22, - "work_registers_used": 32 - }, - "Varying": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.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.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 10, - "work_registers_used": 8 - } - } - }, - "Mali-T880": { - "core": "Mali-T880", - "filename": "flutter/impeller/entity/gles/blend.vert.gles", - "has_uniform_computation": false, - "type": "Vertex", - "variants": { - "Main": { - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 2.9700000286102295, - 5.0, - 0.0 - ], - "pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "load_store" - ], - "shortest_path_cycles": [ - 2.9700000286102295, - 5.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 3.0, - 5.0, - 0.0 - ] - }, - "thread_occupancy": 100, - "uniform_registers_used": 6, - "work_registers_used": 2 - } - } - } - }, "flutter/impeller/entity/gles/border_mask_blur.frag.gles": { "Mali-G78": { "core": "Mali-G78", @@ -5788,7 +5323,8 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "longest_path_cycles": [ 0.046875, @@ -5796,7 +5332,7 @@ 0.046875, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "pipelines": [ @@ -5809,7 +5345,8 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.03125, @@ -5817,11 +5354,12 @@ 0.015625, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "total_bound_pipelines": [ - "varying" + "varying", + "texture" ], "total_cycles": [ 0.046875, @@ -5829,13 +5367,13 @@ 0.046875, 0.0, 0.0, - 0.375, + 0.25, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 2, + "uniform_registers_used": 4, "work_registers_used": 19 } } @@ -5885,7 +5423,7 @@ ] }, "thread_occupancy": 100, - "uniform_registers_used": 0, + "uniform_registers_used": 1, "work_registers_used": 2 } } @@ -5957,11 +5495,11 @@ "load_store" ], "longest_path_cycles": [ - 0.03125, 0.015625, - 0.03125, + 0.015625, + 0.015625, 0.0, - 4.0, + 3.0, 0.0 ], "pipelines": [ @@ -5976,29 +5514,29 @@ "load_store" ], "shortest_path_cycles": [ - 0.03125, 0.015625, - 0.03125, + 0.015625, + 0.015625, 0.0, - 4.0, + 3.0, 0.0 ], "total_bound_pipelines": [ "load_store" ], "total_cycles": [ - 0.03125, 0.015625, - 0.03125, + 0.015625, + 0.015625, 0.0, - 4.0, + 3.0, 0.0 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 10, - "work_registers_used": 7 + "work_registers_used": 8 } } }, @@ -6016,7 +5554,7 @@ ], "longest_path_cycles": [ 2.9700000286102295, - 6.0, + 5.0, 0.0 ], "pipelines": [ @@ -6029,7 +5567,7 @@ ], "shortest_path_cycles": [ 2.9700000286102295, - 6.0, + 5.0, 0.0 ], "total_bound_pipelines": [ @@ -6037,7 +5575,7 @@ ], "total_cycles": [ 3.0, - 6.0, + 5.0, 0.0 ] }, @@ -6048,121 +5586,6 @@ } } }, - "flutter/impeller/entity/gles/texture_fill_external.frag.gles": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/gles/texture_fill_external.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": [ - "varying" - ], - "longest_path_cycles": [ - 0.203125, - 0.203125, - 0.03125, - 0.0, - 0.0, - 0.375, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying" - ], - "shortest_path_cycles": [ - 0.203125, - 0.203125, - 0.0, - 0.0, - 0.0, - 0.375, - 0.25 - ], - "total_bound_pipelines": [ - "varying" - ], - "total_cycles": [ - 0.203125, - 0.203125, - 0.03125, - 0.0, - 0.0, - 0.375, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 14, - "work_registers_used": 19 - } - } - }, - "Mali-T880": { - "core": "Mali-T880", - "filename": "flutter/impeller/entity/gles/texture_fill_external.frag.gles", - "has_uniform_computation": false, - "type": "Fragment", - "variants": { - "Main": { - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "arithmetic" - ], - "longest_path_cycles": [ - 1.649999976158142, - 1.0, - 1.0 - ], - "pipelines": [ - "arithmetic", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "arithmetic" - ], - "shortest_path_cycles": [ - 1.649999976158142, - 1.0, - 1.0 - ], - "total_bound_pipelines": [ - "arithmetic" - ], - "total_cycles": [ - 2.0, - 1.0, - 1.0 - ] - }, - "thread_occupancy": 100, - "uniform_registers_used": 2, - "work_registers_used": 3 - } - } - } - }, "flutter/impeller/entity/gles/texture_fill_strict_src.frag.gles": { "Mali-G78": { "core": "Mali-G78", @@ -6180,7 +5603,8 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "longest_path_cycles": [ 0.109375, @@ -6188,7 +5612,7 @@ 0.109375, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "pipelines": [ @@ -6201,7 +5625,8 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.078125, @@ -6209,11 +5634,12 @@ 0.078125, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "total_bound_pipelines": [ - "varying" + "varying", + "texture" ], "total_cycles": [ 0.109375, @@ -6221,14 +5647,14 @@ 0.109375, 0.0, 0.0, - 0.375, + 0.25, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 20 + "uniform_registers_used": 6, + "work_registers_used": 19 } } }, @@ -6301,15 +5727,16 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying" + "arith_total", + "arith_cvt" ], "longest_path_cycles": [ - 0.25, + 0.265625, 0.03125, + 0.265625, + 0.0, + 0.0, 0.25, - 0.0, - 0.0, - 0.375, 0.25 ], "pipelines": [ @@ -6322,27 +5749,29 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ - 0.046875, + 0.0625, 0.03125, - 0.046875, + 0.0625, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "total_bound_pipelines": [ - "varying" + "arith_total", + "arith_cvt" ], "total_cycles": [ - 0.25, + 0.265625, 0.03125, + 0.265625, + 0.0, + 0.0, 0.25, - 0.0, - 0.0, - 0.375, 0.25 ] }, @@ -6367,7 +5796,7 @@ ], "longest_path_cycles": [ 3.299999952316284, - 2.0, + 1.0, 1.0 ], "pipelines": [ @@ -6376,11 +5805,11 @@ "texture" ], "shortest_path_bound_pipelines": [ - "load_store" + "arithmetic" ], "shortest_path_cycles": [ 1.3200000524520874, - 2.0, + 1.0, 0.0 ], "total_bound_pipelines": [ @@ -6388,7 +5817,7 @@ ], "total_cycles": [ 3.6666667461395264, - 2.0, + 1.0, 1.0 ] }, @@ -6425,7 +5854,7 @@ 0.421875, 0.0, 0.0, - 0.25, + 0.125, 0.25 ], "pipelines": [ @@ -6446,7 +5875,7 @@ 0.09375, 0.0, 0.0, - 0.25, + 0.125, 0.0 ], "total_bound_pipelines": [ @@ -6459,7 +5888,7 @@ 0.515625, 0.0, 0.0, - 0.25, + 0.125, 0.25 ] }, @@ -6484,7 +5913,7 @@ ], "longest_path_cycles": [ 7.920000076293945, - 2.0, + 1.0, 1.0 ], "pipelines": [ @@ -6493,11 +5922,11 @@ "texture" ], "shortest_path_bound_pipelines": [ - "load_store" + "arithmetic" ], "shortest_path_cycles": [ 1.3200000524520874, - 2.0, + 1.0, 0.0 ], "total_bound_pipelines": [ @@ -6505,7 +5934,7 @@ ], "total_cycles": [ 9.0, - 2.0, + 1.0, 1.0 ] }, @@ -8969,7 +8398,7 @@ "core": "Mali-G78", "filename": "flutter/impeller/entity/texture_fill.frag.vkspv", "has_side_effects": false, - "has_uniform_computation": false, + "has_uniform_computation": true, "modifies_coverage": false, "reads_color_buffer": false, "type": "Fragment", @@ -8981,7 +8410,8 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "longest_path_cycles": [ 0.03125, @@ -8989,7 +8419,7 @@ 0.015625, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "pipelines": [ @@ -9002,7 +8432,8 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.03125, @@ -9010,11 +8441,12 @@ 0.015625, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "total_bound_pipelines": [ - "varying" + "varying", + "texture" ], "total_cycles": [ 0.03125, @@ -9022,14 +8454,14 @@ 0.015625, 0.0, 0.0, - 0.375, + 0.25, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 2, - "work_registers_used": 6 + "uniform_registers_used": 4, + "work_registers_used": 5 } } } @@ -9100,11 +8532,11 @@ "load_store" ], "longest_path_cycles": [ - 0.03125, 0.015625, - 0.03125, + 0.015625, + 0.015625, 0.0, - 4.0, + 3.0, 0.0 ], "pipelines": [ @@ -9119,99 +8551,29 @@ "load_store" ], "shortest_path_cycles": [ - 0.03125, 0.015625, - 0.03125, + 0.015625, + 0.015625, 0.0, - 4.0, + 3.0, 0.0 ], "total_bound_pipelines": [ "load_store" ], "total_cycles": [ - 0.03125, 0.015625, - 0.03125, + 0.015625, + 0.015625, 0.0, - 4.0, + 3.0, 0.0 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 22, - "work_registers_used": 7 - } - } - } - }, - "flutter/impeller/entity/texture_fill_external.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/texture_fill_external.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": false, - "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" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.375, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.375, - 0.25 - ], - "total_bound_pipelines": [ - "varying" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.375, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 10 + "work_registers_used": 8 } } } @@ -9233,7 +8595,8 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "longest_path_cycles": [ 0.078125, @@ -9241,7 +8604,7 @@ 0.078125, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "pipelines": [ @@ -9254,7 +8617,8 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.078125, @@ -9262,11 +8626,12 @@ 0.078125, 0.0, 0.0, - 0.375, + 0.25, 0.25 ], "total_bound_pipelines": [ - "varying" + "varying", + "texture" ], "total_cycles": [ 0.078125, @@ -9274,14 +8639,14 @@ 0.078125, 0.0, 0.0, - 0.375, + 0.25, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, - "uniform_registers_used": 6, - "work_registers_used": 6 + "uniform_registers_used": 8, + "work_registers_used": 5 } } } @@ -9303,7 +8668,10 @@ "has_stack_spilling": false, "performance": { "longest_path_bound_pipelines": [ - "varying" + "arith_total", + "arith_cvt", + "varying", + "texture" ], "longest_path_cycles": [ 0.25, @@ -9311,7 +8679,7 @@ 0.25, 0.0625, 0.0, - 0.375, + 0.25, 0.25 ], "pipelines": [ @@ -9332,11 +8700,14 @@ 0.140625, 0.0625, 0.0, - 0.375, + 0.25, 0.0 ], "total_bound_pipelines": [ - "varying" + "arith_total", + "arith_cvt", + "varying", + "texture" ], "total_cycles": [ 0.25, @@ -9344,14 +8715,14 @@ 0.25, 0.0625, 0.0, - 0.375, + 0.25, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 4, - "work_registers_used": 8 + "work_registers_used": 7 } } } @@ -9382,7 +8753,7 @@ 0.328125, 0.0, 0.0, - 0.25, + 0.125, 0.25 ], "pipelines": [ @@ -9403,7 +8774,7 @@ 0.109375, 0.0, 0.0, - 0.25, + 0.125, 0.0 ], "total_bound_pipelines": [ @@ -9416,14 +8787,14 @@ 0.390625, 0.0, 0.0, - 0.25, + 0.125, 0.25 ] }, "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 6, - "work_registers_used": 7 + "work_registers_used": 6 } } }