From 2fb18cf2218729bb1b45b9c29a668e29c8dd0b7d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 14:36:09 -0700 Subject: [PATCH 01/10] [Impeller] Do not build scene unless 3d define is true --- impeller/aiks/color_source.cc | 7 ++++++- impeller/aiks/color_source.h | 5 +++++ impeller/display_list/dl_dispatcher.cc | 5 ++++- impeller/entity/BUILD.gn | 11 +++++++--- impeller/entity/contents/content_context.cc | 4 ++++ impeller/entity/contents/content_context.h | 4 ++++ .../renderer/backend/vulkan/render_pass_vk.cc | 7 ++++++- .../android/android_context_gl_impeller.cc | 15 +++++++------ .../android_context_vulkan_impeller.cc | 17 +++++++++------ .../FlutterDarwinContextMetalImpeller.mm | 21 ++++++++++++------- .../embedder/embedder_surface_gl_impeller.cc | 14 ++++++++----- .../embedder_surface_metal_impeller.mm | 21 ++++++++++++------- 12 files changed, 92 insertions(+), 39 deletions(-) diff --git a/impeller/aiks/color_source.cc b/impeller/aiks/color_source.cc index 082225dd505a9..3e3ecf06d651b 100644 --- a/impeller/aiks/color_source.cc +++ b/impeller/aiks/color_source.cc @@ -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" + +#if IMPELLER_ENABLE_3D +#include "impeller/entity/contents/scene_contents.h" #include "impeller/scene/node.h" +#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, Matrix camera_transform) { ColorSource result; @@ -224,6 +228,7 @@ ColorSource ColorSource::MakeScene(std::shared_ptr scene_node, }; return result; } +#endif // IMPELLER_ENABLE_3D ColorSource::Type ColorSource::GetType() const { return type_; diff --git a/impeller/aiks/color_source.h b/impeller/aiks/color_source.h index 84c6a6e3d56b8..5e16c06fdd47f 100644 --- a/impeller/aiks/color_source.h +++ b/impeller/aiks/color_source.h @@ -15,7 +15,10 @@ #include "impeller/geometry/matrix.h" #include "impeller/geometry/point.h" #include "impeller/runtime_stage/runtime_stage.h" + +#if IMPELLER_ENABLE_3D #include "impeller/scene/node.h" +#endif // IMPELLER_ENABLE_3D namespace impeller { @@ -85,8 +88,10 @@ class ColorSource { std::shared_ptr> uniform_data, std::vector texture_inputs); +#if IMPELLER_ENABLE_3D static ColorSource MakeScene(std::shared_ptr scene_node, Matrix camera_transform); +#endif // IMPELLER_ENABLE_3D Type GetType() const; diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index 1aff59079bcd6..0a61b45b72f23 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -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 \ diff --git a/impeller/entity/BUILD.gn b/impeller/entity/BUILD.gn index 0b55979172c2e..57113a7b7bbc5 100644 --- a/impeller/entity/BUILD.gn +++ b/impeller/entity/BUILD.gn @@ -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" ] } diff --git a/impeller/entity/contents/content_context.cc b/impeller/entity/contents/content_context.cc index 081895bd0182c..2501ef822f053 100644 --- a/impeller/entity/contents/content_context.cc +++ b/impeller/entity/contents/content_context.cc @@ -167,7 +167,9 @@ ContentContext::ContentContext( lazy_glyph_atlas_( std::make_shared(std::move(typographer_context))), tessellator_(std::make_shared()), +#if IMPELLER_ENABLE_3D scene_context_(std::make_shared(context_)), +#endif // IMPELLER_ENABLE_3D render_target_cache_(std::make_shared( context_->GetResourceAllocator())) { if (!context_ || !context_->IsValid()) { @@ -413,9 +415,11 @@ std::shared_ptr ContentContext::MakeSubpass( return subpass_texture; } +#if IMPELLER_ENABLE_3D std::shared_ptr ContentContext::GetSceneContext() const { return scene_context_; } +#endif // IMPELLER_ENABLE_3D std::shared_ptr ContentContext::GetTessellator() const { return tessellator_; diff --git a/impeller/entity/contents/content_context.h b/impeller/entity/contents/content_context.h index fd976542d0d41..b7470baa6398f 100644 --- a/impeller/entity/contents/content_context.h +++ b/impeller/entity/contents/content_context.h @@ -348,7 +348,9 @@ class ContentContext { bool IsValid() const; +#if IMPELLER_ENABLE_3D std::shared_ptr GetSceneContext() const; +#endif // IMPELLER_ENABLE_3D std::shared_ptr GetTessellator() const; @@ -873,7 +875,9 @@ class ContentContext { bool is_valid_ = false; std::shared_ptr tessellator_; +#if IMPELLER_ENABLE_3D std::shared_ptr scene_context_; +#endif // IMPELLER_ENABLE_3D std::shared_ptr render_target_cache_; bool wireframe_ = false; diff --git a/impeller/renderer/backend/vulkan/render_pass_vk.cc b/impeller/renderer/backend/vulkan/render_pass_vk.cc index a981c75658853..c838d7f909f22 100644 --- a/impeller/renderer/backend/vulkan/render_pass_vk.cc +++ b/impeller/renderer/backend/vulkan/render_pass_vk.cc @@ -260,6 +260,8 @@ SharedHandleVK RenderPassVK::CreateVKFramebuffer( auto [result, framebuffer] = context.GetDevice().createFramebufferUnique(fb_info); + FML_LOG(ERROR) << "create framebuffer result is " << vk::to_string(result) + << " "; // << framebuffer.get(); if (result != vk::Result::eSuccess) { VALIDATION_LOG << "Could not create framebuffer: " << vk::to_string(result); return {}; @@ -636,12 +638,15 @@ bool RenderPassVK::OnEncodeCommands(const Context& context) const { vk::RenderPassBeginInfo pass_info; pass_info.renderPass = *render_pass; - pass_info.framebuffer = *framebuffer; + FML_LOG(ERROR) << target_size; pass_info.renderArea.extent.width = static_cast(target_size.width); pass_info.renderArea.extent.height = static_cast(target_size.height); pass_info.setClearValues(clear_values); + VkRenderPassBeginInfo my_info = pass_info; + FML_LOG(ERROR) << "my_info is " << my_info.sType << " " << my_info.renderPass + << " " << my_info.framebuffer; { TRACE_EVENT0("impeller", "EncodeRenderPassCommands"); cmd_buffer.beginRenderPass(pass_info, vk::SubpassContents::eInline); diff --git a/shell/platform/android/android_context_gl_impeller.cc b/shell/platform/android/android_context_gl_impeller.cc index c630ab2fb8f6e..d0452613284e5 100644 --- a/shell/platform/android/android_context_gl_impeller.cc +++ b/shell/platform/android/android_context_gl_impeller.cc @@ -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" +#endif // IMPELLER_ENABLE_3D namespace flutter { class AndroidContextGLImpeller::ReactorWorker final @@ -56,11 +58,12 @@ static std::shared_ptr CreateImpellerContext( } std::vector> shader_mappings = { - std::make_shared( - impeller_entity_shaders_gles_data, - impeller_entity_shaders_gles_length), - std::make_shared( - impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length), + std::make_shared(impeller_entity_shaders_gles_data, + impeller_entity_shaders_gles_length), +#if IMPELLER_ENABLE_3D + std::make_shared(impeller_scene_shaders_gles_data, + impeller_scene_shaders_gles_length), +#endif // IMPELLER_ENABLE_3D }; auto context = diff --git a/shell/platform/android/android_context_vulkan_impeller.cc b/shell/platform/android/android_context_vulkan_impeller.cc index 50df30cecb5e1..4adc2d1beefb6 100644 --- a/shell/platform/android/android_context_vulkan_impeller.cc +++ b/shell/platform/android/android_context_vulkan_impeller.cc @@ -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 CreateImpellerContext( const fml::RefPtr& proc_table, bool enable_vulkan_validation) { std::vector> shader_mappings = { - std::make_shared(impeller_entity_shaders_vk_data, - impeller_entity_shaders_vk_length), - std::make_shared(impeller_scene_shaders_vk_data, - impeller_scene_shaders_vk_length), - std::make_shared(impeller_modern_shaders_vk_data, - impeller_modern_shaders_vk_length), + std::make_shared(impeller_entity_shaders_vk_data, + impeller_entity_shaders_vk_length), +#if IMPELLER_ENABLE_3D + std::make_shared(impeller_scene_shaders_vk_data, + impeller_scene_shaders_vk_length), +#endif + std::make_shared(impeller_modern_shaders_vk_data, + impeller_modern_shaders_vk_length), }; PFN_vkGetInstanceProcAddr instance_proc_addr = diff --git a/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm b/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm index 00c4115698c08..bcf0be76fc969 100644 --- a/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm +++ b/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm @@ -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" + +#if IMPELLER_ENABLE_3D #include "impeller/scene/shaders/mtl/scene_shaders.h" +#endif // IMPELLER_ENABLE_3D FLUTTER_ASSERT_ARC static std::shared_ptr CreateImpellerContext( std::shared_ptr is_gpu_disabled_sync_switch) { std::vector> shader_mappings = { - std::make_shared(impeller_entity_shaders_data, - impeller_entity_shaders_length), - std::make_shared(impeller_scene_shaders_data, - impeller_scene_shaders_length), - std::make_shared(impeller_modern_shaders_data, - impeller_modern_shaders_length), - std::make_shared(impeller_framebuffer_blend_shaders_data, - impeller_framebuffer_blend_shaders_length), + std::make_shared(impeller_entity_shaders_data, + impeller_entity_shaders_length), +#if IMPELLER_ENABLE_3D + std::make_shared(impeller_scene_shaders_data, + impeller_scene_shaders_length), +#endif // IMPELLER_ENABLE_3D + std::make_shared(impeller_modern_shaders_data, + impeller_modern_shaders_length), + std::make_shared(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"); diff --git a/shell/platform/embedder/embedder_surface_gl_impeller.cc b/shell/platform/embedder/embedder_surface_gl_impeller.cc index 4d03bff292811..3a7992fd20ebe 100644 --- a/shell/platform/embedder/embedder_surface_gl_impeller.cc +++ b/shell/platform/embedder/embedder_surface_gl_impeller.cc @@ -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" + +#if IMPELLER_ENABLE_3D #include "impeller/scene/shaders/gles/scene_shaders_gles.h" +#endif // IMPELLER_ENABLE_3D namespace flutter { @@ -62,11 +65,12 @@ EmbedderSurfaceGLImpeller::EmbedderSurfaceGLImpeller( gl_dispatch_table_.gl_make_current_callback(); std::vector> shader_mappings = { - std::make_shared( - impeller_entity_shaders_gles_data, - impeller_entity_shaders_gles_length), - std::make_shared( - impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length), + std::make_shared(impeller_entity_shaders_gles_data, + impeller_entity_shaders_gles_length), +#if IMPELLER_ENABLE_3D + std::make_shared(impeller_scene_shaders_gles_data, + impeller_scene_shaders_gles_length), +#endif // IMPELLER_ENABLE_3D }; auto gl = std::make_unique( gl_dispatch_table_.gl_proc_resolver); diff --git a/shell/platform/embedder/embedder_surface_metal_impeller.mm b/shell/platform/embedder/embedder_surface_metal_impeller.mm index 139f3e9094081..599045ad273b0 100644 --- a/shell/platform/embedder/embedder_surface_metal_impeller.mm +++ b/shell/platform/embedder/embedder_surface_metal_impeller.mm @@ -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" + +#if IMPELLER_ENABLE_3D #include "impeller/scene/shaders/mtl/scene_shaders.h" +#endif // IMPELLER_ENABLE_3D FLUTTER_ASSERT_NOT_ARC @@ -31,14 +34,16 @@ metal_dispatch_table_(std::move(metal_dispatch_table)), external_view_embedder_(std::move(external_view_embedder)) { std::vector> shader_mappings = { - std::make_shared(impeller_entity_shaders_data, - impeller_entity_shaders_length), - std::make_shared(impeller_scene_shaders_data, - impeller_scene_shaders_length), - std::make_shared(impeller_modern_shaders_data, - impeller_modern_shaders_length), - std::make_shared(impeller_framebuffer_blend_shaders_data, - impeller_framebuffer_blend_shaders_length), + std::make_shared(impeller_entity_shaders_data, + impeller_entity_shaders_length), +#if IMPELLER_ENABLE_3D + std::make_shared(impeller_scene_shaders_data, + impeller_scene_shaders_length), +#endif // IMPELLER_ENABLE_3D + std::make_shared(impeller_modern_shaders_data, + impeller_modern_shaders_length), + std::make_shared(impeller_framebuffer_blend_shaders_data, + impeller_framebuffer_blend_shaders_length), }; context_ = impeller::ContextMTL::Create( (id)device, // device From 6913bc8b1fe053cfac2e17c450e61760031ca824 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 14:41:14 -0700 Subject: [PATCH 02/10] fix --- impeller/aiks/color_source.cc | 6 +++--- impeller/aiks/color_source.h | 4 ++-- impeller/entity/contents/content_context.h | 5 ++++- shell/platform/android/android_context_gl_impeller.cc | 2 +- .../darwin/graphics/FlutterDarwinContextMetalImpeller.mm | 2 +- shell/platform/embedder/embedder_surface_gl_impeller.cc | 2 +- shell/platform/embedder/embedder_surface_metal_impeller.mm | 2 +- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/impeller/aiks/color_source.cc b/impeller/aiks/color_source.cc index 3e3ecf06d651b..3329bcb4b832e 100644 --- a/impeller/aiks/color_source.cc +++ b/impeller/aiks/color_source.cc @@ -22,9 +22,9 @@ #include "impeller/runtime_stage/runtime_stage.h" #if IMPELLER_ENABLE_3D -#include "impeller/entity/contents/scene_contents.h" -#include "impeller/scene/node.h" -#endif // IMPELLER_ENABLE_3D +#include "impeller/entity/contents/scene_contents.h" // nogncheck +#include "impeller/scene/node.h" // nogncheck +#endif // IMPELLER_ENABLE_3D namespace impeller { diff --git a/impeller/aiks/color_source.h b/impeller/aiks/color_source.h index 5e16c06fdd47f..7849b841ec784 100644 --- a/impeller/aiks/color_source.h +++ b/impeller/aiks/color_source.h @@ -17,8 +17,8 @@ #include "impeller/runtime_stage/runtime_stage.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/node.h" -#endif // IMPELLER_ENABLE_3D +#include "impeller/scene/node.h" // nogncheck +#endif // IMPELLER_ENABLE_3D namespace impeller { diff --git a/impeller/entity/contents/content_context.h b/impeller/entity/contents/content_context.h index b7470baa6398f..549d2b29811de 100644 --- a/impeller/entity/contents/content_context.h +++ b/impeller/entity/contents/content_context.h @@ -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 diff --git a/shell/platform/android/android_context_gl_impeller.cc b/shell/platform/android/android_context_gl_impeller.cc index d0452613284e5..a2a555000ae09 100644 --- a/shell/platform/android/android_context_gl_impeller.cc +++ b/shell/platform/android/android_context_gl_impeller.cc @@ -12,7 +12,7 @@ #include "impeller/entity/gles/entity_shaders_gles.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/shaders/gles/scene_shaders_gles.h" +#include "impeller/scene/shaders/gles/scene_shaders_gles.h" // nogcncheck #endif // IMPELLER_ENABLE_3D namespace flutter { diff --git a/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm b/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm index bcf0be76fc969..2b79a52792ebe 100644 --- a/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm +++ b/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm @@ -14,7 +14,7 @@ #include "impeller/entity/mtl/modern_shaders.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/shaders/mtl/scene_shaders.h" +#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck #endif // IMPELLER_ENABLE_3D FLUTTER_ASSERT_ARC diff --git a/shell/platform/embedder/embedder_surface_gl_impeller.cc b/shell/platform/embedder/embedder_surface_gl_impeller.cc index 3a7992fd20ebe..20a2a5184e133 100644 --- a/shell/platform/embedder/embedder_surface_gl_impeller.cc +++ b/shell/platform/embedder/embedder_surface_gl_impeller.cc @@ -11,7 +11,7 @@ #include "impeller/renderer/backend/gles/proc_table_gles.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/shaders/gles/scene_shaders_gles.h" +#include "impeller/scene/shaders/gles/scene_shaders_gles.h" // nogncheck #endif // IMPELLER_ENABLE_3D namespace flutter { diff --git a/shell/platform/embedder/embedder_surface_metal_impeller.mm b/shell/platform/embedder/embedder_surface_metal_impeller.mm index 599045ad273b0..564bdde94a701 100644 --- a/shell/platform/embedder/embedder_surface_metal_impeller.mm +++ b/shell/platform/embedder/embedder_surface_metal_impeller.mm @@ -18,7 +18,7 @@ #include "impeller/renderer/backend/metal/context_mtl.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/shaders/mtl/scene_shaders.h" +#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck #endif // IMPELLER_ENABLE_3D FLUTTER_ASSERT_NOT_ARC From 24b7ff15a3ce2f8aca092b6d464267f67747b0ec Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 14:43:12 -0700 Subject: [PATCH 03/10] more --- impeller/aiks/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/impeller/aiks/BUILD.gn b/impeller/aiks/BUILD.gn index 91ba4d190bac2..5347c61972e5f 100644 --- a/impeller/aiks/BUILD.gn +++ b/impeller/aiks/BUILD.gn @@ -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", ] From 25892768e3fc205978d71e56113f48cb665ce9eb Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 14:50:37 -0700 Subject: [PATCH 04/10] more --- impeller/aiks/BUILD.gn | 1 + impeller/display_list/BUILD.gn | 1 + 2 files changed, 2 insertions(+) diff --git a/impeller/aiks/BUILD.gn b/impeller/aiks/BUILD.gn index 5347c61972e5f..d436664906007 100644 --- a/impeller/aiks/BUILD.gn +++ b/impeller/aiks/BUILD.gn @@ -92,6 +92,7 @@ impeller_component("aiks_unittests_golden") { ":aiks_playground", "//flutter/impeller/geometry:geometry_asserts", "//flutter/impeller/golden_tests:golden_playground_test", + "//flutter/impeller/scene", "//flutter/impeller/playground:playground_test", "//flutter/impeller/typographer/backends/stb:typographer_stb_backend", "//flutter/testing:testing_lib", diff --git a/impeller/display_list/BUILD.gn b/impeller/display_list/BUILD.gn index c84a693a5fb1a..9a10021b7306b 100644 --- a/impeller/display_list/BUILD.gn +++ b/impeller/display_list/BUILD.gn @@ -60,6 +60,7 @@ impeller_component("display_list_unittests") { deps = [ ":display_list", + "//flutter/impeller/scene", "../playground:playground_test", "//flutter/impeller/typographer/backends/stb:typographer_stb_backend", ] From 02580cfd6378294610d8a18c27d67e30303b085d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 15:00:59 -0700 Subject: [PATCH 05/10] format --- impeller/aiks/BUILD.gn | 2 +- impeller/display_list/BUILD.gn | 2 +- .../darwin/graphics/FlutterDarwinContextMetalImpeller.mm | 4 ++-- shell/platform/embedder/embedder_surface_metal_impeller.mm | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/impeller/aiks/BUILD.gn b/impeller/aiks/BUILD.gn index d436664906007..6509f6b3dd2a0 100644 --- a/impeller/aiks/BUILD.gn +++ b/impeller/aiks/BUILD.gn @@ -92,8 +92,8 @@ impeller_component("aiks_unittests_golden") { ":aiks_playground", "//flutter/impeller/geometry:geometry_asserts", "//flutter/impeller/golden_tests:golden_playground_test", - "//flutter/impeller/scene", "//flutter/impeller/playground:playground_test", + "//flutter/impeller/scene", "//flutter/impeller/typographer/backends/stb:typographer_stb_backend", "//flutter/testing:testing_lib", ] diff --git a/impeller/display_list/BUILD.gn b/impeller/display_list/BUILD.gn index 9a10021b7306b..24a1980f59aac 100644 --- a/impeller/display_list/BUILD.gn +++ b/impeller/display_list/BUILD.gn @@ -60,8 +60,8 @@ impeller_component("display_list_unittests") { deps = [ ":display_list", - "//flutter/impeller/scene", "../playground:playground_test", + "//flutter/impeller/scene", "//flutter/impeller/typographer/backends/stb:typographer_stb_backend", ] diff --git a/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm b/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm index 2b79a52792ebe..fab938f1a600b 100644 --- a/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm +++ b/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm @@ -14,8 +14,8 @@ #include "impeller/entity/mtl/modern_shaders.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck -#endif // IMPELLER_ENABLE_3D +#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck +#endif // IMPELLER_ENABLE_3D FLUTTER_ASSERT_ARC diff --git a/shell/platform/embedder/embedder_surface_metal_impeller.mm b/shell/platform/embedder/embedder_surface_metal_impeller.mm index 564bdde94a701..c9f463a059700 100644 --- a/shell/platform/embedder/embedder_surface_metal_impeller.mm +++ b/shell/platform/embedder/embedder_surface_metal_impeller.mm @@ -18,8 +18,8 @@ #include "impeller/renderer/backend/metal/context_mtl.h" #if IMPELLER_ENABLE_3D -#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck -#endif // IMPELLER_ENABLE_3D +#include "impeller/scene/shaders/mtl/scene_shaders.h" // nogncheck +#endif // IMPELLER_ENABLE_3D FLUTTER_ASSERT_NOT_ARC From 97065b1842dabffbbb58e1dd07f73adf407bd19d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 15:52:39 -0700 Subject: [PATCH 06/10] skip 3d test if no 3d --- impeller/aiks/aiks_unittests.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index ba4305c1b63d4..540024415027d 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -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 From 9ab610704e0cd7df137f4bbf951889d57af08b1d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 18:16:59 -0700 Subject: [PATCH 07/10] test 3d on mac unopt, update malioc --- ci/builders/mac_unopt.json | 3 +- impeller/tools/malioc.json | 727 ------------------------------------- 2 files changed, 2 insertions(+), 728 deletions(-) diff --git a/ci/builders/mac_unopt.json b/ci/builders/mac_unopt.json index f0591e9e3e355..616caa21fd65b 100644 --- a/ci/builders/mac_unopt.json +++ b/ci/builders/mac_unopt.json @@ -13,7 +13,8 @@ "debug", "--unoptimized", "--no-lto", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--impeller-enable-3d" ], "name": "host_debug_unopt", "ninja": { diff --git a/impeller/tools/malioc.json b/impeller/tools/malioc.json index a0aeed92e6937..3fa01c48f9fbb 100644 --- a/impeller/tools/malioc.json +++ b/impeller/tools/malioc.json @@ -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 - } - } - } } } \ No newline at end of file From 79fcdbd04b6edd52609585e7399cde17dde0eb1d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 22:04:54 -0700 Subject: [PATCH 08/10] option name --- ci/builders/mac_unopt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/builders/mac_unopt.json b/ci/builders/mac_unopt.json index 616caa21fd65b..357bc5e33cb0f 100644 --- a/ci/builders/mac_unopt.json +++ b/ci/builders/mac_unopt.json @@ -14,7 +14,7 @@ "--unoptimized", "--no-lto", "--prebuilt-dart-sdk", - "--impeller-enable-3d" + "--enable-impeller-3d" ], "name": "host_debug_unopt", "ninja": { From a183a3ead062411432f22c803dc7c5135de67a69 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 23 Aug 2023 22:40:37 -0700 Subject: [PATCH 09/10] config --- impeller/BUILD.gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn index 9855acc959de5..b62ab1262c597 100644 --- a/impeller/BUILD.gn +++ b/impeller/BUILD.gn @@ -44,6 +44,10 @@ config("impeller_public_config") { "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING", ] } + + if (impeller_enable_3d) { + defines += [ "IMPELLER_ENABLE_3D" ] + } } group("impeller") { From 6260b352801e26c7a66acd2ecbefff201c7bf3c1 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Thu, 24 Aug 2023 10:45:54 -0700 Subject: [PATCH 10/10] Unintended change --- impeller/renderer/backend/vulkan/render_pass_vk.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/impeller/renderer/backend/vulkan/render_pass_vk.cc b/impeller/renderer/backend/vulkan/render_pass_vk.cc index 39f0bb1bc57d4..0a9f020ef6e59 100644 --- a/impeller/renderer/backend/vulkan/render_pass_vk.cc +++ b/impeller/renderer/backend/vulkan/render_pass_vk.cc @@ -260,8 +260,6 @@ SharedHandleVK RenderPassVK::CreateVKFramebuffer( auto [result, framebuffer] = context.GetDevice().createFramebufferUnique(fb_info); - FML_LOG(ERROR) << "create framebuffer result is " << vk::to_string(result) - << " "; // << framebuffer.get(); if (result != vk::Result::eSuccess) { VALIDATION_LOG << "Could not create framebuffer: " << vk::to_string(result); return {}; @@ -638,15 +636,12 @@ bool RenderPassVK::OnEncodeCommands(const Context& context) const { vk::RenderPassBeginInfo pass_info; pass_info.renderPass = *render_pass; - FML_LOG(ERROR) << target_size; + pass_info.framebuffer = *framebuffer; pass_info.renderArea.extent.width = static_cast(target_size.width); pass_info.renderArea.extent.height = static_cast(target_size.height); pass_info.setClearValues(clear_values); - VkRenderPassBeginInfo my_info = pass_info; - FML_LOG(ERROR) << "my_info is " << my_info.sType << " " << my_info.renderPass - << " " << my_info.framebuffer; { TRACE_EVENT0("impeller", "EncodeRenderPassCommands"); cmd_buffer.beginRenderPass(pass_info, vk::SubpassContents::eInline);