1 // Copyright (c) 2013 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.
5 // A valid gpu control list json file is in the format of
17 // Each entry contains the following fields (fields are optional unless
18 // specifically described as mandatory below):
19 // 1. "id" is an integer. 0 is reserved. This field is mandatory.
20 // 2. "os" contains "type" and an optional "version". "type" could be "macosx",
21 // "linux", "win", "chromeos", or "any". "any" is the same as not specifying
23 // "version" is a VERSION structure (defined below).
24 // 3. "vendor_id" is a string. 0 is reserved.
25 // 4. "device_id" is an array of strings. 0 is reserved.
26 // 5. "multi_gpu_style" is a string, valid values include:
27 // a) "optimus": NVIDIA dual GPU
28 // b) "amd_switchable": AMD dual GPU
29 // c) "amd_switchable_integrated": AMD dual GPU, integrated GPU is active
30 // d) "amd_switchable_discrete": AMD dual GPU, discrete GPU is active
31 // c) and d) are only valid on Win, as on Mac we can switch GPU on the fly.
32 // 6. "multi_gpu_category" is a string, valid values include "any", "primary",
33 // "secondary", and "active". If unspecified, the default value is "primary".
34 // See gpu_control_list.h for more details on the meanings of the strings.
35 // 7. "driver_vendor" is a string pattern.
36 // 8. "driver_version" is a VERSION structure (defined below).
37 // 9. "driver_date" is a VERSION structure (defined below).
38 // The version is interpreted as "year.month.day".
39 // 10. "gl_type" is a string, valid values include "gl", "gles", and "angle".
40 // If "gl_version" is specified and "gl_type" is not, use the default value.
41 // The default value on Android is "gles", on Windows is "angle", on other
43 // 11. "gl_version" is a VERSION structure (defined below).
44 // 12. "gl_vendor" is a string pattern.
45 // 13. "gl_renderer" is a string pattern.
46 // 14. "gl_extensions" is a string pattern.
47 // 15. "machine_model_name" is an array of string patterns.
48 // 16. "machine_model_version" is a VERSION structure (defined below).
49 // 17. "gpu_count" is a INT structure (defined below).
50 // 18. "cpu_info" is a string pattern.
51 // 19. "exceptions" is a list of entries.
52 // 20. "features" is a list of gpu control list options, which can be
53 // configured by a specific list. See its *_json.cc file for a list of
54 // supported features. This field is mandatory.
55 // 21. "description" has the description of the entry.
56 // 22. "webkit_bugs" is an array of associated webkit bug numbers.
57 // 23. "cr_bugs" is an array of associated webkit bug numbers.
58 // 24. "disabled" is a boolean. If it is present, the entry will be skipped.
59 // This can not be used in exceptions.
60 // 25. "direct_rendering" is a boolean. If present, this will filter on whether
61 // the GL contexts are direct or indirect based on the value.
62 // 26. "disabled_extensions" is a list of strings which contain the GL_EXTENSION
63 // strings which are disabled by the workaround.
65 // VERSION includes "op", "style", "value", and "value2". "op" can be any of
66 // the following values: "=", "<", "<=", ">", ">=", "any", "between". "style"
67 // is optional and can be "lexical" or "numerical"; if it's not specified, it
68 // defaults to "numerical". "value2" is only used if "op" is "between".
69 // "between" is "value <= * <= value2".
70 // "value" is used for all "op" values except "any". "value" and "value2"
71 // are in the format of x, x.x, x.x.x, etc.
72 // Only "driver_version" supports lexical style if the format is major.minor;
73 // in that case, major is still numerical, but minor is lexical.
75 // FLOAT includes "op" "value", and "value2". "op" can be any of the
76 // following values: "=", "<", "<=", ">", ">=", "any", "between". "value2" is
77 // only used if "op" is "between". "value" is used for all "op" values except
78 // "any". "value" and "value2" are valid float numbers.
79 // INT is very much like FLOAT, except that the values need to be integers.
81 // String pattern syntax can be found at
82 // https://code.google.com/p/re2/wiki/Syntax.