Skip to content

Commit

Permalink
[Impeller] Add a shard for Impeller Vulkan testing (flutter#36965)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik authored Oct 25, 2022
1 parent 6adcc86 commit 40019b7
Show file tree
Hide file tree
Showing 6 changed files with 381 additions and 6 deletions.
42 changes: 42 additions & 0 deletions ci/builders/linux_host_engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,48 @@
"tests": []
},
{
"archives": [],
"drone_dimensions": [
"device_type=none",
"os=Linux"
],
"gclient_custom_vars": {
"download_android_deps": false
},
"gn": [
"--runtime-mode",
"debug",
"--unoptimized",
"--prebuilt-dart-sdk",
"--enable-impeller-vulkan",
"--target-dir",
"host_debug_impeller_vulkan"
],
"name": "host_debug_impeller_vulkan",
"ninja": {
"config": "host_debug_impeller_vulkan",
"targets": [
"flutter",
"flutter/sky/packages"
]
},
"tests": [
{
"language": "python",
"name": "Host Tests for host_debug_impeller_vulkan",
"parameters": [
"--variant",
"host_debug_impeller_vulkan",
"--type",
"impeller-vulkan",
"--engine-capture-core-dump"
],
"script": "flutter/testing/run_tests.py",
"type": "local"
}
]
},
{
"archives": [
{
"name": "host_debug",
Expand Down
1 change: 1 addition & 0 deletions impeller/playground/backend/vulkan/playground_impl_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ PlaygroundImplVK::PlaygroundImplVK()
::glfwDefaultWindowHints();
::glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
::glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
::glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);

auto window =
::glfwCreateWindow(800, 600, "Test Vulkan Window", nullptr, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion impeller/playground/playground.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ struct Playground::GLFWInitializer {
// applicationDidFinishLaunching is never fired.
static std::once_flag sOnceInitializer;
std::call_once(sOnceInitializer, []() {
FML_CHECK(::glfwInit() == GLFW_TRUE);
::glfwSetErrorCallback([](int code, const char* description) {
FML_LOG(ERROR) << "GLFW Error '" << description << "' (" << code
<< ").";
});
FML_CHECK(::glfwInit() == GLFW_TRUE);
});
}
};
Expand Down
141 changes: 141 additions & 0 deletions testing/impeller_vulkan_test_status.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
test,status
CanRenderImage/Vulkan,fail
CanRenderTiledTexture/Vulkan,fail
CanRenderImageRect/Vulkan,fail
CoordinateConversionsAreCorrect/Vulkan,fail
CanRenderDifferencePaths/Vulkan,fail
SaveLayerFiltersScaleWithTransform/Vulkan,fail
CanDrawImage/Vulkan,fail
CanDrawWithMaskBlur/Vulkan,fail
CanDrawWithBlendColorFilter/Vulkan,fail
CanDrawWithColorFilterImageFilter/Vulkan,fail
CanDrawWithImageBlurFilter/Vulkan,fail
CanDrawWithComposeImageFilter/Vulkan,fail
CanClampTheResultingColorOfColorMatrixFilter/Vulkan,fail
SaveLayerWithColorMatrixFiltersAndAlphaDrawCorrectly/Vulkan,fail
SaveLayerWithBlendFiltersAndAlphaDrawCorrectly/Vulkan,fail
CanDrawBackdropFilter/Vulkan,fail
CanDrawNinePatchImage/Vulkan,fail
CanDrawNinePatchImageCenterWidthBiggerThanDest/Vulkan,fail
CanDrawNinePatchImageCenterHeightBiggerThanDest/Vulkan,fail
CanDrawNinePatchImageCenterBiggerThanDest/Vulkan,fail
CanDrawNinePatchImageCornersScaledDown/Vulkan,fail
CanDrawWithMatrixFilter/Vulkan,fail
CanDrawPaintWithColorSource/Vulkan,fail
FilterCoverageRespectsCropRect/Vulkan,fail
Filters/Vulkan,fail
GaussianBlurFilter/Vulkan,fail
MorphologyFilter/Vulkan,fail
DrawAtlasNoColor/Vulkan,fail
DrawAtlasWithColor/Vulkan,fail
DrawAtlasUsesProvidedCullRectForCoverage/Vulkan,fail
DrawAtlasWithOpacity/Vulkan,fail
DrawAtlasNoColorFullSize/Vulkan,fail
ColorMatrixFilterEditable/Vulkan,fail
LinearToSrgbFilter/Vulkan,fail
SrgbToLinearFilter/Vulkan,fail
CanCreateBoxPrimitive/Vulkan,fail
CanRenderPerspectiveCube/Vulkan,fail
CanRenderMultiplePrimitives/Vulkan,fail
CanRenderToTexture/Vulkan,fail
CanBlitTextureToTexture/Vulkan,fail
CanGenerateMipmaps/Vulkan,fail
TheImpeller/Vulkan,fail
InactiveUniforms/Vulkan,fail
CanCreateGlyphAtlas/Vulkan,fail
GlyphAtlasWithOddUniqueGlyphSize/Vulkan,fail
CanRegisterStage/Vulkan,pass
CanCreatePipelineFromRuntimeStage/Vulkan,pass
CanvasCTMCanBeUpdated/Vulkan,pass
CanvasCanPushPopCTM/Vulkan,pass
CanRenderColoredRect/Vulkan,pass
CanRenderStrokes/Vulkan,pass
CanRenderCurvedStrokes/Vulkan,pass
CanRenderClips/Vulkan,pass
CanRenderNestedClips/Vulkan,pass
CanRenderDifferenceClips/Vulkan,pass
ClipsUseCurrentTransform/Vulkan,pass
CanSaveLayerStandalone/Vulkan,pass
CanRenderLinearGradient/Vulkan,pass
CanRenderLinearGradientManyColors/Vulkan,pass
CanRenderLinearGradientWayManyColors/Vulkan,pass
CanRenderLinearGradientManyColorsUnevenStops/Vulkan,pass
CanRenderRadialGradient/Vulkan,pass
CanRenderRadialGradientManyColors/Vulkan,pass
CanRenderSweepGradient/Vulkan,pass
CanRenderSweepGradientManyColors/Vulkan,pass
CanRenderDifferentShapesWithSameColorSource/Vulkan,pass
CanPictureConvertToImage/Vulkan,pass
BlendModeShouldCoverWholeScreen/Vulkan,pass
CanRenderGroupOpacity/Vulkan,pass
CanPerformFullScreenMSAA/Vulkan,pass
CanPerformSkew/Vulkan,pass
CanPerformSaveLayerWithBounds/Vulkan,pass
CanPerformSaveLayerWithBoundsAndLargerIntermediateIsNotAllocated/Vulkan,pass
CanRenderRoundedRectWithNonUniformRadii/Vulkan,pass
CanRenderTextFrame/Vulkan,pass
CanRenderItalicizedText/Vulkan,pass
CanRenderEmojiTextFrame/Vulkan,pass
CanRenderTextInSaveLayer/Vulkan,pass
CanDrawPaint/Vulkan,pass
PaintBlendModeIsRespected/Vulkan,pass
ColorWheel/Vulkan,pass
TransformMultipliesCorrectly/Vulkan,pass
SolidStrokesRenderCorrectly/Vulkan,pass
GradientStrokesRenderCorrectly/Vulkan,pass
CoverageOriginShouldBeAccountedForInSubpasses/Vulkan,pass
DrawRectStrokesRenderCorrectly/Vulkan,pass
SaveLayerDrawsBehindSubsequentEntities/Vulkan,pass
SiblingSaveLayerBoundsAreRespected/Vulkan,pass
CanRenderClippedLayers/Vulkan,pass
CanDrawRect/Vulkan,pass
CanDrawTextBlob/Vulkan,pass
CanDrawCapsAndJoins/Vulkan,pass
CanDrawArc/Vulkan,pass
StrokedPathsDrawCorrectly/Vulkan,pass
CanDrawWithOddPathWinding/Vulkan,pass
CanDrawPoints/Vulkan,pass
CanDrawZeroLengthLine/Vulkan,pass
CanDrawShadow/Vulkan,pass
CanConvertTriangleFanToTriangles/Vulkan,pass
CanDrawZeroWidthLine/Vulkan,pass
CanDrawRectWithLinearToSrgbColorFilter/Vulkan,pass
CanBlendDstOverAndDstCorrectly/Vulkan,pass
CanCreateEntity/Vulkan,pass
EntityPassCoverageRespectsDelegateBoundsHint/Vulkan,pass
EntityPassCoverageRespectsCoverageLimit/Vulkan,pass
CanDrawRect/Vulkan,pass
ThreeStrokesInOnePath/Vulkan,pass
TriangleInsideASquare/Vulkan,pass
StrokeCapAndJoinTest/Vulkan,pass
CubicCurveTest/Vulkan,pass
CubicCurveAndOverlapTest/Vulkan,pass
SolidColorContentsStrokeSetStrokeCapsAndJoins/Vulkan,pass
SolidColorContentsStrokeSetMiterLimit/Vulkan,pass
BlendingModeOptions/Vulkan,pass
BezierCircleScaled/Vulkan,pass
SetBlendMode/Vulkan,pass
ContentsGetBoundsForEmptyPathReturnsNullopt/Vulkan,pass
SolidStrokeCoverageIsCorrect/Vulkan,pass
BorderMaskBlurCoverageIsCorrect/Vulkan,pass
DrawVerticesSolidColorTrianglesWithoutIndices/Vulkan,pass
DrawVerticesLinearGradientWithoutIndices/Vulkan,pass
DrawVerticesSolidColorTrianglesWithIndices/Vulkan,pass
SolidFillCoverageIsCorrect/Vulkan,pass
SolidFillShouldRenderIsCorrect/Vulkan,pass
ClipContentsShouldRenderIsCorrect/Vulkan,pass
RRectShadowTest/Vulkan,pass
ColorMatrixFilterCoverageIsCorrect/Vulkan,pass
LinearToSrgbFilterCoverageIsCorrect/Vulkan,pass
SrgbToLinearFilterCoverageIsCorrect/Vulkan,pass
TTTBlendColor/Vulkan,pass
SdfText/Vulkan,pass
RuntimeEffect/Vulkan,pass
ArrayUniforms/Vulkan,pass
CanCreateCPUBackedTexture/Vulkan,pass
DefaultIndexSize/Vulkan,pass
VertexBufferBuilder/Vulkan,pass
CanCreateComputePass/Vulkan,pass
CanConvertTextBlob/Vulkan,pass
CanCreateRenderContext/Vulkan,pass
LazyAtlasTracksColor/Vulkan,pass
47 changes: 42 additions & 5 deletions testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
import subprocess
import sys
import time
import csv
import xvfb

script_dir = os.path.dirname(os.path.realpath(__file__))
buildroot_dir = os.path.abspath(
os.path.join(os.path.realpath(__file__), '..', '..', '..')
)
Expand Down Expand Up @@ -305,6 +308,12 @@ def __str__(self):
return " ".join(command)


shuffle_flags = [
"--gtest_repeat=2",
"--gtest_shuffle",
]


def RunCCTests(build_dir, filter, coverage, capture_core_dump):
print("Running Engine Unit-tests.")

Expand All @@ -314,11 +323,6 @@ def RunCCTests(build_dir, filter, coverage, capture_core_dump):
resource.RLIMIT_CORE, (resource.RLIM_INFINITY, resource.RLIM_INFINITY)
)

shuffle_flags = [
"--gtest_repeat=2",
"--gtest_shuffle",
]

repeat_flags = [
"--repeat=2",
]
Expand Down Expand Up @@ -427,6 +431,19 @@ def make_test(name, flags=repeat_flags, extra_env={}):
)


def ParseImpellerVulkanFilter():
test_status_path = os.path.join(script_dir, 'impeller_vulkan_test_status.csv')
gtest_filter = '--gtest_filter="'
with open(test_status_path, 'r') as csvfile:
csvreader = csv.reader(csvfile)
next(csvreader) # Skip header.
for row in csvreader:
if row[1] == 'pass':
gtest_filter += '*%s:' % row[0]
gtest_filter += '"'
return gtest_filter


def RunEngineBenchmarks(build_dir, filter):
print("Running Engine Benchmarks.")

Expand Down Expand Up @@ -1054,6 +1071,26 @@ def main():
build_dir, engine_filter, args.coverage, args.engine_capture_core_dump
)

# Use this type to exclusively run impeller vulkan tests.
# TODO (https://github.com/flutter/flutter/issues/113961): Remove this once
# impeller vulkan tests are stable.
if 'impeller-vulkan' in types:
build_name = args.variant
try:
xvfb.StartVirtualX(build_name, build_dir)
vulkan_gtest_filter = ParseImpellerVulkanFilter()
gtest_flags = shuffle_flags
gtest_flags.append(vulkan_gtest_filter)
RunEngineExecutable(
build_dir,
'impeller_unittests',
engine_filter,
gtest_flags,
coverage=args.coverage
)
finally:
xvfb.StopVirtualX(build_name)

if 'dart' in types:
dart_filter = args.dart_filter.split(',') if args.dart_filter else None
tasks = list(GatherDartSmokeTest(build_dir, args.verbose_dart_snapshot))
Expand Down
Loading

0 comments on commit 40019b7

Please sign in to comment.