Revert "Un-bitrot impeller_unittests; disable failing tests; disable non-metal backends (#40339)"
This reverts commit 63238fe979de8c18fd8b0069a8e89b4698119da3.
diff --git a/common/graphics/BUILD.gn b/common/graphics/BUILD.gn
index ac79963..480aefb 100644
--- a/common/graphics/BUILD.gn
+++ b/common/graphics/BUILD.gn
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import("//flutter/common/config.gni")
-import("//flutter/shell/config.gni")
import("//flutter/testing/testing.gni")
source_set("graphics") {
@@ -30,8 +29,8 @@
"//third_party/skia",
]
- public_configs = [ "//flutter:config" ]
- if (shell_enable_vulkan) {
- public_configs += [ "//flutter/vulkan:vulkan_config" ]
- }
+ public_configs = [
+ "//flutter:config",
+ "//flutter/vulkan:vulkan_config",
+ ]
}
diff --git a/display_list/testing/BUILD.gn b/display_list/testing/BUILD.gn
index e1965e8..fabb290 100644
--- a/display_list/testing/BUILD.gn
+++ b/display_list/testing/BUILD.gn
@@ -29,7 +29,7 @@
# But, since benchmarks do not run on Windows and rendertests only
# runs on SW by default, this restriction currently only limits the
# ability to manually cross-check OpenGL on Windows for rendertests
-surface_provider_include_gl = !is_fuchsia && !is_ios && !is_win && !is_mac
+surface_provider_include_gl = !is_fuchsia && !is_ios && !is_win
# TODO (https://github.com/flutter/flutter/issues/107357):
# impeller_enable_vulkan currently requires skia to not use VMA, which in turn
diff --git a/flow/BUILD.gn b/flow/BUILD.gn
index 1adceef..c3261cb 100644
--- a/flow/BUILD.gn
+++ b/flow/BUILD.gn
@@ -4,7 +4,6 @@
import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
-import("//flutter/shell/config.gni")
import("//flutter/testing/testing.gni")
source_set("flow") {
@@ -86,10 +85,10 @@
"surface_frame.h",
]
- public_configs = [ "//flutter:config" ]
- if (shell_enable_vulkan) {
- public_configs += [ "//flutter/vulkan:vulkan_config" ]
- }
+ public_configs = [
+ "//flutter:config",
+ "//flutter/vulkan:vulkan_config",
+ ]
deps = [
"//flutter/common",
diff --git a/impeller/renderer/compute_subgroup_unittests.cc b/impeller/renderer/compute_subgroup_unittests.cc
index 39c36c6..e0f6b86 100644
--- a/impeller/renderer/compute_subgroup_unittests.cc
+++ b/impeller/renderer/compute_subgroup_unittests.cc
@@ -32,9 +32,7 @@
using ComputeTest = ComputePlaygroundTest;
INSTANTIATE_COMPUTE_SUITE(ComputeTest);
-// TODO(dnfield): Re-enable
-// https://github.com/flutter/flutter/issues/122828
-TEST_P(ComputeTest, DISABLED_HeartCubicsToStrokeVertices) {
+TEST_P(ComputeTest, HeartCubicsToStrokeVertices) {
using CS = CubicToQuadsComputeShader;
using QS = QuadPolylineComputeShader;
using SS = StrokeComputeShader;
@@ -258,9 +256,7 @@
ASSERT_TRUE(OpenPlaygroundHere(callback));
}
-// TODO(dnfield): Re-enable
-// https://github.com/flutter/flutter/issues/122828
-TEST_P(ComputeTest, DISABLED_QuadsToPolyline) {
+TEST_P(ComputeTest, QuadsToPolyline) {
using QS = QuadPolylineComputeShader;
auto context = GetContext();
ASSERT_TRUE(context);
diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni
index c9a46c1..818a65c 100644
--- a/impeller/tools/impeller.gni
+++ b/impeller/tools/impeller.gni
@@ -15,10 +15,10 @@
impeller_enable_metal = is_mac || is_ios
# Whether the OpenGLES backend is enabled.
- impeller_enable_opengles = is_linux || is_win || is_android
+ impeller_enable_opengles = is_mac || is_linux || is_win || is_android
# Whether the Vulkan backend is enabled.
- impeller_enable_vulkan = is_linux || is_win || is_android
+ impeller_enable_vulkan = is_mac || is_linux || is_win || is_android
# Whether to use a prebuilt impellerc.
# If this is the empty string, impellerc will be built.
@@ -679,7 +679,6 @@
}
if (impeller_enable_metal) {
- not_needed(invoker, [ "analyze" ])
mtl_shaders = "mtl_$target_name"
_impeller_shaders_metal(mtl_shaders) {
name = invoker.name
diff --git a/impeller/typographer/typographer_unittests.cc b/impeller/typographer/typographer_unittests.cc
index 01a11d4..e8b6258 100644
--- a/impeller/typographer/typographer_unittests.cc
+++ b/impeller/typographer/typographer_unittests.cc
@@ -168,9 +168,7 @@
atlas->GetTexture()->GetSize().height);
}
-// TODO(jonahwilliams): Re-enable
-// https://github.com/flutter/flutter/issues/122839
-TEST_P(TypographerTest, DISABLED_GlyphAtlasTextureIsRecycledIfUnchanged) {
+TEST_P(TypographerTest, GlyphAtlasTextureIsRecycledIfUnchanged) {
auto context = TextRenderContext::Create(GetContext());
auto atlas_context = std::make_shared<GlyphAtlasContext>();
ASSERT_TRUE(context && context->IsValid());
@@ -188,7 +186,7 @@
auto* first_texture = atlas->GetTexture().get();
- // Now create a new glyph atlas with a nearly identical blob.
+ // now create a new glyph atlas with a nearly identical blob.
auto blob2 = SkTextBlob::MakeFromString("spooky 2", sk_font);
auto next_atlas =
diff --git a/lib/ui/BUILD.gn b/lib/ui/BUILD.gn
index b360fc8..121375a 100644
--- a/lib/ui/BUILD.gn
+++ b/lib/ui/BUILD.gn
@@ -5,7 +5,6 @@
import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
-import("//flutter/shell/config.gni")
import("//flutter/testing/testing.gni")
source_set("ui") {
@@ -271,7 +270,7 @@
]
# TODO(https://github.com/flutter/flutter/issues/63837): This test is hard-coded to use a TestGLSurface so it cannot run on fuchsia.
- if (shell_enable_gl) {
+ if (!is_fuchsia) {
sources += [ "painting/image_decoder_unittests.cc" ]
deps += [ "//flutter/testing:opengl" ]
diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn
index 32d6336..d025537 100644
--- a/shell/common/BUILD.gn
+++ b/shell/common/BUILD.gn
@@ -319,11 +319,14 @@
"$fuchsia_sdk_root/pkg:fidl_cpp",
"$fuchsia_sdk_root/pkg:sys_cpp",
]
- } else if (shell_enable_gl) {
- # TODO(63837): This test is hard-coded to use a TestGLSurface so it cannot
- # run on fuchsia or when GL is not enabled.
+ } else {
+ # TODO(63837): This test is hard-coded to use a TestGLSurface so it cannot run on fuchsia.
sources += [ "shell_io_manager_unittests.cc" ]
- deps += [ "//third_party/swiftshader" ]
+
+ # Swiftshader only needed on non-Fuchsia platforms.
+ if (shell_enable_vulkan) {
+ deps += [ "//third_party/swiftshader" ]
+ }
}
if (shell_enable_gl) {
diff --git a/shell/common/shell_io_manager_unittests.cc b/shell/common/shell_io_manager_unittests.cc
index de880b1..b1ac2ed 100644
--- a/shell/common/shell_io_manager_unittests.cc
+++ b/shell/common/shell_io_manager_unittests.cc
@@ -10,7 +10,7 @@
#include "flutter/testing/dart_isolate_runner.h"
#include "flutter/testing/fixture_test.h"
#include "flutter/testing/post_task_sync.h"
-#include "flutter/testing/test_gl_surface.h" // nogncheck
+#include "flutter/testing/test_gl_surface.h"
#include "flutter/testing/testing.h"
namespace flutter {
diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc
index aac516a..2d1b4f0 100644
--- a/shell/common/shell_unittests.cc
+++ b/shell/common/shell_unittests.cc
@@ -1732,9 +1732,6 @@
#if defined(SHELL_ENABLE_VULKAN) && !defined(SHELL_ENABLE_GL)
EXPECT_EQ(GetRasterizerResourceCacheBytesSync(*shell),
vulkan::kGrCacheMaxByteSize);
-#elif defined(SHELL_ENABLE_METAL)
- EXPECT_EQ(GetRasterizerResourceCacheBytesSync(*shell),
- static_cast<size_t>(256 * (1 << 20)));
#else
EXPECT_EQ(GetRasterizerResourceCacheBytesSync(*shell),
static_cast<size_t>(24 * (1 << 20)));
@@ -2574,74 +2571,12 @@
// It would be better to parse out the json and check for the validity of
// fields. Below checks approximate what needs to be checked, this can not be
// an exact check since duration will not exactly match.
-#ifdef SHELL_ENABLE_METAL
- std::string expected_json =
- "\"snapshot\":[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,3,32,0,"
- "0,2,88,8,6,0,0,0,154,118,130,112,0,0,0,1,115,82,71,66,0,174,206,28,233,"
- "0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,7,103,73,68,65,84,120,"
- "156,237,206,65,13,192,48,0,3,177,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0,0,0,31,21,196,137,0,0,0,1,115,"
"82,71,66,0,174,206,28,233,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,"
"0,0,13,73,68,65,84,8,153,99,248,207,192,240,31,0,5,0,1,255,171,206,54,"
"137,0,0,0,0,73,69,78,68,174,66,96,130]";
-#endif
std::string actual_json = buffer.GetString();
EXPECT_THAT(actual_json, ::testing::HasSubstr(expected_json));
diff --git a/shell/config.gni b/shell/config.gni
index 3f498d2..85dd360 100644
--- a/shell/config.gni
+++ b/shell/config.gni
@@ -3,7 +3,7 @@
# found in the LICENSE file.
declare_args() {
- shell_enable_gl = !is_fuchsia && !is_mac
+ shell_enable_gl = !is_fuchsia
# The logic for enabling Vulkan and Metal is in tools/gn.
shell_enable_metal = false
diff --git a/shell/platform/embedder/tests/embedder_a11y_unittests.cc b/shell/platform/embedder/tests/embedder_a11y_unittests.cc
index 104775a..4007bb9 100644
--- a/shell/platform/embedder/tests/embedder_a11y_unittests.cc
+++ b/shell/platform/embedder/tests/embedder_a11y_unittests.cc
@@ -46,13 +46,7 @@
GTEST_SKIP() << "This test crashes on Fuchsia. https://fxbug.dev/87493 ";
#endif // OS_FUCHSIA
-#ifdef SHELL_ENABLE_GL
auto& context = GetEmbedderContext(EmbedderTestContextType::kOpenGLContext);
-#elif SHELL_ENABLE_METAL
- auto& context = GetEmbedderContext(EmbedderTestContextType::kMetalContext);
-#else
- auto& context = GetEmbedderContext(EmbedderTestContextType::kSoftwareContext);
-#endif
fml::AutoResetWaitableEvent signal_native_latch;
@@ -228,13 +222,7 @@
}
TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
-#ifdef SHELL_ENABLE_GL
auto& context = GetEmbedderContext(EmbedderTestContextType::kOpenGLContext);
-#elif SHELL_ENABLE_METAL
- auto& context = GetEmbedderContext(EmbedderTestContextType::kMetalContext);
-#else
- auto& context = GetEmbedderContext(EmbedderTestContextType::kSoftwareContext);
-#endif
fml::AutoResetWaitableEvent signal_native_latch;
diff --git a/shell/platform/embedder/tests/embedder_config_builder.cc b/shell/platform/embedder/tests/embedder_config_builder.cc
index 232615b..52764b4 100644
--- a/shell/platform/embedder/tests/embedder_config_builder.cc
+++ b/shell/platform/embedder/tests/embedder_config_builder.cc
@@ -8,6 +8,7 @@
#include "flutter/shell/platform/embedder/embedder.h"
#include "tests/embedder_test_context.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "vulkan/vulkan_core.h"
#ifdef SHELL_ENABLE_GL
#include "flutter/shell/platform/embedder/tests/embedder_test_compositor_gl.h"
@@ -16,8 +17,7 @@
#ifdef SHELL_ENABLE_VULKAN
#include "flutter/shell/platform/embedder/tests/embedder_test_context_vulkan.h"
-#include "flutter/vulkan/vulkan_device.h" // nogncheck
-#include "vulkan/vulkan_core.h" // nogncheck
+#include "flutter/vulkan/vulkan_device.h"
#endif
#ifdef SHELL_ENABLE_METAL
diff --git a/shell/platform/embedder/tests/embedder_test.cc b/shell/platform/embedder/tests/embedder_test.cc
index 0b557d3..9a315de 100644
--- a/shell/platform/embedder/tests/embedder_test.cc
+++ b/shell/platform/embedder/tests/embedder_test.cc
@@ -4,6 +4,7 @@
#include "flutter/shell/platform/embedder/tests/embedder_test.h"
#include "flutter/shell/platform/embedder/tests/embedder_test_context_software.h"
+#include "flutter/shell/platform/embedder/tests/embedder_test_context_vulkan.h"
#ifdef SHELL_ENABLE_GL
#include "flutter/shell/platform/embedder/tests/embedder_test_context_gl.h"
@@ -13,10 +14,6 @@
#include "flutter/shell/platform/embedder/tests/embedder_test_context_metal.h"
#endif
-#ifdef SHELL_ENABLE_VULKAN
-#include "flutter/shell/platform/embedder/tests/embedder_test_context_vulkan.h"
-#endif
-
namespace flutter {
namespace testing {
diff --git a/shell/platform/embedder/tests/embedder_test_backingstore_producer.h b/shell/platform/embedder/tests/embedder_test_backingstore_producer.h
index 51b15f7..85c3a53 100644
--- a/shell/platform/embedder/tests/embedder_test_backingstore_producer.h
+++ b/shell/platform/embedder/tests/embedder_test_backingstore_producer.h
@@ -18,7 +18,7 @@
#endif
#ifdef SHELL_ENABLE_VULKAN
-#include "flutter/testing/test_vulkan_context.h" // nogncheck
+#include "flutter/testing/test_vulkan_context.h"
#endif
namespace flutter {
diff --git a/testing/BUILD.gn b/testing/BUILD.gn
index 6ba34eb..84fab9e 100644
--- a/testing/BUILD.gn
+++ b/testing/BUILD.gn
@@ -124,7 +124,7 @@
}
}
-if (enable_unittests && shell_enable_vulkan) {
+if (enable_unittests) {
source_set("vulkan") {
testonly = true
@@ -153,9 +153,7 @@
configs += [ "//third_party/swiftshader:swiftshader_config" ]
}
}
-}
-if (enable_unittests) {
test_fixtures("testing_fixtures") {
fixtures = []
}
@@ -172,6 +170,7 @@
":testing",
":testing_fixtures",
"//flutter/runtime:libdart",
+ "//flutter/vulkan",
]
if (shell_enable_metal) {
@@ -179,10 +178,6 @@
deps += [ ":metal" ]
}
-
- if (shell_enable_vulkan) {
- deps += [ "//flutter/vulkan" ]
- }
}
}
@@ -212,7 +207,7 @@
# Skia's Vulkan support is enabled for all platforms (except iOS), and so parts of
# Skia's graphics context reference Vulkan symbols.
- if (shell_enable_vulkan) {
+ if (!is_ios) {
deps += [ "//flutter/vulkan" ]
}
}
@@ -222,21 +217,22 @@
}
# We only use SwiftShader on unittests
-use_swiftshader = enable_unittests && shell_enable_gl
-if (use_swiftshader) {
- source_set("opengl") {
- testonly = true
+use_swiftshader = enable_unittests && !is_fuchsia
- sources = [
- "test_gl_surface.cc",
- "test_gl_surface.h",
- ]
+source_set("opengl") {
+ testonly = true
- deps = [
- ":skia",
- "//flutter/fml",
- ]
+ sources = [
+ "test_gl_surface.cc",
+ "test_gl_surface.h",
+ ]
+ deps = [
+ ":skia",
+ "//flutter/fml",
+ ]
+
+ if (use_swiftshader) {
configs -= [ "//build/config/clang:extra_warnings" ]
configs += [
"//flutter/vulkan:vulkan_config", # for swiftshader
diff --git a/testing/run_tests.py b/testing/run_tests.py
index 98af755..9961cd1 100755
--- a/testing/run_tests.py
+++ b/testing/run_tests.py
@@ -445,25 +445,25 @@
# TODO(117122): Re-enable impeller_unittests after shader compiler errors
# are addressed.
# Impeller tests are only supported on macOS for now.
- run_engine_executable(
- build_dir,
- 'impeller_unittests',
- executable_filter,
- shuffle_flags,
- coverage=coverage,
- extra_env={
- # pylint: disable=line-too-long
- # See https://developer.apple.com/documentation/metal/diagnosing_metal_programming_issues_early?language=objc
- 'MTL_SHADER_VALIDATION':
- '1', # Enables all shader validation tests.
- 'MTL_SHADER_VALIDATION_GLOBAL_MEMORY':
- '1', # Validates accesses to device and constant memory.
- 'MTL_SHADER_VALIDATION_THREADGROUP_MEMORY':
- '1', # Validates accesses to threadgroup memory.
- 'MTL_SHADER_VALIDATION_TEXTURE_USAGE':
- '1', # Validates that texture references are not nil.
- }
- )
+ # run_engine_executable(
+ # build_dir,
+ # 'impeller_unittests',
+ # executable_filter,
+ # shuffle_flags,
+ # coverage=coverage,
+ # extra_env={
+ # # pylint: disable=line-too-long
+ # # See https://developer.apple.com/documentation/metal/diagnosing_metal_programming_issues_early?language=objc
+ # 'MTL_SHADER_VALIDATION':
+ # '1', # Enables all shader validation tests.
+ # 'MTL_SHADER_VALIDATION_GLOBAL_MEMORY':
+ # '1', # Validates accesses to device and constant memory.
+ # 'MTL_SHADER_VALIDATION_THREADGROUP_MEMORY':
+ # '1', # Validates accesses to threadgroup memory.
+ # 'MTL_SHADER_VALIDATION_TEXTURE_USAGE':
+ # '1', # Validates that texture references are not nil.
+ # }
+ # )
def parse_impeller_vulkan_filter():
diff --git a/tools/gn b/tools/gn
index b2cadaf..47664dd 100755
--- a/tools/gn
+++ b/tools/gn
@@ -446,7 +446,7 @@
# Enable Vulkan on all platforms except for iOS. This is just
# to save on mobile binary size, as there's no reason the Vulkan embedder
# features can't work on these platforms.
- if gn_args['target_os'] not in ['ios', 'mac']:
+ if args.target_os not in ['ios']:
gn_args['skia_use_vulkan'] = True
gn_args['skia_use_vma'] = False
gn_args['shell_enable_vulkan'] = True