1// Copyright 2020 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5package gen_tasks_logic 6 7import ( 8 "fmt" 9 "sort" 10 "strconv" 11 "strings" 12 13 "github.com/golang/glog" 14 "go.skia.org/infra/task_scheduler/go/specs" 15) 16 17// keyParams generates the key used by DM for Gold results. 18func keyParams(parts map[string]string) []string { 19 // Don't bother to include role, which is always Test. 20 ignored := []string{"role", "test_filter"} 21 keys := make([]string, 0, len(parts)) 22 for key := range parts { 23 found := false 24 for _, b := range ignored { 25 if key == b { 26 found = true 27 break 28 } 29 } 30 if !found { 31 keys = append(keys, key) 32 } 33 } 34 sort.Strings(keys) 35 rv := make([]string, 0, 2*len(keys)) 36 for _, key := range keys { 37 rv = append(rv, key, parts[key]) 38 } 39 return rv 40} 41 42// dmFlags generates flags to DM based on the given task properties. 43func (b *taskBuilder) dmFlags(internalHardwareLabel string) { 44 properties := map[string]string{ 45 "gitHash": specs.PLACEHOLDER_REVISION, 46 "builder": b.Name, 47 "buildbucket_build_id": specs.PLACEHOLDER_BUILDBUCKET_BUILD_ID, 48 "task_id": specs.PLACEHOLDER_TASK_ID, 49 "issue": specs.PLACEHOLDER_ISSUE, 50 "patchset": specs.PLACEHOLDER_PATCHSET, 51 "patch_storage": specs.PLACEHOLDER_PATCH_STORAGE, 52 "swarming_bot_id": "${SWARMING_BOT_ID}", 53 "swarming_task_id": "${SWARMING_TASK_ID}", 54 } 55 56 args := []string{ 57 "dm", 58 "--nameByHash", 59 } 60 61 configs := []string{} 62 skipped := []string{} 63 64 hasConfig := func(cfg string) bool { 65 for _, c := range configs { 66 if c == cfg { 67 return true 68 } 69 } 70 return false 71 } 72 filter := func(slice []string, elems ...string) []string { 73 m := make(map[string]bool, len(elems)) 74 for _, e := range elems { 75 m[e] = true 76 } 77 rv := make([]string, 0, len(slice)) 78 for _, e := range slice { 79 if m[e] { 80 rv = append(rv, e) 81 } 82 } 83 return rv 84 } 85 remove := func(slice []string, elem string) []string { 86 rv := make([]string, 0, len(slice)) 87 for _, e := range slice { 88 if e != elem { 89 rv = append(rv, e) 90 } 91 } 92 return rv 93 } 94 removeContains := func(slice []string, elem string) []string { 95 rv := make([]string, 0, len(slice)) 96 for _, e := range slice { 97 if !strings.Contains(e, elem) { 98 rv = append(rv, e) 99 } 100 } 101 return rv 102 } 103 suffix := func(slice []string, sfx string) []string { 104 rv := make([]string, 0, len(slice)) 105 for _, e := range slice { 106 rv = append(rv, e+sfx) 107 } 108 return rv 109 } 110 111 // When matching skip logic, _ is a wildcard that matches all parts for the field. 112 // For example, "8888 _ _ _" means everything that is part of an 8888 config and 113 // "_ skp _ SomeBigDraw" means the skp named SomeBigDraw on all config and options. 114 const ALL = "_" 115 // The inputs here are turned into a --skip flag which represents a 116 // "Space-separated config/src/srcOptions/name quadruples to skip." 117 // See DM.cpp for more, especially should_skip(). ~ negates the match. 118 skip := func(config, src, srcOptions, name string) { 119 // config is also called "sink" in DM 120 if config == "_" || 121 hasConfig(config) || 122 (config[0] == '~' && hasConfig(config[1:])) { 123 skipped = append(skipped, config, src, srcOptions, name) 124 } 125 } 126 127 // Keys. 128 keys := keyParams(b.parts) 129 if b.extraConfig("Lottie") { 130 keys = append(keys, "renderer", "skottie") 131 } 132 if b.matchExtraConfig("DDL") { 133 // 'DDL' style means "--skpViewportSize 2048" 134 keys = append(keys, "style", "DDL") 135 } else { 136 keys = append(keys, "style", "default") 137 } 138 args = append(args, "--key") 139 args = append(args, keys...) 140 141 // This enables non-deterministic random seeding of the GPU FP optimization 142 // test. 143 // Not Android due to: 144 // - https://skia.googlesource.com/skia/+/5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160 145 // - https://skia.googlesource.com/skia/+/ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307 146 // Not MSAN due to: 147 // - https://skia.googlesource.com/skia/+/0ac06e47269a40c177747310a613d213c95d1d6d/infra/bots/recipe_modules/flavor/gn_flavor.py#80 148 if !b.matchOs("Android") && !b.extraConfig("MSAN") { 149 args = append(args, "--randomProcessorTest") 150 } 151 152 threadLimit := -1 153 const MAIN_THREAD_ONLY = 0 154 155 // 32-bit desktop machines tend to run out of memory, because they have relatively 156 // far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit. 157 if b.arch("x86") { 158 threadLimit = 4 159 } 160 161 // These devices run out of memory easily. 162 if b.model("MotoG4", "Nexus7") { 163 threadLimit = MAIN_THREAD_ONLY 164 } 165 166 // Avoid issues with dynamically exceeding resource cache limits. 167 if b.matchExtraConfig("DISCARDABLE") { 168 threadLimit = MAIN_THREAD_ONLY 169 } 170 171 if threadLimit >= 0 { 172 args = append(args, "--threads", strconv.Itoa(threadLimit)) 173 } 174 175 sampleCount := 0 176 glPrefix := "" 177 if b.extraConfig("FakeWGPU") { 178 configs = append(configs, "grdawn_fakeWGPU") 179 } else if b.extraConfig("SwiftShader") { 180 configs = append(configs, "vk", "vkdmsaa") 181 // skbug.com/12826 182 skip(ALL, "test", ALL, "GrThreadSafeCache16Verts") 183 // b/296440036 184 skip(ALL, "test", ALL, "ImageAsyncReadPixels") 185 // skbug.com/12829 186 skip(ALL, "test", ALL, "image_subset") 187 } else if b.cpu() { 188 args = append(args, "--nogpu") 189 190 configs = append(configs, "8888") 191 192 if b.extraConfig("BonusConfigs") { 193 configs = []string{ 194 "r8", "565", 195 "pic-8888", "serialize-8888"} 196 } 197 198 if b.extraConfig("PDF") { 199 configs = []string{"pdf"} 200 args = append(args, "--rasterize_pdf") // Works only on Mac. 201 // Take ~forever to rasterize: 202 skip("pdf", "gm", ALL, "lattice2") 203 skip("pdf", "gm", ALL, "hairmodes") 204 skip("pdf", "gm", ALL, "longpathdash") 205 } 206 207 if b.extraConfig("OldestSupportedSkpVersion") { 208 // For triaging convenience, make the old-skp job's output match the size of the DDL jobs' output 209 args = append(args, "--skpViewportSize", "2048") 210 } 211 212 } else if b.gpu() { 213 args = append(args, "--nocpu") 214 215 // Add in either gles or gl configs to the canonical set based on OS 216 glPrefix = "gl" 217 // Use 4x MSAA for all our testing. It's more consistent and 8x MSAA is nondeterministic (by 218 // design) on NVIDIA hardware. The problem is especially bad on ANGLE. skia:6813 skia:6545 219 sampleCount = 4 220 if b.matchOs("Android") || b.os("iOS") { 221 glPrefix = "gles" 222 // MSAA is disabled on Pixel3a (https://b.corp.google.com/issues/143074513). 223 // MSAA is disabled on Pixel5 (https://skbug.com/11152). 224 if b.model("Pixel3a", "Pixel5") { 225 sampleCount = 0 226 } 227 } else if b.matchGpu("Intel") { 228 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926 229 if b.gpu("IntelIrisXe") && b.matchOs("Win") && b.extraConfig("ANGLE") { 230 // Make an exception for newer GPUs + D3D 231 args = append(args, "--allowMSAAOnNewIntel", "true") 232 } else { 233 sampleCount = 0 234 } 235 } else if b.os("ChromeOS") { 236 glPrefix = "gles" 237 } 238 239 if b.extraConfig("NativeFonts") { 240 configs = append(configs, glPrefix) 241 } else { 242 configs = append(configs, glPrefix, glPrefix+"dft") 243 if sampleCount > 0 { 244 configs = append(configs, fmt.Sprintf("%smsaa%d", glPrefix, sampleCount)) 245 // Temporarily limit the machines we test dynamic MSAA on. 246 if b.gpu("QuadroP400", "MaliG77") || b.matchOs("Mac") { 247 configs = append(configs, fmt.Sprintf("%sdmsaa", glPrefix)) 248 } 249 } 250 } 251 252 if b.extraConfig("Protected") { 253 args = append(args, "--createProtected") 254 // The Protected jobs (for now) only run the unit tests 255 skip(ALL, "gm", ALL, ALL) 256 skip(ALL, "image", ALL, ALL) 257 skip(ALL, "lottie", ALL, ALL) 258 skip(ALL, "colorImage", ALL, ALL) 259 skip(ALL, "svg", ALL, ALL) 260 skip(ALL, "skp", ALL, ALL) 261 262 // These unit tests attempt to readback 263 skip(ALL, "test", ALL, "ApplyGamma") 264 skip(ALL, "test", ALL, "BigImageTest_Ganesh") 265 skip(ALL, "test", ALL, "BigImageTest_Graphite") 266 skip(ALL, "test", ALL, "BlendRequiringDstReadWithLargeCoordinates") 267 skip(ALL, "test", ALL, "BlurMaskBiggerThanDest") 268 skip(ALL, "test", ALL, "ClearOp") 269 skip(ALL, "test", ALL, "ColorTypeBackendAllocationTest") 270 skip(ALL, "test", ALL, "ComposedImageFilterBounds_Gpu") 271 skip(ALL, "test", ALL, "CopySurface") 272 skip(ALL, "test", ALL, "crbug_1271431") 273 skip(ALL, "test", ALL, "DashPathEffectTest_2PiInterval") 274 skip(ALL, "test", ALL, "DeviceTestVertexTransparency") 275 skip(ALL, "test", ALL, "DDLMultipleDDLs") 276 skip(ALL, "test", ALL, "DefaultPathRendererTest") 277 skip(ALL, "test", ALL, "DMSAA_aa_dst_read_after_dmsaa") 278 skip(ALL, "test", ALL, "DMSAA_dst_read") 279 skip(ALL, "test", ALL, "DMSAA_dst_read_with_existing_barrier") 280 skip(ALL, "test", ALL, "DMSAA_dual_source_blend_disable") 281 skip(ALL, "test", ALL, "DMSAA_preserve_contents") 282 skip(ALL, "test", ALL, "ExtendedSkColorTypeTests_gpu") 283 skip(ALL, "test", ALL, "FilterResult_ganesh") // knocks out a bunch 284 skip(ALL, "test", ALL, "FullScreenClearWithLayers") 285 skip(ALL, "test", ALL, "GrAHardwareBuffer_BasicDrawTest") 286 skip(ALL, "test", ALL, "GrGpuBufferTransferTest") 287 skip(ALL, "test", ALL, "GrGpuBufferUpdateDataTest") 288 skip(ALL, "test", ALL, "GrMeshTest") 289 skip(ALL, "test", ALL, "GrPipelineDynamicStateTest") 290 skip(ALL, "test", ALL, "GrTextBlobScaleAnimation") 291 skip(ALL, "test", ALL, "HalfFloatAlphaTextureTest") 292 skip(ALL, "test", ALL, "HalfFloatRGBATextureTest") 293 skip(ALL, "test", ALL, "ImageAsyncReadPixelsGraphite") 294 skip(ALL, "test", ALL, "ImageEncode_Gpu") 295 skip(ALL, "test", ALL, "ImageFilterFailAffectsTransparentBlack_Gpu") 296 skip(ALL, "test", ALL, "ImageFilterNegativeBlurSigma_Gpu") 297 skip(ALL, "test", ALL, "ImageFilterZeroBlurSigma_Gpu") 298 skip(ALL, "test", ALL, "ImageLegacyBitmap_Gpu") 299 skip(ALL, "test", ALL, "ImageNewShader_GPU") 300 skip(ALL, "test", ALL, "ImageOriginTest_drawImage_Graphite") 301 skip(ALL, "test", ALL, "ImageOriginTest_imageShader_Graphite") 302 skip(ALL, "test", ALL, "ImageProviderTest_Graphite_Default") 303 skip(ALL, "test", ALL, "ImageProviderTest_Graphite_Testing") 304 skip(ALL, "test", ALL, "ImageReadPixels_Gpu") 305 skip(ALL, "test", ALL, "ImageScalePixels_Gpu") 306 skip(ALL, "test", ALL, "ImageShaderTest") 307 skip(ALL, "test", ALL, "ImageWrapTextureMipmapsTest") 308 skip(ALL, "test", ALL, "MatrixColorFilter_TransparentBlack") 309 skip(ALL, "test", ALL, "MorphologyFilterRadiusWithMirrorCTM_Gpu") 310 skip(ALL, "test", ALL, "MultisampleRetainTest") 311 skip(ALL, "test", ALL, "MutableImagesTest") 312 skip(ALL, "test", ALL, "OpsTaskFlushCount") 313 skip(ALL, "test", ALL, "OverdrawSurface_Gpu") 314 skip(ALL, "test", ALL, "PinnedImageTest") 315 skip(ALL, "test", ALL, "RecordingOrderTest_Graphite") 316 skip(ALL, "test", ALL, "RecordingSurfacesTestClear") 317 skip(ALL, "test", ALL, "RecordingSurfacesTestWritePixels") 318 skip(ALL, "test", ALL, "RecordingSurfacesTestWritePixelsOffscreen") 319 skip(ALL, "test", ALL, "ReplaceSurfaceBackendTexture") 320 skip(ALL, "test", ALL, "ResourceCacheCache") 321 skip(ALL, "test", ALL, "SaveLayerOrigin") 322 skip(ALL, "test", ALL, "ShaderTestNestedBlendsGanesh") 323 skip(ALL, "test", ALL, "ShaderTestNestedBlendsGraphite") 324 skip(ALL, "test", ALL, "skbug6653") 325 skip(ALL, "test", ALL, "SkImage_makeNonTextureImage") 326 skip(ALL, "test", ALL, "SkipCopyTaskTest") 327 skip(ALL, "test", ALL, "SkipOpsTaskTest") 328 skip(ALL, "test", ALL, "SkRuntimeBlender_GPU") 329 skip(ALL, "test", ALL, "SkRuntimeEffect") // knocks out a bunch 330 skip(ALL, "test", ALL, "SkRuntimeShaderImageFilter_GPU") 331 skip(ALL, "test", ALL, "SkSLCross") 332 skip(ALL, "test", ALL, "SkSL") // knocks out a bunch 333 skip(ALL, "test", ALL, "SpecialImage_Gpu") 334 skip(ALL, "test", ALL, "SRGBReadWritePixels") 335 skip(ALL, "test", ALL, "SurfaceAsyncReadPixels") 336 skip(ALL, "test", ALL, "SurfaceContextReadPixels") 337 skip(ALL, "test", ALL, "SurfaceContextWritePixelsMipped") 338 skip(ALL, "test", ALL, "SurfaceDrawContextTest") 339 skip(ALL, "test", ALL, "SurfaceSemaphores") 340 skip(ALL, "test", ALL, "TestSweepGradientZeroXGanesh") 341 skip(ALL, "test", ALL, "TiledDrawCacheTest_Ganesh") 342 skip(ALL, "test", ALL, "TiledDrawCacheTest_Graphite") 343 skip(ALL, "test", ALL, "UnpremulTextureImage") 344 skip(ALL, "test", ALL, "VkBackendAllocationTest") 345 skip(ALL, "test", ALL, "VkDrawableTest") 346 skip(ALL, "test", ALL, "VkDrawableImportTest") 347 skip(ALL, "test", ALL, "VkYCbcrSampler_DrawImageWithYcbcrSampler") 348 skip(ALL, "test", ALL, "WritePixels_Gpu") 349 skip(ALL, "test", ALL, "WritePixels_Graphite") 350 skip(ALL, "test", ALL, "WritePixelsMSAA_Gpu") 351 skip(ALL, "test", ALL, "WritePixelsPendingIO") 352 skip(ALL, "test", ALL, "XfermodeImageFilterCroppedInput_Gpu") 353 354 // These unit tests require some debugging (skbug.com/319229312) 355 skip(ALL, "test", ALL, "GrTextBlobMoveAround") // a lot of AllocImageMemory failures 356 skip(ALL, "test", ALL, "Programs") // Perlin Noise FP violating protected constraints 357 skip(ALL, "test", ALL, "Protected_SmokeTest") // Ganesh/Vulkan disallow creating Unprotected Image 358 skip(ALL, "test", ALL, "ReadOnlyTexture") // crashes device! 359 skip(ALL, "test", ALL, "RepeatedClippedBlurTest") // blurs not creating expected # of resources 360 skip(ALL, "test", ALL, "CharacterizationVkSCBnessTest") // DDL Validation failure for Vk SCBs 361 362 // These unit tests are very slow and probably don't benefit from Protected testing 363 skip(ALL, "test", ALL, "PaintParamsKeyTest") 364 skip(ALL, "test", ALL, "ProcessorCloneTest") 365 skip(ALL, "test", ALL, "ProcessorOptimizationValidationTest") 366 skip(ALL, "test", ALL, "TextBlobAbnormal") 367 skip(ALL, "test", ALL, "TextBlobStressAbnormal") 368 } 369 370 // The Tegra3 doesn't support MSAA 371 if b.gpu("Tegra3") || 372 // We aren't interested in fixing msaa bugs on current iOS devices. 373 b.model("iPad4", "iPadPro", "iPhone7") || 374 // skia:5792 375 b.gpu("IntelHD530", "IntelIris540") { 376 configs = removeContains(configs, "msaa") 377 } 378 379 // We want to test both the OpenGL config and the GLES config on Linux Intel: 380 // GL is used by Chrome, GLES is used by ChromeOS. 381 if b.matchGpu("Intel") && b.isLinux() { 382 configs = append(configs, "gles", "glesdft") 383 } 384 385 // The FailFlushTimeCallbacks tasks only run the 'gl' config 386 if b.extraConfig("FailFlushTimeCallbacks") { 387 configs = []string{"gl"} 388 } 389 390 // Graphite task *only* runs the gr*** configs 391 if b.extraConfig("Graphite") { 392 args = append(args, "--nogpu") // disable non-Graphite tests 393 394 if b.extraConfig("Dawn") { 395 if b.extraConfig("D3D11") { 396 configs = []string{"grdawn_d3d11"} 397 } 398 if b.extraConfig("D3D12") { 399 configs = []string{"grdawn_d3d12"} 400 } 401 if b.extraConfig("Metal") { 402 configs = []string{"grdawn_mtl"} 403 } 404 if b.extraConfig("Vulkan") { 405 configs = []string{"grdawn_vk"} 406 } 407 if b.extraConfig("GL") { 408 configs = []string{"grdawn_gl"} 409 } 410 if b.extraConfig("GLES") { 411 configs = []string{"grdawn_gles"} 412 } 413 // Shader doesn't compile 414 // https://skbug.com/14105 415 skip(ALL, "gm", ALL, "runtime_intrinsics_matrix") 416 // Crashes and failures 417 // https://skbug.com/14105 418 skip(ALL, "test", ALL, "BackendTextureTest") 419 skip(ALL, "test", ALL, "GraphitePurgeNotUsedSinceResourcesTest") 420 skip(ALL, "test", ALL, "PaintParamsKeyTest") 421 422 if b.matchOs("Win10") || b.matchGpu("MaliG78", "Adreno620", "QuadroP400") { 423 // The Dawn Win10 and some Android/Linux device jobs OOMs (skbug.com/14410, b/318725123) 424 skip(ALL, "test", ALL, "BigImageTest_Graphite") 425 } 426 if b.matchGpu("Adreno620") { 427 // The Dawn Pixel5 device job fails one compute test (b/318725123) 428 skip(ALL, "test", ALL, "Compute_AtomicOperationsOverArrayAndStructTest") 429 } 430 } else if b.extraConfig("Native") { 431 if b.extraConfig("Metal") { 432 configs = []string{"grmtl"} 433 if b.gpu("IntelIrisPlus") { 434 // We get some 27/255 RGB diffs on the 45 degree 435 // rotation case on this device (skbug.com/14408) 436 skip(ALL, "test", ALL, "BigImageTest_Graphite") 437 } 438 } 439 if b.extraConfig("Vulkan") { 440 configs = []string{"grvk"} 441 // Couldn't readback 442 skip(ALL, "gm", ALL, "aaxfermodes") 443 // Could not instantiate texture proxy for UploadTask! 444 skip(ALL, "test", ALL, "BigImageTest_Graphite") 445 // Test failures 446 skip(ALL, "test", ALL, "DeviceTestVertexTransparency") 447 skip(ALL, "test", ALL, "GraphitePromiseImageMultipleImgUses") 448 skip(ALL, "test", ALL, "GraphitePromiseImageRecorderLoss") 449 skip(ALL, "test", ALL, "GraphitePurgeNotUsedSinceResourcesTest") 450 skip(ALL, "test", ALL, "GraphiteTextureProxyTest") 451 skip(ALL, "test", ALL, "GraphiteYUVAPromiseImageMultipleImgUses") 452 skip(ALL, "test", ALL, "GraphiteYUVAPromiseImageRecorderLoss") 453 skip(ALL, "test", ALL, "ImageOriginTest_drawImage_Graphite") 454 skip(ALL, "test", ALL, "ImageOriginTest_imageShader_Graphite") 455 skip(ALL, "test", ALL, "ImageProviderTest_Graphite_Testing") 456 skip(ALL, "test", ALL, "ImageProviderTest_Graphite_Default") 457 skip(ALL, "test", ALL, "MakeColorSpace_Test") 458 skip(ALL, "test", ALL, "ImageProviderTest") 459 skip(ALL, "test", ALL, "ImageShaderTest") 460 skip(ALL, "test", ALL, "MutableImagesTest") 461 skip(ALL, "test", ALL, "MultisampleRetainTest") 462 skip(ALL, "test", ALL, "NonVolatileGraphitePromiseImageTest") 463 skip(ALL, "test", ALL, "NonVolatileGraphiteYUVAPromiseImageTest") 464 skip(ALL, "test", ALL, "PaintParamsKeyTest") 465 skip(ALL, "test", ALL, "RecordingOrderTest_Graphite") 466 skip(ALL, "test", ALL, "RecordingSurfacesTestClear") 467 skip(ALL, "test", ALL, "ShaderTestNestedBlendsGraphite") 468 skip(ALL, "test", ALL, "SkRuntimeEffectSimple_Graphite") 469 skip(ALL, "test", ALL, "VolatileGraphiteYUVAPromiseImageTest") 470 skip(ALL, "test", ALL, "VolatileGraphitePromiseImageTest") 471 if b.matchOs("Android") { 472 // Currently broken on Android Vulkan (skbug.com/310180104) 473 skip(ALL, "test", ALL, "ImageAsyncReadPixelsGraphite") 474 skip(ALL, "test", ALL, "SurfaceAsyncReadPixelsGraphite") 475 } 476 } 477 } 478 } 479 480 // ANGLE bot *only* runs the angle configs 481 if b.extraConfig("ANGLE") { 482 if b.matchOs("Win") { 483 configs = []string{"angle_d3d11_es2", "angle_d3d11_es3"} 484 if sampleCount > 0 { 485 configs = append(configs, fmt.Sprintf("angle_d3d11_es2_msaa%d", sampleCount)) 486 configs = append(configs, fmt.Sprintf("angle_d3d11_es2_dmsaa")) 487 configs = append(configs, fmt.Sprintf("angle_d3d11_es3_msaa%d", sampleCount)) 488 configs = append(configs, fmt.Sprintf("angle_d3d11_es3_dmsaa")) 489 } 490 if !b.matchGpu("GTX", "Quadro", "GT610") { 491 // See skia:10149 492 configs = append(configs, "angle_d3d9_es2") 493 } 494 if b.model("NUC5i7RYH") { 495 // skbug.com/7376 496 skip(ALL, "test", ALL, "ProcessorCloneTest") 497 } 498 if b.matchGpu("Intel") { 499 // Debug-ANGLE-All on Intel frequently timeout, and the FilterResult test suite 500 // produces many test cases, that are multiplied by the number of configs (of 501 // which ANGLE has many variations). There is not a lot of value gained by 502 // running these if they are the source of long 'dm' time on Xe hardware given 503 // many other tasks are executing them. 504 skip(ALL, "test", ALL, "FilterResult") 505 } 506 } else if b.matchOs("Mac") { 507 configs = []string{"angle_mtl_es2", "angle_mtl_es3"} 508 509 // anglebug.com/7245 510 skip("angle_mtl_es3", "gm", ALL, "runtime_intrinsics_common_es3") 511 512 if b.gpu("AppleM1") { 513 // M1 Macs fail this test for sRGB color types 514 // skbug.com/13289 515 skip(ALL, "test", ALL, "TransferPixelsToTextureTest") 516 } 517 } 518 } 519 520 if b.model("AndroidOne", "Nexus5", "Nexus7", "JioNext") { 521 // skbug.com/9019 522 skip(ALL, "test", ALL, "ProcessorCloneTest") 523 skip(ALL, "test", ALL, "Programs") 524 skip(ALL, "test", ALL, "ProcessorOptimizationValidationTest") 525 } 526 527 if b.model("GalaxyS20") { 528 // skbug.com/10595 529 skip(ALL, "test", ALL, "ProcessorCloneTest") 530 } 531 532 if b.model("Spin513") { 533 // skbug.com/11876 534 skip(ALL, "test", ALL, "Programs") 535 // skbug.com/12486 536 skip(ALL, "test", ALL, "TestMockContext") 537 skip(ALL, "test", ALL, "TestGpuRenderingContexts") 538 skip(ALL, "test", ALL, "TestGpuAllContexts") 539 skip(ALL, "test", ALL, "TextBlobCache") 540 skip(ALL, "test", ALL, "OverdrawSurface_Gpu") 541 skip(ALL, "test", ALL, "ReplaceSurfaceBackendTexture") 542 skip(ALL, "test", ALL, "SurfaceAttachStencil_Gpu") 543 skip(ALL, "test", ALL, "SurfacePartialDraw_Gpu") 544 skip(ALL, "test", ALL, "SurfaceWrappedWithRelease_Gpu") 545 } 546 547 // skbug.com/9043 - these devices render this test incorrectly 548 // when opList splitting reduction is enabled 549 if b.gpu() && b.extraConfig("Vulkan") && (b.gpu("RadeonR9M470X", "RadeonHD7770")) { 550 skip(ALL, "tests", ALL, "VkDrawableImportTest") 551 } 552 if b.extraConfig("Vulkan") && !b.extraConfig("Graphite") { 553 configs = []string{"vk"} 554 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926, skia:9023 555 if !b.matchGpu("Intel") { 556 configs = append(configs, "vkmsaa4") 557 } 558 // Temporarily limit the machines we test dynamic MSAA on. 559 if b.gpu("QuadroP400", "MaliG77") && !b.extraConfig("TSAN") { 560 configs = append(configs, "vkdmsaa") 561 } 562 } 563 if b.extraConfig("Metal") && !b.extraConfig("Graphite") { 564 configs = []string{"mtl"} 565 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926 566 if !b.matchGpu("Intel") { 567 configs = append(configs, "mtlmsaa4") 568 } 569 } 570 if b.extraConfig("Slug") { 571 // Test slug drawing 572 configs = []string{"glslug", "glserializeslug", "glremoteslug"} 573 // glremoteslug does not handle layers right. Exclude the tests for now. 574 skip("glremoteslug", "gm", ALL, "rtif_distort") 575 skip("glremoteslug", "gm", ALL, "textfilter_image") 576 skip("glremoteslug", "gm", ALL, "textfilter_color") 577 skip("glremoteslug", "gm", ALL, "savelayerpreservelcdtext") 578 skip("glremoteslug", "gm", ALL, "typefacerendering_pfa") 579 skip("glremoteslug", "gm", ALL, "typefacerendering_pfb") 580 skip("glremoteslug", "gm", ALL, "typefacerendering") 581 } 582 if b.extraConfig("Direct3D") { 583 configs = []string{"d3d"} 584 } 585 586 // Test 1010102 on our Linux/NVIDIA tasks and the persistent cache config 587 // on the GL tasks. 588 if b.gpu("QuadroP400") && !b.extraConfig("PreAbandonGpuContext") && !b.extraConfig("TSAN") && b.isLinux() && 589 !b.extraConfig("FailFlushTimeCallbacks") && !b.extraConfig("Graphite") { 590 if b.extraConfig("Vulkan") { 591 configs = append(configs, "vk1010102") 592 // Decoding transparent images to 1010102 just looks bad 593 skip("vk1010102", "image", ALL, ALL) 594 } else { 595 configs = append(configs, "gl1010102", "gltestpersistentcache", "gltestglslcache", "gltestprecompile") 596 // Decoding transparent images to 1010102 just looks bad 597 skip("gl1010102", "image", ALL, ALL) 598 // These tests produce slightly different pixels run to run on NV. 599 skip("gltestpersistentcache", "gm", ALL, "atlastext") 600 skip("gltestpersistentcache", "gm", ALL, "dftext") 601 skip("gltestpersistentcache", "gm", ALL, "glyph_pos_h_b") 602 skip("gltestpersistentcache", "gm", ALL, "glyph_pos_h_f") 603 skip("gltestpersistentcache", "gm", ALL, "glyph_pos_n_f") 604 skip("gltestglslcache", "gm", ALL, "atlastext") 605 skip("gltestglslcache", "gm", ALL, "dftext") 606 skip("gltestglslcache", "gm", ALL, "glyph_pos_h_b") 607 skip("gltestglslcache", "gm", ALL, "glyph_pos_h_f") 608 skip("gltestglslcache", "gm", ALL, "glyph_pos_n_f") 609 skip("gltestprecompile", "gm", ALL, "atlastext") 610 skip("gltestprecompile", "gm", ALL, "dftext") 611 skip("gltestprecompile", "gm", ALL, "glyph_pos_h_b") 612 skip("gltestprecompile", "gm", ALL, "glyph_pos_h_f") 613 skip("gltestprecompile", "gm", ALL, "glyph_pos_n_f") 614 // Tessellation shaders do not yet participate in the persistent cache. 615 skip("gltestpersistentcache", "gm", ALL, "tessellation") 616 skip("gltestglslcache", "gm", ALL, "tessellation") 617 skip("gltestprecompile", "gm", ALL, "tessellation") 618 } 619 } 620 621 // We also test the SkSL precompile config on Pixel2XL as a representative 622 // Android device - this feature is primarily used by Flutter. 623 if b.model("Pixel2XL") && !b.extraConfig("Vulkan") { 624 configs = append(configs, "glestestprecompile") 625 } 626 627 // Test SkSL precompile on iPhone 8 as representative iOS device 628 if b.model("iPhone8") && b.extraConfig("Metal") { 629 configs = append(configs, "mtltestprecompile") 630 // avoid tests that can generate slightly different pixels per run 631 skip("mtltestprecompile", "gm", ALL, "atlastext") 632 skip("mtltestprecompile", "gm", ALL, "circular_arcs_hairline") 633 skip("mtltestprecompile", "gm", ALL, "dashcircle") 634 skip("mtltestprecompile", "gm", ALL, "dftext") 635 skip("mtltestprecompile", "gm", ALL, "encode-platform") 636 skip("mtltestprecompile", "gm", ALL, "fontmgr_bounds") 637 skip("mtltestprecompile", "gm", ALL, "fontmgr_bounds_1_-0.25") 638 skip("mtltestprecompile", "gm", ALL, "glyph_pos_h_b") 639 skip("mtltestprecompile", "gm", ALL, "glyph_pos_h_f") 640 skip("mtltestprecompile", "gm", ALL, "glyph_pos_n_f") 641 skip("mtltestprecompile", "gm", ALL, "persp_images") 642 skip("mtltestprecompile", "gm", ALL, "ovals") 643 skip("mtltestprecompile", "gm", ALL, "roundrects") 644 skip("mtltestprecompile", "gm", ALL, "shadow_utils_occl") 645 skip("mtltestprecompile", "gm", ALL, "strokedlines") 646 skip("mtltestprecompile", "gm", ALL, "strokerect") 647 skip("mtltestprecompile", "gm", ALL, "strokes3") 648 skip("mtltestprecompile", "gm", ALL, "texel_subset_linear_mipmap_nearest_down") 649 skip("mtltestprecompile", "gm", ALL, "texel_subset_linear_mipmap_linear_down") 650 skip("mtltestprecompile", "gm", ALL, "textblobmixedsizes_df") 651 skip("mtltestprecompile", "gm", ALL, "yuv420_odd_dim_repeat") 652 skip("mtltestprecompile", "svg", ALL, "A_large_blank_world_map_with_oceans_marked_in_blue.svg") 653 skip("mtltestprecompile", "svg", ALL, "Chalkboard.svg") 654 skip("mtltestprecompile", "svg", ALL, "Ghostscript_Tiger.svg") 655 skip("mtltestprecompile", "svg", ALL, "Seal_of_American_Samoa.svg") 656 skip("mtltestprecompile", "svg", ALL, "Seal_of_Illinois.svg") 657 skip("mtltestprecompile", "svg", ALL, "cartman.svg") 658 skip("mtltestprecompile", "svg", ALL, "desk_motionmark_paths.svg") 659 skip("mtltestprecompile", "svg", ALL, "rg1024_green_grapes.svg") 660 skip("mtltestprecompile", "svg", ALL, "shapes-intro-02-f.svg") 661 skip("mtltestprecompile", "svg", ALL, "tiger-8.svg") 662 } 663 // Test reduced shader mode on iPhone 11 as representative iOS device 664 if b.model("iPhone11") && b.extraConfig("Metal") && !b.extraConfig("Graphite") { 665 configs = append(configs, "mtlreducedshaders") 666 } 667 668 if b.model(DONT_REDUCE_OPS_TASK_SPLITTING_MODELS...) { 669 args = append(args, "--dontReduceOpsTaskSplitting", "true") 670 } 671 672 // Test reduceOpsTaskSplitting fallback when over budget. 673 if b.model("NUC7i5BNK") && b.extraConfig("ASAN") { 674 args = append(args, "--gpuResourceCacheLimit", "16777216") 675 } 676 677 // Test rendering to wrapped dsts on a few tasks 678 if b.extraConfig("BonusConfigs") { 679 configs = []string{"glbetex", "glbert", "glreducedshaders", "glr8"} 680 } 681 682 if b.os("ChromeOS") { 683 // Just run GLES for now - maybe add gles_msaa4 in the future 684 configs = []string{"gles"} 685 } 686 687 // Test GPU tessellation path renderer. 688 if b.extraConfig("GpuTess") { 689 configs = []string{glPrefix + "msaa4"} 690 // Use fixed count tessellation path renderers as much as possible. 691 args = append(args, "--pr", "atlas", "tess") 692 } 693 694 // DDL is a GPU-only feature 695 if b.extraConfig("DDL1") { 696 // This bot generates comparison images for the large skps and the gms 697 configs = filter(configs, "gl", "vk", "mtl") 698 args = append(args, "--skpViewportSize", "2048") 699 } 700 if b.extraConfig("DDL3") { 701 // This bot generates the real ddl images for the large skps and the gms 702 configs = suffix(filter(configs, "gl", "vk", "mtl"), "ddl") 703 args = append(args, "--skpViewportSize", "2048") 704 args = append(args, "--gpuThreads", "0") 705 } 706 } 707 708 if b.matchExtraConfig("ColorSpaces") { 709 // Here we're going to generate a bunch of configs with the format: 710 // <colorspace> <backend> <targetFormat> 711 // Where: <colorspace> is one of: "", "linear-", "narrow-", p3-", "rec2020-", "srgb2-" 712 // <backend> is one of: "gl, "gles", "mtl", "vk" 713 // their "gr" prefixed versions 714 // and "" (for raster) 715 // <targetFormat> is one of: "f16", { "" (for gpus) or "rgba" (for raster) } 716 // 717 // We also add on two configs with the format: 718 // narrow-<backend>f16norm 719 // linear-<backend>srgba 720 colorSpaces := []string{"", "linear-", "narrow-", "p3-", "rec2020-", "srgb2-"} 721 722 backendStr := "" 723 if b.gpu() { 724 if b.extraConfig("Graphite") { 725 if b.extraConfig("GL") { 726 backendStr = "grgl" 727 } else if b.extraConfig("GLES") { 728 backendStr = "grgles" 729 } else if b.extraConfig("Metal") { 730 backendStr = "grmtl" 731 } else if b.extraConfig("Vulkan") { 732 backendStr = "grvk" 733 } 734 } else { 735 if b.extraConfig("GL") { 736 backendStr = "gl" 737 } else if b.extraConfig("GLES") { 738 backendStr = "gles" 739 } else if b.extraConfig("Metal") { 740 backendStr = "mtl" 741 } else if b.extraConfig("Vulkan") { 742 backendStr = "vk" 743 } 744 } 745 } 746 747 targetFormats := []string{"f16"} 748 if b.gpu() { 749 targetFormats = append(targetFormats, "") 750 } else { 751 targetFormats = append(targetFormats, "rgba") 752 } 753 754 configs = []string{} 755 756 for _, cs := range colorSpaces { 757 for _, tf := range targetFormats { 758 configs = append(configs, cs+backendStr+tf) 759 } 760 } 761 762 configs = append(configs, "narrow-"+backendStr+"f16norm") 763 configs = append(configs, "linear-"+backendStr+"srgba") 764 } 765 766 // Sharding. 767 tf := b.parts["test_filter"] 768 if tf != "" && tf != "All" { 769 // Expected format: shard_XX_YY 770 split := strings.Split(tf, ALL) 771 if len(split) == 3 { 772 args = append(args, "--shard", split[1]) 773 args = append(args, "--shards", split[2]) 774 } else { 775 glog.Fatalf("Invalid task name - bad shards: %s", tf) 776 } 777 } 778 779 args = append(args, "--config") 780 args = append(args, configs...) 781 782 removeFromArgs := func(arg string) { 783 args = remove(args, arg) 784 } 785 786 // Run tests, gms, and image decoding tests everywhere. 787 args = append(args, "--src", "tests", "gm", "image", "lottie", "colorImage", "svg", "skp") 788 if b.gpu() { 789 // Don't run the "svgparse_*" svgs on GPU. 790 skip(ALL, "svg", ALL, "svgparse_") 791 } else if b.Name == "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" { 792 // Only run the CPU SVGs on 8888. 793 skip("~8888", "svg", ALL, ALL) 794 } else { 795 // On CPU SVGs we only care about parsing. Only run them on the above bot. 796 removeFromArgs("svg") 797 } 798 799 // Eventually I'd like these to pass, but for now just skip 'em. 800 if b.extraConfig("SK_FORCE_RASTER_PIPELINE_BLITTER") { 801 removeFromArgs("tests") 802 } 803 804 if b.model("Spin513") { 805 removeFromArgs("tests") 806 } 807 808 if b.extraConfig("NativeFonts") { // images won't exercise native font integration :) 809 removeFromArgs("image") 810 removeFromArgs("colorImage") 811 } 812 813 if b.matchExtraConfig("Graphite") { 814 removeFromArgs("image") 815 removeFromArgs("lottie") 816 removeFromArgs("colorImage") 817 removeFromArgs("svg") 818 } 819 820 if b.matchExtraConfig("Fontations") { 821 // The only fontations code is exercised via gms and tests 822 removeFromArgs("image") 823 removeFromArgs("lottie") 824 removeFromArgs("colorImage") 825 removeFromArgs("svg") 826 } 827 828 // Remove skps for all tasks except for a select few. On tasks that will run SKPs remove some of 829 // their other tests. 830 if b.matchExtraConfig("DDL", "PDF") { 831 // The DDL and PDF tasks just render the large skps and the gms 832 removeFromArgs("tests") 833 removeFromArgs("image") 834 removeFromArgs("colorImage") 835 removeFromArgs("svg") 836 } else if b.matchExtraConfig("OldestSupportedSkpVersion") { 837 // The OldestSupportedSkpVersion bot only renders skps. 838 removeFromArgs("tests") 839 removeFromArgs("gm") 840 removeFromArgs("image") 841 removeFromArgs("colorImage") 842 removeFromArgs("svg") 843 } else if b.matchExtraConfig("FailFlushTimeCallbacks") { 844 // The FailFlushTimeCallbacks bot only runs skps, gms and svgs 845 removeFromArgs("tests") 846 removeFromArgs("image") 847 removeFromArgs("colorImage") 848 } else if b.extraConfig("Protected") { 849 // Currently the Protected jobs only run the unit tests 850 removeFromArgs("gm") 851 removeFromArgs("image") 852 removeFromArgs("lottie") 853 removeFromArgs("colorImage") 854 removeFromArgs("svg") 855 removeFromArgs("skp") 856 } else { 857 // No other tasks render the .skps. 858 removeFromArgs("skp") 859 } 860 861 if b.extraConfig("Lottie") { 862 // Only run the lotties on Lottie tasks. 863 removeFromArgs("tests") 864 removeFromArgs("gm") 865 removeFromArgs("image") 866 removeFromArgs("colorImage") 867 removeFromArgs("svg") 868 removeFromArgs("skp") 869 } else { 870 removeFromArgs("lottie") 871 } 872 873 if b.extraConfig("TSAN") { 874 // skbug.com/10848 875 removeFromArgs("svg") 876 // skbug.com/12900 avoid OOM on 877 // Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan 878 // Avoid lots of spurious TSAN failures on 879 // Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-TSAN_Vulkan 880 // Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_TSAN_Vulkan 881 if b.Name == "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan" || 882 b.Name == "Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-TSAN_Vulkan" || 883 b.Name == "Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_TSAN_Vulkan" { 884 skip("_", "test", "_", "_") 885 } 886 } 887 888 // TODO: ??? 889 skip("f16", ALL, ALL, "dstreadshuffle") 890 891 // --src image --config r8 means "decode into R8", which isn't supported. 892 skip("r8", "image", ALL, ALL) 893 skip("r8", "colorImage", ALL, ALL) 894 895 if b.extraConfig("Valgrind") { 896 // These take 18+ hours to run. 897 skip("pdf", "gm", ALL, "fontmgr_iter") 898 skip("pdf", ALL, ALL, "PANO_20121023_214540.jpg") 899 skip("pdf", "skp", ALL, "worldjournal") 900 skip("pdf", "skp", ALL, "desk_baidu.skp") 901 skip("pdf", "skp", ALL, "desk_wikipedia.skp") 902 skip(ALL, "svg", ALL, ALL) 903 // skbug.com/9171 and 8847 904 skip(ALL, "test", ALL, "InitialTextureClear") 905 } 906 907 if b.model("TecnoSpark3Pro", "Wembley") { 908 // skbug.com/9421 909 skip(ALL, "test", ALL, "InitialTextureClear") 910 } 911 912 if b.model("Wembley", "JioNext") { 913 // These tests run forever on the Wembley. 914 skip(ALL, "gm", ALL, "async_rescale_and_read") 915 } 916 917 if b.os("iOS") { 918 skip(glPrefix, "skp", ALL, ALL) 919 } 920 921 if b.matchOs("Mac", "iOS") { 922 // CG fails on questionable bmps 923 skip(ALL, "image", "gen_platf", "rgba32abf.bmp") 924 skip(ALL, "image", "gen_platf", "rgb24prof.bmp") 925 skip(ALL, "image", "gen_platf", "rgb24lprof.bmp") 926 skip(ALL, "image", "gen_platf", "8bpp-pixeldata-cropped.bmp") 927 skip(ALL, "image", "gen_platf", "4bpp-pixeldata-cropped.bmp") 928 skip(ALL, "image", "gen_platf", "32bpp-pixeldata-cropped.bmp") 929 skip(ALL, "image", "gen_platf", "24bpp-pixeldata-cropped.bmp") 930 931 // CG has unpredictable behavior on this questionable gif 932 // It's probably using uninitialized memory 933 skip(ALL, "image", "gen_platf", "frame_larger_than_image.gif") 934 935 // CG has unpredictable behavior on incomplete pngs 936 // skbug.com/5774 937 skip(ALL, "image", "gen_platf", "inc0.png") 938 skip(ALL, "image", "gen_platf", "inc1.png") 939 skip(ALL, "image", "gen_platf", "inc2.png") 940 skip(ALL, "image", "gen_platf", "inc3.png") 941 skip(ALL, "image", "gen_platf", "inc4.png") 942 skip(ALL, "image", "gen_platf", "inc5.png") 943 skip(ALL, "image", "gen_platf", "inc6.png") 944 skip(ALL, "image", "gen_platf", "inc7.png") 945 skip(ALL, "image", "gen_platf", "inc8.png") 946 skip(ALL, "image", "gen_platf", "inc9.png") 947 skip(ALL, "image", "gen_platf", "inc10.png") 948 skip(ALL, "image", "gen_platf", "inc11.png") 949 skip(ALL, "image", "gen_platf", "inc12.png") 950 skip(ALL, "image", "gen_platf", "inc13.png") 951 skip(ALL, "image", "gen_platf", "inc14.png") 952 skip(ALL, "image", "gen_platf", "incInterlaced.png") 953 954 // These images fail after Mac 10.13.1 upgrade. 955 skip(ALL, "image", "gen_platf", "incInterlaced.gif") 956 skip(ALL, "image", "gen_platf", "inc1.gif") 957 skip(ALL, "image", "gen_platf", "inc0.gif") 958 skip(ALL, "image", "gen_platf", "butterfly.gif") 959 } 960 961 // WIC fails on questionable bmps 962 if b.matchOs("Win") { 963 skip(ALL, "image", "gen_platf", "pal8os2v2.bmp") 964 skip(ALL, "image", "gen_platf", "pal8os2v2-16.bmp") 965 skip(ALL, "image", "gen_platf", "rgba32abf.bmp") 966 skip(ALL, "image", "gen_platf", "rgb24prof.bmp") 967 skip(ALL, "image", "gen_platf", "rgb24lprof.bmp") 968 skip(ALL, "image", "gen_platf", "8bpp-pixeldata-cropped.bmp") 969 skip(ALL, "image", "gen_platf", "4bpp-pixeldata-cropped.bmp") 970 skip(ALL, "image", "gen_platf", "32bpp-pixeldata-cropped.bmp") 971 skip(ALL, "image", "gen_platf", "24bpp-pixeldata-cropped.bmp") 972 if b.arch("x86_64") && b.cpu() { 973 // This GM triggers a SkSmallAllocator assert. 974 skip(ALL, "gm", ALL, "composeshader_bitmap") 975 } 976 } 977 978 if !b.matchOs("Win", "Debian11", "Ubuntu18") || b.gpu("IntelIris655", "IntelIris540") { 979 // This test requires a decent max texture size so just run it on the desktops. 980 // The OS list should include Mac but Mac10.13 doesn't work correctly. 981 // The IntelIris655 and IntelIris540 GPUs don't work correctly in the Vk backend 982 skip(ALL, "test", ALL, "BigImageTest_Ganesh") 983 } 984 985 if b.matchOs("Win", "Mac") { 986 // WIC and CG fail on arithmetic jpegs 987 skip(ALL, "image", "gen_platf", "testimgari.jpg") 988 // More questionable bmps that fail on Mac, too. skbug.com/6984 989 skip(ALL, "image", "gen_platf", "rle8-height-negative.bmp") 990 skip(ALL, "image", "gen_platf", "rle4-height-negative.bmp") 991 } 992 993 // These PNGs have CRC errors. The platform generators seem to draw 994 // uninitialized memory without reporting an error, so skip them to 995 // avoid lots of images on Gold. 996 skip(ALL, "image", "gen_platf", "error") 997 998 if b.matchOs("Android") || b.os("iOS") { 999 // This test crashes the N9 (perhaps because of large malloc/frees). It also 1000 // is fairly slow and not platform-specific. So we just disable it on all of 1001 // Android and iOS. skia:5438 1002 skip(ALL, "test", ALL, "GrStyledShape") 1003 } 1004 1005 if internalHardwareLabel == "5" { 1006 // http://b/118312149#comment9 1007 skip(ALL, "test", ALL, "SRGBReadWritePixels") 1008 } 1009 1010 // skia:4095 1011 badSerializeGMs := []string{ 1012 "strict_constraint_batch_no_red_allowed", // https://crbug.com/skia/10278 1013 "strict_constraint_no_red_allowed", // https://crbug.com/skia/10278 1014 "fast_constraint_red_is_allowed", // https://crbug.com/skia/10278 1015 "c_gms", 1016 "colortype", 1017 "colortype_xfermodes", 1018 "drawfilter", 1019 "fontmgr_bounds_0.75_0", 1020 "fontmgr_bounds_1_-0.25", 1021 "fontmgr_bounds", 1022 "fontmgr_match", 1023 "fontmgr_iter", 1024 "imagemasksubset", 1025 "wacky_yuv_formats_domain", 1026 "imagemakewithfilter", 1027 "imagemakewithfilter_crop", 1028 "imagemakewithfilter_crop_ref", 1029 "imagemakewithfilter_ref", 1030 "imagefilterstransformed", 1031 } 1032 1033 // skia:5589 1034 badSerializeGMs = append(badSerializeGMs, 1035 "bitmapfilters", 1036 "bitmapshaders", 1037 "convex_poly_clip", 1038 "extractalpha", 1039 "filterbitmap_checkerboard_32_32_g8", 1040 "filterbitmap_image_mandrill_64", 1041 "shadows", 1042 "simpleaaclip_aaclip", 1043 ) 1044 1045 // skia:5595 1046 badSerializeGMs = append(badSerializeGMs, 1047 "composeshader_bitmap", 1048 "scaled_tilemodes_npot", 1049 "scaled_tilemodes", 1050 ) 1051 1052 // skia:5778 1053 badSerializeGMs = append(badSerializeGMs, "typefacerendering_pfaMac") 1054 // skia:5942 1055 badSerializeGMs = append(badSerializeGMs, "parsedpaths") 1056 1057 // these use a custom image generator which doesn't serialize 1058 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_rect") 1059 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_shader") 1060 1061 // skia:6189 1062 badSerializeGMs = append(badSerializeGMs, "shadow_utils") 1063 badSerializeGMs = append(badSerializeGMs, "graphitestart") 1064 1065 // skia:7938 1066 badSerializeGMs = append(badSerializeGMs, "persp_images") 1067 1068 // Not expected to round trip encoding/decoding. 1069 badSerializeGMs = append(badSerializeGMs, "all_bitmap_configs") 1070 badSerializeGMs = append(badSerializeGMs, "makecolorspace") 1071 badSerializeGMs = append(badSerializeGMs, "readpixels") 1072 badSerializeGMs = append(badSerializeGMs, "draw_image_set_rect_to_rect") 1073 badSerializeGMs = append(badSerializeGMs, "draw_image_set_alpha_only") 1074 badSerializeGMs = append(badSerializeGMs, "compositor_quads_shader") 1075 badSerializeGMs = append(badSerializeGMs, "wacky_yuv_formats_qtr") 1076 badSerializeGMs = append(badSerializeGMs, "runtime_effect_image") 1077 badSerializeGMs = append(badSerializeGMs, "ctmpatheffect") 1078 badSerializeGMs = append(badSerializeGMs, "image_out_of_gamut") 1079 1080 // This GM forces a path to be convex. That property doesn't survive 1081 // serialization. 1082 badSerializeGMs = append(badSerializeGMs, "analytic_antialias_convex") 1083 1084 for _, test := range badSerializeGMs { 1085 skip("serialize-8888", "gm", ALL, test) 1086 } 1087 1088 // We skip these to avoid out-of-memory failures. 1089 if b.matchOs("Win", "Android") { 1090 for _, test := range []string{"verylargebitmap", "verylarge_picture_image"} { 1091 skip("serialize-8888", "gm", ALL, test) 1092 } 1093 } 1094 if b.matchOs("Mac") && b.cpu() { 1095 // skia:6992 1096 skip("pic-8888", "gm", ALL, "encode-platform") 1097 skip("serialize-8888", "gm", ALL, "encode-platform") 1098 } 1099 1100 // skia:14411 -- images are visibly identical, not interested in diagnosing non-determinism here 1101 skip("pic-8888", "gm", ALL, "perlinnoise_layered") 1102 skip("serialize-8888", "gm", ALL, "perlinnoise_layered") 1103 if b.gpu("IntelIrisXe") && !b.extraConfig("Vulkan") { 1104 skip(ALL, "gm", ALL, "perlinnoise_layered") // skia:14411 1105 } 1106 1107 if b.gpu("IntelIrisXe") && b.matchOs("Win") && b.extraConfig("Vulkan") { 1108 skip(ALL, "tests", ALL, "VkYCbcrSampler_DrawImageWithYcbcrSampler") // skia:14628 1109 } 1110 1111 // skia:4769 1112 skip("pic-8888", "gm", ALL, "drawfilter") 1113 1114 // skia:4703 1115 for _, test := range []string{"image-cacherator-from-picture", 1116 "image-cacherator-from-raster", 1117 "image-cacherator-from-ctable"} { 1118 skip("pic-8888", "gm", ALL, test) 1119 skip("serialize-8888", "gm", ALL, test) 1120 } 1121 1122 // GM that requires raster-backed canvas 1123 for _, test := range []string{"complexclip4_bw", "complexclip4_aa", "p3", 1124 "async_rescale_and_read_text_up_large", 1125 "async_rescale_and_read_text_up", 1126 "async_rescale_and_read_text_down", 1127 "async_rescale_and_read_dog_up", 1128 "async_rescale_and_read_dog_down", 1129 "async_rescale_and_read_rose", 1130 "async_rescale_and_read_no_bleed", 1131 "async_rescale_and_read_alpha_type"} { 1132 skip("pic-8888", "gm", ALL, test) 1133 skip("serialize-8888", "gm", ALL, test) 1134 1135 // GM requires canvas->makeSurface() to return a valid surface. 1136 // TODO(borenet): These should be just outside of this block but are 1137 // left here to match the recipe which has an indentation bug. 1138 skip("pic-8888", "gm", ALL, "blurrect_compare") 1139 skip("serialize-8888", "gm", ALL, "blurrect_compare") 1140 } 1141 1142 // Extensions for RAW images 1143 r := []string{ 1144 "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", 1145 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW", 1146 } 1147 1148 // skbug.com/4888 1149 // Skip RAW images (and a few large PNGs) on GPU tasks 1150 // until we can resolve failures. 1151 if b.gpu() { 1152 skip(ALL, "image", ALL, "interlaced1.png") 1153 skip(ALL, "image", ALL, "interlaced2.png") 1154 skip(ALL, "image", ALL, "interlaced3.png") 1155 for _, rawExt := range r { 1156 skip(ALL, "image", ALL, "."+rawExt) 1157 } 1158 } 1159 1160 if b.model("Nexus5", "Nexus5x", "JioNext") && b.gpu() { 1161 // skia:5876 1162 skip(ALL, "gm", ALL, "encode-platform") 1163 } 1164 1165 if b.model("AndroidOne") && b.gpu() { // skia:4697, skia:4704, skia:4694, skia:4705, skia:11133 1166 skip(ALL, "gm", ALL, "bigblurs") 1167 skip(ALL, "gm", ALL, "strict_constraint_no_red_allowed") 1168 skip(ALL, "gm", ALL, "fast_constraint_red_is_allowed") 1169 skip(ALL, "gm", ALL, "dropshadowimagefilter") 1170 skip(ALL, "gm", ALL, "filterfastbounds") 1171 skip(glPrefix, "gm", ALL, "imageblurtiled") 1172 skip(ALL, "gm", ALL, "imagefiltersclipped") 1173 skip(ALL, "gm", ALL, "imagefiltersscaled") 1174 skip(ALL, "gm", ALL, "imageresizetiled") 1175 skip(ALL, "gm", ALL, "matrixconvolution") 1176 skip(ALL, "gm", ALL, "strokedlines") 1177 skip(ALL, "gm", ALL, "runtime_intrinsics_matrix") 1178 if sampleCount > 0 { 1179 glMsaaConfig := fmt.Sprintf("%smsaa%d", glPrefix, sampleCount) 1180 skip(glMsaaConfig, "gm", ALL, "imageblurtiled") 1181 skip(glMsaaConfig, "gm", ALL, "imagefiltersbase") 1182 } 1183 } 1184 1185 // b/296440036 1186 // disable broken tests on Adreno 5/6xx Vulkan or API30 1187 if b.matchGpu("Adreno[56]") && (b.extraConfig("Vulkan") || b.extraConfig("API30")) { 1188 skip(ALL, "tests", ALL, "ImageAsyncReadPixels_Renderable_BottomLeft") 1189 skip(ALL, "tests", ALL, "ImageAsyncReadPixels_Renderable_TopLeft") 1190 skip(ALL, "tests", ALL, "ImageAsyncReadPixels_NonRenderable_BottomLeft") 1191 skip(ALL, "tests", ALL, "ImageAsyncReadPixels_NonRenderable_TopLeft") 1192 skip(ALL, "tests", ALL, "SurfaceAsyncReadPixels") 1193 } 1194 1195 if b.matchGpu("Adreno[56]") && b.extraConfig("Vulkan") { 1196 skip(ALL, "gm", ALL, "mesh_with_image") 1197 skip(ALL, "gm", ALL, "mesh_with_paint_color") 1198 skip(ALL, "gm", ALL, "mesh_with_paint_image") 1199 } 1200 1201 if b.matchGpu("Mali400") { 1202 skip(ALL, "tests", ALL, "BlendRequiringDstReadWithLargeCoordinates") 1203 skip(ALL, "tests", ALL, "SkSLCross") // despite the name, it's not in SkSLTest.cpp 1204 } 1205 1206 if b.matchOs("Mac") && (b.gpu("IntelIrisPlus") || b.gpu("IntelHD6000")) && 1207 b.extraConfig("Metal") { 1208 // TODO(skia:296960708): The IntelIrisPlus+Metal config hangs on this test, but passes 1209 // SurfaceContextWritePixelsMipped so let that one keep running. 1210 skip(ALL, "tests", ALL, "SurfaceContextWritePixels") 1211 skip(ALL, "tests", ALL, "SurfaceContextWritePixelsMipped") 1212 skip(ALL, "tests", ALL, "ImageAsyncReadPixels") 1213 skip(ALL, "tests", ALL, "SurfaceAsyncReadPixels") 1214 } 1215 1216 if b.extraConfig("ANGLE") && b.matchOs("Win") && b.matchGpu("IntelIris(540|655|Xe)") { 1217 skip(ALL, "tests", ALL, "ImageFilterCropRect_Gpu") // b/294080402 1218 } 1219 1220 if b.gpu("RTX3060") && b.extraConfig("Vulkan") && b.matchOs("Win") { 1221 skip(ALL, "gm", ALL, "blurcircles2") // skia:13342 1222 } 1223 1224 if b.gpu("QuadroP400") && b.matchOs("Win10") && b.matchModel("Golo") { 1225 // Times out with driver 30.0.15.1179 1226 skip("vkmsaa4", "gm", ALL, "shadow_utils") 1227 } 1228 1229 if b.gpu("RadeonR9M470X") && b.extraConfig("ANGLE") { 1230 // skbug:14293 - ANGLE D3D9 ES2 has flaky texture sampling that leads to fuzzy diff errors 1231 skip(ALL, "tests", ALL, "FilterResult") 1232 // skbug:13815 - Flaky failures on ANGLE D3D9 ES2 1233 skip(ALL, "tests", ALL, "SkRuntimeEffectSimple_Ganesh") 1234 skip(ALL, "tests", ALL, "TestSweepGradientZeroXGanesh") 1235 } 1236 1237 if b.extraConfig("Vulkan") && b.gpu("RadeonVega6") { 1238 skip(ALL, "gm", ALL, "ycbcrimage") // skia:13265 1239 skip(ALL, "test", ALL, "VkYCbcrSampler_DrawImageWithYcbcrSampler") // skia:13265 1240 } 1241 1242 match := []string{} 1243 1244 if b.extraConfig("Graphite") { 1245 // Graphite doesn't do auto-image-tiling so these GMs should remain disabled 1246 match = append(match, "~^verylarge_picture_image$") 1247 match = append(match, "~^verylargebitmap$") 1248 match = append(match, "~^path_huge_aa$") 1249 match = append(match, "~^fast_constraint_red_is_allowed$") 1250 match = append(match, "~^strict_constraint_batch_no_red_allowed$") 1251 match = append(match, "~^strict_constraint_no_red_allowed$") 1252 } 1253 1254 if b.extraConfig("Valgrind") { // skia:3021 1255 match = append(match, "~Threaded") 1256 } 1257 1258 if b.extraConfig("Valgrind") && b.extraConfig("PreAbandonGpuContext") { 1259 // skia:6575 1260 match = append(match, "~multipicturedraw_") 1261 } 1262 1263 if b.model("AndroidOne") { 1264 match = append(match, "~WritePixels") // skia:4711 1265 match = append(match, "~PremulAlphaRoundTrip_Gpu") // skia:7501 1266 match = append(match, "~ReimportImageTextureWithMipLevels") // skia:8090 1267 match = append(match, "~MorphologyFilterRadiusWithMirrorCTM_Gpu") // skia:10383 1268 } 1269 1270 if b.gpu("IntelIrisXe") { 1271 match = append(match, "~ReimportImageTextureWithMipLevels") 1272 } 1273 1274 if b.extraConfig("MSAN") { 1275 match = append(match, "~Once", "~Shared") // Not sure what's up with these tests. 1276 } 1277 1278 // By default, we test with GPU threading enabled, unless specifically 1279 // disabled. 1280 if b.extraConfig("NoGPUThreads") { 1281 args = append(args, "--gpuThreads", "0") 1282 } 1283 1284 if b.extraConfig("Vulkan") && b.gpu("Adreno530") { 1285 // skia:5777 1286 match = append(match, "~CopySurface") 1287 } 1288 1289 // Pixel4XL on the tree is still on Android 10 (Q), and the vulkan drivers 1290 // crash during this GM. It works correctly on newer versions of Android. 1291 // The Pixel3a is also failing on this GM with an invalid return value from 1292 // vkCreateGraphicPipelines. 1293 if b.extraConfig("Vulkan") && (b.model("Pixel4XL") || b.model("Pixel3a")) { 1294 skip("vk", "gm", ALL, "custommesh_cs_uniforms") 1295 } 1296 1297 if b.extraConfig("Vulkan") && b.matchGpu("Adreno") { 1298 // skia:7663 1299 match = append(match, "~WritePixelsNonTextureMSAA_Gpu") 1300 match = append(match, "~WritePixelsMSAA_Gpu") 1301 } 1302 1303 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelIris640") { 1304 match = append(match, "~VkHeapTests") // skia:6245 1305 } 1306 1307 if b.isLinux() && b.gpu("IntelIris640") { 1308 match = append(match, "~Programs") // skia:7849 1309 } 1310 1311 if b.model("TecnoSpark3Pro", "Wembley") { 1312 // skia:9814 1313 match = append(match, "~Programs") 1314 match = append(match, "~ProcessorCloneTest") 1315 match = append(match, "~ProcessorOptimizationValidationTest") 1316 } 1317 1318 if b.gpu("IntelIris640", "IntelHD615", "IntelHDGraphics615") { 1319 match = append(match, "~^SRGBReadWritePixels$") // skia:9225 1320 } 1321 1322 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelHD405") { 1323 // skia:7322 1324 skip("vk", "gm", ALL, "skbug_257") 1325 skip("vk", "gm", ALL, "filltypespersp") 1326 match = append(match, "~^ClearOp$") 1327 match = append(match, "~^CopySurface$") 1328 match = append(match, "~^ImageNewShader_GPU$") 1329 match = append(match, "~^InitialTextureClear$") 1330 match = append(match, "~^PinnedImageTest$") 1331 match = append(match, "~^ReadPixels_Gpu$") 1332 match = append(match, "~^ReadPixels_Texture$") 1333 match = append(match, "~^SRGBReadWritePixels$") 1334 match = append(match, "~^VkUploadPixelsTests$") 1335 match = append(match, "~^WritePixelsNonTexture_Gpu$") 1336 match = append(match, "~^WritePixelsNonTextureMSAA_Gpu$") 1337 match = append(match, "~^WritePixels_Gpu$") 1338 match = append(match, "~^WritePixelsMSAA_Gpu$") 1339 } 1340 1341 if b.extraConfig("Vulkan") && b.gpu("GTX660") && b.matchOs("Win") { 1342 // skbug.com/8047 1343 match = append(match, "~FloatingPointTextureTest$") 1344 } 1345 1346 if b.extraConfig("Metal") && !b.extraConfig("Graphite") && b.gpu("RadeonHD8870M") && b.matchOs("Mac") { 1347 // skia:9255 1348 match = append(match, "~WritePixelsNonTextureMSAA_Gpu") 1349 // skbug.com/11366 1350 match = append(match, "~SurfacePartialDraw_Gpu") 1351 } 1352 1353 if b.extraConfig("Metal") && !b.extraConfig("Graphite") && b.gpu("PowerVRGX6450") && b.matchOs("iOS") { 1354 // skbug.com/11885 1355 match = append(match, "~flight_animated_image") 1356 } 1357 1358 if b.extraConfig("ANGLE") { 1359 // skia:7835 1360 match = append(match, "~BlurMaskBiggerThanDest") 1361 } 1362 1363 if b.gpu("IntelIris6100") && b.extraConfig("ANGLE") && !b.debug() { 1364 // skia:7376 1365 match = append(match, "~^ProcessorOptimizationValidationTest$") 1366 } 1367 1368 if b.gpu("IntelIris6100", "IntelHD4400") && b.extraConfig("ANGLE") { 1369 // skia:6857 1370 skip("angle_d3d9_es2", "gm", ALL, "lighting") 1371 } 1372 1373 if b.gpu("PowerVRGX6250") { 1374 match = append(match, "~gradients_view_perspective_nodither") //skia:6972 1375 } 1376 1377 if b.arch("arm") && b.extraConfig("ASAN") { 1378 // TODO: can we run with env allocator_may_return_null=1 instead? 1379 match = append(match, "~BadImage") 1380 } 1381 1382 if b.arch("arm64") && b.extraConfig("ASAN") { 1383 // skbug.com/13155 the use of longjmp may cause ASAN stack check issues. 1384 skip(ALL, "test", ALL, "SkPDF_JpegIdentification") 1385 } 1386 1387 if b.extraConfig("HWASAN") { 1388 // HWASAN adds tag bytes to pointers. That's incompatible with this test -- it compares 1389 // pointers from unrelated stack frames to check that RP isn't growing the stack. 1390 skip(ALL, "test", ALL, "SkRasterPipeline_stack_rewind") 1391 } 1392 1393 if b.matchOs("Mac") && b.gpu("IntelHD6000") { 1394 // skia:7574 1395 match = append(match, "~^ProcessorCloneTest$") 1396 match = append(match, "~^GrMeshTest$") 1397 } 1398 1399 if b.matchOs("Mac") && b.gpu("IntelHD615") { 1400 // skia:7603 1401 match = append(match, "~^GrMeshTest$") 1402 } 1403 1404 if b.matchOs("Mac") && b.gpu("IntelIrisPlus") { 1405 // skia:7603 1406 match = append(match, "~^GrMeshTest$") 1407 } 1408 1409 if b.extraConfig("Vulkan") && b.model("GalaxyS20") { 1410 // skia:10247 1411 match = append(match, "~VkPrepareForExternalIOQueueTransitionTest") 1412 } 1413 if b.matchExtraConfig("Graphite") { 1414 // skia:12813 1415 match = append(match, "~async_rescale_and_read") 1416 } 1417 1418 if b.matchExtraConfig("ColorSpaces") { 1419 // Here we reset the 'match' and 'skipped' strings bc the ColorSpaces job only runs 1420 // a very specific subset of the GMs. 1421 skipped = []string{} 1422 match = []string{} 1423 match = append(match, "async_rescale_and_read_dog_up") 1424 match = append(match, "bug6783") 1425 match = append(match, "colorspace") 1426 match = append(match, "colorspace2") 1427 match = append(match, "coloremoji") 1428 match = append(match, "composeCF") 1429 match = append(match, "crbug_224618") 1430 match = append(match, "drawlines_with_local_matrix") 1431 match = append(match, "gradients_interesting") 1432 match = append(match, "manypathatlases_2048") 1433 match = append(match, "custommesh_cs_uniforms") 1434 match = append(match, "paint_alpha_normals_rt") 1435 match = append(match, "runtimefunctions") 1436 match = append(match, "savelayer_f16") 1437 match = append(match, "spiral_rt") 1438 match = append(match, "srgb_colorfilter") 1439 match = append(match, "strokedlines") 1440 match = append(match, "sweep_tiling") 1441 } 1442 1443 if len(skipped) > 0 { 1444 args = append(args, "--skip") 1445 args = append(args, skipped...) 1446 } 1447 1448 if len(match) > 0 { 1449 args = append(args, "--match") 1450 args = append(args, match...) 1451 } 1452 1453 // These devices run out of memory running RAW codec tests. Do not run them in 1454 // parallel 1455 // TODO(borenet): Previously this was `'Nexus5' in bot or 'Nexus9' in bot` 1456 // which also matched 'Nexus5x'. I added That here to maintain the 1457 // existing behavior, but we should verify that it's needed. 1458 if b.model("Nexus5", "Nexus5x", "Nexus9", "JioNext") { 1459 args = append(args, "--noRAW_threading") 1460 } 1461 1462 if b.extraConfig("NativeFonts") { 1463 args = append(args, "--nativeFonts") 1464 if !b.matchOs("Android") { 1465 args = append(args, "--paragraph_fonts", "extra_fonts") 1466 args = append(args, "--norun_paragraph_tests_needing_system_fonts") 1467 } 1468 } else { 1469 args = append(args, "--nonativeFonts") 1470 } 1471 1472 if b.extraConfig("GDI") { 1473 args = append(args, "--gdi") 1474 } 1475 1476 if b.extraConfig("Fontations") { 1477 args = append(args, "--fontations") 1478 } 1479 1480 // Let's make all tasks produce verbose output by default. 1481 args = append(args, "--verbose") 1482 1483 // See skia:2789. 1484 if b.extraConfig("AbandonGpuContext") { 1485 args = append(args, "--abandonGpuContext") 1486 } 1487 if b.extraConfig("PreAbandonGpuContext") { 1488 args = append(args, "--preAbandonGpuContext") 1489 } 1490 if b.extraConfig("ReleaseAndAbandonGpuContext") { 1491 args = append(args, "--releaseAndAbandonGpuContext") 1492 } 1493 1494 if b.extraConfig("NeverYield") { 1495 args = append(args, "--neverYieldToWebGPU") 1496 } 1497 1498 if b.extraConfig("FailFlushTimeCallbacks") { 1499 args = append(args, "--failFlushTimeCallbacks") 1500 } 1501 1502 // Finalize the DM flags and properties. 1503 b.recipeProp("dm_flags", marshalJson(args)) 1504 b.recipeProp("dm_properties", marshalJson(properties)) 1505 1506 // Add properties indicating which assets the task should use. 1507 if b.matchExtraConfig("Lottie") { 1508 b.asset("lottie-samples") 1509 b.recipeProp("lotties", "true") 1510 } else if b.matchExtraConfig("OldestSupportedSkpVersion") { 1511 b.recipeProp("skps", "true") 1512 } else { 1513 b.asset("skimage") 1514 b.recipeProp("images", "true") 1515 b.asset("skp") 1516 b.recipeProp("skps", "true") 1517 b.asset("svg") 1518 b.recipeProp("svgs", "true") 1519 } 1520 b.recipeProp("do_upload", fmt.Sprintf("%t", b.doUpload())) 1521 b.recipeProp("resources", "true") 1522} 1523