blob: cdd24283e52a1b9ea7c5cebaf29ef81e2502d643 [file] [log] [blame]
Eric Borena1613c92020-03-02 12:55:38 -05001// 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 "log"
10 "sort"
11 "strconv"
12 "strings"
13
14 "github.com/golang/glog"
15 "go.skia.org/infra/task_scheduler/go/specs"
16)
17
18// keyParams generates the key used by DM for Gold results.
19func keyParams(parts map[string]string) []string {
20 // Don't bother to include role, which is always Test.
Mike Kleina54d3802020-07-24 12:37:32 -050021 ignored := []string{"role", "test_filter"}
Eric Borena1613c92020-03-02 12:55:38 -050022 keys := make([]string, 0, len(parts))
23 for key := range parts {
24 found := false
Mike Kleina54d3802020-07-24 12:37:32 -050025 for _, b := range ignored {
Eric Borena1613c92020-03-02 12:55:38 -050026 if key == b {
27 found = true
28 break
29 }
30 }
31 if !found {
32 keys = append(keys, key)
33 }
34 }
35 sort.Strings(keys)
36 rv := make([]string, 0, 2*len(keys))
37 for _, key := range keys {
38 rv = append(rv, key, parts[key])
39 }
40 return rv
41}
42
43// dmFlags generates flags to DM based on the given task properties.
Eric Boren457c1eb2020-03-16 13:49:33 -040044func (b *taskBuilder) dmFlags(internalHardwareLabel string) {
Eric Borena1613c92020-03-02 12:55:38 -050045 properties := map[string]string{
46 "gitHash": specs.PLACEHOLDER_REVISION,
Eric Borenc27e7022020-03-09 08:43:45 -040047 "builder": b.Name,
Eric Borena1613c92020-03-02 12:55:38 -050048 "buildbucket_build_id": specs.PLACEHOLDER_BUILDBUCKET_BUILD_ID,
49 "task_id": specs.PLACEHOLDER_TASK_ID,
50 "issue": specs.PLACEHOLDER_ISSUE,
51 "patchset": specs.PLACEHOLDER_PATCHSET,
52 "patch_storage": specs.PLACEHOLDER_PATCH_STORAGE,
53 "swarming_bot_id": "${SWARMING_BOT_ID}",
54 "swarming_task_id": "${SWARMING_TASK_ID}",
55 }
56
57 args := []string{
58 "dm",
59 "--nameByHash",
60 }
61
62 configs := []string{}
Mike Kleina54d3802020-07-24 12:37:32 -050063 skipped := []string{}
Eric Borena1613c92020-03-02 12:55:38 -050064
Eric Borena1613c92020-03-02 12:55:38 -050065 hasConfig := func(cfg string) bool {
66 for _, c := range configs {
67 if c == cfg {
68 return true
69 }
70 }
71 return false
72 }
Eric Borena1613c92020-03-02 12:55:38 -050073 filter := func(slice []string, elems ...string) []string {
74 m := make(map[string]bool, len(elems))
75 for _, e := range elems {
76 m[e] = true
77 }
78 rv := make([]string, 0, len(slice))
79 for _, e := range slice {
80 if m[e] {
81 rv = append(rv, e)
82 }
83 }
84 return rv
85 }
86 remove := func(slice []string, elem string) []string {
87 rv := make([]string, 0, len(slice))
88 for _, e := range slice {
89 if e != elem {
90 rv = append(rv, e)
91 }
92 }
93 return rv
94 }
95 removeContains := func(slice []string, elem string) []string {
96 rv := make([]string, 0, len(slice))
97 for _, e := range slice {
98 if !strings.Contains(e, elem) {
99 rv = append(rv, e)
100 }
101 }
102 return rv
103 }
Robert Phillips2329db12020-05-04 09:20:00 -0400104 suffix := func(slice []string, sfx string) []string {
105 rv := make([]string, 0, len(slice))
106 for _, e := range slice {
107 rv = append(rv, e+sfx)
108 }
109 return rv
110 }
Eric Borena1613c92020-03-02 12:55:38 -0500111
Mike Kleina54d3802020-07-24 12:37:32 -0500112 skip := func(quad ...string) {
Eric Borena1613c92020-03-02 12:55:38 -0500113 if len(quad) == 1 {
114 quad = strings.Fields(quad[0])
115 }
116 if len(quad) != 4 {
Mike Kleina54d3802020-07-24 12:37:32 -0500117 log.Fatalf("Invalid value for --skip: %+v", quad)
Eric Borena1613c92020-03-02 12:55:38 -0500118 }
119 config := quad[0]
120 src := quad[1]
121 options := quad[2]
122 name := quad[3]
123 if config == "_" ||
124 hasConfig(config) ||
125 (config[0] == '~' && hasConfig(config[1:])) {
Mike Kleina54d3802020-07-24 12:37:32 -0500126 skipped = append(skipped, config, src, options, name)
Eric Borena1613c92020-03-02 12:55:38 -0500127 }
128 }
129
Eric Borena1613c92020-03-02 12:55:38 -0500130 // Keys.
Eric Borenc27e7022020-03-09 08:43:45 -0400131 keys := keyParams(b.parts)
132 if b.extraConfig("Lottie") {
Eric Borena1613c92020-03-02 12:55:38 -0500133 keys = append(keys, "renderer", "skottie")
134 }
Eric Borenc27e7022020-03-09 08:43:45 -0400135 if b.matchExtraConfig("DDL") {
Robert Phillips34298652020-08-12 12:38:59 -0400136 // 'DDL' style means "--skpViewportSize 2048"
Eric Borena1613c92020-03-02 12:55:38 -0500137 keys = append(keys, "style", "DDL")
138 } else {
139 keys = append(keys, "style", "default")
140 }
141 args = append(args, "--key")
142 args = append(args, keys...)
143
144 // This enables non-deterministic random seeding of the GPU FP optimization
145 // test.
146 // Not Android due to:
147 // - https://skia.googlesource.com/skia/+/5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160
148 // - https://skia.googlesource.com/skia/+/ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307
149 // Not MSAN due to:
150 // - https://skia.googlesource.com/skia/+/0ac06e47269a40c177747310a613d213c95d1d6d/infra/bots/recipe_modules/flavor/gn_flavor.py#80
Eric Borenc27e7022020-03-09 08:43:45 -0400151 if !b.os("Android") && !b.extraConfig("MSAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500152 args = append(args, "--randomProcessorTest")
153 }
154
Eric Borenc27e7022020-03-09 08:43:45 -0400155 if b.model("Pixel3", "Pixel3a") && b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500156 args = append(args, "--dontReduceOpsTaskSplitting")
157 }
158
159 threadLimit := -1
160 const MAIN_THREAD_ONLY = 0
161
162 // 32-bit desktop bots tend to run out of memory, because they have relatively
163 // far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
Eric Borenc27e7022020-03-09 08:43:45 -0400164 if b.arch("x86") {
Eric Borena1613c92020-03-02 12:55:38 -0500165 threadLimit = 4
166 }
167
168 // These bots run out of memory easily.
Eric Borenc27e7022020-03-09 08:43:45 -0400169 if b.model("MotoG4", "Nexus7") {
Eric Borena1613c92020-03-02 12:55:38 -0500170 threadLimit = MAIN_THREAD_ONLY
171 }
172
173 // Avoid issues with dynamically exceeding resource cache limits.
Eric Borenc27e7022020-03-09 08:43:45 -0400174 if b.matchExtraConfig("DISCARDABLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500175 threadLimit = MAIN_THREAD_ONLY
176 }
177
178 if threadLimit >= 0 {
179 args = append(args, "--threads", strconv.Itoa(threadLimit))
180 }
181
182 sampleCount := 0
183 glPrefix := ""
Eric Borenc27e7022020-03-09 08:43:45 -0400184 if b.extraConfig("SwiftShader") {
Eric Borena1613c92020-03-02 12:55:38 -0500185 configs = append(configs, "gles", "glesdft")
186 args = append(args, "--disableDriverCorrectnessWorkarounds")
Eric Borenc27e7022020-03-09 08:43:45 -0400187 } else if b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500188 args = append(args, "--nogpu")
189
190 configs = append(configs, "8888")
191
Mike Klein4ba8d1f2020-04-07 12:14:48 -0500192 if b.extraConfig("SkVM") {
193 args = append(args, "--skvm")
194 }
195
Eric Borenc27e7022020-03-09 08:43:45 -0400196 if b.extraConfig("BonusConfigs") {
Eric Borena1613c92020-03-02 12:55:38 -0500197 configs = []string{
198 "g8", "565",
199 "pic-8888", "serialize-8888",
200 "f16", "srgb", "esrgb", "narrow", "enarrow",
201 "p3", "ep3", "rec2020", "erec2020"}
202 }
203
Eric Borenc27e7022020-03-09 08:43:45 -0400204 if b.extraConfig("PDF") {
Eric Borena1613c92020-03-02 12:55:38 -0500205 configs = []string{"pdf"}
206 args = append(args, "--rasterize_pdf") // Works only on Mac.
207 // Take ~forever to rasterize:
Mike Kleina54d3802020-07-24 12:37:32 -0500208 skip("pdf gm _ lattice2")
209 skip("pdf gm _ hairmodes")
210 skip("pdf gm _ longpathdash")
Eric Borena1613c92020-03-02 12:55:38 -0500211 }
212
Eric Borenc27e7022020-03-09 08:43:45 -0400213 } else if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500214 args = append(args, "--nocpu")
215
216 // Add in either gles or gl configs to the canonical set based on OS
Eric Borena1613c92020-03-02 12:55:38 -0500217 glPrefix = "gl"
Chris Daltond4756592021-03-31 09:14:16 -0600218 // Use 4x MSAA for all our testing. It's more consistent and 8x MSAA is nondeterministic (by
219 // design) on NVIDIA hardware. The problem is especially bad on ANGLE. skia:6813 skia:6545
220 sampleCount = 4
Eric Borenc27e7022020-03-09 08:43:45 -0400221 if b.os("Android", "iOS") {
Chris Daltond4756592021-03-31 09:14:16 -0600222 glPrefix = "gles"
Eric Borena1613c92020-03-02 12:55:38 -0500223 // MSAA is disabled on Pixel3a (https://b.corp.google.com/issues/143074513).
Eric Borenc27e7022020-03-09 08:43:45 -0400224 if b.model("Pixel3a") {
Eric Borena1613c92020-03-02 12:55:38 -0500225 sampleCount = 0
226 }
Eric Borenc27e7022020-03-09 08:43:45 -0400227 } else if b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500228 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
229 sampleCount = 0
Eric Borenc27e7022020-03-09 08:43:45 -0400230 } else if b.os("ChromeOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500231 glPrefix = "gles"
232 }
233
Eric Borenc27e7022020-03-09 08:43:45 -0400234 if b.extraConfig("NativeFonts") {
Eric Borena1613c92020-03-02 12:55:38 -0500235 configs = append(configs, glPrefix)
236 } else {
237 configs = append(configs, glPrefix, glPrefix+"dft", glPrefix+"srgb")
238 if sampleCount > 0 {
239 configs = append(configs, fmt.Sprintf("%smsaa%d", glPrefix, sampleCount))
240 }
241 }
242
243 // The Tegra3 doesn't support MSAA
Eric Borenc27e7022020-03-09 08:43:45 -0400244 if b.gpu("Tegra3") ||
Eric Borena1613c92020-03-02 12:55:38 -0500245 // We aren't interested in fixing msaa bugs on current iOS devices.
Eric Borenc27e7022020-03-09 08:43:45 -0400246 b.model("iPad4", "iPadPro", "iPhone6", "iPhone7") ||
Eric Borena1613c92020-03-02 12:55:38 -0500247 // skia:5792
Eric Borenc27e7022020-03-09 08:43:45 -0400248 b.gpu("IntelHD530", "IntelIris540") {
Eric Borena1613c92020-03-02 12:55:38 -0500249 configs = removeContains(configs, "msaa")
250 }
251
252 // We want to test both the OpenGL config and the GLES config on Linux Intel:
253 // GL is used by Chrome, GLES is used by ChromeOS.
254 // Also do the Ganesh threading verification test (render with and without
255 // worker threads, using only the SW path renderer, and compare the results).
Eric Borenc27e7022020-03-09 08:43:45 -0400256 if b.matchGpu("Intel") && b.isLinux() {
Eric Borena1613c92020-03-02 12:55:38 -0500257 configs = append(configs, "gles", "glesdft", "glessrgb", "gltestthreading")
258 // skbug.com/6333, skbug.com/6419, skbug.com/6702
Mike Kleina54d3802020-07-24 12:37:32 -0500259 skip("gltestthreading gm _ lcdblendmodes")
260 skip("gltestthreading gm _ lcdoverlap")
261 skip("gltestthreading gm _ textbloblooper")
Eric Borena1613c92020-03-02 12:55:38 -0500262 // All of these GMs are flaky, too:
Mike Kleina54d3802020-07-24 12:37:32 -0500263 skip("gltestthreading gm _ savelayer_with_backdrop")
264 skip("gltestthreading gm _ persp_shaders_bw")
265 skip("gltestthreading gm _ dftext_blob_persp")
266 skip("gltestthreading gm _ dftext")
267 skip("gltestthreading gm _ gpu_blur_utils")
268 skip("gltestthreading gm _ gpu_blur_utils_ref")
269 skip("gltestthreading gm _ gpu_blur_utils_subset_rect")
270 skip("gltestthreading gm _ gpu_blur_utils_subset_rect_ref")
Eric Borena1613c92020-03-02 12:55:38 -0500271 // skbug.com/7523 - Flaky on various GPUs
Mike Kleina54d3802020-07-24 12:37:32 -0500272 skip("gltestthreading gm _ orientation")
Eric Borena1613c92020-03-02 12:55:38 -0500273 // These GMs only differ in the low bits
Mike Kleina54d3802020-07-24 12:37:32 -0500274 skip("gltestthreading gm _ stroketext")
275 skip("gltestthreading gm _ draw_image_set")
Eric Borena1613c92020-03-02 12:55:38 -0500276 }
277
278 // CommandBuffer bot *only* runs the command_buffer config.
Eric Borenc27e7022020-03-09 08:43:45 -0400279 if b.extraConfig("CommandBuffer") {
Eric Borena1613c92020-03-02 12:55:38 -0500280 configs = []string{"commandbuffer"}
281 }
282
Brian Salomon414782d2020-04-17 09:34:17 -0400283 // Dawn bot *only* runs the dawn config
Brian Salomon46994e02020-03-31 19:43:29 -0400284 if b.extraConfig("Dawn") {
285 configs = []string{"dawn"}
286 }
287
Brian Salomon414782d2020-04-17 09:34:17 -0400288 // ANGLE bot *only* runs the angle configs
Eric Borenc27e7022020-03-09 08:43:45 -0400289 if b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500290 configs = []string{"angle_d3d11_es2",
Eric Borena1613c92020-03-02 12:55:38 -0500291 "angle_gl_es2",
292 "angle_d3d11_es3"}
293 if sampleCount > 0 {
294 configs = append(configs, fmt.Sprintf("angle_d3d11_es2_msaa%d", sampleCount))
295 configs = append(configs, fmt.Sprintf("angle_d3d11_es3_msaa%d", sampleCount))
296 }
Eric Borenc27e7022020-03-09 08:43:45 -0400297 if b.matchGpu("GTX", "Quadro") {
Eric Borena1613c92020-03-02 12:55:38 -0500298 // See skia:7823 and chromium:693090.
299 configs = append(configs, "angle_gl_es3")
300 if sampleCount > 0 {
301 configs = append(configs, fmt.Sprintf("angle_gl_es2_msaa%d", sampleCount))
302 configs = append(configs, fmt.Sprintf("angle_gl_es3_msaa%d", sampleCount))
303 }
304 }
Brian Salomon414782d2020-04-17 09:34:17 -0400305 if !b.matchGpu("GTX", "Quadro", "GT610") {
306 // See skia:10149
307 configs = append(configs, "angle_d3d9_es2")
308 }
Eric Borenc27e7022020-03-09 08:43:45 -0400309 if b.model("NUC5i7RYH") {
Eric Borena1613c92020-03-02 12:55:38 -0500310 // skbug.com/7376
Mike Kleina54d3802020-07-24 12:37:32 -0500311 skip("_ test _ ProcessorCloneTest")
Eric Borena1613c92020-03-02 12:55:38 -0500312 }
313 }
314
Weston Tracey21be4f22020-05-11 10:47:17 -0400315 if b.model("Pixelbook") {
316 // skbug.com/10232
Mike Kleina54d3802020-07-24 12:37:32 -0500317 skip("_ test _ ProcessorCloneTest")
Weston Tracey21be4f22020-05-11 10:47:17 -0400318
319 }
320
John Stiles2cc126f2020-08-10 14:26:29 -0400321 if b.model("AndroidOne", "GalaxyS6", "Nexus5", "Nexus7") {
Eric Borena1613c92020-03-02 12:55:38 -0500322 // skbug.com/9019
Mike Kleina54d3802020-07-24 12:37:32 -0500323 skip("_ test _ ProcessorCloneTest")
324 skip("_ test _ Programs")
325 skip("_ test _ ProcessorOptimizationValidationTest")
Eric Borena1613c92020-03-02 12:55:38 -0500326 }
327
John Stiles2cc126f2020-08-10 14:26:29 -0400328 if b.model("GalaxyS20") {
329 // skbug.com/10595
330 skip("_ test _ ProcessorCloneTest")
331 }
332
Eric Borenc27e7022020-03-09 08:43:45 -0400333 if b.extraConfig("CommandBuffer") && b.model("MacBook10.1") {
Eric Borena1613c92020-03-02 12:55:38 -0500334 // skbug.com/9235
Mike Kleina54d3802020-07-24 12:37:32 -0500335 skip("_ test _ Programs")
Eric Borena1613c92020-03-02 12:55:38 -0500336 }
337
Brian Salomon0f396992020-06-19 19:51:21 -0400338 if b.extraConfig("CommandBuffer") {
339 // skbug.com/10412
Mike Kleina54d3802020-07-24 12:37:32 -0500340 skip("_ test _ GLBackendAllocationTest")
Brian Salomon0f396992020-06-19 19:51:21 -0400341 }
342
Eric Borena1613c92020-03-02 12:55:38 -0500343 // skbug.com/9033 - these devices run out of memory on this test
344 // when opList splitting reduction is enabled
Eric Borenc27e7022020-03-09 08:43:45 -0400345 if b.gpu() && (b.model("Nexus7", "NVIDIA_Shield", "Nexus5x") ||
346 (b.os("Win10") && b.gpu("GTX660") && b.extraConfig("Vulkan"))) {
Mike Kleina54d3802020-07-24 12:37:32 -0500347 skip("_", "gm", "_", "savelayer_clipmask")
Eric Borena1613c92020-03-02 12:55:38 -0500348 }
349
Eric Borena1613c92020-03-02 12:55:38 -0500350 // skbug.com/9043 - these devices render this test incorrectly
351 // when opList splitting reduction is enabled
Eric Borenc27e7022020-03-09 08:43:45 -0400352 if b.gpu() && b.extraConfig("Vulkan") && (b.gpu("RadeonR9M470X", "RadeonHD7770")) {
Mike Kleina54d3802020-07-24 12:37:32 -0500353 skip("_", "tests", "_", "VkDrawableImportTest")
Eric Borena1613c92020-03-02 12:55:38 -0500354 }
Eric Borenc27e7022020-03-09 08:43:45 -0400355 if b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500356 configs = []string{"vk"}
Chris Daltond4756592021-03-31 09:14:16 -0600357 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926, skia:9023
358 if !b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500359 configs = append(configs, "vkmsaa4")
Eric Borena1613c92020-03-02 12:55:38 -0500360 }
361 }
Eric Borenc27e7022020-03-09 08:43:45 -0400362 if b.extraConfig("Metal") {
Eric Borena1613c92020-03-02 12:55:38 -0500363 configs = []string{"mtl"}
Chris Daltond4756592021-03-31 09:14:16 -0600364 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
365 if !b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500366 configs = append(configs, "mtlmsaa4")
Eric Borena1613c92020-03-02 12:55:38 -0500367 }
368 }
Jim Van Verth2b98f162020-06-11 15:27:35 -0400369 if b.extraConfig("Direct3D") {
John Stiles2cc126f2020-08-10 14:26:29 -0400370 configs = []string{"d3d"}
Jim Van Verth2b98f162020-06-11 15:27:35 -0400371 }
Eric Borena1613c92020-03-02 12:55:38 -0500372
373 // Test 1010102 on our Linux/NVIDIA bots and the persistent cache config
374 // on the GL bots.
Eric Borenc27e7022020-03-09 08:43:45 -0400375 if b.gpu("QuadroP400") && !b.extraConfig("PreAbandonGpuContext") && !b.extraConfig("TSAN") && b.isLinux() {
376 if b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500377 configs = append(configs, "vk1010102")
378 // Decoding transparent images to 1010102 just looks bad
Mike Kleina54d3802020-07-24 12:37:32 -0500379 skip("vk1010102 image _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500380 } else {
381 configs = append(configs, "gl1010102", "gltestpersistentcache", "gltestglslcache", "gltestprecompile")
382 // Decoding transparent images to 1010102 just looks bad
Mike Kleina54d3802020-07-24 12:37:32 -0500383 skip("gl1010102 image _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500384 // These tests produce slightly different pixels run to run on NV.
Mike Kleina54d3802020-07-24 12:37:32 -0500385 skip("gltestpersistentcache gm _ atlastext")
386 skip("gltestpersistentcache gm _ dftext")
387 skip("gltestpersistentcache gm _ glyph_pos_h_b")
388 skip("gltestpersistentcache gm _ glyph_pos_h_f")
389 skip("gltestpersistentcache gm _ glyph_pos_n_f")
390 skip("gltestglslcache gm _ atlastext")
391 skip("gltestglslcache gm _ dftext")
392 skip("gltestglslcache gm _ glyph_pos_h_b")
393 skip("gltestglslcache gm _ glyph_pos_h_f")
394 skip("gltestglslcache gm _ glyph_pos_n_f")
395 skip("gltestprecompile gm _ atlastext")
396 skip("gltestprecompile gm _ dftext")
397 skip("gltestprecompile gm _ glyph_pos_h_b")
398 skip("gltestprecompile gm _ glyph_pos_h_f")
399 skip("gltestprecompile gm _ glyph_pos_n_f")
Eric Borena1613c92020-03-02 12:55:38 -0500400 // Tessellation shaders do not yet participate in the persistent cache.
Mike Kleina54d3802020-07-24 12:37:32 -0500401 skip("gltestpersistentcache gm _ tessellation")
402 skip("gltestglslcache gm _ tessellation")
403 skip("gltestprecompile gm _ tessellation")
Eric Borena1613c92020-03-02 12:55:38 -0500404 }
405 }
406
407 // We also test the SkSL precompile config on Pixel2XL as a representative
408 // Android device - this feature is primarily used by Flutter.
Eric Borenc27e7022020-03-09 08:43:45 -0400409 if b.model("Pixel2XL") && !b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500410 configs = append(configs, "glestestprecompile")
411 }
412
Robert Phillips8b87f4e2021-03-18 12:16:03 -0400413 // Test SkSL precompile on iPhone 8 as representative iOS device
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500414 if b.model("iPhone8") && b.extraConfig("Metal") {
Robert Phillips8b87f4e2021-03-18 12:16:03 -0400415 configs = append(configs, "mtltestprecompile")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500416 // avoid tests that can generate slightly different pixels per run
417 skip("mtltestprecompile gm _ atlastext")
418 skip("mtltestprecompile gm _ circular_arcs_hairline")
419 skip("mtltestprecompile gm _ dftext")
420 skip("mtltestprecompile gm _ fontmgr_bounds_1_-0.25")
421 skip("mtltestprecompile gm _ glyph_pos_h_b")
422 skip("mtltestprecompile gm _ glyph_pos_h_f")
423 skip("mtltestprecompile gm _ glyph_pos_n_f")
424 skip("mtltestprecompile gm _ strokes3")
425 skip("mtltestprecompile gm _ texel_subset_linear_mipmap_nearest_down")
426 skip("mtltestprecompile gm _ texel_subset_linear_mipmap_linear_down")
427 skip("mtltestprecompile svg _ A_large_blank_world_map_with_oceans_marked_in_blue.svg")
428 skip("mtltestprecompile svg _ Chalkboard.svg")
Robert Phillips8b87f4e2021-03-18 12:16:03 -0400429 skip("mtltestprecompile svg _ Ghostscript_Tiger.svg")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500430 }
431
Adlai Hollere1a72842021-03-01 17:47:07 -0600432 if b.model(REDUCE_OPS_TASK_SPLITTING_MODELS...) {
433 args = append(args, "--reduceOpsTaskSplitting", "true")
434 }
435
Eric Borena1613c92020-03-02 12:55:38 -0500436 // Test rendering to wrapped dsts on a few bots
437 // Also test "glenarrow", which hits F16 surfaces and F16 vertex colors.
Eric Borenc27e7022020-03-09 08:43:45 -0400438 if b.extraConfig("BonusConfigs") {
Eric Borena1613c92020-03-02 12:55:38 -0500439 configs = []string{"glbetex", "glbert", "glenarrow"}
440 }
441
Eric Borenc27e7022020-03-09 08:43:45 -0400442 if b.os("ChromeOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500443 // Just run GLES for now - maybe add gles_msaa4 in the future
444 configs = []string{"gles"}
445 }
446
Eric Borena1613c92020-03-02 12:55:38 -0500447 // Test GPU tessellation path renderer.
Eric Borenc27e7022020-03-09 08:43:45 -0400448 if b.extraConfig("GpuTess") {
Eric Borena1613c92020-03-02 12:55:38 -0500449 configs = []string{glPrefix + "msaa4"}
Chris Dalton15f51842020-12-15 19:55:10 -0700450 args = append(args, "--hwtess", "--pr", "tess")
Eric Borena1613c92020-03-02 12:55:38 -0500451 }
452
Chris Dalton81513372021-03-18 00:32:48 -0600453 // Test dynamic MSAA.
454 if b.extraConfig("DMSAA") {
455 configs = []string{glPrefix + "dmsaa"}
456 args = append(args, "--hwtess")
457 }
458
Eric Borena1613c92020-03-02 12:55:38 -0500459 // DDL is a GPU-only feature
Eric Borenc27e7022020-03-09 08:43:45 -0400460 if b.extraConfig("DDL1") {
Robert Phillips2329db12020-05-04 09:20:00 -0400461 // This bot generates comparison images for the large skps and the gms
Eric Borena1613c92020-03-02 12:55:38 -0500462 configs = filter(configs, "gl", "vk", "mtl")
463 args = append(args, "--skpViewportSize", "2048")
Eric Borena1613c92020-03-02 12:55:38 -0500464 }
Eric Borenc27e7022020-03-09 08:43:45 -0400465 if b.extraConfig("DDL3") {
Robert Phillips2329db12020-05-04 09:20:00 -0400466 // This bot generates the real ddl images for the large skps and the gms
Robert Phillipsb3238362021-02-26 08:48:20 -0500467 configs = suffix(filter(configs, "gl", "vk", "mtl"), "ddl")
Eric Borena1613c92020-03-02 12:55:38 -0500468 args = append(args, "--skpViewportSize", "2048")
469 args = append(args, "--gpuThreads", "0")
470 }
Robert Phillipsfe7794d2020-06-26 09:36:22 -0400471 if b.extraConfig("OOPRDDL") {
472 // This bot generates the real oopr/DDL images for the large skps and the GMs
473 configs = suffix(filter(configs, "gl", "vk", "mtl"), "ooprddl")
474 args = append(args, "--skpViewportSize", "2048")
475 args = append(args, "--gpuThreads", "0")
476 }
Eric Borena1613c92020-03-02 12:55:38 -0500477 }
478
479 // Sharding.
Eric Borenc27e7022020-03-09 08:43:45 -0400480 tf := b.parts["test_filter"]
Eric Borena1613c92020-03-02 12:55:38 -0500481 if tf != "" && tf != "All" {
482 // Expected format: shard_XX_YY
483 split := strings.Split(tf, "_")
484 if len(split) == 3 {
485 args = append(args, "--shard", split[1])
486 args = append(args, "--shards", split[2])
487 } else {
488 glog.Fatalf("Invalid task name - bad shards: %s", tf)
489 }
490 }
491
492 args = append(args, "--config")
493 args = append(args, configs...)
494
495 removeFromArgs := func(arg string) {
496 args = remove(args, arg)
497 }
498
499 // Run tests, gms, and image decoding tests everywhere.
500 args = append(args, "--src", "tests", "gm", "image", "lottie", "colorImage", "svg", "skp")
Eric Borenc27e7022020-03-09 08:43:45 -0400501 if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500502 // Don't run the "svgparse_*" svgs on GPU.
Mike Kleina54d3802020-07-24 12:37:32 -0500503 skip("_ svg _ svgparse_")
Weston Tracey24627882020-04-06 21:27:14 -0400504 } else if b.Name == "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" {
Eric Borena1613c92020-03-02 12:55:38 -0500505 // Only run the CPU SVGs on 8888.
Mike Kleina54d3802020-07-24 12:37:32 -0500506 skip("~8888 svg _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500507 } else {
508 // On CPU SVGs we only care about parsing. Only run them on the above bot.
509 removeFromArgs("svg")
510 }
511
512 // Eventually I'd like these to pass, but for now just skip 'em.
Eric Borenc27e7022020-03-09 08:43:45 -0400513 if b.extraConfig("SK_FORCE_RASTER_PIPELINE_BLITTER") {
Eric Borena1613c92020-03-02 12:55:38 -0500514 removeFromArgs("tests")
515 }
516
Eric Borenc27e7022020-03-09 08:43:45 -0400517 if b.extraConfig("NativeFonts") { // images won't exercise native font integration :)
Eric Borena1613c92020-03-02 12:55:38 -0500518 removeFromArgs("image")
519 removeFromArgs("colorImage")
520 }
521
Eric Borenc27e7022020-03-09 08:43:45 -0400522 if b.matchExtraConfig("DDL", "PDF") {
Eric Borena1613c92020-03-02 12:55:38 -0500523 // The DDL and PDF bots just render the large skps and the gms
524 removeFromArgs("tests")
525 removeFromArgs("image")
526 removeFromArgs("colorImage")
527 removeFromArgs("svg")
528 } else {
529 // No other bots render the .skps.
530 removeFromArgs("skp")
531 }
532
Eric Borenc27e7022020-03-09 08:43:45 -0400533 if b.extraConfig("Lottie") {
Eric Borena1613c92020-03-02 12:55:38 -0500534 // Only run the lotties on Lottie bots.
535 removeFromArgs("tests")
536 removeFromArgs("gm")
537 removeFromArgs("image")
538 removeFromArgs("colorImage")
539 removeFromArgs("svg")
540 removeFromArgs("skp")
541 } else {
542 removeFromArgs("lottie")
543 }
544
Tyler Denniston5f90ee02020-10-16 16:24:43 -0400545 if b.extraConfig("TSAN") {
546 // skbug.com/10848
547 removeFromArgs("svg")
548 }
549
Eric Borena1613c92020-03-02 12:55:38 -0500550 // TODO: ???
Mike Kleina54d3802020-07-24 12:37:32 -0500551 skip("f16 _ _ dstreadshuffle")
552 skip("glsrgb image _ _")
553 skip("glessrgb image _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500554
555 // --src image --config g8 means "decode into Gray8", which isn't supported.
Mike Kleina54d3802020-07-24 12:37:32 -0500556 skip("g8 image _ _")
557 skip("g8 colorImage _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500558
Eric Borenc27e7022020-03-09 08:43:45 -0400559 if b.extraConfig("Valgrind") {
Eric Borena1613c92020-03-02 12:55:38 -0500560 // These take 18+ hours to run.
Mike Kleina54d3802020-07-24 12:37:32 -0500561 skip("pdf gm _ fontmgr_iter")
562 skip("pdf _ _ PANO_20121023_214540.jpg")
563 skip("pdf skp _ worldjournal")
564 skip("pdf skp _ desk_baidu.skp")
565 skip("pdf skp _ desk_wikipedia.skp")
566 skip("_ svg _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500567 // skbug.com/9171 and 8847
Mike Kleina54d3802020-07-24 12:37:32 -0500568 skip("_ test _ InitialTextureClear")
Eric Borena1613c92020-03-02 12:55:38 -0500569 }
570
Robert Phillips5890fec2020-07-28 15:23:42 -0400571 if b.model("Pixel3") {
572 // skbug.com/10546
573 skip("vkddl gm _ compressed_textures_nmof")
574 skip("vkddl gm _ compressed_textures_npot")
575 skip("vkddl gm _ compressed_textures")
576 }
577
Eric Borenc27e7022020-03-09 08:43:45 -0400578 if b.model("TecnoSpark3Pro") {
Eric Borena1613c92020-03-02 12:55:38 -0500579 // skbug.com/9421
Mike Kleina54d3802020-07-24 12:37:32 -0500580 skip("_ test _ InitialTextureClear")
Eric Borena1613c92020-03-02 12:55:38 -0500581 }
582
Eric Borenc27e7022020-03-09 08:43:45 -0400583 if b.os("iOS") {
Mike Kleina54d3802020-07-24 12:37:32 -0500584 skip(glPrefix + " skp _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500585 }
586
Eric Borenc27e7022020-03-09 08:43:45 -0400587 if b.matchOs("Mac", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500588 // CG fails on questionable bmps
Mike Kleina54d3802020-07-24 12:37:32 -0500589 skip("_ image gen_platf rgba32abf.bmp")
590 skip("_ image gen_platf rgb24prof.bmp")
591 skip("_ image gen_platf rgb24lprof.bmp")
592 skip("_ image gen_platf 8bpp-pixeldata-cropped.bmp")
593 skip("_ image gen_platf 4bpp-pixeldata-cropped.bmp")
594 skip("_ image gen_platf 32bpp-pixeldata-cropped.bmp")
595 skip("_ image gen_platf 24bpp-pixeldata-cropped.bmp")
Eric Borena1613c92020-03-02 12:55:38 -0500596
597 // CG has unpredictable behavior on this questionable gif
598 // It's probably using uninitialized memory
Mike Kleina54d3802020-07-24 12:37:32 -0500599 skip("_ image gen_platf frame_larger_than_image.gif")
Eric Borena1613c92020-03-02 12:55:38 -0500600
601 // CG has unpredictable behavior on incomplete pngs
602 // skbug.com/5774
Mike Kleina54d3802020-07-24 12:37:32 -0500603 skip("_ image gen_platf inc0.png")
604 skip("_ image gen_platf inc1.png")
605 skip("_ image gen_platf inc2.png")
606 skip("_ image gen_platf inc3.png")
607 skip("_ image gen_platf inc4.png")
608 skip("_ image gen_platf inc5.png")
609 skip("_ image gen_platf inc6.png")
610 skip("_ image gen_platf inc7.png")
611 skip("_ image gen_platf inc8.png")
612 skip("_ image gen_platf inc9.png")
613 skip("_ image gen_platf inc10.png")
614 skip("_ image gen_platf inc11.png")
615 skip("_ image gen_platf inc12.png")
616 skip("_ image gen_platf inc13.png")
617 skip("_ image gen_platf inc14.png")
618 skip("_ image gen_platf incInterlaced.png")
Eric Borena1613c92020-03-02 12:55:38 -0500619
620 // These images fail after Mac 10.13.1 upgrade.
Mike Kleina54d3802020-07-24 12:37:32 -0500621 skip("_ image gen_platf incInterlaced.gif")
622 skip("_ image gen_platf inc1.gif")
623 skip("_ image gen_platf inc0.gif")
624 skip("_ image gen_platf butterfly.gif")
Eric Borena1613c92020-03-02 12:55:38 -0500625 }
626
627 // WIC fails on questionable bmps
Eric Borenc27e7022020-03-09 08:43:45 -0400628 if b.matchOs("Win") {
Mike Kleina54d3802020-07-24 12:37:32 -0500629 skip("_ image gen_platf pal8os2v2.bmp")
630 skip("_ image gen_platf pal8os2v2-16.bmp")
631 skip("_ image gen_platf rgba32abf.bmp")
632 skip("_ image gen_platf rgb24prof.bmp")
633 skip("_ image gen_platf rgb24lprof.bmp")
634 skip("_ image gen_platf 8bpp-pixeldata-cropped.bmp")
635 skip("_ image gen_platf 4bpp-pixeldata-cropped.bmp")
636 skip("_ image gen_platf 32bpp-pixeldata-cropped.bmp")
637 skip("_ image gen_platf 24bpp-pixeldata-cropped.bmp")
Eric Borenc27e7022020-03-09 08:43:45 -0400638 if b.arch("x86_64") && b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500639 // This GM triggers a SkSmallAllocator assert.
Mike Kleina54d3802020-07-24 12:37:32 -0500640 skip("_ gm _ composeshader_bitmap")
Eric Borena1613c92020-03-02 12:55:38 -0500641 }
642 }
643
Eric Borenc27e7022020-03-09 08:43:45 -0400644 if b.matchOs("Win", "Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500645 // WIC and CG fail on arithmetic jpegs
Mike Kleina54d3802020-07-24 12:37:32 -0500646 skip("_ image gen_platf testimgari.jpg")
Eric Borena1613c92020-03-02 12:55:38 -0500647 // More questionable bmps that fail on Mac, too. skbug.com/6984
Mike Kleina54d3802020-07-24 12:37:32 -0500648 skip("_ image gen_platf rle8-height-negative.bmp")
649 skip("_ image gen_platf rle4-height-negative.bmp")
Eric Borena1613c92020-03-02 12:55:38 -0500650 }
651
652 // These PNGs have CRC errors. The platform generators seem to draw
653 // uninitialized memory without reporting an error, so skip them to
654 // avoid lots of images on Gold.
Mike Kleina54d3802020-07-24 12:37:32 -0500655 skip("_ image gen_platf error")
Eric Borena1613c92020-03-02 12:55:38 -0500656
Eric Borenc27e7022020-03-09 08:43:45 -0400657 if b.os("Android", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500658 // This test crashes the N9 (perhaps because of large malloc/frees). It also
659 // is fairly slow and not platform-specific. So we just disable it on all of
660 // Android and iOS. skia:5438
Mike Kleina54d3802020-07-24 12:37:32 -0500661 skip("_ test _ GrStyledShape")
Eric Borena1613c92020-03-02 12:55:38 -0500662 }
663
664 if internalHardwareLabel == "5" {
665 // http://b/118312149#comment9
Mike Kleina54d3802020-07-24 12:37:32 -0500666 skip("_ test _ SRGBReadWritePixels")
Eric Borena1613c92020-03-02 12:55:38 -0500667 }
668
669 // skia:4095
670 badSerializeGMs := []string{
John Stiles2cc126f2020-08-10 14:26:29 -0400671 "strict_constraint_batch_no_red_allowed", // https://crbug.com/skia/10278
672 "strict_constraint_no_red_allowed", // https://crbug.com/skia/10278
673 "fast_constraint_red_is_allowed", // https://crbug.com/skia/10278
Eric Borena1613c92020-03-02 12:55:38 -0500674 "c_gms",
675 "colortype",
676 "colortype_xfermodes",
677 "drawfilter",
678 "fontmgr_bounds_0.75_0",
679 "fontmgr_bounds_1_-0.25",
680 "fontmgr_bounds",
681 "fontmgr_match",
682 "fontmgr_iter",
683 "imagemasksubset",
684 "wacky_yuv_formats_domain",
685 "imagemakewithfilter",
686 "imagemakewithfilter_crop",
687 "imagemakewithfilter_crop_ref",
688 "imagemakewithfilter_ref",
689 }
690
691 // skia:5589
692 badSerializeGMs = append(badSerializeGMs,
693 "bitmapfilters",
694 "bitmapshaders",
Eric Borena1613c92020-03-02 12:55:38 -0500695 "convex_poly_clip",
696 "extractalpha",
697 "filterbitmap_checkerboard_32_32_g8",
698 "filterbitmap_image_mandrill_64",
699 "shadows",
700 "simpleaaclip_aaclip",
701 )
702
703 // skia:5595
704 badSerializeGMs = append(badSerializeGMs,
705 "composeshader_bitmap",
706 "scaled_tilemodes_npot",
707 "scaled_tilemodes",
708 )
709
710 // skia:5778
711 badSerializeGMs = append(badSerializeGMs, "typefacerendering_pfaMac")
712 // skia:5942
713 badSerializeGMs = append(badSerializeGMs, "parsedpaths")
714
715 // these use a custom image generator which doesn't serialize
716 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_rect")
717 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_shader")
718
719 // skia:6189
720 badSerializeGMs = append(badSerializeGMs, "shadow_utils")
721
722 // skia:7938
723 badSerializeGMs = append(badSerializeGMs, "persp_images")
724
725 // Not expected to round trip encoding/decoding.
726 badSerializeGMs = append(badSerializeGMs, "all_bitmap_configs")
727 badSerializeGMs = append(badSerializeGMs, "makecolorspace")
728 badSerializeGMs = append(badSerializeGMs, "readpixels")
729 badSerializeGMs = append(badSerializeGMs, "draw_image_set_rect_to_rect")
Michael Ludwig1c66ad92020-07-10 08:59:44 -0400730 badSerializeGMs = append(badSerializeGMs, "draw_image_set_alpha_only")
Eric Borena1613c92020-03-02 12:55:38 -0500731 badSerializeGMs = append(badSerializeGMs, "compositor_quads_shader")
732 badSerializeGMs = append(badSerializeGMs, "wacky_yuv_formats_qtr")
Brian Salomon04aef102021-01-23 11:41:54 -0500733 badSerializeGMs = append(badSerializeGMs, "runtime_effect_image")
Eric Borena1613c92020-03-02 12:55:38 -0500734
735 // This GM forces a path to be convex. That property doesn't survive
736 // serialization.
737 badSerializeGMs = append(badSerializeGMs, "analytic_antialias_convex")
738
739 for _, test := range badSerializeGMs {
Mike Kleina54d3802020-07-24 12:37:32 -0500740 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500741 }
742
Eric Borena1613c92020-03-02 12:55:38 -0500743 // It looks like we skip these only for out-of-memory concerns.
Eric Borenc27e7022020-03-09 08:43:45 -0400744 if b.matchOs("Win", "Android") {
Eric Borena1613c92020-03-02 12:55:38 -0500745 for _, test := range []string{"verylargebitmap", "verylarge_picture_image"} {
Mike Kleina54d3802020-07-24 12:37:32 -0500746 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500747 }
748 }
Eric Borenc27e7022020-03-09 08:43:45 -0400749 if b.matchOs("Mac") && b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500750 // skia:6992
Mike Kleina54d3802020-07-24 12:37:32 -0500751 skip("pic-8888", "gm", "_", "encode-platform")
752 skip("serialize-8888", "gm", "_", "encode-platform")
Eric Borena1613c92020-03-02 12:55:38 -0500753 }
754
755 // skia:4769
Mike Kleina54d3802020-07-24 12:37:32 -0500756 skip("pic-8888", "gm", "_", "drawfilter")
Eric Borena1613c92020-03-02 12:55:38 -0500757
758 // skia:4703
759 for _, test := range []string{"image-cacherator-from-picture",
760 "image-cacherator-from-raster",
761 "image-cacherator-from-ctable"} {
Mike Kleina54d3802020-07-24 12:37:32 -0500762 skip("pic-8888", "gm", "_", test)
763 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500764 }
765
766 // GM that requires raster-backed canvas
767 for _, test := range []string{"complexclip4_bw", "complexclip4_aa", "p3",
768 "async_rescale_and_read_text_up_large",
769 "async_rescale_and_read_text_up",
770 "async_rescale_and_read_text_down",
771 "async_rescale_and_read_dog_up",
772 "async_rescale_and_read_dog_down",
773 "async_rescale_and_read_rose",
Brian Salomonbacbb922021-01-21 19:48:00 -0500774 "async_rescale_and_read_no_bleed",
John Stilesa0e407d2021-02-10 12:21:51 -0500775 "async_rescale_and_read_alpha_type"} {
Mike Kleina54d3802020-07-24 12:37:32 -0500776 skip("pic-8888", "gm", "_", test)
777 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500778
779 // GM requires canvas->makeSurface() to return a valid surface.
780 // TODO(borenet): These should be just outside of this block but are
781 // left here to match the recipe which has an indentation bug.
Mike Kleina54d3802020-07-24 12:37:32 -0500782 skip("pic-8888", "gm", "_", "blurrect_compare")
783 skip("serialize-8888", "gm", "_", "blurrect_compare")
Eric Borena1613c92020-03-02 12:55:38 -0500784 }
785
786 // Extensions for RAW images
787 r := []string{
788 "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
789 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW",
790 }
791
792 // skbug.com/4888
Mike Kleina54d3802020-07-24 12:37:32 -0500793 // Skip RAW images (and a few large PNGs) on GPU bots
Eric Borena1613c92020-03-02 12:55:38 -0500794 // until we can resolve failures.
Eric Borenc27e7022020-03-09 08:43:45 -0400795 if b.gpu() {
Mike Kleina54d3802020-07-24 12:37:32 -0500796 skip("_ image _ interlaced1.png")
797 skip("_ image _ interlaced2.png")
798 skip("_ image _ interlaced3.png")
Eric Borena1613c92020-03-02 12:55:38 -0500799 for _, rawExt := range r {
Mike Kleina54d3802020-07-24 12:37:32 -0500800 skip(fmt.Sprintf("_ image _ .%s", rawExt))
Eric Borena1613c92020-03-02 12:55:38 -0500801 }
802 }
803
Mike Kleina54d3802020-07-24 12:37:32 -0500804 // Skip memory intensive tests on 32-bit bots.
Eric Borenc27e7022020-03-09 08:43:45 -0400805 if b.os("Win8") && b.arch("x86") {
Mike Kleina54d3802020-07-24 12:37:32 -0500806 skip("_ image f16 _")
807 skip("_ image _ abnormal.wbmp")
808 skip("_ image _ interlaced1.png")
809 skip("_ image _ interlaced2.png")
810 skip("_ image _ interlaced3.png")
Eric Borena1613c92020-03-02 12:55:38 -0500811 for _, rawExt := range r {
Mike Kleina54d3802020-07-24 12:37:32 -0500812 skip(fmt.Sprintf("_ image _ .%s", rawExt))
Eric Borena1613c92020-03-02 12:55:38 -0500813 }
814 }
815
Eric Borenc27e7022020-03-09 08:43:45 -0400816 if b.model("Nexus5", "Nexus5x") && b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500817 // skia:5876
Mike Kleina54d3802020-07-24 12:37:32 -0500818 skip("_", "gm", "_", "encode-platform")
Eric Borena1613c92020-03-02 12:55:38 -0500819 }
820
Brian Osman3b2fac62020-12-30 16:18:34 -0500821 if b.model("AndroidOne") && b.gpu() { // skia:4697, skia:4704, skia:4694, skia:4705, skia:11133
Mike Kleina54d3802020-07-24 12:37:32 -0500822 skip("_", "gm", "_", "bigblurs")
823 skip("_", "gm", "_", "strict_constraint_no_red_allowed")
824 skip("_", "gm", "_", "fast_constraint_red_is_allowed")
825 skip("_", "gm", "_", "dropshadowimagefilter")
826 skip("_", "gm", "_", "filterfastbounds")
827 skip(glPrefix, "gm", "_", "imageblurtiled")
828 skip("_", "gm", "_", "imagefiltersclipped")
829 skip("_", "gm", "_", "imagefiltersscaled")
830 skip("_", "gm", "_", "imageresizetiled")
831 skip("_", "gm", "_", "matrixconvolution")
832 skip("_", "gm", "_", "strokedlines")
Brian Osman3b2fac62020-12-30 16:18:34 -0500833 skip("_", "gm", "_", "runtime_intrinsics_matrix")
Eric Borena1613c92020-03-02 12:55:38 -0500834 if sampleCount > 0 {
835 glMsaaConfig := fmt.Sprintf("%smsaa%d", glPrefix, sampleCount)
Mike Kleina54d3802020-07-24 12:37:32 -0500836 skip(glMsaaConfig, "gm", "_", "imageblurtiled")
837 skip(glMsaaConfig, "gm", "_", "imagefiltersbase")
Eric Borena1613c92020-03-02 12:55:38 -0500838 }
839 }
840
John Stilesa0e407d2021-02-10 12:21:51 -0500841 if b.matchGpu("Adreno[56][0-9][0-9]") { // skia:11308 - disable on Adreno 5xx/6xx
842 skip("_", "tests", "_", "SkSLMatrixEquality_GPU")
843 }
844
Eric Borena1613c92020-03-02 12:55:38 -0500845 match := []string{}
Eric Borenc27e7022020-03-09 08:43:45 -0400846 if b.extraConfig("Valgrind") { // skia:3021
Eric Borena1613c92020-03-02 12:55:38 -0500847 match = append(match, "~Threaded")
848 }
849
Eric Borenc27e7022020-03-09 08:43:45 -0400850 if b.extraConfig("Valgrind") && b.extraConfig("PreAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -0500851 // skia:6575
852 match = append(match, "~multipicturedraw_")
853 }
854
Eric Borenc27e7022020-03-09 08:43:45 -0400855 if b.model("AndroidOne") {
John Stiles2cc126f2020-08-10 14:26:29 -0400856 match = append(match, "~WritePixels") // skia:4711
857 match = append(match, "~PremulAlphaRoundTrip_Gpu") // skia:7501
858 match = append(match, "~ReimportImageTextureWithMipLevels") // skia:8090
Brian Salomon602b4022020-06-15 09:53:34 -0400859 match = append(match, "~MorphologyFilterRadiusWithMirrorCTM_Gpu") // skia:10383
Eric Borena1613c92020-03-02 12:55:38 -0500860 }
861
Eric Borenc27e7022020-03-09 08:43:45 -0400862 if b.model("GalaxyS6") {
Eric Borena1613c92020-03-02 12:55:38 -0500863 match = append(match, "~SpecialImage") // skia:6338
864 match = append(match, "~skbug6653") // skia:6653
865 }
866
Eric Borenc27e7022020-03-09 08:43:45 -0400867 if b.extraConfig("MSAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500868 match = append(match, "~Once", "~Shared") // Not sure what's up with these tests.
869 }
870
Eric Borena1613c92020-03-02 12:55:38 -0500871 // By default, we test with GPU threading enabled, unless specifically
872 // disabled.
Eric Borenc27e7022020-03-09 08:43:45 -0400873 if b.extraConfig("NoGPUThreads") {
Eric Borena1613c92020-03-02 12:55:38 -0500874 args = append(args, "--gpuThreads", "0")
875 }
876
Eric Borenc27e7022020-03-09 08:43:45 -0400877 if b.extraConfig("Vulkan") && b.gpu("Adreno530") {
Eric Borena1613c92020-03-02 12:55:38 -0500878 // skia:5777
879 match = append(match, "~CopySurface")
880 }
881
Eric Borenc27e7022020-03-09 08:43:45 -0400882 if b.extraConfig("Vulkan") && b.matchGpu("Adreno") {
Eric Borena1613c92020-03-02 12:55:38 -0500883 // skia:7663
884 match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
885 match = append(match, "~WritePixelsMSAA_Gpu")
886 }
887
Eric Borenc27e7022020-03-09 08:43:45 -0400888 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelIris640") {
Eric Borena1613c92020-03-02 12:55:38 -0500889 match = append(match, "~VkHeapTests") // skia:6245
890 }
891
Eric Borenc27e7022020-03-09 08:43:45 -0400892 if b.isLinux() && b.gpu("IntelIris640") {
Eric Borena1613c92020-03-02 12:55:38 -0500893 match = append(match, "~Programs") // skia:7849
894 }
895
Eric Borenc27e7022020-03-09 08:43:45 -0400896 if b.model("TecnoSpark3Pro") {
Brian Osmanb883f7d2020-03-26 16:55:07 -0400897 // skia:9814
898 match = append(match, "~Programs")
899 match = append(match, "~ProcessorCloneTest")
900 match = append(match, "~ProcessorOptimizationValidationTest")
Eric Borena1613c92020-03-02 12:55:38 -0500901 }
902
Eric Borenc27e7022020-03-09 08:43:45 -0400903 if b.gpu("IntelIris640", "IntelHD615", "IntelHDGraphics615") {
Eric Borena1613c92020-03-02 12:55:38 -0500904 match = append(match, "~^SRGBReadWritePixels$") // skia:9225
905 }
906
Eric Borenc27e7022020-03-09 08:43:45 -0400907 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelHD405") {
Eric Borena1613c92020-03-02 12:55:38 -0500908 // skia:7322
Mike Kleina54d3802020-07-24 12:37:32 -0500909 skip("vk", "gm", "_", "skbug_257")
910 skip("vk", "gm", "_", "filltypespersp")
Eric Borena1613c92020-03-02 12:55:38 -0500911 match = append(match, "~^ClearOp$")
912 match = append(match, "~^CopySurface$")
913 match = append(match, "~^ImageNewShader_GPU$")
914 match = append(match, "~^InitialTextureClear$")
915 match = append(match, "~^PinnedImageTest$")
916 match = append(match, "~^ReadPixels_Gpu$")
917 match = append(match, "~^ReadPixels_Texture$")
918 match = append(match, "~^SRGBReadWritePixels$")
919 match = append(match, "~^VkUploadPixelsTests$")
920 match = append(match, "~^WritePixelsNonTexture_Gpu$")
921 match = append(match, "~^WritePixelsNonTextureMSAA_Gpu$")
922 match = append(match, "~^WritePixels_Gpu$")
923 match = append(match, "~^WritePixelsMSAA_Gpu$")
924 }
925
Eric Borenc27e7022020-03-09 08:43:45 -0400926 if b.extraConfig("Vulkan") && b.gpu("GTX660") && b.matchOs("Win") {
Eric Borena1613c92020-03-02 12:55:38 -0500927 // skbug.com/8047
928 match = append(match, "~FloatingPointTextureTest$")
929 }
930
Eric Borenc27e7022020-03-09 08:43:45 -0400931 if b.extraConfig("Metal") && b.gpu("RadeonHD8870M") && b.matchOs("Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500932 // skia:9255
933 match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
Weston Traceya77620b2021-02-25 11:24:34 -0500934 // skbug.com/11366
935 match = append(match, "~SurfacePartialDraw_Gpu")
Eric Borena1613c92020-03-02 12:55:38 -0500936 }
937
Brian Salomon63a0a752020-06-26 13:32:09 -0400938 if b.extraConfig("Direct3D") {
Jim Van Verth2b98f162020-06-11 15:27:35 -0400939 // skia:9935
Jim Van Verth2b98f162020-06-11 15:27:35 -0400940 match = append(match, "~^DDLSkSurfaceFlush$")
Jim Van Verth2b98f162020-06-11 15:27:35 -0400941 match = append(match, "~^GrBackendTextureImageMipMappedTest$")
Jim Van Verth2b98f162020-06-11 15:27:35 -0400942 match = append(match, "~^GrTextureMipMapInvalidationTest$")
Jim Van Verth2b98f162020-06-11 15:27:35 -0400943 match = append(match, "~^SkImage_makeTextureImage$")
Jim Van Verth2b98f162020-06-11 15:27:35 -0400944 match = append(match, "~^TextureIdleStateTest$")
Jim Van Verth2b98f162020-06-11 15:27:35 -0400945 }
946
Eric Borenc27e7022020-03-09 08:43:45 -0400947 if b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500948 // skia:7835
949 match = append(match, "~BlurMaskBiggerThanDest")
950 }
951
Eric Borenc27e7022020-03-09 08:43:45 -0400952 if b.gpu("IntelIris6100") && b.extraConfig("ANGLE") && !b.debug() {
Eric Borena1613c92020-03-02 12:55:38 -0500953 // skia:7376
954 match = append(match, "~^ProcessorOptimizationValidationTest$")
955 }
956
Eric Borenc27e7022020-03-09 08:43:45 -0400957 if b.gpu("IntelIris6100", "IntelHD4400") && b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500958 // skia:6857
Mike Kleina54d3802020-07-24 12:37:32 -0500959 skip("angle_d3d9_es2", "gm", "_", "lighting")
Eric Borena1613c92020-03-02 12:55:38 -0500960 }
961
Eric Borenc27e7022020-03-09 08:43:45 -0400962 if b.gpu("PowerVRGX6250") {
Eric Borena1613c92020-03-02 12:55:38 -0500963 match = append(match, "~gradients_view_perspective_nodither") //skia:6972
964 }
965
Brian Salomon1d2a26d2021-03-30 10:59:10 -0400966 if b.matchOs("iOS") && b.extraConfig("Metal") {
967 match = append(match, "~^SurfaceContextWritePixels$") //skia:11130
968 }
969
Eric Borenc27e7022020-03-09 08:43:45 -0400970 if b.arch("arm") && b.extraConfig("ASAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500971 // TODO: can we run with env allocator_may_return_null=1 instead?
972 match = append(match, "~BadImage")
973 }
974
Eric Borenc27e7022020-03-09 08:43:45 -0400975 if b.matchOs("Mac") && b.gpu("IntelHD6000") {
Eric Borena1613c92020-03-02 12:55:38 -0500976 // skia:7574
977 match = append(match, "~^ProcessorCloneTest$")
978 match = append(match, "~^GrMeshTest$")
979 }
980
Eric Borenc27e7022020-03-09 08:43:45 -0400981 if b.matchOs("Mac") && b.gpu("IntelHD615") {
Eric Borena1613c92020-03-02 12:55:38 -0500982 // skia:7603
983 match = append(match, "~^GrMeshTest$")
984 }
985
Greg Danieldbe77702020-05-13 18:36:34 -0400986 if b.extraConfig("Vulkan") && b.model("GalaxyS20") {
987 // skia:10247
988 match = append(match, "~VkPrepareForExternalIOQueueTransitionTest")
989 }
990
Mike Kleina54d3802020-07-24 12:37:32 -0500991 if len(skipped) > 0 {
992 args = append(args, "--skip")
993 args = append(args, skipped...)
Eric Borena1613c92020-03-02 12:55:38 -0500994 }
995
996 if len(match) > 0 {
997 args = append(args, "--match")
998 args = append(args, match...)
999 }
1000
1001 // These bots run out of memory running RAW codec tests. Do not run them in
1002 // parallel
Eric Borenc27e7022020-03-09 08:43:45 -04001003 // TODO(borenet): Previously this was `'Nexus5' in bot or 'Nexus9' in bot`
1004 // which also matched 'Nexus5x'. I added That here to maintain the
1005 // existing behavior, but we should verify that it's needed.
1006 if b.model("Nexus5", "Nexus5x", "Nexus9") {
Eric Borena1613c92020-03-02 12:55:38 -05001007 args = append(args, "--noRAW_threading")
1008 }
1009
Eric Borenc27e7022020-03-09 08:43:45 -04001010 if b.extraConfig("FSAA") {
Eric Borena1613c92020-03-02 12:55:38 -05001011 args = append(args, "--analyticAA", "false")
1012 }
Eric Borenc27e7022020-03-09 08:43:45 -04001013 if b.extraConfig("FAAA") {
Eric Borena1613c92020-03-02 12:55:38 -05001014 args = append(args, "--forceAnalyticAA")
1015 }
1016
Eric Borenc27e7022020-03-09 08:43:45 -04001017 if !b.extraConfig("NativeFonts") {
Eric Borena1613c92020-03-02 12:55:38 -05001018 args = append(args, "--nonativeFonts")
1019 }
1020
Eric Borenc27e7022020-03-09 08:43:45 -04001021 if b.extraConfig("GDI") {
Eric Borena1613c92020-03-02 12:55:38 -05001022 args = append(args, "--gdi")
1023 }
1024
1025 // Let's make all bots produce verbose output by default.
1026 args = append(args, "--verbose")
1027
1028 // See skia:2789.
Eric Borenc27e7022020-03-09 08:43:45 -04001029 if b.extraConfig("AbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -05001030 args = append(args, "--abandonGpuContext")
1031 }
Eric Borenc27e7022020-03-09 08:43:45 -04001032 if b.extraConfig("PreAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -05001033 args = append(args, "--preAbandonGpuContext")
1034 }
Eric Borenc27e7022020-03-09 08:43:45 -04001035 if b.extraConfig("ReleaseAndAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -05001036 args = append(args, "--releaseAndAbandonGpuContext")
1037 }
Eric Boren457c1eb2020-03-16 13:49:33 -04001038
1039 // Finalize the DM flags and properties.
1040 b.recipeProp("dm_flags", marshalJson(args))
1041 b.recipeProp("dm_properties", marshalJson(properties))
Eric Boren59e74962020-03-23 09:17:24 -04001042
1043 // Add properties indicating which assets the task should use.
1044 if b.matchExtraConfig("Lottie") {
Eric Boren0f9d5bd2020-03-23 09:57:05 -04001045 b.asset("lottie-samples")
Eric Boren59e74962020-03-23 09:17:24 -04001046 b.recipeProp("lotties", "true")
1047 } else {
1048 b.asset("skimage")
1049 b.recipeProp("images", "true")
1050 b.asset("skp")
1051 b.recipeProp("skps", "true")
1052 b.asset("svg")
1053 b.recipeProp("svgs", "true")
1054 }
1055 b.recipeProp("do_upload", fmt.Sprintf("%t", b.doUpload()))
1056 b.recipeProp("resources", "true")
Eric Borena1613c92020-03-02 12:55:38 -05001057}