xref: /aosp_15_r20/external/skia/infra/bots/gen_tasks_logic/dm_flags.go (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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.gpu("AppleM1") {
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("Spin513") {
555			// skbug.com/11876
556			skip(ALL, "test", ALL, "Programs")
557			// skbug.com/12486
558			skip(ALL, "test", ALL, "TestMockContext")
559			skip(ALL, "test", ALL, "TestGpuRenderingContexts")
560			skip(ALL, "test", ALL, "TestGpuAllContexts")
561			skip(ALL, "test", ALL, "TextBlobCache")
562			skip(ALL, "test", ALL, "OverdrawSurface_Gpu")
563			skip(ALL, "test", ALL, "ReplaceSurfaceBackendTexture")
564			skip(ALL, "test", ALL, "SurfaceAttachStencil_Gpu")
565			skip(ALL, "test", ALL, "SurfacePartialDraw_Gpu")
566			skip(ALL, "test", ALL, "SurfaceWrappedWithRelease_Gpu")
567		}
568
569		// skbug.com/9043 - these devices render this test incorrectly
570		// when opList splitting reduction is enabled
571		if b.gpu() && b.extraConfig("Vulkan") && (b.gpu("RadeonR9M470X", "RadeonHD7770")) {
572			skip(ALL, "tests", ALL, "VkDrawableImportTest")
573		}
574		if b.extraConfig("Vulkan") && !b.extraConfig("Graphite") {
575			configs = []string{"vk"}
576			// MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926, skia:9023
577			if !b.matchGpu("Intel") {
578				configs = append(configs, "vkmsaa4")
579			}
580			// Temporarily limit the machines we test dynamic MSAA on.
581			if b.gpu("QuadroP400", "MaliG77") && !b.extraConfig("TSAN") {
582				configs = append(configs, "vkdmsaa")
583			}
584		}
585		if b.extraConfig("Metal") && !b.extraConfig("Graphite") {
586			configs = []string{"mtl"}
587			// MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
588			if !b.matchGpu("Intel") {
589				configs = append(configs, "mtlmsaa4")
590			}
591		}
592		if b.extraConfig("Slug") {
593			// Test slug drawing
594			configs = []string{"glslug", "glserializeslug", "glremoteslug"}
595			// glremoteslug does not handle layers right. Exclude the tests for now.
596			skip("glremoteslug", "gm", ALL, "rtif_distort")
597			skip("glremoteslug", "gm", ALL, "textfilter_image")
598			skip("glremoteslug", "gm", ALL, "textfilter_color")
599			skip("glremoteslug", "gm", ALL, "savelayerpreservelcdtext")
600			skip("glremoteslug", "gm", ALL, "typefacerendering_pfa")
601			skip("glremoteslug", "gm", ALL, "typefacerendering_pfb")
602			skip("glremoteslug", "gm", ALL, "typefacerendering")
603		}
604		if b.extraConfig("Direct3D") {
605			configs = []string{"d3d"}
606		}
607
608		// Test 1010102 on our Linux/NVIDIA tasks and the persistent cache config
609		// on the GL tasks.
610		if b.gpu("QuadroP400") && !b.extraConfig("PreAbandonGpuContext") && !b.extraConfig("TSAN") && b.isLinux() &&
611			!b.extraConfig("FailFlushTimeCallbacks") && !b.extraConfig("Graphite") {
612			if b.extraConfig("Vulkan") {
613				configs = append(configs, "vk1010102")
614				// Decoding transparent images to 1010102 just looks bad
615				skip("vk1010102", "image", ALL, ALL)
616			} else {
617				configs = append(configs, "gl1010102", "gltestpersistentcache", "gltestglslcache", "gltestprecompile")
618				// Decoding transparent images to 1010102 just looks bad
619				skip("gl1010102", "image", ALL, ALL)
620				// These tests produce slightly different pixels run to run on NV.
621				skip("gltestpersistentcache", "gm", ALL, "atlastext")
622				skip("gltestpersistentcache", "gm", ALL, "dftext")
623				skip("gltestpersistentcache", "gm", ALL, "glyph_pos_h_b")
624				skip("gltestpersistentcache", "gm", ALL, "glyph_pos_h_f")
625				skip("gltestpersistentcache", "gm", ALL, "glyph_pos_n_f")
626				skip("gltestglslcache", "gm", ALL, "atlastext")
627				skip("gltestglslcache", "gm", ALL, "dftext")
628				skip("gltestglslcache", "gm", ALL, "glyph_pos_h_b")
629				skip("gltestglslcache", "gm", ALL, "glyph_pos_h_f")
630				skip("gltestglslcache", "gm", ALL, "glyph_pos_n_f")
631				skip("gltestprecompile", "gm", ALL, "atlastext")
632				skip("gltestprecompile", "gm", ALL, "dftext")
633				skip("gltestprecompile", "gm", ALL, "glyph_pos_h_b")
634				skip("gltestprecompile", "gm", ALL, "glyph_pos_h_f")
635				skip("gltestprecompile", "gm", ALL, "glyph_pos_n_f")
636				// Tessellation shaders do not yet participate in the persistent cache.
637				skip("gltestpersistentcache", "gm", ALL, "tessellation")
638				skip("gltestglslcache", "gm", ALL, "tessellation")
639				skip("gltestprecompile", "gm", ALL, "tessellation")
640			}
641		}
642
643		// We also test the SkSL precompile config on Pixel2XL as a representative
644		// Android device - this feature is primarily used by Flutter.
645		if b.model("Pixel2XL") && !b.extraConfig("Vulkan") {
646			configs = append(configs, "glestestprecompile")
647		}
648
649		// Test SkSL precompile on iPhone 8 as representative iOS device
650		if b.model("iPhone8") && b.extraConfig("Metal") {
651			configs = append(configs, "mtltestprecompile")
652			// avoid tests that can generate slightly different pixels per run
653			skip("mtltestprecompile", "gm", ALL, "atlastext")
654			skip("mtltestprecompile", "gm", ALL, "circular_arcs_hairline")
655			skip("mtltestprecompile", "gm", ALL, "dashcircle")
656			skip("mtltestprecompile", "gm", ALL, "dftext")
657			skip("mtltestprecompile", "gm", ALL, "encode-platform")
658			skip("mtltestprecompile", "gm", ALL, "fontmgr_bounds")
659			skip("mtltestprecompile", "gm", ALL, "fontmgr_bounds_1_-0.25")
660			skip("mtltestprecompile", "gm", ALL, "glyph_pos_h_b")
661			skip("mtltestprecompile", "gm", ALL, "glyph_pos_h_f")
662			skip("mtltestprecompile", "gm", ALL, "glyph_pos_n_f")
663			skip("mtltestprecompile", "gm", ALL, "persp_images")
664			skip("mtltestprecompile", "gm", ALL, "ovals")
665			skip("mtltestprecompile", "gm", ALL, "roundrects")
666			skip("mtltestprecompile", "gm", ALL, "shadow_utils_occl")
667			skip("mtltestprecompile", "gm", ALL, "strokedlines")
668			skip("mtltestprecompile", "gm", ALL, "strokerect")
669			skip("mtltestprecompile", "gm", ALL, "strokes3")
670			skip("mtltestprecompile", "gm", ALL, "texel_subset_linear_mipmap_nearest_down")
671			skip("mtltestprecompile", "gm", ALL, "texel_subset_linear_mipmap_linear_down")
672			skip("mtltestprecompile", "gm", ALL, "textblobmixedsizes_df")
673			skip("mtltestprecompile", "gm", ALL, "yuv420_odd_dim_repeat")
674			skip("mtltestprecompile", "svg", ALL, "A_large_blank_world_map_with_oceans_marked_in_blue.svg")
675			skip("mtltestprecompile", "svg", ALL, "Chalkboard.svg")
676			skip("mtltestprecompile", "svg", ALL, "Ghostscript_Tiger.svg")
677			skip("mtltestprecompile", "svg", ALL, "Seal_of_American_Samoa.svg")
678			skip("mtltestprecompile", "svg", ALL, "Seal_of_Illinois.svg")
679			skip("mtltestprecompile", "svg", ALL, "cartman.svg")
680			skip("mtltestprecompile", "svg", ALL, "desk_motionmark_paths.svg")
681			skip("mtltestprecompile", "svg", ALL, "rg1024_green_grapes.svg")
682			skip("mtltestprecompile", "svg", ALL, "shapes-intro-02-f.svg")
683			skip("mtltestprecompile", "svg", ALL, "tiger-8.svg")
684		}
685		// Test reduced shader mode on iPhone 11 as representative iOS device
686		if b.model("iPhone11") && b.extraConfig("Metal") && !b.extraConfig("Graphite") {
687			configs = append(configs, "mtlreducedshaders")
688		}
689
690		if b.model(DONT_REDUCE_OPS_TASK_SPLITTING_MODELS...) {
691			args = append(args, "--dontReduceOpsTaskSplitting", "true")
692		}
693
694		// Test reduceOpsTaskSplitting fallback when over budget.
695		if b.model("NUC7i5BNK") && b.extraConfig("ASAN") {
696			args = append(args, "--gpuResourceCacheLimit", "16777216")
697		}
698
699		// Test rendering to wrapped dsts on a few tasks
700		if b.extraConfig("BonusConfigs") {
701			configs = []string{"glbetex", "glbert", "glreducedshaders", "glr8"}
702		}
703
704		if b.os("ChromeOS") {
705			// Just run GLES for now - maybe add gles_msaa4 in the future
706			configs = []string{"gles"}
707		}
708
709		// Test GPU tessellation path renderer.
710		if b.extraConfig("GpuTess") {
711			configs = []string{glPrefix + "msaa4"}
712			// Use fixed count tessellation path renderers as much as possible.
713			args = append(args, "--pr", "atlas", "tess")
714		}
715
716		// DDL is a GPU-only feature
717		if b.extraConfig("DDL1") {
718			// This bot generates comparison images for the large skps and the gms
719			configs = filter(configs, "gl", "vk", "mtl")
720			args = append(args, "--skpViewportSize", "2048")
721		}
722		if b.extraConfig("DDL3") {
723			// This bot generates the real ddl images for the large skps and the gms
724			configs = suffix(filter(configs, "gl", "vk", "mtl"), "ddl")
725			args = append(args, "--skpViewportSize", "2048")
726			args = append(args, "--gpuThreads", "0")
727		}
728	}
729
730	if b.matchExtraConfig("ColorSpaces") {
731		// Here we're going to generate a bunch of configs with the format:
732		//        <colorspace> <backend> <targetFormat>
733		// Where: <colorspace> is one of:   "", "linear-", "narrow-", p3-", "rec2020-", "srgb2-"
734		//        <backend> is one of: "gl, "gles", "mtl", "vk"
735		//                             their "gr" prefixed versions
736		//                             and "" (for raster)
737		//        <targetFormat> is one of: "f16", { "" (for gpus) or "rgba" (for raster) }
738		//
739		// We also add on two configs with the format:
740		//        narrow-<backend>f16norm
741		//        linear-<backend>srgba
742		colorSpaces := []string{"", "linear-", "narrow-", "p3-", "rec2020-", "srgb2-"}
743
744		backendStr := ""
745		if b.gpu() {
746			if b.extraConfig("Graphite") {
747				if b.extraConfig("GL") {
748					backendStr = "grgl"
749				} else if b.extraConfig("GLES") {
750					backendStr = "grgles"
751				} else if b.extraConfig("Metal") {
752					backendStr = "grmtl"
753				} else if b.extraConfig("Vulkan") {
754					backendStr = "grvk"
755				}
756			} else {
757				if b.extraConfig("GL") {
758					backendStr = "gl"
759				} else if b.extraConfig("GLES") {
760					backendStr = "gles"
761				} else if b.extraConfig("Metal") {
762					backendStr = "mtl"
763				} else if b.extraConfig("Vulkan") {
764					backendStr = "vk"
765				}
766			}
767		}
768
769		targetFormats := []string{"f16"}
770		if b.gpu() {
771			targetFormats = append(targetFormats, "")
772		} else {
773			targetFormats = append(targetFormats, "rgba")
774		}
775
776		configs = []string{}
777
778		for _, cs := range colorSpaces {
779			for _, tf := range targetFormats {
780				configs = append(configs, cs+backendStr+tf)
781			}
782		}
783
784		configs = append(configs, "narrow-"+backendStr+"f16norm")
785		configs = append(configs, "linear-"+backendStr+"srgba")
786	}
787
788	// Sharding.
789	tf := b.parts["test_filter"]
790	if tf != "" && tf != "All" {
791		// Expected format: shard_XX_YY
792		split := strings.Split(tf, ALL)
793		if len(split) == 3 {
794			args = append(args, "--shard", split[1])
795			args = append(args, "--shards", split[2])
796		} else {
797			glog.Fatalf("Invalid task name - bad shards: %s", tf)
798		}
799	}
800
801	args = append(args, "--config")
802	args = append(args, configs...)
803
804	removeFromArgs := func(arg string) {
805		args = remove(args, arg)
806	}
807
808	// Run tests, gms, and image decoding tests everywhere.
809	args = append(args, "--src", "tests", "gm", "image", "lottie", "colorImage", "svg", "skp")
810	if b.gpu() {
811		// Don't run the "svgparse_*" svgs on GPU.
812		skip(ALL, "svg", ALL, "svgparse_")
813	} else if b.Name == "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" {
814		// Only run the CPU SVGs on 8888.
815		skip("~8888", "svg", ALL, ALL)
816	} else {
817		// On CPU SVGs we only care about parsing. Only run them on the above bot.
818		removeFromArgs("svg")
819	}
820
821	// Eventually I'd like these to pass, but for now just skip 'em.
822	if b.extraConfig("SK_FORCE_RASTER_PIPELINE_BLITTER") {
823		removeFromArgs("tests")
824	}
825
826	if b.model("Spin513") {
827		removeFromArgs("tests")
828	}
829
830	if b.extraConfig("NativeFonts") { // images won't exercise native font integration :)
831		removeFromArgs("image")
832		removeFromArgs("colorImage")
833	}
834
835	if b.matchExtraConfig("Graphite") {
836		removeFromArgs("image")
837		removeFromArgs("lottie")
838		removeFromArgs("colorImage")
839		removeFromArgs("svg")
840	}
841
842	if b.matchExtraConfig("Fontations") {
843		// The only fontations code is exercised via gms and tests
844		removeFromArgs("image")
845		removeFromArgs("lottie")
846		removeFromArgs("colorImage")
847		removeFromArgs("svg")
848	}
849
850	// Remove skps for all tasks except for a select few. On tasks that will run SKPs remove some of
851	// their other tests.
852	if b.matchExtraConfig("DDL", "PDF") {
853		// The DDL and PDF tasks just render the large skps and the gms
854		removeFromArgs("tests")
855		removeFromArgs("image")
856		removeFromArgs("colorImage")
857		removeFromArgs("svg")
858	} else if b.matchExtraConfig("OldestSupportedSkpVersion") {
859		// The OldestSupportedSkpVersion bot only renders skps.
860		removeFromArgs("tests")
861		removeFromArgs("gm")
862		removeFromArgs("image")
863		removeFromArgs("colorImage")
864		removeFromArgs("svg")
865	} else if b.matchExtraConfig("FailFlushTimeCallbacks") {
866		// The FailFlushTimeCallbacks bot only runs skps, gms and svgs
867		removeFromArgs("tests")
868		removeFromArgs("image")
869		removeFromArgs("colorImage")
870	} else if b.extraConfig("Protected") {
871		// Currently the Protected jobs only run the unit tests
872		removeFromArgs("gm")
873		removeFromArgs("image")
874		removeFromArgs("lottie")
875		removeFromArgs("colorImage")
876		removeFromArgs("svg")
877		removeFromArgs("skp")
878	} else {
879		// No other tasks render the .skps.
880		removeFromArgs("skp")
881	}
882
883	if b.extraConfig("Lottie") {
884		// Only run the lotties on Lottie tasks.
885		removeFromArgs("tests")
886		removeFromArgs("gm")
887		removeFromArgs("image")
888		removeFromArgs("colorImage")
889		removeFromArgs("svg")
890		removeFromArgs("skp")
891	} else {
892		removeFromArgs("lottie")
893	}
894
895	if b.extraConfig("TSAN") {
896		// skbug.com/10848
897		removeFromArgs("svg")
898		// skbug.com/12900 avoid OOM on
899		//   Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan
900		// Avoid lots of spurious TSAN failures on
901		//   Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-TSAN_Vulkan
902		//   Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_TSAN_Vulkan
903		if b.Name == "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan" ||
904			b.Name == "Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-TSAN_Vulkan" ||
905			b.Name == "Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_TSAN_Vulkan" {
906			skip("_", "test", "_", "_")
907		}
908	}
909
910	// TODO: ???
911	skip("f16", ALL, ALL, "dstreadshuffle")
912
913	// --src image --config r8 means "decode into R8", which isn't supported.
914	skip("r8", "image", ALL, ALL)
915	skip("r8", "colorImage", ALL, ALL)
916
917	if b.extraConfig("Valgrind") {
918		// These take 18+ hours to run.
919		skip("pdf", "gm", ALL, "fontmgr_iter")
920		skip("pdf", ALL, ALL, "PANO_20121023_214540.jpg")
921		skip("pdf", "skp", ALL, "worldjournal")
922		skip("pdf", "skp", ALL, "desk_baidu.skp")
923		skip("pdf", "skp", ALL, "desk_wikipedia.skp")
924		skip(ALL, "svg", ALL, ALL)
925		// skbug.com/9171 and 8847
926		skip(ALL, "test", ALL, "InitialTextureClear")
927	}
928
929	if b.model("TecnoSpark3Pro", "Wembley") {
930		// skbug.com/9421
931		skip(ALL, "test", ALL, "InitialTextureClear")
932	}
933
934	if b.model("Wembley", "JioNext") {
935		// These tests run forever on the Wembley.
936		skip(ALL, "gm", ALL, "async_rescale_and_read")
937	}
938
939	if b.model("Wembley") {
940		// These tests run forever or use too many resources on the Wembley.
941		skip(ALL, "gm", ALL, "wacky_yuv_formats")
942		skip(ALL, "gm", ALL, "wacky_yuv_formats_cs")
943		skip(ALL, "gm", ALL, "wacky_yuv_formats_cubic")
944		skip(ALL, "gm", ALL, "wacky_yuv_formats_domain")
945		skip(ALL, "gm", ALL, "wacky_yuv_formats_fromimages")
946		skip(ALL, "gm", ALL, "wacky_yuv_formats_frompixmaps")
947		skip(ALL, "gm", ALL, "wacky_yuv_formats_imggen")
948		skip(ALL, "gm", ALL, "wacky_yuv_formats_limited")
949		skip(ALL, "gm", ALL, "wacky_yuv_formats_limited_cs")
950		skip(ALL, "gm", ALL, "wacky_yuv_formats_limited_fromimages")
951	}
952
953	if b.os("iOS") {
954		skip(glPrefix, "skp", ALL, ALL)
955	}
956
957	if b.matchOs("Mac", "iOS") {
958		// CG fails on questionable bmps
959		skip(ALL, "image", "gen_platf", "rgba32abf.bmp")
960		skip(ALL, "image", "gen_platf", "rgb24prof.bmp")
961		skip(ALL, "image", "gen_platf", "rgb24lprof.bmp")
962		skip(ALL, "image", "gen_platf", "8bpp-pixeldata-cropped.bmp")
963		skip(ALL, "image", "gen_platf", "4bpp-pixeldata-cropped.bmp")
964		skip(ALL, "image", "gen_platf", "32bpp-pixeldata-cropped.bmp")
965		skip(ALL, "image", "gen_platf", "24bpp-pixeldata-cropped.bmp")
966
967		// CG has unpredictable behavior on this questionable gif
968		// It's probably using uninitialized memory
969		skip(ALL, "image", "gen_platf", "frame_larger_than_image.gif")
970
971		// CG has unpredictable behavior on incomplete pngs
972		// skbug.com/5774
973		skip(ALL, "image", "gen_platf", "inc0.png")
974		skip(ALL, "image", "gen_platf", "inc1.png")
975		skip(ALL, "image", "gen_platf", "inc2.png")
976		skip(ALL, "image", "gen_platf", "inc3.png")
977		skip(ALL, "image", "gen_platf", "inc4.png")
978		skip(ALL, "image", "gen_platf", "inc5.png")
979		skip(ALL, "image", "gen_platf", "inc6.png")
980		skip(ALL, "image", "gen_platf", "inc7.png")
981		skip(ALL, "image", "gen_platf", "inc8.png")
982		skip(ALL, "image", "gen_platf", "inc9.png")
983		skip(ALL, "image", "gen_platf", "inc10.png")
984		skip(ALL, "image", "gen_platf", "inc11.png")
985		skip(ALL, "image", "gen_platf", "inc12.png")
986		skip(ALL, "image", "gen_platf", "inc13.png")
987		skip(ALL, "image", "gen_platf", "inc14.png")
988		skip(ALL, "image", "gen_platf", "incInterlaced.png")
989
990		// These images fail after Mac 10.13.1 upgrade.
991		skip(ALL, "image", "gen_platf", "incInterlaced.gif")
992		skip(ALL, "image", "gen_platf", "inc1.gif")
993		skip(ALL, "image", "gen_platf", "inc0.gif")
994		skip(ALL, "image", "gen_platf", "butterfly.gif")
995	}
996
997	// WIC fails on questionable bmps
998	if b.matchOs("Win") {
999		skip(ALL, "image", "gen_platf", "pal8os2v2.bmp")
1000		skip(ALL, "image", "gen_platf", "pal8os2v2-16.bmp")
1001		skip(ALL, "image", "gen_platf", "rgba32abf.bmp")
1002		skip(ALL, "image", "gen_platf", "rgb24prof.bmp")
1003		skip(ALL, "image", "gen_platf", "rgb24lprof.bmp")
1004		skip(ALL, "image", "gen_platf", "8bpp-pixeldata-cropped.bmp")
1005		skip(ALL, "image", "gen_platf", "4bpp-pixeldata-cropped.bmp")
1006		skip(ALL, "image", "gen_platf", "32bpp-pixeldata-cropped.bmp")
1007		skip(ALL, "image", "gen_platf", "24bpp-pixeldata-cropped.bmp")
1008		if b.arch("x86_64") && b.cpu() {
1009			// This GM triggers a SkSmallAllocator assert.
1010			skip(ALL, "gm", ALL, "composeshader_bitmap")
1011		}
1012	}
1013
1014	if !b.matchOs("Win", "Debian11", "Ubuntu18") || b.gpu("IntelIris655", "IntelIris540") {
1015		// This test requires a decent max texture size so just run it on the desktops.
1016		// The OS list should include Mac but Mac10.13 doesn't work correctly.
1017		// The IntelIris655 and IntelIris540 GPUs don't work correctly in the Vk backend
1018		skip(ALL, "test", ALL, "BigImageTest_Ganesh")
1019	}
1020
1021	if b.matchOs("Win", "Mac") {
1022		// WIC and CG fail on arithmetic jpegs
1023		skip(ALL, "image", "gen_platf", "testimgari.jpg")
1024		// More questionable bmps that fail on Mac, too. skbug.com/6984
1025		skip(ALL, "image", "gen_platf", "rle8-height-negative.bmp")
1026		skip(ALL, "image", "gen_platf", "rle4-height-negative.bmp")
1027	}
1028
1029	// These PNGs have CRC errors. The platform generators seem to draw
1030	// uninitialized memory without reporting an error, so skip them to
1031	// avoid lots of images on Gold.
1032	skip(ALL, "image", "gen_platf", "error")
1033
1034	if b.matchOs("Android") || b.os("iOS") {
1035		// This test crashes the N9 (perhaps because of large malloc/frees). It also
1036		// is fairly slow and not platform-specific. So we just disable it on all of
1037		// Android and iOS. skia:5438
1038		skip(ALL, "test", ALL, "GrStyledShape")
1039	}
1040
1041	if internalHardwareLabel == "5" {
1042		// http://b/118312149#comment9
1043		skip(ALL, "test", ALL, "SRGBReadWritePixels")
1044	}
1045
1046	// skia:4095
1047	badSerializeGMs := []string{
1048		"strict_constraint_batch_no_red_allowed", // https://crbug.com/skia/10278
1049		"strict_constraint_no_red_allowed",       // https://crbug.com/skia/10278
1050		"fast_constraint_red_is_allowed",         // https://crbug.com/skia/10278
1051		"c_gms",
1052		"colortype",
1053		"colortype_xfermodes",
1054		"drawfilter",
1055		"fontmgr_bounds_0.75_0",
1056		"fontmgr_bounds_1_-0.25",
1057		"fontmgr_bounds",
1058		"fontmgr_match",
1059		"fontmgr_iter",
1060		"imagemasksubset",
1061		"wacky_yuv_formats_domain",
1062		"imagemakewithfilter",
1063		"imagemakewithfilter_crop",
1064		"imagemakewithfilter_crop_ref",
1065		"imagemakewithfilter_ref",
1066		"imagefilterstransformed",
1067	}
1068
1069	// skia:5589
1070	badSerializeGMs = append(badSerializeGMs,
1071		"bitmapfilters",
1072		"bitmapshaders",
1073		"convex_poly_clip",
1074		"extractalpha",
1075		"filterbitmap_checkerboard_32_32_g8",
1076		"filterbitmap_image_mandrill_64",
1077		"shadows",
1078		"simpleaaclip_aaclip",
1079	)
1080
1081	// skia:5595
1082	badSerializeGMs = append(badSerializeGMs,
1083		"composeshader_bitmap",
1084		"scaled_tilemodes_npot",
1085		"scaled_tilemodes",
1086	)
1087
1088	// skia:5778
1089	badSerializeGMs = append(badSerializeGMs, "typefacerendering_pfaMac")
1090	// skia:5942
1091	badSerializeGMs = append(badSerializeGMs, "parsedpaths")
1092
1093	// these use a custom image generator which doesn't serialize
1094	badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_rect")
1095	badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_shader")
1096
1097	// skia:6189
1098	badSerializeGMs = append(badSerializeGMs, "shadow_utils")
1099	badSerializeGMs = append(badSerializeGMs, "graphitestart")
1100
1101	// skia:7938
1102	badSerializeGMs = append(badSerializeGMs, "persp_images")
1103
1104	// Not expected to round trip encoding/decoding.
1105	badSerializeGMs = append(badSerializeGMs, "all_bitmap_configs")
1106	badSerializeGMs = append(badSerializeGMs, "makecolorspace")
1107	badSerializeGMs = append(badSerializeGMs, "readpixels")
1108	badSerializeGMs = append(badSerializeGMs, "draw_image_set_rect_to_rect")
1109	badSerializeGMs = append(badSerializeGMs, "draw_image_set_alpha_only")
1110	badSerializeGMs = append(badSerializeGMs, "compositor_quads_shader")
1111	badSerializeGMs = append(badSerializeGMs, "wacky_yuv_formats_qtr")
1112	badSerializeGMs = append(badSerializeGMs, "runtime_effect_image")
1113	badSerializeGMs = append(badSerializeGMs, "ctmpatheffect")
1114	badSerializeGMs = append(badSerializeGMs, "image_out_of_gamut")
1115
1116	// This GM forces a path to be convex. That property doesn't survive
1117	// serialization.
1118	badSerializeGMs = append(badSerializeGMs, "analytic_antialias_convex")
1119
1120	for _, test := range badSerializeGMs {
1121		skip("serialize-8888", "gm", ALL, test)
1122	}
1123
1124	// We skip these to avoid out-of-memory failures.
1125	if b.matchOs("Win", "Android") {
1126		for _, test := range []string{"verylargebitmap", "verylarge_picture_image"} {
1127			skip("serialize-8888", "gm", ALL, test)
1128		}
1129	}
1130	if b.matchOs("Mac") && b.cpu() {
1131		// skia:6992
1132		skip("pic-8888", "gm", ALL, "encode-platform")
1133		skip("serialize-8888", "gm", ALL, "encode-platform")
1134	}
1135
1136	// skia:14411 -- images are visibly identical, not interested in diagnosing non-determinism here
1137	skip("pic-8888", "gm", ALL, "perlinnoise_layered")
1138	skip("serialize-8888", "gm", ALL, "perlinnoise_layered")
1139	if b.gpu("IntelIrisXe") && !b.extraConfig("Vulkan") {
1140		skip(ALL, "gm", ALL, "perlinnoise_layered") // skia:14411
1141	}
1142
1143	if b.gpu("IntelIrisXe") && b.matchOs("Win") && b.extraConfig("Vulkan") {
1144		skip(ALL, "tests", ALL, "VkYCbcrSampler_DrawImageWithYcbcrSampler") // skia:14628
1145	}
1146
1147	// skia:4769
1148	skip("pic-8888", "gm", ALL, "drawfilter")
1149
1150	// skia:4703
1151	for _, test := range []string{"image-cacherator-from-picture",
1152		"image-cacherator-from-raster",
1153		"image-cacherator-from-ctable"} {
1154		skip("pic-8888", "gm", ALL, test)
1155		skip("serialize-8888", "gm", ALL, test)
1156	}
1157
1158	// GM that requires raster-backed canvas
1159	for _, test := range []string{"complexclip4_bw", "complexclip4_aa", "p3",
1160		"async_rescale_and_read_text_up_large",
1161		"async_rescale_and_read_text_up",
1162		"async_rescale_and_read_text_down",
1163		"async_rescale_and_read_dog_up",
1164		"async_rescale_and_read_dog_down",
1165		"async_rescale_and_read_rose",
1166		"async_rescale_and_read_no_bleed",
1167		"async_rescale_and_read_alpha_type"} {
1168		skip("pic-8888", "gm", ALL, test)
1169		skip("serialize-8888", "gm", ALL, test)
1170
1171		// GM requires canvas->makeSurface() to return a valid surface.
1172		// TODO(borenet): These should be just outside of this block but are
1173		// left here to match the recipe which has an indentation bug.
1174		skip("pic-8888", "gm", ALL, "blurrect_compare")
1175		skip("serialize-8888", "gm", ALL, "blurrect_compare")
1176	}
1177
1178	// Extensions for RAW images
1179	r := []string{
1180		"arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
1181		"ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW",
1182	}
1183
1184	// skbug.com/4888
1185	// Skip RAW images (and a few large PNGs) on GPU tasks
1186	// until we can resolve failures.
1187	if b.gpu() {
1188		skip(ALL, "image", ALL, "interlaced1.png")
1189		skip(ALL, "image", ALL, "interlaced2.png")
1190		skip(ALL, "image", ALL, "interlaced3.png")
1191		for _, rawExt := range r {
1192			skip(ALL, "image", ALL, "."+rawExt)
1193		}
1194	}
1195
1196	if b.model("Nexus5", "Nexus5x", "JioNext") && b.gpu() {
1197		// skia:5876
1198		skip(ALL, "gm", ALL, "encode-platform")
1199	}
1200
1201	if b.model("AndroidOne") && b.gpu() { // skia:4697, skia:4704, skia:4694, skia:4705, skia:11133
1202		skip(ALL, "gm", ALL, "bigblurs")
1203		skip(ALL, "gm", ALL, "strict_constraint_no_red_allowed")
1204		skip(ALL, "gm", ALL, "fast_constraint_red_is_allowed")
1205		skip(ALL, "gm", ALL, "dropshadowimagefilter")
1206		skip(ALL, "gm", ALL, "filterfastbounds")
1207		skip(glPrefix, "gm", ALL, "imageblurtiled")
1208		skip(ALL, "gm", ALL, "imagefiltersclipped")
1209		skip(ALL, "gm", ALL, "imagefiltersscaled")
1210		skip(ALL, "gm", ALL, "imageresizetiled")
1211		skip(ALL, "gm", ALL, "matrixconvolution")
1212		skip(ALL, "gm", ALL, "strokedlines")
1213		skip(ALL, "gm", ALL, "runtime_intrinsics_matrix")
1214		if sampleCount > 0 {
1215			glMsaaConfig := fmt.Sprintf("%smsaa%d", glPrefix, sampleCount)
1216			skip(glMsaaConfig, "gm", ALL, "imageblurtiled")
1217			skip(glMsaaConfig, "gm", ALL, "imagefiltersbase")
1218		}
1219	}
1220
1221	// b/296440036
1222	// disable broken tests on Adreno 5/6xx Vulkan or API30
1223	if b.matchGpu("Adreno[56]") && (b.extraConfig("Vulkan") || b.extraConfig("API30")) {
1224		skip(ALL, "tests", ALL, "ImageAsyncReadPixels_Renderable_BottomLeft")
1225		skip(ALL, "tests", ALL, "ImageAsyncReadPixels_Renderable_TopLeft")
1226		skip(ALL, "tests", ALL, "ImageAsyncReadPixels_NonRenderable_BottomLeft")
1227		skip(ALL, "tests", ALL, "ImageAsyncReadPixels_NonRenderable_TopLeft")
1228		skip(ALL, "tests", ALL, "SurfaceAsyncReadPixels")
1229	}
1230
1231	if b.matchGpu("Adreno[56]") && b.extraConfig("Vulkan") {
1232		skip(ALL, "gm", ALL, "mesh_with_image")
1233		skip(ALL, "gm", ALL, "mesh_with_paint_color")
1234		skip(ALL, "gm", ALL, "mesh_with_paint_image")
1235	}
1236
1237	if b.matchGpu("Mali400") {
1238		skip(ALL, "tests", ALL, "BlendRequiringDstReadWithLargeCoordinates")
1239		skip(ALL, "tests", ALL, "SkSLCross") // despite the name, it's not in SkSLTest.cpp
1240	}
1241
1242	if b.matchOs("Mac") && (b.gpu("IntelIrisPlus") || b.gpu("IntelHD6000")) &&
1243		b.extraConfig("Metal") {
1244		// TODO(skia:296960708): The IntelIrisPlus+Metal config hangs on this test, but passes
1245		// SurfaceContextWritePixelsMipped so let that one keep running.
1246		skip(ALL, "tests", ALL, "SurfaceContextWritePixels")
1247		skip(ALL, "tests", ALL, "SurfaceContextWritePixelsMipped")
1248		skip(ALL, "tests", ALL, "ImageAsyncReadPixels")
1249		skip(ALL, "tests", ALL, "SurfaceAsyncReadPixels")
1250	}
1251
1252	if b.extraConfig("ANGLE") && b.matchOs("Win") && b.matchGpu("IntelIris(540|655|Xe)") {
1253		skip(ALL, "tests", ALL, "ImageFilterCropRect_Gpu") // b/294080402
1254	}
1255
1256	if b.gpu("RTX3060") && b.extraConfig("Vulkan") && b.matchOs("Win") {
1257		skip(ALL, "gm", ALL, "blurcircles2") // skia:13342
1258	}
1259
1260	if b.gpu("QuadroP400") && b.matchOs("Win10") && b.matchModel("Golo") {
1261		// Times out with driver 30.0.15.1179
1262		skip("vkmsaa4", "gm", ALL, "shadow_utils")
1263	}
1264
1265	if b.gpu("RadeonR9M470X") && b.extraConfig("ANGLE") {
1266		// skbug:14293 - ANGLE D3D9 ES2 has flaky texture sampling that leads to fuzzy diff errors
1267		skip(ALL, "tests", ALL, "FilterResult")
1268		// skbug:13815 - Flaky failures on ANGLE D3D9 ES2
1269		skip(ALL, "tests", ALL, "SkRuntimeEffectSimple_Ganesh")
1270		skip(ALL, "tests", ALL, "TestSweepGradientZeroXGanesh")
1271	}
1272
1273	if b.extraConfig("Vulkan") && b.gpu("RadeonVega6") {
1274		skip(ALL, "gm", ALL, "ycbcrimage")                                 // skia:13265
1275		skip(ALL, "test", ALL, "VkYCbcrSampler_DrawImageWithYcbcrSampler") // skia:13265
1276	}
1277
1278	match := []string{}
1279
1280	if b.extraConfig("Graphite") {
1281		// Graphite doesn't do auto-image-tiling so these GMs should remain disabled
1282		match = append(match, "~^verylarge_picture_image$")
1283		match = append(match, "~^verylargebitmap$")
1284		match = append(match, "~^path_huge_aa$")
1285		match = append(match, "~^fast_constraint_red_is_allowed$")
1286		match = append(match, "~^strict_constraint_batch_no_red_allowed$")
1287		match = append(match, "~^strict_constraint_no_red_allowed$")
1288	}
1289
1290	if b.extraConfig("Valgrind") { // skia:3021
1291		match = append(match, "~Threaded")
1292	}
1293
1294	if b.extraConfig("Valgrind") && b.extraConfig("PreAbandonGpuContext") {
1295		// skia:6575
1296		match = append(match, "~multipicturedraw_")
1297	}
1298
1299	if b.model("AndroidOne") {
1300		match = append(match, "~WritePixels")                             // skia:4711
1301		match = append(match, "~PremulAlphaRoundTrip_Gpu")                // skia:7501
1302		match = append(match, "~ReimportImageTextureWithMipLevels")       // skia:8090
1303		match = append(match, "~MorphologyFilterRadiusWithMirrorCTM_Gpu") // skia:10383
1304	}
1305
1306	if b.gpu("IntelIrisXe") {
1307		match = append(match, "~ReimportImageTextureWithMipLevels")
1308	}
1309
1310	if b.extraConfig("MSAN") {
1311		match = append(match, "~Once", "~Shared") // Not sure what's up with these tests.
1312	}
1313
1314	// By default, we test with GPU threading enabled, unless specifically
1315	// disabled.
1316	if b.extraConfig("NoGPUThreads") {
1317		args = append(args, "--gpuThreads", "0")
1318	}
1319
1320	if b.extraConfig("Vulkan") && b.gpu("Adreno530") {
1321		// skia:5777
1322		match = append(match, "~CopySurface")
1323	}
1324
1325	// Pixel4XL on the tree is still on Android 10 (Q), and the vulkan drivers
1326	// crash during this GM. It works correctly on newer versions of Android.
1327	// The Pixel3a is also failing on this GM with an invalid return value from
1328	// vkCreateGraphicPipelines.
1329	if b.extraConfig("Vulkan") && (b.model("Pixel4XL") || b.model("Pixel3a")) {
1330		skip("vk", "gm", ALL, "custommesh_cs_uniforms")
1331	}
1332
1333	if b.extraConfig("Vulkan") && b.matchGpu("Adreno") {
1334		// skia:7663
1335		match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
1336		match = append(match, "~WritePixelsMSAA_Gpu")
1337	}
1338
1339	if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelIris640") {
1340		match = append(match, "~VkHeapTests") // skia:6245
1341	}
1342
1343	if b.isLinux() && b.gpu("IntelIris640") {
1344		match = append(match, "~Programs") // skia:7849
1345	}
1346
1347	if b.model("TecnoSpark3Pro", "Wembley") {
1348		// skia:9814
1349		match = append(match, "~Programs")
1350		match = append(match, "~ProcessorCloneTest")
1351		match = append(match, "~ProcessorOptimizationValidationTest")
1352	}
1353
1354	if b.gpu("IntelIris640", "IntelHD615", "IntelHDGraphics615") {
1355		match = append(match, "~^SRGBReadWritePixels$") // skia:9225
1356	}
1357
1358	if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelHD405") {
1359		// skia:7322
1360		skip("vk", "gm", ALL, "skbug_257")
1361		skip("vk", "gm", ALL, "filltypespersp")
1362		match = append(match, "~^ClearOp$")
1363		match = append(match, "~^CopySurface$")
1364		match = append(match, "~^ImageNewShader_GPU$")
1365		match = append(match, "~^InitialTextureClear$")
1366		match = append(match, "~^PinnedImageTest$")
1367		match = append(match, "~^ReadPixels_Gpu$")
1368		match = append(match, "~^ReadPixels_Texture$")
1369		match = append(match, "~^SRGBReadWritePixels$")
1370		match = append(match, "~^VkUploadPixelsTests$")
1371		match = append(match, "~^WritePixelsNonTexture_Gpu$")
1372		match = append(match, "~^WritePixelsNonTextureMSAA_Gpu$")
1373		match = append(match, "~^WritePixels_Gpu$")
1374		match = append(match, "~^WritePixelsMSAA_Gpu$")
1375	}
1376
1377	if b.extraConfig("Vulkan") && b.gpu("GTX660") && b.matchOs("Win") {
1378		// skbug.com/8047
1379		match = append(match, "~FloatingPointTextureTest$")
1380	}
1381
1382	if b.extraConfig("Metal") && !b.extraConfig("Graphite") && b.gpu("RadeonHD8870M") && b.matchOs("Mac") {
1383		// skia:9255
1384		match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
1385		// skbug.com/11366
1386		match = append(match, "~SurfacePartialDraw_Gpu")
1387	}
1388
1389	if b.extraConfig("Metal") && !b.extraConfig("Graphite") && b.gpu("PowerVRGX6450") && b.matchOs("iOS") {
1390		// skbug.com/11885
1391		match = append(match, "~flight_animated_image")
1392	}
1393
1394	if b.extraConfig("ANGLE") {
1395		// skia:7835
1396		match = append(match, "~BlurMaskBiggerThanDest")
1397	}
1398
1399	if b.gpu("IntelIris6100") && b.extraConfig("ANGLE") && !b.debug() {
1400		// skia:7376
1401		match = append(match, "~^ProcessorOptimizationValidationTest$")
1402	}
1403
1404	if b.gpu("IntelIris6100", "IntelHD4400") && b.extraConfig("ANGLE") {
1405		// skia:6857
1406		skip("angle_d3d9_es2", "gm", ALL, "lighting")
1407	}
1408
1409	if b.gpu("PowerVRGX6250") {
1410		match = append(match, "~gradients_view_perspective_nodither") //skia:6972
1411	}
1412
1413	if b.arch("arm") && b.extraConfig("ASAN") {
1414		// TODO: can we run with env allocator_may_return_null=1 instead?
1415		match = append(match, "~BadImage")
1416	}
1417
1418	if b.arch("arm64") && b.extraConfig("ASAN") {
1419		// skbug.com/13155 the use of longjmp may cause ASAN stack check issues.
1420		skip(ALL, "test", ALL, "SkPDF_JpegIdentification")
1421	}
1422
1423	if b.extraConfig("HWASAN") {
1424		// HWASAN adds tag bytes to pointers. That's incompatible with this test -- it compares
1425		// pointers from unrelated stack frames to check that RP isn't growing the stack.
1426		skip(ALL, "test", ALL, "SkRasterPipeline_stack_rewind")
1427	}
1428
1429	if b.matchOs("Mac") && b.gpu("IntelHD6000") {
1430		// skia:7574
1431		match = append(match, "~^ProcessorCloneTest$")
1432		match = append(match, "~^GrMeshTest$")
1433	}
1434
1435	if b.matchOs("Mac") && b.gpu("IntelHD615") {
1436		// skia:7603
1437		match = append(match, "~^GrMeshTest$")
1438	}
1439
1440	if b.matchOs("Mac") && b.gpu("IntelIrisPlus") {
1441		// skia:7603
1442		match = append(match, "~^GrMeshTest$")
1443	}
1444
1445	if b.extraConfig("Vulkan") && b.model("GalaxyS20") {
1446		// skia:10247
1447		match = append(match, "~VkPrepareForExternalIOQueueTransitionTest")
1448	}
1449	if b.matchExtraConfig("Graphite") {
1450		// skia:12813
1451		match = append(match, "~async_rescale_and_read")
1452	}
1453
1454	if b.matchExtraConfig("ColorSpaces") {
1455		// Here we reset the 'match' and 'skipped' strings bc the ColorSpaces job only runs
1456		// a very specific subset of the GMs.
1457		skipped = []string{}
1458		match = []string{}
1459		match = append(match, "async_rescale_and_read_dog_up")
1460		match = append(match, "bug6783")
1461		match = append(match, "colorspace")
1462		match = append(match, "colorspace2")
1463		match = append(match, "coloremoji")
1464		match = append(match, "composeCF")
1465		match = append(match, "crbug_224618")
1466		match = append(match, "drawlines_with_local_matrix")
1467		match = append(match, "gradients_interesting")
1468		match = append(match, "manypathatlases_2048")
1469		match = append(match, "custommesh_cs_uniforms")
1470		match = append(match, "paint_alpha_normals_rt")
1471		match = append(match, "runtimefunctions")
1472		match = append(match, "savelayer_f16")
1473		match = append(match, "spiral_rt")
1474		match = append(match, "srgb_colorfilter")
1475		match = append(match, "strokedlines")
1476		match = append(match, "sweep_tiling")
1477	}
1478
1479	if len(skipped) > 0 {
1480		args = append(args, "--skip")
1481		args = append(args, skipped...)
1482	}
1483
1484	if len(match) > 0 {
1485		args = append(args, "--match")
1486		args = append(args, match...)
1487	}
1488
1489	// These devices run out of memory running RAW codec tests. Do not run them in
1490	// parallel
1491	// TODO(borenet): Previously this was `'Nexus5' in bot or 'Nexus9' in bot`
1492	// which also matched 'Nexus5x'. I added That here to maintain the
1493	// existing behavior, but we should verify that it's needed.
1494	if b.model("Nexus5", "Nexus5x", "Nexus9", "JioNext") {
1495		args = append(args, "--noRAW_threading")
1496	}
1497
1498	if b.extraConfig("NativeFonts") {
1499		args = append(args, "--nativeFonts")
1500		if !b.matchOs("Android") {
1501			args = append(args, "--paragraph_fonts", "extra_fonts")
1502			args = append(args, "--norun_paragraph_tests_needing_system_fonts")
1503		}
1504	} else {
1505		args = append(args, "--nonativeFonts")
1506	}
1507	if b.extraConfig("GDI") {
1508		args = append(args, "--gdi")
1509	}
1510	if b.extraConfig("Fontations") {
1511		args = append(args, "--fontations")
1512	}
1513	if b.extraConfig("AndroidNDKFonts") {
1514		args = append(args, "--androidndkfonts")
1515	}
1516
1517	// Let's make all tasks produce verbose output by default.
1518	args = append(args, "--verbose")
1519
1520	// See skia:2789.
1521	if b.extraConfig("AbandonGpuContext") {
1522		args = append(args, "--abandonGpuContext")
1523	}
1524	if b.extraConfig("PreAbandonGpuContext") {
1525		args = append(args, "--preAbandonGpuContext")
1526	}
1527	if b.extraConfig("ReleaseAndAbandonGpuContext") {
1528		args = append(args, "--releaseAndAbandonGpuContext")
1529	}
1530
1531	if b.extraConfig("NeverYield") {
1532		args = append(args, "--neverYieldToWebGPU")
1533	}
1534
1535	if b.extraConfig("FailFlushTimeCallbacks") {
1536		args = append(args, "--failFlushTimeCallbacks")
1537	}
1538
1539	// Finalize the DM flags and properties.
1540	b.recipeProp("dm_flags", marshalJson(args))
1541	b.recipeProp("dm_properties", marshalJson(properties))
1542
1543	// Add properties indicating which assets the task should use.
1544	if b.matchExtraConfig("Lottie") {
1545		b.asset("lottie-samples")
1546		b.recipeProp("lotties", "true")
1547	} else if b.matchExtraConfig("OldestSupportedSkpVersion") {
1548		b.recipeProp("skps", "true")
1549	} else {
1550		b.asset("skimage")
1551		b.recipeProp("images", "true")
1552		b.asset("skp")
1553		b.recipeProp("skps", "true")
1554		b.asset("svg")
1555		b.recipeProp("svgs", "true")
1556	}
1557	b.recipeProp("do_upload", fmt.Sprintf("%t", b.doUpload()))
1558	b.recipeProp("resources", "true")
1559}
1560