[Impeller] drawVertices uber shader. (flutter/engine#52315)

In order to land https://github.com/flutter/engine/pull/52303 , we need to finally fix the advanced blend draw vertices combo. Right now a ColorFilter is used for advanced blends which doesn't work if there are overlapping vertices.

See also: https://github.com/flutter/flutter/issues/145707

The issue was fixed for drawVertices/drawAtlas pipeline blends using the porterduff shader. This extends this to advanced blends, but since drawVertices/atlas with an advanced blend is uncommon and  because we don't 15 new shader variants, just add one special uber shader.

Part of https://github.com/flutter/flutter/issues/131345
This commit is contained in:
Jonah Williams
2024-04-23 11:20:54 -07:00
committed by GitHub
parent 683f924dd6
commit 970ea4c511
14 changed files with 675 additions and 64 deletions

View File

@@ -40377,6 +40377,8 @@ ORIGIN: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.frag
ORIGIN: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.vert + ../../../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/blending/vertices_uber.frag + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/entity/shaders/blending/vertices_uber.vert + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/entity/shaders/border_mask_blur.frag + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/entity/shaders/border_mask_blur.vert + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/entity/shaders/clip.frag + ../../../flutter/LICENSE
@@ -43257,6 +43259,8 @@ FILE: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.frag
FILE: ../../../flutter/impeller/entity/shaders/blending/framebuffer_blend.vert
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/blending/vertices_uber.frag
FILE: ../../../flutter/impeller/entity/shaders/blending/vertices_uber.vert
FILE: ../../../flutter/impeller/entity/shaders/border_mask_blur.frag
FILE: ../../../flutter/impeller/entity/shaders/border_mask_blur.vert
FILE: ../../../flutter/impeller/entity/shaders/clip.frag

View File

@@ -2773,6 +2773,38 @@ TEST_P(AiksTest, VerticesGeometryColorUVPositionData) {
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}
TEST_P(AiksTest, VerticesGeometryColorUVPositionDataAdvancedBlend) {
Canvas canvas;
Paint paint;
auto texture = CreateTextureForFixture("table_mountain_nx.png");
paint.color_source =
ColorSource::MakeImage(texture, Entity::TileMode::kClamp,
Entity::TileMode::kClamp, {}, Matrix());
auto vertices = {
Point(0, 0),
Point(texture->GetSize().width, 0),
Point(0, texture->GetSize().height),
Point(texture->GetSize().width, 0),
Point(0, 0),
Point(texture->GetSize().width, texture->GetSize().height),
};
std::vector<uint16_t> indices = {};
std::vector<Point> texture_coordinates = {};
std::vector<Color> vertex_colors = {
Color::Red().WithAlpha(0.5), Color::Blue().WithAlpha(0.5),
Color::Green().WithAlpha(0.5), Color::Red().WithAlpha(0.5),
Color::Blue().WithAlpha(0.5), Color::Green().WithAlpha(0.5),
};
auto geometry = std::make_shared<VerticesGeometry>(
vertices, indices, texture_coordinates, vertex_colors,
Rect::MakeLTRB(0, 0, 1, 1), VerticesGeometry::VertexMode::kTriangles);
canvas.DrawVertices(geometry, BlendMode::kColorBurn, paint);
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}
TEST_P(AiksTest, MatrixImageFilterMagnify) {
Canvas canvas;
canvas.Scale(GetContentScale());

View File

@@ -938,23 +938,21 @@ void Canvas::DrawVertices(const std::shared_ptr<VerticesGeometry>& vertices,
// If there is are per-vertex colors, an image, and the blend mode
// is simple we can draw without a sub-renderpass.
if (blend_mode <= BlendMode::kModulate && vertices->HasVertexColors()) {
if (std::optional<ImageData> maybe_image_data =
GetImageColorSourceData(paint.color_source)) {
const ImageData& image_data = maybe_image_data.value();
auto contents = std::make_shared<VerticesSimpleBlendContents>();
contents->SetBlendMode(blend_mode);
contents->SetAlpha(paint.color.alpha);
contents->SetGeometry(vertices);
if (std::optional<ImageData> maybe_image_data =
GetImageColorSourceData(paint.color_source)) {
const ImageData& image_data = maybe_image_data.value();
auto contents = std::make_shared<VerticesSimpleBlendContents>();
contents->SetBlendMode(blend_mode);
contents->SetAlpha(paint.color.alpha);
contents->SetGeometry(vertices);
contents->SetEffectTransform(image_data.effect_transform);
contents->SetTexture(image_data.texture);
contents->SetTileMode(image_data.x_tile_mode, image_data.y_tile_mode);
contents->SetEffectTransform(image_data.effect_transform);
contents->SetTexture(image_data.texture);
contents->SetTileMode(image_data.x_tile_mode, image_data.y_tile_mode);
entity.SetContents(paint.WithFilters(std::move(contents)));
AddRenderEntityToCurrentPass(std::move(entity));
return;
}
entity.SetContents(paint.WithFilters(std::move(contents)));
AddRenderEntityToCurrentPass(std::move(entity));
return;
}
auto src_paint = paint;

View File

@@ -52,6 +52,8 @@ impeller_shaders("entity_shaders") {
"shaders/filters/linear_to_srgb_filter.frag",
"shaders/filters/morphology_filter.frag",
"shaders/filters/morphology_filter.vert",
"shaders/blending/vertices_uber.frag",
"shaders/blending/vertices_uber.vert",
]
if (impeller_debug) {

View File

@@ -445,6 +445,7 @@ ContentContext::ContentContext(
yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options_trianglestrip);
porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
vertices_uber_shader_.CreateDefault(*context_, options);
// GLES only shader that is unsupported on macOS.
#if defined(IMPELLER_ENABLE_OPENGLES) && !defined(FML_OS_MACOSX)
if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) {

View File

@@ -81,6 +81,9 @@
#include "impeller/entity/framebuffer_blend.frag.h"
#include "impeller/entity/framebuffer_blend.vert.h"
#include "impeller/entity/vertices_uber.frag.h"
#include "impeller/entity/vertices_uber.vert.h"
#ifdef IMPELLER_ENABLE_OPENGLES
#include "impeller/entity/tiled_texture_fill_external.frag.h"
#endif // IMPELLER_ENABLE_OPENGLES
@@ -251,6 +254,10 @@ using FramebufferBlendSoftLightPipeline =
RenderPipelineHandle<FramebufferBlendVertexShader,
FramebufferBlendFragmentShader>;
/// Draw Vertices/Atlas Uber Shader
using VerticesUberShader =
RenderPipelineHandle<VerticesUberVertexShader, VerticesUberFragmentShader>;
/// Geometry Pipelines
using PointsComputeShaderPipeline = ComputePipelineBuilder<PointsComputeShader>;
using UvComputeShaderPipeline = ComputePipelineBuilder<UvComputeShader>;
@@ -721,6 +728,11 @@ class ContentContext {
return GetPipeline(framebuffer_blend_softlight_pipelines_, opts);
}
std::shared_ptr<Pipeline<PipelineDescriptor>> GetDrawVerticesUberShader(
ContentContextOptions opts) const {
return GetPipeline(vertices_uber_shader_, opts);
}
std::shared_ptr<Pipeline<ComputePipelineDescriptor>> GetPointComputePipeline()
const {
FML_DCHECK(GetDeviceCapabilities().SupportsCompute());
@@ -995,6 +1007,7 @@ class ContentContext {
framebuffer_blend_screen_pipelines_;
mutable Variants<FramebufferBlendSoftLightPipeline>
framebuffer_blend_softlight_pipelines_;
mutable Variants<VerticesUberShader> vertices_uber_shader_;
mutable std::shared_ptr<Pipeline<ComputePipelineDescriptor>>
point_field_compute_pipelines_;
mutable std::shared_ptr<Pipeline<ComputePipelineDescriptor>>

View File

@@ -243,7 +243,6 @@ void VerticesSimpleBlendContents::SetAlpha(Scalar alpha) {
}
void VerticesSimpleBlendContents::SetBlendMode(BlendMode blend_mode) {
FML_DCHECK(blend_mode <= BlendMode::kModulate);
blend_mode_ = blend_mode;
}
@@ -275,29 +274,10 @@ bool VerticesSimpleBlendContents::Render(const ContentContext& renderer,
const Entity& entity,
RenderPass& pass) const {
FML_DCHECK(texture_);
FML_DCHECK(geometry_->HasVertexColors());
// Simple Porter-Duff blends can be accomplished without a sub renderpass.
using VS = PorterDuffBlendPipeline::VertexShader;
using FS = PorterDuffBlendPipeline::FragmentShader;
GeometryResult geometry_result = geometry_->GetPositionUVColorBuffer(
Rect::MakeSize(texture_->GetSize()), inverse_matrix_, renderer, entity,
pass);
if (geometry_result.vertex_buffer.vertex_count == 0) {
return true;
BlendMode blend_mode = blend_mode_;
if (!geometry_->HasVertexColors()) {
blend_mode = BlendMode::kSource;
}
FML_DCHECK(geometry_result.mode == GeometryResult::Mode::kNormal);
#ifdef IMPELLER_DEBUG
pass.SetCommandLabel(SPrintF("DrawVertices Porterduff Blend (%s)",
BlendModeToString(blend_mode_)));
#endif // IMPELLER_DEBUG
pass.SetVertexBuffer(std::move(geometry_result.vertex_buffer));
auto options = OptionsFromPassAndEntity(pass, entity);
options.primitive_type = geometry_result.type;
pass.SetPipeline(renderer.GetPorterDuffBlendPipeline(options));
auto dst_sampler_descriptor = descriptor_;
dst_sampler_descriptor.width_address_mode =
@@ -310,32 +290,85 @@ bool VerticesSimpleBlendContents::Render(const ContentContext& renderer,
const std::unique_ptr<const Sampler>& dst_sampler =
renderer.GetContext()->GetSamplerLibrary()->GetSampler(
dst_sampler_descriptor);
FS::BindTextureSamplerDst(pass, texture_, dst_sampler);
FS::FragInfo frag_info;
GeometryResult geometry_result = geometry_->GetPositionUVColorBuffer(
Rect::MakeSize(texture_->GetSize()), inverse_matrix_, renderer, entity,
pass);
if (geometry_result.vertex_buffer.vertex_count == 0) {
return true;
}
FML_DCHECK(geometry_result.mode == GeometryResult::Mode::kNormal);
if (blend_mode <= Entity::kLastPipelineBlendMode) {
using VS = PorterDuffBlendPipeline::VertexShader;
using FS = PorterDuffBlendPipeline::FragmentShader;
#ifdef IMPELLER_DEBUG
pass.SetCommandLabel(SPrintF("DrawVertices Porterduff Blend (%s)",
BlendModeToString(blend_mode)));
#endif // IMPELLER_DEBUG
pass.SetVertexBuffer(std::move(geometry_result.vertex_buffer));
auto options = OptionsFromPassAndEntity(pass, entity);
options.primitive_type = geometry_result.type;
pass.SetPipeline(renderer.GetPorterDuffBlendPipeline(options));
FS::BindTextureSamplerDst(pass, texture_, dst_sampler);
VS::FrameInfo frame_info;
FS::FragInfo frag_info;
frame_info.texture_sampler_y_coord_scale = texture_->GetYCoordScale();
frame_info.mvp = geometry_result.transform;
frag_info.output_alpha = alpha_;
frag_info.input_alpha = 1.0;
auto inverted_blend_mode =
InvertPorterDuffBlend(blend_mode).value_or(BlendMode::kSource);
auto blend_coefficients =
kPorterDuffCoefficients[static_cast<int>(inverted_blend_mode)];
frag_info.src_coeff = blend_coefficients[0];
frag_info.src_coeff_dst_alpha = blend_coefficients[1];
frag_info.dst_coeff = blend_coefficients[2];
frag_info.dst_coeff_src_alpha = blend_coefficients[3];
frag_info.dst_coeff_src_color = blend_coefficients[4];
// Only used on devices that do not natively support advanced blends.
frag_info.tmx = static_cast<int>(tile_mode_x_);
frag_info.tmy = static_cast<int>(tile_mode_y_);
auto& host_buffer = renderer.GetTransientsBuffer();
FS::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info));
VS::BindFrameInfo(pass, host_buffer.EmplaceUniform(frame_info));
return pass.Draw().ok();
}
using VS = VerticesUberShader::VertexShader;
using FS = VerticesUberShader::FragmentShader;
#ifdef IMPELLER_DEBUG
pass.SetCommandLabel(SPrintF("DrawVertices Advanced Blend (%s)",
BlendModeToString(blend_mode)));
#endif // IMPELLER_DEBUG
pass.SetVertexBuffer(std::move(geometry_result.vertex_buffer));
auto options = OptionsFromPassAndEntity(pass, entity);
options.primitive_type = geometry_result.type;
pass.SetPipeline(renderer.GetDrawVerticesUberShader(options));
FS::BindTextureSampler(pass, texture_, dst_sampler);
VS::FrameInfo frame_info;
FS::FragInfo frag_info;
frame_info.texture_sampler_y_coord_scale = texture_->GetYCoordScale();
frag_info.output_alpha = alpha_;
frag_info.input_alpha = 1.0;
auto inverted_blend_mode =
InvertPorterDuffBlend(blend_mode_).value_or(BlendMode::kSource);
auto blend_coefficients =
kPorterDuffCoefficients[static_cast<int>(inverted_blend_mode)];
frag_info.src_coeff = blend_coefficients[0];
frag_info.src_coeff_dst_alpha = blend_coefficients[1];
frag_info.dst_coeff = blend_coefficients[2];
frag_info.dst_coeff_src_alpha = blend_coefficients[3];
frag_info.dst_coeff_src_color = blend_coefficients[4];
frame_info.mvp = geometry_result.transform;
frag_info.alpha = alpha_;
frag_info.blend_mode = static_cast<int>(blend_mode);
auto& host_buffer = renderer.GetTransientsBuffer();
FS::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info));
frame_info.mvp = geometry_result.transform;
auto uniform_view = host_buffer.EmplaceUniform(frame_info);
VS::BindFrameInfo(pass, uniform_view);
VS::BindFrameInfo(pass, host_buffer.EmplaceUniform(frame_info));
return pass.Draw().ok();
}

View File

@@ -108,8 +108,8 @@ class VerticesUVContents final : public Contents {
VerticesUVContents& operator=(const VerticesUVContents&) = delete;
};
/// A vertices contents for per-color vertices + texture and porter duff
/// blended.
/// A vertices contents for (optional) per-color vertices + texture and any
/// blend mode.
class VerticesSimpleBlendContents final : public Contents {
public:
VerticesSimpleBlendContents();

View File

@@ -256,6 +256,7 @@ GeometryResult VerticesGeometry::GetPositionUVColorBuffer(
auto uv_transform =
texture_coverage.GetNormalizingTransform() * effect_transform;
auto has_texture_coordinates = HasTextureCoordinates();
auto has_colors = HasVertexColors();
size_t total_vtx_bytes = vertices_.size() * sizeof(VS::PerVertexData);
auto vertex_buffer = renderer.GetTransientsBuffer().Emplace(
@@ -274,7 +275,7 @@ GeometryResult VerticesGeometry::GetPositionUVColorBuffer(
.texture_coords =
Point(std::clamp(uv.x, 0.0f, 1.0f - kEhCloseEnough),
std::clamp(uv.y, 0.0f, 1.0f - kEhCloseEnough)),
.color = colors_[i],
.color = has_colors ? colors_[i] : Color::BlackTransparent(),
};
std::memcpy(vtx_contents++, &vertex_data, sizeof(VS::PerVertexData));
}

View File

@@ -21,6 +21,8 @@ uniform FragInfo {
float16_t dst_coeff_src_color;
float16_t input_alpha;
float16_t output_alpha;
float tmx;
float tmy;
}
frag_info;
@@ -29,16 +31,20 @@ in f16vec4 v_color;
out f16vec4 frag_color;
f16vec4 Sample(f16sampler2D texture_sampler, vec2 texture_coords) {
f16vec4 Sample(f16sampler2D texture_sampler,
vec2 texture_coords,
float tmx,
float tmy) {
if (supports_decal > 0.0) {
return texture(texture_sampler, texture_coords);
}
return IPHalfSampleDecal(texture_sampler, texture_coords);
return IPHalfSampleWithTileMode(texture_sampler, texture_coords, tmx, tmy);
}
void main() {
f16vec4 dst =
texture(texture_sampler_dst, v_texture_coords) * frag_info.input_alpha;
f16vec4 dst = Sample(texture_sampler_dst, v_texture_coords, frag_info.tmx,
frag_info.tmy) *
frag_info.input_alpha;
f16vec4 src = v_color;
frag_color =
src * (frag_info.src_coeff + dst.a * frag_info.src_coeff_dst_alpha) +

View File

@@ -0,0 +1,33 @@
// 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 <impeller/blending.glsl>
#include <impeller/types.glsl>
#include "blend_select.glsl"
uniform FragInfo {
float16_t alpha;
float16_t blend_mode;
}
frag_info;
uniform f16sampler2D texture_sampler;
in highp vec2 v_texture_coords;
in mediump f16vec4 v_color;
out f16vec4 frag_color;
// A shader that implements the required src/dst blending for drawVertices and
// drawAtlas advanced blends without requiring an offscreen render pass. This is
// done in a single shader to reduce the permutations of PSO needed at runtime
// for rarely used features.
void main() {
f16vec4 dst = IPHalfUnpremultiply(v_color);
f16vec4 src = IPHalfUnpremultiply(texture(texture_sampler, v_texture_coords));
f16vec3 blend_result =
AdvancedBlend(dst.rgb, src.rgb, int(frag_info.blend_mode - 14.0));
frag_color = IPApplyBlendedColor(dst, src, blend_result);
frag_color *= frag_info.alpha;
}

View File

@@ -0,0 +1,26 @@
// 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 <impeller/conversions.glsl>
#include <impeller/types.glsl>
uniform FrameInfo {
mat4 mvp;
float texture_sampler_y_coord_scale;
}
frame_info;
in vec2 vertices;
in vec2 texture_coords;
in vec4 color;
out vec2 v_texture_coords;
out mediump f16vec4 v_color;
void main() {
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);
v_color = f16vec4(color);
v_texture_coords =
IPRemapCoords(texture_coords, frame_info.texture_sampler_y_coord_scale);
}

View File

@@ -6062,6 +6062,280 @@
}
}
},
"flutter/impeller/entity/gles/vertices_uber.frag.gles": {
"Mali-G78": {
"core": "Mali-G78",
"filename": "flutter/impeller/entity/gles/vertices_uber.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": [
"arith_total",
"arith_fma"
],
"longest_path_cycles": [
1.2625000476837158,
1.2625000476837158,
0.699999988079071,
0.3125,
0.0,
0.5,
0.25
],
"pipelines": [
"arith_total",
"arith_fma",
"arith_cvt",
"arith_sfu",
"load_store",
"varying",
"texture"
],
"shortest_path_bound_pipelines": [
"varying"
],
"shortest_path_cycles": [
0.390625,
0.375,
0.390625,
0.0,
0.0,
0.5,
0.25
],
"total_bound_pipelines": [
"arith_total",
"arith_fma"
],
"total_cycles": [
3.862499952316284,
3.862499952316284,
2.825000047683716,
0.9375,
0.0,
0.5,
0.25
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 14,
"work_registers_used": 32
}
}
},
"Mali-T880": {
"core": "Mali-T880",
"filename": "flutter/impeller/entity/gles/vertices_uber.frag.gles",
"has_uniform_computation": false,
"type": "Fragment",
"variants": {
"Main": {
"has_stack_spilling": true,
"performance": {
"longest_path_bound_pipelines": [
"arithmetic"
],
"longest_path_cycles": [
14.1899995803833,
5.0,
1.0
],
"pipelines": [
"arithmetic",
"load_store",
"texture"
],
"shortest_path_bound_pipelines": [
"arithmetic"
],
"shortest_path_cycles": [
4.289999961853027,
1.0,
1.0
],
"total_bound_pipelines": [
"arithmetic"
],
"total_cycles": [
47.33333206176758,
6.0,
1.0
]
},
"thread_occupancy": 50,
"uniform_registers_used": 1,
"work_registers_used": 8
}
}
}
},
"flutter/impeller/entity/gles/vertices_uber.vert.gles": {
"Mali-G78": {
"core": "Mali-G78",
"filename": "flutter/impeller/entity/gles/vertices_uber.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,
4.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,
4.0,
0.0
],
"total_bound_pipelines": [
"load_store"
],
"total_cycles": [
0.015625,
0.015625,
0.015625,
0.0,
4.0,
0.0
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 10,
"work_registers_used": 9
}
}
},
"Mali-T880": {
"core": "Mali-T880",
"filename": "flutter/impeller/entity/gles/vertices_uber.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,
7.0,
0.0
],
"pipelines": [
"arithmetic",
"load_store",
"texture"
],
"shortest_path_bound_pipelines": [
"load_store"
],
"shortest_path_cycles": [
2.9700000286102295,
7.0,
0.0
],
"total_bound_pipelines": [
"load_store"
],
"total_cycles": [
3.0,
7.0,
0.0
]
},
"thread_occupancy": 100,
"uniform_registers_used": 6,
"work_registers_used": 2
}
}
}
},
"flutter/impeller/entity/gles/yuv_to_rgb_filter.frag.gles": {
"Mali-G78": {
"core": "Mali-G78",
@@ -8932,6 +9206,191 @@
}
}
},
"flutter/impeller/entity/vertices_uber.frag.vkspv": {
"Mali-G78": {
"core": "Mali-G78",
"filename": "flutter/impeller/entity/vertices_uber.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": [
"arith_total",
"arith_fma"
],
"longest_path_cycles": [
1.1124999523162842,
1.1124999523162842,
0.84375,
0.3125,
0.0,
0.5,
0.25
],
"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.5625,
0.5625,
0.21875,
0.125,
0.0,
0.5,
0.25
],
"total_bound_pipelines": [
"arith_total",
"arith_fma"
],
"total_cycles": [
3.875,
3.875,
2.40625,
0.9375,
0.0,
0.5,
0.25
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 14,
"work_registers_used": 32
}
}
}
},
"flutter/impeller/entity/vertices_uber.vert.vkspv": {
"Mali-G78": {
"core": "Mali-G78",
"filename": "flutter/impeller/entity/vertices_uber.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,
4.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,
4.0,
0.0
],
"total_bound_pipelines": [
"load_store"
],
"total_cycles": [
0.015625,
0.015625,
0.015625,
0.0,
4.0,
0.0
]
},
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 22,
"work_registers_used": 9
}
}
}
},
"flutter/impeller/entity/yuv_to_rgb_filter.frag.vkspv": {
"Mali-G78": {
"core": "Mali-G78",

View File

@@ -757,6 +757,9 @@ impeller_Play_AiksTest_TranslucentSaveLayerWithColorMatrixColorFilterDrawsCorrec
impeller_Play_AiksTest_TranslucentSaveLayerWithColorMatrixImageFilterDrawsCorrectly_Metal.png
impeller_Play_AiksTest_TranslucentSaveLayerWithColorMatrixImageFilterDrawsCorrectly_OpenGLES.png
impeller_Play_AiksTest_TranslucentSaveLayerWithColorMatrixImageFilterDrawsCorrectly_Vulkan.png
impeller_Play_AiksTest_VerticesGeometryColorUVPositionDataAdvancedBlend_Metal.png
impeller_Play_AiksTest_VerticesGeometryColorUVPositionDataAdvancedBlend_OpenGLES.png
impeller_Play_AiksTest_VerticesGeometryColorUVPositionDataAdvancedBlend_Vulkan.png
impeller_Play_AiksTest_VerticesGeometryColorUVPositionData_Metal.png
impeller_Play_AiksTest_VerticesGeometryColorUVPositionData_OpenGLES.png
impeller_Play_AiksTest_VerticesGeometryColorUVPositionData_Vulkan.png