[Impeller] Do not build scene unless 3d define is true (flutter/engine#45028)
Fixes https://github.com/flutter/flutter/issues/133193
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
"debug",
|
||||
"--unoptimized",
|
||||
"--no-lto",
|
||||
"--prebuilt-dart-sdk"
|
||||
"--prebuilt-dart-sdk",
|
||||
"--enable-impeller-3d"
|
||||
],
|
||||
"name": "host_debug_unopt",
|
||||
"ninja": {
|
||||
|
||||
@@ -44,6 +44,10 @@ config("impeller_public_config") {
|
||||
"_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING",
|
||||
]
|
||||
}
|
||||
|
||||
if (impeller_enable_3d) {
|
||||
defines += [ "IMPELLER_ENABLE_3D" ]
|
||||
}
|
||||
}
|
||||
|
||||
group("impeller") {
|
||||
|
||||
@@ -67,6 +67,7 @@ impeller_component("aiks_unittests") {
|
||||
"//flutter/impeller/geometry:geometry_asserts",
|
||||
"//flutter/impeller/golden_tests:golden_playground_test",
|
||||
"//flutter/impeller/playground:playground_test",
|
||||
"//flutter/impeller/scene",
|
||||
"//flutter/impeller/typographer/backends/stb:typographer_stb_backend",
|
||||
"//flutter/testing:testing_lib",
|
||||
]
|
||||
@@ -92,6 +93,7 @@ impeller_component("aiks_unittests_golden") {
|
||||
"//flutter/impeller/geometry:geometry_asserts",
|
||||
"//flutter/impeller/golden_tests:golden_playground_test",
|
||||
"//flutter/impeller/playground:playground_test",
|
||||
"//flutter/impeller/scene",
|
||||
"//flutter/impeller/typographer/backends/stb:typographer_stb_backend",
|
||||
"//flutter/testing:testing_lib",
|
||||
]
|
||||
|
||||
@@ -2056,6 +2056,7 @@ TEST_P(AiksTest, SaveLayerFiltersScaleWithTransform) {
|
||||
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
|
||||
}
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
TEST_P(AiksTest, SceneColorSource) {
|
||||
// Load up the scene.
|
||||
auto mapping =
|
||||
@@ -2096,6 +2097,7 @@ TEST_P(AiksTest, SceneColorSource) {
|
||||
|
||||
ASSERT_TRUE(OpenPlaygroundHere(callback));
|
||||
}
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
TEST_P(AiksTest, PaintWithFilters) {
|
||||
// validate that a paint with a color filter "HasFilters", no other filters
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "impeller/entity/contents/linear_gradient_contents.h"
|
||||
#include "impeller/entity/contents/radial_gradient_contents.h"
|
||||
#include "impeller/entity/contents/runtime_effect_contents.h"
|
||||
#include "impeller/entity/contents/scene_contents.h"
|
||||
#include "impeller/entity/contents/solid_color_contents.h"
|
||||
#include "impeller/entity/contents/sweep_gradient_contents.h"
|
||||
#include "impeller/entity/contents/tiled_texture_contents.h"
|
||||
@@ -21,7 +20,11 @@
|
||||
#include "impeller/geometry/matrix.h"
|
||||
#include "impeller/geometry/scalar.h"
|
||||
#include "impeller/runtime_stage/runtime_stage.h"
|
||||
#include "impeller/scene/node.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/entity/contents/scene_contents.h" // nogncheck
|
||||
#include "impeller/scene/node.h" // nogncheck
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
namespace impeller {
|
||||
|
||||
@@ -210,6 +213,7 @@ ColorSource ColorSource::MakeRuntimeEffect(
|
||||
return result;
|
||||
}
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
ColorSource ColorSource::MakeScene(std::shared_ptr<scene::Node> scene_node,
|
||||
Matrix camera_transform) {
|
||||
ColorSource result;
|
||||
@@ -224,6 +228,7 @@ ColorSource ColorSource::MakeScene(std::shared_ptr<scene::Node> scene_node,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
ColorSource::Type ColorSource::GetType() const {
|
||||
return type_;
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
#include "impeller/geometry/matrix.h"
|
||||
#include "impeller/geometry/point.h"
|
||||
#include "impeller/runtime_stage/runtime_stage.h"
|
||||
#include "impeller/scene/node.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/scene/node.h" // nogncheck
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
namespace impeller {
|
||||
|
||||
@@ -85,8 +88,10 @@ class ColorSource {
|
||||
std::shared_ptr<std::vector<uint8_t>> uniform_data,
|
||||
std::vector<RuntimeEffectContents::TextureInput> texture_inputs);
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
static ColorSource MakeScene(std::shared_ptr<scene::Node> scene_node,
|
||||
Matrix camera_transform);
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
Type GetType() const;
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ impeller_component("display_list_unittests") {
|
||||
deps = [
|
||||
":display_list",
|
||||
"../playground:playground_test",
|
||||
"//flutter/impeller/scene",
|
||||
"//flutter/impeller/typographer/backends/stb:typographer_stb_backend",
|
||||
]
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "impeller/entity/contents/linear_gradient_contents.h"
|
||||
#include "impeller/entity/contents/radial_gradient_contents.h"
|
||||
#include "impeller/entity/contents/runtime_effect_contents.h"
|
||||
#include "impeller/entity/contents/scene_contents.h"
|
||||
#include "impeller/entity/contents/sweep_gradient_contents.h"
|
||||
#include "impeller/entity/contents/tiled_texture_contents.h"
|
||||
#include "impeller/entity/entity.h"
|
||||
@@ -37,6 +36,10 @@
|
||||
#include "impeller/geometry/sigma.h"
|
||||
#include "impeller/typographer/backends/skia/text_frame_skia.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/entity/contents/scene_contents.h"
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
namespace impeller {
|
||||
|
||||
#define UNIMPLEMENTED \
|
||||
|
||||
@@ -203,8 +203,6 @@ impeller_component("entity") {
|
||||
"contents/radial_gradient_contents.h",
|
||||
"contents/runtime_effect_contents.cc",
|
||||
"contents/runtime_effect_contents.h",
|
||||
"contents/scene_contents.cc",
|
||||
"contents/scene_contents.h",
|
||||
"contents/solid_color_contents.cc",
|
||||
"contents/solid_color_contents.h",
|
||||
"contents/solid_rrect_blur_contents.cc",
|
||||
@@ -261,10 +259,17 @@ impeller_component("entity") {
|
||||
"../archivist",
|
||||
"../image:image_skia_backend",
|
||||
"../renderer",
|
||||
"../scene",
|
||||
"../typographer",
|
||||
]
|
||||
|
||||
if (impeller_enable_3d) {
|
||||
sources += [
|
||||
"contents/scene_contents.cc",
|
||||
"contents/scene_contents.h",
|
||||
]
|
||||
public_deps += [ "../scene" ]
|
||||
}
|
||||
|
||||
deps = [ "//flutter/fml" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,9 @@ ContentContext::ContentContext(
|
||||
lazy_glyph_atlas_(
|
||||
std::make_shared<LazyGlyphAtlas>(std::move(typographer_context))),
|
||||
tessellator_(std::make_shared<Tessellator>()),
|
||||
#if IMPELLER_ENABLE_3D
|
||||
scene_context_(std::make_shared<scene::SceneContext>(context_)),
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
render_target_cache_(std::make_shared<RenderTargetCache>(
|
||||
context_->GetResourceAllocator())) {
|
||||
if (!context_ || !context_->IsValid()) {
|
||||
@@ -413,9 +415,11 @@ std::shared_ptr<Texture> ContentContext::MakeSubpass(
|
||||
return subpass_texture;
|
||||
}
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::shared_ptr<scene::SceneContext> ContentContext::GetSceneContext() const {
|
||||
return scene_context_;
|
||||
}
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
std::shared_ptr<Tessellator> ContentContext::GetTessellator() const {
|
||||
return tessellator_;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "impeller/renderer/capabilities.h"
|
||||
#include "impeller/renderer/pipeline.h"
|
||||
#include "impeller/renderer/render_target.h"
|
||||
#include "impeller/scene/scene_context.h"
|
||||
#include "impeller/typographer/typographer_context.h"
|
||||
|
||||
#ifdef IMPELLER_DEBUG
|
||||
@@ -113,6 +112,10 @@
|
||||
#include "impeller/entity/framebuffer_blend_screen.frag.h"
|
||||
#include "impeller/entity/framebuffer_blend_softlight.frag.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/scene/scene_context.h" // nogncheck
|
||||
#endif
|
||||
|
||||
namespace impeller {
|
||||
|
||||
#ifdef IMPELLER_DEBUG
|
||||
@@ -348,7 +351,9 @@ class ContentContext {
|
||||
|
||||
bool IsValid() const;
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::shared_ptr<scene::SceneContext> GetSceneContext() const;
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
std::shared_ptr<Tessellator> GetTessellator() const;
|
||||
|
||||
@@ -873,7 +878,9 @@ class ContentContext {
|
||||
|
||||
bool is_valid_ = false;
|
||||
std::shared_ptr<Tessellator> tessellator_;
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::shared_ptr<scene::SceneContext> scene_context_;
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
std::shared_ptr<RenderTargetAllocator> render_target_cache_;
|
||||
bool wireframe_ = false;
|
||||
|
||||
|
||||
@@ -14571,732 +14571,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flutter/impeller/scene/shaders/gles/skinned.vert.gles": {
|
||||
"Mali-G78": {
|
||||
"core": "Mali-G78",
|
||||
"filename": "flutter/impeller/scene/shaders/gles/skinned.vert.gles",
|
||||
"has_uniform_computation": true,
|
||||
"type": "Vertex",
|
||||
"variants": {
|
||||
"Position": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
3.075000047683716,
|
||||
3.075000047683716,
|
||||
0.09375,
|
||||
0.0,
|
||||
4.0,
|
||||
4.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arith_total",
|
||||
"arith_fma",
|
||||
"arith_cvt",
|
||||
"arith_sfu",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
1.2625000476837158,
|
||||
1.2625000476837158,
|
||||
0.296875,
|
||||
0.0,
|
||||
2.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"total_cycles": [
|
||||
3.075000047683716,
|
||||
3.075000047683716,
|
||||
0.359375,
|
||||
0.0,
|
||||
4.0,
|
||||
4.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 50,
|
||||
"uniform_registers_used": 30,
|
||||
"work_registers_used": 64
|
||||
},
|
||||
"Varying": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
3.59375,
|
||||
3.59375,
|
||||
0.09375,
|
||||
0.0,
|
||||
13.0,
|
||||
4.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arith_total",
|
||||
"arith_fma",
|
||||
"arith_cvt",
|
||||
"arith_sfu",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
1.78125,
|
||||
1.78125,
|
||||
0.296875,
|
||||
0.0,
|
||||
11.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
3.59375,
|
||||
3.59375,
|
||||
0.359375,
|
||||
0.0,
|
||||
13.0,
|
||||
4.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 50,
|
||||
"uniform_registers_used": 26,
|
||||
"work_registers_used": 64
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mali-T880": {
|
||||
"core": "Mali-T880",
|
||||
"filename": "flutter/impeller/scene/shaders/gles/skinned.vert.gles",
|
||||
"has_uniform_computation": false,
|
||||
"type": "Vertex",
|
||||
"variants": {
|
||||
"Main": {
|
||||
"has_stack_spilling": true,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"arithmetic"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
23.43000030517578,
|
||||
17.0,
|
||||
16.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arithmetic",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
12.210000038146973,
|
||||
13.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"arithmetic"
|
||||
],
|
||||
"total_cycles": [
|
||||
20.0,
|
||||
17.0,
|
||||
16.0
|
||||
]
|
||||
},
|
||||
"thread_occupancy": 50,
|
||||
"uniform_registers_used": 7,
|
||||
"work_registers_used": 8
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flutter/impeller/scene/shaders/gles/unlit.frag.gles": {
|
||||
"Mali-G78": {
|
||||
"core": "Mali-G78",
|
||||
"filename": "flutter/impeller/scene/shaders/gles/unlit.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": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"varying"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.03125,
|
||||
0.0,
|
||||
0.0,
|
||||
0.75,
|
||||
0.25
|
||||
],
|
||||
"pipelines": [
|
||||
"arith_total",
|
||||
"arith_fma",
|
||||
"arith_cvt",
|
||||
"arith_sfu",
|
||||
"load_store",
|
||||
"varying",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"varying"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.75,
|
||||
0.25
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"varying"
|
||||
],
|
||||
"total_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.03125,
|
||||
0.0,
|
||||
0.0,
|
||||
0.75,
|
||||
0.25
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 8,
|
||||
"work_registers_used": 19
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mali-T880": {
|
||||
"core": "Mali-T880",
|
||||
"filename": "flutter/impeller/scene/shaders/gles/unlit.frag.gles",
|
||||
"has_uniform_computation": false,
|
||||
"type": "Fragment",
|
||||
"variants": {
|
||||
"Main": {
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
1.0,
|
||||
2.0,
|
||||
1.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arithmetic",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
1.0,
|
||||
2.0,
|
||||
1.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
1.3333333730697632,
|
||||
2.0,
|
||||
1.0
|
||||
]
|
||||
},
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 2,
|
||||
"work_registers_used": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flutter/impeller/scene/shaders/gles/unskinned.vert.gles": {
|
||||
"Mali-G78": {
|
||||
"core": "Mali-G78",
|
||||
"filename": "flutter/impeller/scene/shaders/gles/unskinned.vert.gles",
|
||||
"has_uniform_computation": false,
|
||||
"type": "Vertex",
|
||||
"variants": {
|
||||
"Position": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
0.265625,
|
||||
0.265625,
|
||||
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.265625,
|
||||
0.265625,
|
||||
0.0,
|
||||
0.0,
|
||||
2.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
0.265625,
|
||||
0.265625,
|
||||
0.0,
|
||||
0.0,
|
||||
2.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 24,
|
||||
"work_registers_used": 32
|
||||
},
|
||||
"Varying": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.0,
|
||||
0.0,
|
||||
11.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.75,
|
||||
0.75,
|
||||
0.0,
|
||||
0.0,
|
||||
11.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.0,
|
||||
0.0,
|
||||
11.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 20,
|
||||
"work_registers_used": 32
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mali-T880": {
|
||||
"core": "Mali-T880",
|
||||
"filename": "flutter/impeller/scene/shaders/gles/unskinned.vert.gles",
|
||||
"has_uniform_computation": false,
|
||||
"type": "Vertex",
|
||||
"variants": {
|
||||
"Main": {
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
5.28000020980835,
|
||||
13.0,
|
||||
0.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arithmetic",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
5.28000020980835,
|
||||
13.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
5.333333492279053,
|
||||
13.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"thread_occupancy": 50,
|
||||
"uniform_registers_used": 7,
|
||||
"work_registers_used": 6
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flutter/impeller/scene/shaders/skinned.vert.vkspv": {
|
||||
"Mali-G78": {
|
||||
"core": "Mali-G78",
|
||||
"filename": "flutter/impeller/scene/shaders/skinned.vert.vkspv",
|
||||
"has_uniform_computation": true,
|
||||
"type": "Vertex",
|
||||
"variants": {
|
||||
"Position": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
3.0625,
|
||||
3.0625,
|
||||
0.09375,
|
||||
0.0,
|
||||
4.0,
|
||||
4.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arith_total",
|
||||
"arith_fma",
|
||||
"arith_cvt",
|
||||
"arith_sfu",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
1.25,
|
||||
1.25,
|
||||
0.296875,
|
||||
0.0,
|
||||
2.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"total_cycles": [
|
||||
3.0625,
|
||||
3.0625,
|
||||
0.359375,
|
||||
0.0,
|
||||
4.0,
|
||||
4.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 50,
|
||||
"uniform_registers_used": 30,
|
||||
"work_registers_used": 64
|
||||
},
|
||||
"Varying": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
3.59375,
|
||||
3.59375,
|
||||
0.09375,
|
||||
0.0,
|
||||
13.0,
|
||||
4.0
|
||||
],
|
||||
"pipelines": [
|
||||
"arith_total",
|
||||
"arith_fma",
|
||||
"arith_cvt",
|
||||
"arith_sfu",
|
||||
"load_store",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
1.78125,
|
||||
1.78125,
|
||||
0.296875,
|
||||
0.0,
|
||||
11.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
3.59375,
|
||||
3.59375,
|
||||
0.359375,
|
||||
0.0,
|
||||
13.0,
|
||||
4.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 50,
|
||||
"uniform_registers_used": 30,
|
||||
"work_registers_used": 64
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flutter/impeller/scene/shaders/unlit.frag.vkspv": {
|
||||
"Mali-G78": {
|
||||
"core": "Mali-G78",
|
||||
"filename": "flutter/impeller/scene/shaders/unlit.frag.vkspv",
|
||||
"has_side_effects": false,
|
||||
"has_uniform_computation": true,
|
||||
"modifies_coverage": false,
|
||||
"reads_color_buffer": false,
|
||||
"type": "Fragment",
|
||||
"uses_late_zs_test": false,
|
||||
"uses_late_zs_update": false,
|
||||
"variants": {
|
||||
"Main": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"varying"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.75,
|
||||
0.25
|
||||
],
|
||||
"pipelines": [
|
||||
"arith_total",
|
||||
"arith_fma",
|
||||
"arith_cvt",
|
||||
"arith_sfu",
|
||||
"load_store",
|
||||
"varying",
|
||||
"texture"
|
||||
],
|
||||
"shortest_path_bound_pipelines": [
|
||||
"varying"
|
||||
],
|
||||
"shortest_path_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.75,
|
||||
0.25
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"varying"
|
||||
],
|
||||
"total_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.75,
|
||||
0.25
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 8,
|
||||
"work_registers_used": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"flutter/impeller/scene/shaders/unskinned.vert.vkspv": {
|
||||
"Mali-G78": {
|
||||
"core": "Mali-G78",
|
||||
"filename": "flutter/impeller/scene/shaders/unskinned.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.25,
|
||||
0.25,
|
||||
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.25,
|
||||
0.25,
|
||||
0.0,
|
||||
0.0,
|
||||
2.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
0.25,
|
||||
0.25,
|
||||
0.0,
|
||||
0.0,
|
||||
2.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 24,
|
||||
"work_registers_used": 32
|
||||
},
|
||||
"Varying": {
|
||||
"fp16_arithmetic": 0,
|
||||
"has_stack_spilling": false,
|
||||
"performance": {
|
||||
"longest_path_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"longest_path_cycles": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.0,
|
||||
0.0,
|
||||
11.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.75,
|
||||
0.75,
|
||||
0.0,
|
||||
0.0,
|
||||
11.0,
|
||||
0.0
|
||||
],
|
||||
"total_bound_pipelines": [
|
||||
"load_store"
|
||||
],
|
||||
"total_cycles": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.0,
|
||||
0.0,
|
||||
11.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"stack_spill_bytes": 0,
|
||||
"thread_occupancy": 100,
|
||||
"uniform_registers_used": 24,
|
||||
"work_registers_used": 31
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,10 @@
|
||||
#include "flutter/impeller/toolkit/egl/context.h"
|
||||
#include "flutter/impeller/toolkit/egl/surface.h"
|
||||
#include "impeller/entity/gles/entity_shaders_gles.h"
|
||||
#include "impeller/scene/shaders/gles/scene_shaders_gles.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/scene/shaders/gles/scene_shaders_gles.h" // nogcncheck
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
namespace flutter {
|
||||
|
||||
class AndroidContextGLImpeller::ReactorWorker final
|
||||
@@ -56,11 +58,12 @@ static std::shared_ptr<impeller::Context> CreateImpellerContext(
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
|
||||
std::make_shared<fml::NonOwnedMapping>(
|
||||
impeller_entity_shaders_gles_data,
|
||||
impeller_entity_shaders_gles_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(
|
||||
impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_gles_data,
|
||||
impeller_entity_shaders_gles_length),
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_gles_data,
|
||||
impeller_scene_shaders_gles_length),
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
};
|
||||
|
||||
auto context =
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "flutter/impeller/entity/vk/entity_shaders_vk.h"
|
||||
#include "flutter/impeller/entity/vk/modern_shaders_vk.h"
|
||||
#include "flutter/impeller/renderer/backend/vulkan/context_vk.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "flutter/impeller/scene/shaders/vk/scene_shaders_vk.h"
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
namespace flutter {
|
||||
|
||||
@@ -16,12 +19,14 @@ static std::shared_ptr<impeller::Context> CreateImpellerContext(
|
||||
const fml::RefPtr<vulkan::VulkanProcTable>& proc_table,
|
||||
bool enable_vulkan_validation) {
|
||||
std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_vk_data,
|
||||
impeller_entity_shaders_vk_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_vk_data,
|
||||
impeller_scene_shaders_vk_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_vk_data,
|
||||
impeller_modern_shaders_vk_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_vk_data,
|
||||
impeller_entity_shaders_vk_length),
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_vk_data,
|
||||
impeller_scene_shaders_vk_length),
|
||||
#endif
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_vk_data,
|
||||
impeller_modern_shaders_vk_length),
|
||||
};
|
||||
|
||||
PFN_vkGetInstanceProcAddr instance_proc_addr =
|
||||
|
||||
@@ -12,21 +12,26 @@
|
||||
#include "impeller/entity/mtl/entity_shaders.h"
|
||||
#include "impeller/entity/mtl/framebuffer_blend_shaders.h"
|
||||
#include "impeller/entity/mtl/modern_shaders.h"
|
||||
#include "impeller/scene/shaders/mtl/scene_shaders.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
FLUTTER_ASSERT_ARC
|
||||
|
||||
static std::shared_ptr<impeller::ContextMTL> CreateImpellerContext(
|
||||
std::shared_ptr<const fml::SyncSwitch> is_gpu_disabled_sync_switch) {
|
||||
std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_data,
|
||||
impeller_entity_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_data,
|
||||
impeller_scene_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_data,
|
||||
impeller_modern_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_framebuffer_blend_shaders_data,
|
||||
impeller_framebuffer_blend_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_data,
|
||||
impeller_entity_shaders_length),
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_data,
|
||||
impeller_scene_shaders_length),
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_data,
|
||||
impeller_modern_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_framebuffer_blend_shaders_data,
|
||||
impeller_framebuffer_blend_shaders_length),
|
||||
};
|
||||
auto context = impeller::ContextMTL::Create(
|
||||
shader_mappings, std::move(is_gpu_disabled_sync_switch), "Impeller Library");
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
#include "impeller/entity/gles/entity_shaders_gles.h"
|
||||
#include "impeller/renderer/backend/gles/context_gles.h"
|
||||
#include "impeller/renderer/backend/gles/proc_table_gles.h"
|
||||
#include "impeller/scene/shaders/gles/scene_shaders_gles.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/scene/shaders/gles/scene_shaders_gles.h" // nogncheck
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
namespace flutter {
|
||||
|
||||
@@ -62,11 +65,12 @@ EmbedderSurfaceGLImpeller::EmbedderSurfaceGLImpeller(
|
||||
gl_dispatch_table_.gl_make_current_callback();
|
||||
|
||||
std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
|
||||
std::make_shared<fml::NonOwnedMapping>(
|
||||
impeller_entity_shaders_gles_data,
|
||||
impeller_entity_shaders_gles_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(
|
||||
impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_gles_data,
|
||||
impeller_entity_shaders_gles_length),
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_gles_data,
|
||||
impeller_scene_shaders_gles_length),
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
};
|
||||
auto gl = std::make_unique<impeller::ProcTableGLES>(
|
||||
gl_dispatch_table_.gl_proc_resolver);
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
#include "impeller/entity/mtl/framebuffer_blend_shaders.h"
|
||||
#include "impeller/entity/mtl/modern_shaders.h"
|
||||
#include "impeller/renderer/backend/metal/context_mtl.h"
|
||||
#include "impeller/scene/shaders/mtl/scene_shaders.h"
|
||||
|
||||
#if IMPELLER_ENABLE_3D
|
||||
#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
|
||||
FLUTTER_ASSERT_NOT_ARC
|
||||
|
||||
@@ -31,14 +34,16 @@ EmbedderSurfaceMetalImpeller::EmbedderSurfaceMetalImpeller(
|
||||
metal_dispatch_table_(std::move(metal_dispatch_table)),
|
||||
external_view_embedder_(std::move(external_view_embedder)) {
|
||||
std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_data,
|
||||
impeller_entity_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_data,
|
||||
impeller_scene_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_data,
|
||||
impeller_modern_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_framebuffer_blend_shaders_data,
|
||||
impeller_framebuffer_blend_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_entity_shaders_data,
|
||||
impeller_entity_shaders_length),
|
||||
#if IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_scene_shaders_data,
|
||||
impeller_scene_shaders_length),
|
||||
#endif // IMPELLER_ENABLE_3D
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_modern_shaders_data,
|
||||
impeller_modern_shaders_length),
|
||||
std::make_shared<fml::NonOwnedMapping>(impeller_framebuffer_blend_shaders_data,
|
||||
impeller_framebuffer_blend_shaders_length),
|
||||
};
|
||||
context_ = impeller::ContextMTL::Create(
|
||||
(id<MTLDevice>)device, // device
|
||||
|
||||
Reference in New Issue
Block a user