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