1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130

gpu / config / gpu_control_list_format.txt [blame]

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// A valid gpu control list json file is in the format of
// {
//   "version": "x.y",
//   "entries": [
//     { // entry 1
//     },
//     ...
//     { // entry n
//     }
//   ]
// }
//
// Each entry contains the following fields (fields are optional unless
// specifically described as mandatory below):
// 1. "id" is an integer.  0 is reserved.  This field is mandatory.
// 2. "os" contains "type" and an optional "version". "type" could be "macosx",
//    "linux", "win", "chromeos", or "any".  "any" is the same as not specifying
//    "os".
//    "version" is a VERSION structure (defined below).
// 3. "vendor_id" is a string.  0 is reserved.
// 4. "device_id" is an array of strings.  0 is reserved
// 5. "device_revision" is an array of strings.  Default is 0.  This is Windows
//    only.  There are three ways to specify a device on Windows:
//      a) only specify device IDs;
//      b) specify one device ID, associate with multiple revisions;
//      c) specify k device IDs, associate with k device revisions.
//    https://docs.microsoft.com/en-us/windows-hardware/drivers/install/identifiers-for-pci-devices
// 6. "multi_gpu_style" is a string, valid values include:
//      a) "optimus": NVIDIA dual GPU
//      b) "amd_switchable": AMD dual GPU
//      c) "amd_switchable_integrated": AMD dual GPU, integrated GPU is active
//      d) "amd_switchable_discrete": AMD dual GPU, discrete GPU is active
//    c) and d) are only valid on Win, as on Mac we can switch GPU on the fly.
// 7. "multi_gpu_category" is a string, valid values include "any", "primary",
//    "secondary", and "active". If unspecified, the default value is "active".
//    See gpu_control_list.h for more details on the meanings of the strings.
// 8. "driver_vendor" is a string pattern. (Not available on Windows)
// 9. "driver_version" is a VERSION structure (defined below). On Windows
//    this value can be retrieved by searching for the "Driver File Version" in
//    dxdiag.txt
// 10. "gl_type" is a string, valid values include "gles", "angle_vulkan",
//     "angle_gles", and "angle_gl". "gles", "angle_vulkan", and "angle_gles"
//     are supported on Android; "angle_vulkan", "angle_gles", and "angle_gl"
//     are supported on Linux; "angle_vulkan" and "angle_gles" are supported on
//     ChromeOS.
// 11. "gl_version" is a VERSION structure (defined below).
//     This is only supported on Linux, ChromeOS, and Android.
// 12. "gl_vendor" is a string pattern.
// 13. "gl_renderer" is a string pattern.
// 14. "gl_extensions" is a string pattern.
// 15. "machine_model_name" is an array of string patterns.
// 16. "machine_model_version" is a VERSION structure (defined below).
// 17. "gpu_count" is a INT structure (defined below).
// 18. "cpu_info" is a string pattern.
// 19. "exceptions" is a list of entries.
// 20. "features" is a list of gpu control list options, which can be
//     configured by a specific list. See its *_json.cc file for a list of
//     supported features. This field is mandatory.
//     An "exceptions" list to the features can be added for convenience instead
//     of listing all features except one.
// 21. "description" has the description of the entry.
// 22. "webkit_bugs" is an array of associated webkit bug numbers.
// 23. "cr_bugs" is an array of associated webkit bug numbers.
// 24. "disabled" is a boolean. If it is present, the entry will be skipped.
//     This can not be used in exceptions.
// 25. "direct_rendering" is a boolean. If present, this will filter on whether
//     the GL contexts are direct or indirect based on the value.
// 26. "disabled_extensions" is a list of strings which contain the GL_EXTENSION
//     strings which are disabled by the workaround.
// 27. "pixel_shader_version" is a VERSION structure (defined below).
// 28. "test_group" is an non-negative integer. If not specified, it defaults
//     to 0, which is Chrome's blocklist. Any entries with a non-zero test_group
//     ID will be appended on top of the default group entries if Chrome runs
//     with --gpu-blocklist-test-group=ID. Entries with non-zero test_group ID
//     can also be enabled via experimentation. For example:
//     --enable-features=GPUBlockListTestGroup:test_group/117 or
//     --enable-features=GPUDriverBugListTestGroup:test_group/119
// 29. "intel_gpu_series" is a list of gpu series names. Currently supported
//     series include: "broadwater", "eaglelake", "ironlake", "sandybridge",
//     "baytrail", "ivybridge", "haswell", "cherrytrail", "broadwell",
//     "apollolake", "skylake", "geminilake", "kabylake", "amberlake",
//     "coffeelake", "whiskeylake", "cometlake", "cannonlake", "icelake",
//     "elkhartlake", "jasperlake", "tigerlake", "rocketlake", "DG1",
//     "alderlake", "alchemist", "raptorlake", "meteorlake", "arrowlake",
//     "lunarlake", "battlemage".
// 30. "hardware_overlay" is either "supported" or "unsupported". Currently it
//     only applies on Windows where hardware overlays may be supported on
//     certain Intel GPUs. By default it's "dont_care" and there is no need to
//     specify that.
// 31. "intel_gpu_generation" is a VERSION structure. Each Intel GPU has a
//     specific integer (meaning generation) associated.
// 32. "subpixel_font_rendering" is either "supported" or "unsupported".
//     Currently it only applies on ChromeOS where subpixel font rendering
//     causes a glitch on Mali GPUs. By default it's "dont_care" and there is
//     no need to specify that.
// 33. "driver_update_link" provides a link where affected users with older
//     drivers can download a newer driver to avoid triggering this entry.
//     Such link will be displayed in chrome://gpu for affected devices.
//
// VERSION includes "op", "style", "schema", "value", and "value2".  "op" can
// be any of the following values: "=", "<", "<=", ">", ">=", "any", "between".
// "style" is optional and can be "lexical" or "numerical"; if it's not
// specified, it defaults to "numerical". "schema" is optional and can be
// "common", "intel_driver" or "nvidia_driver"; if it's not specified, it
// defaults to "common"; it's an error to specify "(intel|nvidia)_driver" schema
// for entries that are not specifically for Intel|Nvidia GPUs on Windows.
// "value2" is only used if "op" is "between". "between" is
// "value <= * <= value2". "value" is used for all "op" values except "any".
// "value" and "value2" are in the format of x, x.x, x.x.x, etc.
// Only "driver_version" supports lexical style if the format is major.minor;
// in that case, major is still numerical, but minor is lexical.
// Only "driver_version" supports "(intel|nvidia)_driver" schema.
//
// intel_driver schema versions have the form like "AA.BB.(CC|CCC).DDDD". The
// last two fields are most relevant, and the first two will be ignored by
// setting them to 0. Thus "0.0.(CC|CCC).DDDD" will be used in comparison
// following the general rule.
//
// FLOAT includes "op" "value", and "value2".  "op" can be any of the
// following values: "=", "<", "<=", ">", ">=", "any", "between".  "value2" is
// only used if "op" is "between".  "value" is used for all "op" values except
// "any". "value" and "value2" are valid float numbers.
// INT is very much like FLOAT, except that the values need to be integers.
//
// String pattern syntax can be found at
// https://github.com/google/re2/blob/master/doc/syntax.txt