blob: 63b1d4353e3471fe5802fe3f69b8d52871816869 [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 Borena1613c92020-03-02 12:55:38 -0500155 threadLimit := -1
156 const MAIN_THREAD_ONLY = 0
157
158 // 32-bit desktop bots tend to run out of memory, because they have relatively
159 // far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
Eric Borenc27e7022020-03-09 08:43:45 -0400160 if b.arch("x86") {
Eric Borena1613c92020-03-02 12:55:38 -0500161 threadLimit = 4
162 }
163
164 // These bots run out of memory easily.
Eric Borenc27e7022020-03-09 08:43:45 -0400165 if b.model("MotoG4", "Nexus7") {
Eric Borena1613c92020-03-02 12:55:38 -0500166 threadLimit = MAIN_THREAD_ONLY
167 }
168
169 // Avoid issues with dynamically exceeding resource cache limits.
Eric Borenc27e7022020-03-09 08:43:45 -0400170 if b.matchExtraConfig("DISCARDABLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500171 threadLimit = MAIN_THREAD_ONLY
172 }
173
174 if threadLimit >= 0 {
175 args = append(args, "--threads", strconv.Itoa(threadLimit))
176 }
177
178 sampleCount := 0
179 glPrefix := ""
Eric Borenc27e7022020-03-09 08:43:45 -0400180 if b.extraConfig("SwiftShader") {
Eric Borena1613c92020-03-02 12:55:38 -0500181 configs = append(configs, "gles", "glesdft")
182 args = append(args, "--disableDriverCorrectnessWorkarounds")
Eric Borenc27e7022020-03-09 08:43:45 -0400183 } else if b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500184 args = append(args, "--nogpu")
185
186 configs = append(configs, "8888")
187
Mike Klein4ba8d1f2020-04-07 12:14:48 -0500188 if b.extraConfig("SkVM") {
189 args = append(args, "--skvm")
190 }
191
Eric Borenc27e7022020-03-09 08:43:45 -0400192 if b.extraConfig("BonusConfigs") {
Eric Borena1613c92020-03-02 12:55:38 -0500193 configs = []string{
194 "g8", "565",
195 "pic-8888", "serialize-8888",
196 "f16", "srgb", "esrgb", "narrow", "enarrow",
197 "p3", "ep3", "rec2020", "erec2020"}
198 }
199
Eric Borenc27e7022020-03-09 08:43:45 -0400200 if b.extraConfig("PDF") {
Eric Borena1613c92020-03-02 12:55:38 -0500201 configs = []string{"pdf"}
202 args = append(args, "--rasterize_pdf") // Works only on Mac.
203 // Take ~forever to rasterize:
Mike Kleina54d3802020-07-24 12:37:32 -0500204 skip("pdf gm _ lattice2")
205 skip("pdf gm _ hairmodes")
206 skip("pdf gm _ longpathdash")
Eric Borena1613c92020-03-02 12:55:38 -0500207 }
208
Eric Borenc27e7022020-03-09 08:43:45 -0400209 } else if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500210 args = append(args, "--nocpu")
211
212 // Add in either gles or gl configs to the canonical set based on OS
Eric Borena1613c92020-03-02 12:55:38 -0500213 glPrefix = "gl"
Chris Daltond4756592021-03-31 09:14:16 -0600214 // Use 4x MSAA for all our testing. It's more consistent and 8x MSAA is nondeterministic (by
215 // design) on NVIDIA hardware. The problem is especially bad on ANGLE. skia:6813 skia:6545
216 sampleCount = 4
Eric Borenc27e7022020-03-09 08:43:45 -0400217 if b.os("Android", "iOS") {
Chris Daltond4756592021-03-31 09:14:16 -0600218 glPrefix = "gles"
Eric Borena1613c92020-03-02 12:55:38 -0500219 // MSAA is disabled on Pixel3a (https://b.corp.google.com/issues/143074513).
Chris Dalton9ad1e6d2021-05-05 12:58:48 -0600220 // MSAA is disabled on Pixel5 (https://skbug.com/11152).
221 if b.model("Pixel3a", "Pixel5") {
Eric Borena1613c92020-03-02 12:55:38 -0500222 sampleCount = 0
223 }
Eric Borenc27e7022020-03-09 08:43:45 -0400224 } else if b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500225 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
226 sampleCount = 0
Eric Borenc27e7022020-03-09 08:43:45 -0400227 } else if b.os("ChromeOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500228 glPrefix = "gles"
229 }
230
Eric Borenc27e7022020-03-09 08:43:45 -0400231 if b.extraConfig("NativeFonts") {
Eric Borena1613c92020-03-02 12:55:38 -0500232 configs = append(configs, glPrefix)
233 } else {
234 configs = append(configs, glPrefix, glPrefix+"dft", glPrefix+"srgb")
235 if sampleCount > 0 {
236 configs = append(configs, fmt.Sprintf("%smsaa%d", glPrefix, sampleCount))
237 }
238 }
239
240 // The Tegra3 doesn't support MSAA
Eric Borenc27e7022020-03-09 08:43:45 -0400241 if b.gpu("Tegra3") ||
Eric Borena1613c92020-03-02 12:55:38 -0500242 // We aren't interested in fixing msaa bugs on current iOS devices.
Eric Borenc27e7022020-03-09 08:43:45 -0400243 b.model("iPad4", "iPadPro", "iPhone6", "iPhone7") ||
Eric Borena1613c92020-03-02 12:55:38 -0500244 // skia:5792
Eric Borenc27e7022020-03-09 08:43:45 -0400245 b.gpu("IntelHD530", "IntelIris540") {
Eric Borena1613c92020-03-02 12:55:38 -0500246 configs = removeContains(configs, "msaa")
247 }
248
249 // We want to test both the OpenGL config and the GLES config on Linux Intel:
250 // GL is used by Chrome, GLES is used by ChromeOS.
251 // Also do the Ganesh threading verification test (render with and without
252 // worker threads, using only the SW path renderer, and compare the results).
Eric Borenc27e7022020-03-09 08:43:45 -0400253 if b.matchGpu("Intel") && b.isLinux() {
Eric Borena1613c92020-03-02 12:55:38 -0500254 configs = append(configs, "gles", "glesdft", "glessrgb", "gltestthreading")
255 // skbug.com/6333, skbug.com/6419, skbug.com/6702
Mike Kleina54d3802020-07-24 12:37:32 -0500256 skip("gltestthreading gm _ lcdblendmodes")
257 skip("gltestthreading gm _ lcdoverlap")
258 skip("gltestthreading gm _ textbloblooper")
Eric Borena1613c92020-03-02 12:55:38 -0500259 // All of these GMs are flaky, too:
Mike Kleina54d3802020-07-24 12:37:32 -0500260 skip("gltestthreading gm _ savelayer_with_backdrop")
261 skip("gltestthreading gm _ persp_shaders_bw")
262 skip("gltestthreading gm _ dftext_blob_persp")
263 skip("gltestthreading gm _ dftext")
264 skip("gltestthreading gm _ gpu_blur_utils")
265 skip("gltestthreading gm _ gpu_blur_utils_ref")
266 skip("gltestthreading gm _ gpu_blur_utils_subset_rect")
267 skip("gltestthreading gm _ gpu_blur_utils_subset_rect_ref")
Eric Borena1613c92020-03-02 12:55:38 -0500268 // skbug.com/7523 - Flaky on various GPUs
Mike Kleina54d3802020-07-24 12:37:32 -0500269 skip("gltestthreading gm _ orientation")
Eric Borena1613c92020-03-02 12:55:38 -0500270 // These GMs only differ in the low bits
Mike Kleina54d3802020-07-24 12:37:32 -0500271 skip("gltestthreading gm _ stroketext")
272 skip("gltestthreading gm _ draw_image_set")
Eric Borena1613c92020-03-02 12:55:38 -0500273 }
274
275 // CommandBuffer bot *only* runs the command_buffer config.
Eric Borenc27e7022020-03-09 08:43:45 -0400276 if b.extraConfig("CommandBuffer") {
Eric Borena1613c92020-03-02 12:55:38 -0500277 configs = []string{"commandbuffer"}
278 }
279
Brian Salomon414782d2020-04-17 09:34:17 -0400280 // Dawn bot *only* runs the dawn config
Brian Salomon46994e02020-03-31 19:43:29 -0400281 if b.extraConfig("Dawn") {
282 configs = []string{"dawn"}
283 }
284
Brian Salomon414782d2020-04-17 09:34:17 -0400285 // ANGLE bot *only* runs the angle configs
Eric Borenc27e7022020-03-09 08:43:45 -0400286 if b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500287 configs = []string{"angle_d3d11_es2",
Eric Borena1613c92020-03-02 12:55:38 -0500288 "angle_gl_es2",
289 "angle_d3d11_es3"}
290 if sampleCount > 0 {
291 configs = append(configs, fmt.Sprintf("angle_d3d11_es2_msaa%d", sampleCount))
292 configs = append(configs, fmt.Sprintf("angle_d3d11_es3_msaa%d", sampleCount))
293 }
Eric Borenc27e7022020-03-09 08:43:45 -0400294 if b.matchGpu("GTX", "Quadro") {
Eric Borena1613c92020-03-02 12:55:38 -0500295 // See skia:7823 and chromium:693090.
296 configs = append(configs, "angle_gl_es3")
297 if sampleCount > 0 {
298 configs = append(configs, fmt.Sprintf("angle_gl_es2_msaa%d", sampleCount))
299 configs = append(configs, fmt.Sprintf("angle_gl_es3_msaa%d", sampleCount))
300 }
301 }
Brian Salomon414782d2020-04-17 09:34:17 -0400302 if !b.matchGpu("GTX", "Quadro", "GT610") {
303 // See skia:10149
304 configs = append(configs, "angle_d3d9_es2")
305 }
Eric Borenc27e7022020-03-09 08:43:45 -0400306 if b.model("NUC5i7RYH") {
Eric Borena1613c92020-03-02 12:55:38 -0500307 // skbug.com/7376
Mike Kleina54d3802020-07-24 12:37:32 -0500308 skip("_ test _ ProcessorCloneTest")
Eric Borena1613c92020-03-02 12:55:38 -0500309 }
310 }
311
John Stiles2cc126f2020-08-10 14:26:29 -0400312 if b.model("AndroidOne", "GalaxyS6", "Nexus5", "Nexus7") {
Eric Borena1613c92020-03-02 12:55:38 -0500313 // skbug.com/9019
Mike Kleina54d3802020-07-24 12:37:32 -0500314 skip("_ test _ ProcessorCloneTest")
315 skip("_ test _ Programs")
316 skip("_ test _ ProcessorOptimizationValidationTest")
Eric Borena1613c92020-03-02 12:55:38 -0500317 }
318
John Stiles2cc126f2020-08-10 14:26:29 -0400319 if b.model("GalaxyS20") {
320 // skbug.com/10595
321 skip("_ test _ ProcessorCloneTest")
322 }
323
Eric Borenc27e7022020-03-09 08:43:45 -0400324 if b.extraConfig("CommandBuffer") && b.model("MacBook10.1") {
Eric Borena1613c92020-03-02 12:55:38 -0500325 // skbug.com/9235
Mike Kleina54d3802020-07-24 12:37:32 -0500326 skip("_ test _ Programs")
Eric Borena1613c92020-03-02 12:55:38 -0500327 }
328
Brian Salomon0f396992020-06-19 19:51:21 -0400329 if b.extraConfig("CommandBuffer") {
330 // skbug.com/10412
Mike Kleina54d3802020-07-24 12:37:32 -0500331 skip("_ test _ GLBackendAllocationTest")
Brian Salomon0f396992020-06-19 19:51:21 -0400332 }
333
Eric Borena1613c92020-03-02 12:55:38 -0500334 // skbug.com/9043 - these devices render this test incorrectly
335 // when opList splitting reduction is enabled
Eric Borenc27e7022020-03-09 08:43:45 -0400336 if b.gpu() && b.extraConfig("Vulkan") && (b.gpu("RadeonR9M470X", "RadeonHD7770")) {
Mike Kleina54d3802020-07-24 12:37:32 -0500337 skip("_", "tests", "_", "VkDrawableImportTest")
Eric Borena1613c92020-03-02 12:55:38 -0500338 }
Eric Borenc27e7022020-03-09 08:43:45 -0400339 if b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500340 configs = []string{"vk"}
Chris Daltond4756592021-03-31 09:14:16 -0600341 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926, skia:9023
342 if !b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500343 configs = append(configs, "vkmsaa4")
Eric Borena1613c92020-03-02 12:55:38 -0500344 }
345 }
Eric Borenc27e7022020-03-09 08:43:45 -0400346 if b.extraConfig("Metal") {
Eric Borena1613c92020-03-02 12:55:38 -0500347 configs = []string{"mtl"}
Chris Daltond4756592021-03-31 09:14:16 -0600348 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
349 if !b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500350 configs = append(configs, "mtlmsaa4")
Eric Borena1613c92020-03-02 12:55:38 -0500351 }
352 }
Jim Van Verth2b98f162020-06-11 15:27:35 -0400353 if b.extraConfig("Direct3D") {
John Stiles2cc126f2020-08-10 14:26:29 -0400354 configs = []string{"d3d"}
Jim Van Verth2b98f162020-06-11 15:27:35 -0400355 }
Eric Borena1613c92020-03-02 12:55:38 -0500356
357 // Test 1010102 on our Linux/NVIDIA bots and the persistent cache config
358 // on the GL bots.
Eric Borenc27e7022020-03-09 08:43:45 -0400359 if b.gpu("QuadroP400") && !b.extraConfig("PreAbandonGpuContext") && !b.extraConfig("TSAN") && b.isLinux() {
360 if b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500361 configs = append(configs, "vk1010102")
362 // Decoding transparent images to 1010102 just looks bad
Mike Kleina54d3802020-07-24 12:37:32 -0500363 skip("vk1010102 image _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500364 } else {
365 configs = append(configs, "gl1010102", "gltestpersistentcache", "gltestglslcache", "gltestprecompile")
366 // Decoding transparent images to 1010102 just looks bad
Mike Kleina54d3802020-07-24 12:37:32 -0500367 skip("gl1010102 image _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500368 // These tests produce slightly different pixels run to run on NV.
Mike Kleina54d3802020-07-24 12:37:32 -0500369 skip("gltestpersistentcache gm _ atlastext")
370 skip("gltestpersistentcache gm _ dftext")
371 skip("gltestpersistentcache gm _ glyph_pos_h_b")
372 skip("gltestpersistentcache gm _ glyph_pos_h_f")
373 skip("gltestpersistentcache gm _ glyph_pos_n_f")
374 skip("gltestglslcache gm _ atlastext")
375 skip("gltestglslcache gm _ dftext")
376 skip("gltestglslcache gm _ glyph_pos_h_b")
377 skip("gltestglslcache gm _ glyph_pos_h_f")
378 skip("gltestglslcache gm _ glyph_pos_n_f")
379 skip("gltestprecompile gm _ atlastext")
380 skip("gltestprecompile gm _ dftext")
381 skip("gltestprecompile gm _ glyph_pos_h_b")
382 skip("gltestprecompile gm _ glyph_pos_h_f")
383 skip("gltestprecompile gm _ glyph_pos_n_f")
Eric Borena1613c92020-03-02 12:55:38 -0500384 // Tessellation shaders do not yet participate in the persistent cache.
Mike Kleina54d3802020-07-24 12:37:32 -0500385 skip("gltestpersistentcache gm _ tessellation")
386 skip("gltestglslcache gm _ tessellation")
387 skip("gltestprecompile gm _ tessellation")
Eric Borena1613c92020-03-02 12:55:38 -0500388 }
389 }
390
391 // We also test the SkSL precompile config on Pixel2XL as a representative
392 // Android device - this feature is primarily used by Flutter.
Eric Borenc27e7022020-03-09 08:43:45 -0400393 if b.model("Pixel2XL") && !b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500394 configs = append(configs, "glestestprecompile")
395 }
396
Robert Phillips8b87f4e2021-03-18 12:16:03 -0400397 // Test SkSL precompile on iPhone 8 as representative iOS device
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500398 if b.model("iPhone8") && b.extraConfig("Metal") {
Robert Phillips8b87f4e2021-03-18 12:16:03 -0400399 configs = append(configs, "mtltestprecompile")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500400 // avoid tests that can generate slightly different pixels per run
401 skip("mtltestprecompile gm _ atlastext")
402 skip("mtltestprecompile gm _ circular_arcs_hairline")
403 skip("mtltestprecompile gm _ dftext")
Brian Salomona65c2952021-05-18 17:29:29 -0400404 skip("mtltestprecompile gm _ fontmgr_bounds")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500405 skip("mtltestprecompile gm _ fontmgr_bounds_1_-0.25")
406 skip("mtltestprecompile gm _ glyph_pos_h_b")
407 skip("mtltestprecompile gm _ glyph_pos_h_f")
408 skip("mtltestprecompile gm _ glyph_pos_n_f")
Brian Salomona65c2952021-05-18 17:29:29 -0400409 skip("mtltestprecompile gm _ strokedlines")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500410 skip("mtltestprecompile gm _ strokes3")
411 skip("mtltestprecompile gm _ texel_subset_linear_mipmap_nearest_down")
412 skip("mtltestprecompile gm _ texel_subset_linear_mipmap_linear_down")
Brian Salomona65c2952021-05-18 17:29:29 -0400413 skip("mtltestprecompile gm _ textblobmixedsizes_df")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500414 skip("mtltestprecompile svg _ A_large_blank_world_map_with_oceans_marked_in_blue.svg")
415 skip("mtltestprecompile svg _ Chalkboard.svg")
Robert Phillips8b87f4e2021-03-18 12:16:03 -0400416 skip("mtltestprecompile svg _ Ghostscript_Tiger.svg")
Brian Salomona65c2952021-05-18 17:29:29 -0400417 skip("mtltestprecompile svg _ Seal_of_Illinois.svg")
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500418 }
Brian Salomon91216d52021-04-09 11:57:59 -0400419 // Test reduced shader mode on iPhone 11 as representative iOS device
420 if b.model("iPhone11") && b.extraConfig("Metal") {
421 configs = append(configs, "mtlreducedshaders")
422 }
Jim Van Verthf54a96b2021-03-11 11:39:33 -0500423
Chris Daltonc44612b2021-03-30 20:50:49 -0600424 if b.gpu("AppleM1") && !b.extraConfig("Metal") {
John Stiles95680232021-04-22 15:05:20 -0400425 skip("_ test _ TransferPixelsFromTextureTest") // skia:11814
Chris Daltonc44612b2021-03-30 20:50:49 -0600426 }
427
Adlai Hollerd37a0852021-04-22 11:08:12 -0400428 if b.model(DONT_REDUCE_OPS_TASK_SPLITTING_MODELS...) {
429 args = append(args, "--dontReduceOpsTaskSplitting", "true")
Adlai Hollere1a72842021-03-01 17:47:07 -0600430 }
431
Adlai Hollerc81ad2d2021-04-16 14:18:10 -0400432 // Test reduceOpsTaskSplitting fallback when over budget.
433 if b.model("NUC7i5BNK") && b.extraConfig("ASAN") {
434 args = append(args, "--gpuResourceCacheLimit", "16777216")
435 }
436
Eric Borena1613c92020-03-02 12:55:38 -0500437 // Test rendering to wrapped dsts on a few bots
438 // Also test "glenarrow", which hits F16 surfaces and F16 vertex colors.
Eric Borenc27e7022020-03-09 08:43:45 -0400439 if b.extraConfig("BonusConfigs") {
Brian Salomon91216d52021-04-09 11:57:59 -0400440 configs = []string{"glbetex", "glbert", "glenarrow", "glreducedshaders"}
Eric Borena1613c92020-03-02 12:55:38 -0500441 }
442
Eric Borenc27e7022020-03-09 08:43:45 -0400443 if b.os("ChromeOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500444 // Just run GLES for now - maybe add gles_msaa4 in the future
445 configs = []string{"gles"}
446 }
447
Eric Borena1613c92020-03-02 12:55:38 -0500448 // Test GPU tessellation path renderer.
Eric Borenc27e7022020-03-09 08:43:45 -0400449 if b.extraConfig("GpuTess") {
Eric Borena1613c92020-03-02 12:55:38 -0500450 configs = []string{glPrefix + "msaa4"}
Chris Dalton15f51842020-12-15 19:55:10 -0700451 args = append(args, "--hwtess", "--pr", "tess")
Eric Borena1613c92020-03-02 12:55:38 -0500452 }
453
Chris Dalton81513372021-03-18 00:32:48 -0600454 // Test dynamic MSAA.
455 if b.extraConfig("DMSAA") {
456 configs = []string{glPrefix + "dmsaa"}
Chris Daltond7872ac2021-04-23 21:41:24 -0600457 if !b.os("Android") {
458 // Also enable hardware tessellation if not on android.
459 args = append(args, "--hwtess")
460 }
Chris Dalton81513372021-03-18 00:32:48 -0600461 }
462
Eric Borena1613c92020-03-02 12:55:38 -0500463 // DDL is a GPU-only feature
Eric Borenc27e7022020-03-09 08:43:45 -0400464 if b.extraConfig("DDL1") {
Robert Phillips2329db12020-05-04 09:20:00 -0400465 // This bot generates comparison images for the large skps and the gms
Eric Borena1613c92020-03-02 12:55:38 -0500466 configs = filter(configs, "gl", "vk", "mtl")
467 args = append(args, "--skpViewportSize", "2048")
Eric Borena1613c92020-03-02 12:55:38 -0500468 }
Eric Borenc27e7022020-03-09 08:43:45 -0400469 if b.extraConfig("DDL3") {
Robert Phillips2329db12020-05-04 09:20:00 -0400470 // This bot generates the real ddl images for the large skps and the gms
Robert Phillipsb3238362021-02-26 08:48:20 -0500471 configs = suffix(filter(configs, "gl", "vk", "mtl"), "ddl")
Eric Borena1613c92020-03-02 12:55:38 -0500472 args = append(args, "--skpViewportSize", "2048")
473 args = append(args, "--gpuThreads", "0")
474 }
Robert Phillipsfe7794d2020-06-26 09:36:22 -0400475 if b.extraConfig("OOPRDDL") {
476 // This bot generates the real oopr/DDL images for the large skps and the GMs
477 configs = suffix(filter(configs, "gl", "vk", "mtl"), "ooprddl")
478 args = append(args, "--skpViewportSize", "2048")
479 args = append(args, "--gpuThreads", "0")
480 }
Eric Borena1613c92020-03-02 12:55:38 -0500481 }
482
483 // Sharding.
Eric Borenc27e7022020-03-09 08:43:45 -0400484 tf := b.parts["test_filter"]
Eric Borena1613c92020-03-02 12:55:38 -0500485 if tf != "" && tf != "All" {
486 // Expected format: shard_XX_YY
487 split := strings.Split(tf, "_")
488 if len(split) == 3 {
489 args = append(args, "--shard", split[1])
490 args = append(args, "--shards", split[2])
491 } else {
492 glog.Fatalf("Invalid task name - bad shards: %s", tf)
493 }
494 }
495
496 args = append(args, "--config")
497 args = append(args, configs...)
498
499 removeFromArgs := func(arg string) {
500 args = remove(args, arg)
501 }
502
503 // Run tests, gms, and image decoding tests everywhere.
504 args = append(args, "--src", "tests", "gm", "image", "lottie", "colorImage", "svg", "skp")
Eric Borenc27e7022020-03-09 08:43:45 -0400505 if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500506 // Don't run the "svgparse_*" svgs on GPU.
Mike Kleina54d3802020-07-24 12:37:32 -0500507 skip("_ svg _ svgparse_")
Weston Tracey24627882020-04-06 21:27:14 -0400508 } else if b.Name == "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" {
Eric Borena1613c92020-03-02 12:55:38 -0500509 // Only run the CPU SVGs on 8888.
Mike Kleina54d3802020-07-24 12:37:32 -0500510 skip("~8888 svg _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500511 } else {
512 // On CPU SVGs we only care about parsing. Only run them on the above bot.
513 removeFromArgs("svg")
514 }
515
516 // Eventually I'd like these to pass, but for now just skip 'em.
Eric Borenc27e7022020-03-09 08:43:45 -0400517 if b.extraConfig("SK_FORCE_RASTER_PIPELINE_BLITTER") {
Eric Borena1613c92020-03-02 12:55:38 -0500518 removeFromArgs("tests")
519 }
520
Eric Borenc27e7022020-03-09 08:43:45 -0400521 if b.extraConfig("NativeFonts") { // images won't exercise native font integration :)
Eric Borena1613c92020-03-02 12:55:38 -0500522 removeFromArgs("image")
523 removeFromArgs("colorImage")
524 }
525
Eric Borenc27e7022020-03-09 08:43:45 -0400526 if b.matchExtraConfig("DDL", "PDF") {
Eric Borena1613c92020-03-02 12:55:38 -0500527 // The DDL and PDF bots just render the large skps and the gms
528 removeFromArgs("tests")
529 removeFromArgs("image")
530 removeFromArgs("colorImage")
531 removeFromArgs("svg")
532 } else {
533 // No other bots render the .skps.
534 removeFromArgs("skp")
535 }
536
Eric Borenc27e7022020-03-09 08:43:45 -0400537 if b.extraConfig("Lottie") {
Eric Borena1613c92020-03-02 12:55:38 -0500538 // Only run the lotties on Lottie bots.
539 removeFromArgs("tests")
540 removeFromArgs("gm")
541 removeFromArgs("image")
542 removeFromArgs("colorImage")
543 removeFromArgs("svg")
544 removeFromArgs("skp")
545 } else {
546 removeFromArgs("lottie")
547 }
548
Tyler Denniston5f90ee02020-10-16 16:24:43 -0400549 if b.extraConfig("TSAN") {
550 // skbug.com/10848
551 removeFromArgs("svg")
552 }
553
Eric Borena1613c92020-03-02 12:55:38 -0500554 // TODO: ???
Mike Kleina54d3802020-07-24 12:37:32 -0500555 skip("f16 _ _ dstreadshuffle")
556 skip("glsrgb image _ _")
557 skip("glessrgb image _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500558
559 // --src image --config g8 means "decode into Gray8", which isn't supported.
Mike Kleina54d3802020-07-24 12:37:32 -0500560 skip("g8 image _ _")
561 skip("g8 colorImage _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500562
Eric Borenc27e7022020-03-09 08:43:45 -0400563 if b.extraConfig("Valgrind") {
Eric Borena1613c92020-03-02 12:55:38 -0500564 // These take 18+ hours to run.
Mike Kleina54d3802020-07-24 12:37:32 -0500565 skip("pdf gm _ fontmgr_iter")
566 skip("pdf _ _ PANO_20121023_214540.jpg")
567 skip("pdf skp _ worldjournal")
568 skip("pdf skp _ desk_baidu.skp")
569 skip("pdf skp _ desk_wikipedia.skp")
570 skip("_ svg _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500571 // skbug.com/9171 and 8847
Mike Kleina54d3802020-07-24 12:37:32 -0500572 skip("_ test _ InitialTextureClear")
Eric Borena1613c92020-03-02 12:55:38 -0500573 }
574
Robert Phillips5890fec2020-07-28 15:23:42 -0400575 if b.model("Pixel3") {
576 // skbug.com/10546
577 skip("vkddl gm _ compressed_textures_nmof")
578 skip("vkddl gm _ compressed_textures_npot")
579 skip("vkddl gm _ compressed_textures")
580 }
581
Eric Borenc27e7022020-03-09 08:43:45 -0400582 if b.model("TecnoSpark3Pro") {
Eric Borena1613c92020-03-02 12:55:38 -0500583 // skbug.com/9421
Mike Kleina54d3802020-07-24 12:37:32 -0500584 skip("_ test _ InitialTextureClear")
Eric Borena1613c92020-03-02 12:55:38 -0500585 }
586
Eric Borenc27e7022020-03-09 08:43:45 -0400587 if b.os("iOS") {
Mike Kleina54d3802020-07-24 12:37:32 -0500588 skip(glPrefix + " skp _ _")
Eric Borena1613c92020-03-02 12:55:38 -0500589 }
590
Eric Borenc27e7022020-03-09 08:43:45 -0400591 if b.matchOs("Mac", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500592 // CG fails on questionable bmps
Mike Kleina54d3802020-07-24 12:37:32 -0500593 skip("_ image gen_platf rgba32abf.bmp")
594 skip("_ image gen_platf rgb24prof.bmp")
595 skip("_ image gen_platf rgb24lprof.bmp")
596 skip("_ image gen_platf 8bpp-pixeldata-cropped.bmp")
597 skip("_ image gen_platf 4bpp-pixeldata-cropped.bmp")
598 skip("_ image gen_platf 32bpp-pixeldata-cropped.bmp")
599 skip("_ image gen_platf 24bpp-pixeldata-cropped.bmp")
Eric Borena1613c92020-03-02 12:55:38 -0500600
601 // CG has unpredictable behavior on this questionable gif
602 // It's probably using uninitialized memory
Mike Kleina54d3802020-07-24 12:37:32 -0500603 skip("_ image gen_platf frame_larger_than_image.gif")
Eric Borena1613c92020-03-02 12:55:38 -0500604
605 // CG has unpredictable behavior on incomplete pngs
606 // skbug.com/5774
Mike Kleina54d3802020-07-24 12:37:32 -0500607 skip("_ image gen_platf inc0.png")
608 skip("_ image gen_platf inc1.png")
609 skip("_ image gen_platf inc2.png")
610 skip("_ image gen_platf inc3.png")
611 skip("_ image gen_platf inc4.png")
612 skip("_ image gen_platf inc5.png")
613 skip("_ image gen_platf inc6.png")
614 skip("_ image gen_platf inc7.png")
615 skip("_ image gen_platf inc8.png")
616 skip("_ image gen_platf inc9.png")
617 skip("_ image gen_platf inc10.png")
618 skip("_ image gen_platf inc11.png")
619 skip("_ image gen_platf inc12.png")
620 skip("_ image gen_platf inc13.png")
621 skip("_ image gen_platf inc14.png")
622 skip("_ image gen_platf incInterlaced.png")
Eric Borena1613c92020-03-02 12:55:38 -0500623
624 // These images fail after Mac 10.13.1 upgrade.
Mike Kleina54d3802020-07-24 12:37:32 -0500625 skip("_ image gen_platf incInterlaced.gif")
626 skip("_ image gen_platf inc1.gif")
627 skip("_ image gen_platf inc0.gif")
628 skip("_ image gen_platf butterfly.gif")
Eric Borena1613c92020-03-02 12:55:38 -0500629 }
630
631 // WIC fails on questionable bmps
Eric Borenc27e7022020-03-09 08:43:45 -0400632 if b.matchOs("Win") {
Mike Kleina54d3802020-07-24 12:37:32 -0500633 skip("_ image gen_platf pal8os2v2.bmp")
634 skip("_ image gen_platf pal8os2v2-16.bmp")
635 skip("_ image gen_platf rgba32abf.bmp")
636 skip("_ image gen_platf rgb24prof.bmp")
637 skip("_ image gen_platf rgb24lprof.bmp")
638 skip("_ image gen_platf 8bpp-pixeldata-cropped.bmp")
639 skip("_ image gen_platf 4bpp-pixeldata-cropped.bmp")
640 skip("_ image gen_platf 32bpp-pixeldata-cropped.bmp")
641 skip("_ image gen_platf 24bpp-pixeldata-cropped.bmp")
Eric Borenc27e7022020-03-09 08:43:45 -0400642 if b.arch("x86_64") && b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500643 // This GM triggers a SkSmallAllocator assert.
Mike Kleina54d3802020-07-24 12:37:32 -0500644 skip("_ gm _ composeshader_bitmap")
Eric Borena1613c92020-03-02 12:55:38 -0500645 }
646 }
647
Eric Borenc27e7022020-03-09 08:43:45 -0400648 if b.matchOs("Win", "Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500649 // WIC and CG fail on arithmetic jpegs
Mike Kleina54d3802020-07-24 12:37:32 -0500650 skip("_ image gen_platf testimgari.jpg")
Eric Borena1613c92020-03-02 12:55:38 -0500651 // More questionable bmps that fail on Mac, too. skbug.com/6984
Mike Kleina54d3802020-07-24 12:37:32 -0500652 skip("_ image gen_platf rle8-height-negative.bmp")
653 skip("_ image gen_platf rle4-height-negative.bmp")
Eric Borena1613c92020-03-02 12:55:38 -0500654 }
655
656 // These PNGs have CRC errors. The platform generators seem to draw
657 // uninitialized memory without reporting an error, so skip them to
658 // avoid lots of images on Gold.
Mike Kleina54d3802020-07-24 12:37:32 -0500659 skip("_ image gen_platf error")
Eric Borena1613c92020-03-02 12:55:38 -0500660
Eric Borenc27e7022020-03-09 08:43:45 -0400661 if b.os("Android", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500662 // This test crashes the N9 (perhaps because of large malloc/frees). It also
663 // is fairly slow and not platform-specific. So we just disable it on all of
664 // Android and iOS. skia:5438
Mike Kleina54d3802020-07-24 12:37:32 -0500665 skip("_ test _ GrStyledShape")
Eric Borena1613c92020-03-02 12:55:38 -0500666 }
667
668 if internalHardwareLabel == "5" {
669 // http://b/118312149#comment9
Mike Kleina54d3802020-07-24 12:37:32 -0500670 skip("_ test _ SRGBReadWritePixels")
Eric Borena1613c92020-03-02 12:55:38 -0500671 }
672
673 // skia:4095
674 badSerializeGMs := []string{
John Stiles2cc126f2020-08-10 14:26:29 -0400675 "strict_constraint_batch_no_red_allowed", // https://crbug.com/skia/10278
676 "strict_constraint_no_red_allowed", // https://crbug.com/skia/10278
677 "fast_constraint_red_is_allowed", // https://crbug.com/skia/10278
Eric Borena1613c92020-03-02 12:55:38 -0500678 "c_gms",
679 "colortype",
680 "colortype_xfermodes",
681 "drawfilter",
682 "fontmgr_bounds_0.75_0",
683 "fontmgr_bounds_1_-0.25",
684 "fontmgr_bounds",
685 "fontmgr_match",
686 "fontmgr_iter",
687 "imagemasksubset",
688 "wacky_yuv_formats_domain",
689 "imagemakewithfilter",
690 "imagemakewithfilter_crop",
691 "imagemakewithfilter_crop_ref",
692 "imagemakewithfilter_ref",
693 }
694
695 // skia:5589
696 badSerializeGMs = append(badSerializeGMs,
697 "bitmapfilters",
698 "bitmapshaders",
Eric Borena1613c92020-03-02 12:55:38 -0500699 "convex_poly_clip",
700 "extractalpha",
701 "filterbitmap_checkerboard_32_32_g8",
702 "filterbitmap_image_mandrill_64",
703 "shadows",
704 "simpleaaclip_aaclip",
705 )
706
707 // skia:5595
708 badSerializeGMs = append(badSerializeGMs,
709 "composeshader_bitmap",
710 "scaled_tilemodes_npot",
711 "scaled_tilemodes",
712 )
713
714 // skia:5778
715 badSerializeGMs = append(badSerializeGMs, "typefacerendering_pfaMac")
716 // skia:5942
717 badSerializeGMs = append(badSerializeGMs, "parsedpaths")
718
719 // these use a custom image generator which doesn't serialize
720 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_rect")
721 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_shader")
722
723 // skia:6189
724 badSerializeGMs = append(badSerializeGMs, "shadow_utils")
725
726 // skia:7938
727 badSerializeGMs = append(badSerializeGMs, "persp_images")
728
729 // Not expected to round trip encoding/decoding.
730 badSerializeGMs = append(badSerializeGMs, "all_bitmap_configs")
731 badSerializeGMs = append(badSerializeGMs, "makecolorspace")
732 badSerializeGMs = append(badSerializeGMs, "readpixels")
733 badSerializeGMs = append(badSerializeGMs, "draw_image_set_rect_to_rect")
Michael Ludwig1c66ad92020-07-10 08:59:44 -0400734 badSerializeGMs = append(badSerializeGMs, "draw_image_set_alpha_only")
Eric Borena1613c92020-03-02 12:55:38 -0500735 badSerializeGMs = append(badSerializeGMs, "compositor_quads_shader")
736 badSerializeGMs = append(badSerializeGMs, "wacky_yuv_formats_qtr")
Brian Salomon04aef102021-01-23 11:41:54 -0500737 badSerializeGMs = append(badSerializeGMs, "runtime_effect_image")
Eric Borena1613c92020-03-02 12:55:38 -0500738
739 // This GM forces a path to be convex. That property doesn't survive
740 // serialization.
741 badSerializeGMs = append(badSerializeGMs, "analytic_antialias_convex")
742
743 for _, test := range badSerializeGMs {
Mike Kleina54d3802020-07-24 12:37:32 -0500744 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500745 }
746
Eric Borena1613c92020-03-02 12:55:38 -0500747 // It looks like we skip these only for out-of-memory concerns.
Eric Borenc27e7022020-03-09 08:43:45 -0400748 if b.matchOs("Win", "Android") {
Eric Borena1613c92020-03-02 12:55:38 -0500749 for _, test := range []string{"verylargebitmap", "verylarge_picture_image"} {
Mike Kleina54d3802020-07-24 12:37:32 -0500750 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500751 }
752 }
Eric Borenc27e7022020-03-09 08:43:45 -0400753 if b.matchOs("Mac") && b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500754 // skia:6992
Mike Kleina54d3802020-07-24 12:37:32 -0500755 skip("pic-8888", "gm", "_", "encode-platform")
756 skip("serialize-8888", "gm", "_", "encode-platform")
Eric Borena1613c92020-03-02 12:55:38 -0500757 }
758
759 // skia:4769
Mike Kleina54d3802020-07-24 12:37:32 -0500760 skip("pic-8888", "gm", "_", "drawfilter")
Eric Borena1613c92020-03-02 12:55:38 -0500761
762 // skia:4703
763 for _, test := range []string{"image-cacherator-from-picture",
764 "image-cacherator-from-raster",
765 "image-cacherator-from-ctable"} {
Mike Kleina54d3802020-07-24 12:37:32 -0500766 skip("pic-8888", "gm", "_", test)
767 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500768 }
769
770 // GM that requires raster-backed canvas
771 for _, test := range []string{"complexclip4_bw", "complexclip4_aa", "p3",
772 "async_rescale_and_read_text_up_large",
773 "async_rescale_and_read_text_up",
774 "async_rescale_and_read_text_down",
775 "async_rescale_and_read_dog_up",
776 "async_rescale_and_read_dog_down",
777 "async_rescale_and_read_rose",
Brian Salomonbacbb922021-01-21 19:48:00 -0500778 "async_rescale_and_read_no_bleed",
John Stilesa0e407d2021-02-10 12:21:51 -0500779 "async_rescale_and_read_alpha_type"} {
Mike Kleina54d3802020-07-24 12:37:32 -0500780 skip("pic-8888", "gm", "_", test)
781 skip("serialize-8888", "gm", "_", test)
Eric Borena1613c92020-03-02 12:55:38 -0500782
783 // GM requires canvas->makeSurface() to return a valid surface.
784 // TODO(borenet): These should be just outside of this block but are
785 // left here to match the recipe which has an indentation bug.
Mike Kleina54d3802020-07-24 12:37:32 -0500786 skip("pic-8888", "gm", "_", "blurrect_compare")
787 skip("serialize-8888", "gm", "_", "blurrect_compare")
Eric Borena1613c92020-03-02 12:55:38 -0500788 }
789
790 // Extensions for RAW images
791 r := []string{
792 "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
793 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW",
794 }
795
796 // skbug.com/4888
Mike Kleina54d3802020-07-24 12:37:32 -0500797 // Skip RAW images (and a few large PNGs) on GPU bots
Eric Borena1613c92020-03-02 12:55:38 -0500798 // until we can resolve failures.
Eric Borenc27e7022020-03-09 08:43:45 -0400799 if b.gpu() {
Mike Kleina54d3802020-07-24 12:37:32 -0500800 skip("_ image _ interlaced1.png")
801 skip("_ image _ interlaced2.png")
802 skip("_ image _ interlaced3.png")
Eric Borena1613c92020-03-02 12:55:38 -0500803 for _, rawExt := range r {
Mike Kleina54d3802020-07-24 12:37:32 -0500804 skip(fmt.Sprintf("_ image _ .%s", rawExt))
Eric Borena1613c92020-03-02 12:55:38 -0500805 }
806 }
807
Mike Kleina54d3802020-07-24 12:37:32 -0500808 // Skip memory intensive tests on 32-bit bots.
Eric Borenc27e7022020-03-09 08:43:45 -0400809 if b.os("Win8") && b.arch("x86") {
Mike Kleina54d3802020-07-24 12:37:32 -0500810 skip("_ image f16 _")
811 skip("_ image _ abnormal.wbmp")
812 skip("_ image _ interlaced1.png")
813 skip("_ image _ interlaced2.png")
814 skip("_ image _ interlaced3.png")
Eric Borena1613c92020-03-02 12:55:38 -0500815 for _, rawExt := range r {
Mike Kleina54d3802020-07-24 12:37:32 -0500816 skip(fmt.Sprintf("_ image _ .%s", rawExt))
Eric Borena1613c92020-03-02 12:55:38 -0500817 }
818 }
819
Eric Borenc27e7022020-03-09 08:43:45 -0400820 if b.model("Nexus5", "Nexus5x") && b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500821 // skia:5876
Mike Kleina54d3802020-07-24 12:37:32 -0500822 skip("_", "gm", "_", "encode-platform")
Eric Borena1613c92020-03-02 12:55:38 -0500823 }
824
Brian Osman3b2fac62020-12-30 16:18:34 -0500825 if b.model("AndroidOne") && b.gpu() { // skia:4697, skia:4704, skia:4694, skia:4705, skia:11133
Mike Kleina54d3802020-07-24 12:37:32 -0500826 skip("_", "gm", "_", "bigblurs")
827 skip("_", "gm", "_", "strict_constraint_no_red_allowed")
828 skip("_", "gm", "_", "fast_constraint_red_is_allowed")
829 skip("_", "gm", "_", "dropshadowimagefilter")
830 skip("_", "gm", "_", "filterfastbounds")
831 skip(glPrefix, "gm", "_", "imageblurtiled")
832 skip("_", "gm", "_", "imagefiltersclipped")
833 skip("_", "gm", "_", "imagefiltersscaled")
834 skip("_", "gm", "_", "imageresizetiled")
835 skip("_", "gm", "_", "matrixconvolution")
836 skip("_", "gm", "_", "strokedlines")
Brian Osman3b2fac62020-12-30 16:18:34 -0500837 skip("_", "gm", "_", "runtime_intrinsics_matrix")
Eric Borena1613c92020-03-02 12:55:38 -0500838 if sampleCount > 0 {
839 glMsaaConfig := fmt.Sprintf("%smsaa%d", glPrefix, sampleCount)
Mike Kleina54d3802020-07-24 12:37:32 -0500840 skip(glMsaaConfig, "gm", "_", "imageblurtiled")
841 skip(glMsaaConfig, "gm", "_", "imagefiltersbase")
Eric Borena1613c92020-03-02 12:55:38 -0500842 }
843 }
844
John Stilese4c43222021-04-29 21:38:07 -0400845 if b.matchGpu("Adreno[3456][0-9][0-9]") { // disable broken tests on Adreno 3/4/5/6xx
John Stiles191b4e22021-05-14 20:03:01 -0400846 skip("_", "tests", "_", "SkSLMatrices_GPU") // skia:11308
847 skip("_", "tests", "_", "SkSLMatrixEquality_GPU") // skia:11308
848 skip("_", "tests", "_", "SkSLMatrixScalarSplat_GPU") // skia:11308
849 skip("_", "tests", "_", "DSLFPTest_SwitchStatement") // skia:11891
850 skip("_", "tests", "_", "SkSLStructsInFunctions_GPU") // skia:11929
John Stilesa0e407d2021-02-10 12:21:51 -0500851 }
852
Eric Borena1613c92020-03-02 12:55:38 -0500853 match := []string{}
Eric Borenc27e7022020-03-09 08:43:45 -0400854 if b.extraConfig("Valgrind") { // skia:3021
Eric Borena1613c92020-03-02 12:55:38 -0500855 match = append(match, "~Threaded")
856 }
857
Eric Borenc27e7022020-03-09 08:43:45 -0400858 if b.extraConfig("Valgrind") && b.extraConfig("PreAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -0500859 // skia:6575
860 match = append(match, "~multipicturedraw_")
861 }
862
Eric Borenc27e7022020-03-09 08:43:45 -0400863 if b.model("AndroidOne") {
John Stiles2cc126f2020-08-10 14:26:29 -0400864 match = append(match, "~WritePixels") // skia:4711
865 match = append(match, "~PremulAlphaRoundTrip_Gpu") // skia:7501
866 match = append(match, "~ReimportImageTextureWithMipLevels") // skia:8090
Brian Salomon602b4022020-06-15 09:53:34 -0400867 match = append(match, "~MorphologyFilterRadiusWithMirrorCTM_Gpu") // skia:10383
Eric Borena1613c92020-03-02 12:55:38 -0500868 }
869
Eric Borenc27e7022020-03-09 08:43:45 -0400870 if b.model("GalaxyS6") {
Eric Borena1613c92020-03-02 12:55:38 -0500871 match = append(match, "~SpecialImage") // skia:6338
872 match = append(match, "~skbug6653") // skia:6653
873 }
874
Eric Borenc27e7022020-03-09 08:43:45 -0400875 if b.extraConfig("MSAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500876 match = append(match, "~Once", "~Shared") // Not sure what's up with these tests.
877 }
878
Eric Borena1613c92020-03-02 12:55:38 -0500879 // By default, we test with GPU threading enabled, unless specifically
880 // disabled.
Eric Borenc27e7022020-03-09 08:43:45 -0400881 if b.extraConfig("NoGPUThreads") {
Eric Borena1613c92020-03-02 12:55:38 -0500882 args = append(args, "--gpuThreads", "0")
883 }
884
Eric Borenc27e7022020-03-09 08:43:45 -0400885 if b.extraConfig("Vulkan") && b.gpu("Adreno530") {
Eric Borena1613c92020-03-02 12:55:38 -0500886 // skia:5777
887 match = append(match, "~CopySurface")
888 }
889
Eric Borenc27e7022020-03-09 08:43:45 -0400890 if b.extraConfig("Vulkan") && b.matchGpu("Adreno") {
Eric Borena1613c92020-03-02 12:55:38 -0500891 // skia:7663
892 match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
893 match = append(match, "~WritePixelsMSAA_Gpu")
894 }
895
Eric Borenc27e7022020-03-09 08:43:45 -0400896 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelIris640") {
Eric Borena1613c92020-03-02 12:55:38 -0500897 match = append(match, "~VkHeapTests") // skia:6245
898 }
899
Eric Borenc27e7022020-03-09 08:43:45 -0400900 if b.isLinux() && b.gpu("IntelIris640") {
Eric Borena1613c92020-03-02 12:55:38 -0500901 match = append(match, "~Programs") // skia:7849
902 }
903
Eric Borenc27e7022020-03-09 08:43:45 -0400904 if b.model("TecnoSpark3Pro") {
Brian Osmanb883f7d2020-03-26 16:55:07 -0400905 // skia:9814
906 match = append(match, "~Programs")
907 match = append(match, "~ProcessorCloneTest")
908 match = append(match, "~ProcessorOptimizationValidationTest")
Eric Borena1613c92020-03-02 12:55:38 -0500909 }
910
Eric Borenc27e7022020-03-09 08:43:45 -0400911 if b.gpu("IntelIris640", "IntelHD615", "IntelHDGraphics615") {
Eric Borena1613c92020-03-02 12:55:38 -0500912 match = append(match, "~^SRGBReadWritePixels$") // skia:9225
913 }
914
Eric Borenc27e7022020-03-09 08:43:45 -0400915 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelHD405") {
Eric Borena1613c92020-03-02 12:55:38 -0500916 // skia:7322
Mike Kleina54d3802020-07-24 12:37:32 -0500917 skip("vk", "gm", "_", "skbug_257")
918 skip("vk", "gm", "_", "filltypespersp")
Eric Borena1613c92020-03-02 12:55:38 -0500919 match = append(match, "~^ClearOp$")
920 match = append(match, "~^CopySurface$")
921 match = append(match, "~^ImageNewShader_GPU$")
922 match = append(match, "~^InitialTextureClear$")
923 match = append(match, "~^PinnedImageTest$")
924 match = append(match, "~^ReadPixels_Gpu$")
925 match = append(match, "~^ReadPixels_Texture$")
926 match = append(match, "~^SRGBReadWritePixels$")
927 match = append(match, "~^VkUploadPixelsTests$")
928 match = append(match, "~^WritePixelsNonTexture_Gpu$")
929 match = append(match, "~^WritePixelsNonTextureMSAA_Gpu$")
930 match = append(match, "~^WritePixels_Gpu$")
931 match = append(match, "~^WritePixelsMSAA_Gpu$")
932 }
933
Eric Borenc27e7022020-03-09 08:43:45 -0400934 if b.extraConfig("Vulkan") && b.gpu("GTX660") && b.matchOs("Win") {
Eric Borena1613c92020-03-02 12:55:38 -0500935 // skbug.com/8047
936 match = append(match, "~FloatingPointTextureTest$")
937 }
938
Eric Borenc27e7022020-03-09 08:43:45 -0400939 if b.extraConfig("Metal") && b.gpu("RadeonHD8870M") && b.matchOs("Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500940 // skia:9255
941 match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
Weston Traceya77620b2021-02-25 11:24:34 -0500942 // skbug.com/11366
943 match = append(match, "~SurfacePartialDraw_Gpu")
Eric Borena1613c92020-03-02 12:55:38 -0500944 }
945
Jim Van Verthe7dfbfe2021-04-20 16:17:04 -0400946 if b.extraConfig("Metal") && b.gpu("PowerVRGX6450") && b.matchOs("iOS") {
John Stiles95680232021-04-22 15:05:20 -0400947 // skbug.com/11885
948 match = append(match, "~flight_animated_image")
Jim Van Verthe7dfbfe2021-04-20 16:17:04 -0400949 }
950
Eric Borenc27e7022020-03-09 08:43:45 -0400951 if b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500952 // skia:7835
953 match = append(match, "~BlurMaskBiggerThanDest")
954 }
955
Eric Borenc27e7022020-03-09 08:43:45 -0400956 if b.gpu("IntelIris6100") && b.extraConfig("ANGLE") && !b.debug() {
Eric Borena1613c92020-03-02 12:55:38 -0500957 // skia:7376
958 match = append(match, "~^ProcessorOptimizationValidationTest$")
959 }
960
Eric Borenc27e7022020-03-09 08:43:45 -0400961 if b.gpu("IntelIris6100", "IntelHD4400") && b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500962 // skia:6857
Mike Kleina54d3802020-07-24 12:37:32 -0500963 skip("angle_d3d9_es2", "gm", "_", "lighting")
Eric Borena1613c92020-03-02 12:55:38 -0500964 }
965
Eric Borenc27e7022020-03-09 08:43:45 -0400966 if b.gpu("PowerVRGX6250") {
Eric Borena1613c92020-03-02 12:55:38 -0500967 match = append(match, "~gradients_view_perspective_nodither") //skia:6972
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}