From eb408f324db22bd5ecb4e1262992af21af4c8d8d Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 1 Nov 2022 21:01:06 -0700 Subject: [PATCH] [Impeller] Copy shaders lib to output directory (flutter/engine#37225) --- engine/src/flutter/impeller/compiler/BUILD.gn | 5 ++++- .../impeller/compiler/shader_lib/BUILD.gn | 10 ++++++++++ .../compiler/shader_lib/flutter/BUILD.gn | 8 ++++++++ .../compiler/shader_lib/impeller/BUILD.gn | 17 +++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 engine/src/flutter/impeller/compiler/shader_lib/BUILD.gn create mode 100644 engine/src/flutter/impeller/compiler/shader_lib/flutter/BUILD.gn create mode 100644 engine/src/flutter/impeller/compiler/shader_lib/impeller/BUILD.gn diff --git a/engine/src/flutter/impeller/compiler/BUILD.gn b/engine/src/flutter/impeller/compiler/BUILD.gn index 4c2b94802ba..85124083210 100644 --- a/engine/src/flutter/impeller/compiler/BUILD.gn +++ b/engine/src/flutter/impeller/compiler/BUILD.gn @@ -94,7 +94,10 @@ impeller_component("impellerc") { sources = [ "impellerc_main.cc" ] - deps = [ ":compiler_lib" ] + deps = [ + ":compiler_lib", + "shader_lib", + ] metadata = { entitlement_file_path = [ "impellerc" ] diff --git a/engine/src/flutter/impeller/compiler/shader_lib/BUILD.gn b/engine/src/flutter/impeller/compiler/shader_lib/BUILD.gn new file mode 100644 index 00000000000..9317feafc76 --- /dev/null +++ b/engine/src/flutter/impeller/compiler/shader_lib/BUILD.gn @@ -0,0 +1,10 @@ +# 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. + +group("shader_lib") { + deps = [ + "./flutter", + "./impeller", + ] +} diff --git a/engine/src/flutter/impeller/compiler/shader_lib/flutter/BUILD.gn b/engine/src/flutter/impeller/compiler/shader_lib/flutter/BUILD.gn new file mode 100644 index 00000000000..cf85043ddcd --- /dev/null +++ b/engine/src/flutter/impeller/compiler/shader_lib/flutter/BUILD.gn @@ -0,0 +1,8 @@ +# 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. + +copy("flutter") { + sources = [ "runtime_effect.glsl" ] + outputs = [ "$root_out_dir/shader_lib/flutter/{{source_file_part}}" ] +} diff --git a/engine/src/flutter/impeller/compiler/shader_lib/impeller/BUILD.gn b/engine/src/flutter/impeller/compiler/shader_lib/impeller/BUILD.gn new file mode 100644 index 00000000000..5d7e85c6bd0 --- /dev/null +++ b/engine/src/flutter/impeller/compiler/shader_lib/impeller/BUILD.gn @@ -0,0 +1,17 @@ +# 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. + +copy("impeller") { + sources = [ + "blending.glsl", + "branching.glsl", + "color.glsl", + "constants.glsl", + "gaussian.glsl", + "texture.glsl", + "transform.glsl", + "types.glsl", + ] + outputs = [ "$root_out_dir/shader_lib/impeller/{{source_file_part}}" ] +}