gpu_switches.cc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // Copyright 2015 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. #include "gpu/config/gpu_switches.h"
  5. namespace switches {
  6. // Disable GPU rasterization, i.e. rasterize on the CPU only.
  7. // Overrides the kEnableGpuRasterization flag.
  8. const char kDisableGpuRasterization[] = "disable-gpu-rasterization";
  9. // Disables mipmap generation in Skia. Used a workaround for select low memory
  10. // devices, see https://crbug.com/1138979 for details.
  11. const char kDisableMipmapGeneration[] = "disable-mipmap-generation";
  12. // Allow heuristics to determine when a layer tile should be drawn with the
  13. // Skia GPU backend. Only valid with GPU accelerated compositing.
  14. const char kEnableGpuRasterization[] = "enable-gpu-rasterization";
  15. // Select a different set of GPU blocklist entries with the specified
  16. // test_group ID.
  17. const char kGpuBlocklistTestGroup[] = "gpu-blocklist-test-group";
  18. // Enable an extra set of GPU driver bug list entries with the specified
  19. // test_group ID. Note the default test group (group 0) is still active.
  20. const char kGpuDriverBugListTestGroup[] = "gpu-driver-bug-list-test-group";
  21. // Passes encoded GpuPreferences to GPU process.
  22. const char kGpuPreferences[] = "gpu-preferences";
  23. // Ignores GPU blocklist.
  24. const char kIgnoreGpuBlocklist[] = "ignore-gpu-blocklist";
  25. // Allows explicitly specifying the shader disk cache size for embedded devices.
  26. // Default value is 6MB. On Android, 2MB is default and 128KB for low-end
  27. // devices.
  28. const char kGpuDiskCacheSizeKB[] = "gpu-disk-cache-size-kb";
  29. // Disables the non-sandboxed GPU process for DX12 info collection
  30. const char kDisableGpuProcessForDX12InfoCollection[] =
  31. "disable-gpu-process-for-dx12-info-collection";
  32. const char kEnableUnsafeWebGPU[] = "enable-unsafe-webgpu";
  33. // Enables WebGPU developer features which are not generally exposed to the web
  34. // platform.
  35. const char kEnableWebGPUDeveloperFeatures[] =
  36. "enable-webgpu-developer-features";
  37. // Enable validation layers in Dawn backends.
  38. const char kEnableDawnBackendValidation[] = "enable-dawn-backend-validation";
  39. // The adapter to use for WebGPU content.
  40. GPU_EXPORT extern const char kUseWebGPUAdapter[] = "use-webgpu-adapter";
  41. // Set the Dawn features(toggles) enabled on the creation of Dawn devices.
  42. const char kEnableDawnFeatures[] = "enable-dawn-features";
  43. // Set the Dawn features(toggles) disabled on the creation of Dawn devices.
  44. const char kDisableDawnFeatures[] = "disable-dawn-features";
  45. // Changes the type (to kRealtimeAudio) of gpu process and compositor thread.
  46. // This is only to be used for perf tests on macOS for more reliable values.
  47. const char kUseHighGPUThreadPriorityForPerfTests[] =
  48. "use-gpu-high-thread-priority-for-perf-tests";
  49. // Start the non-sandboxed GPU process for DX12 and Vulkan info collection
  50. // immediately after the browser starts. The default is to delay for 120
  51. // seconds.
  52. const char kNoDelayForDX12VulkanInfoCollection[] =
  53. "no-delay-for-dx12-vulkan-info-collection";
  54. // Enables measures of how long GPU Main Thread was blocked between SwapBuffers
  55. const char kEnableGpuBlockedTime[] = "enable-gpu-blocked-time";
  56. // Passes the active graphics vendor id from browser process to info collection
  57. // GPU process.
  58. const char kGpuVendorId[] = "gpu-vendor-id";
  59. // Passes the active graphics device id from browser process to info collection
  60. // GPU process.
  61. const char kGpuDeviceId[] = "gpu-device-id";
  62. // Passes the active graphics sub system id from browser process to info
  63. // collection GPU process.
  64. const char kGpuSubSystemId[] = "gpu-sub-system-id";
  65. // Passes the active graphics revision info from browser process to info
  66. // collection GPU process.
  67. const char kGpuRevision[] = "gpu-revision";
  68. // Passes the active graphics driver version from browser process to info
  69. // collection GPU process.
  70. const char kGpuDriverVersion[] = "gpu-driver-version";
  71. // Indicate that the this is being used by Android WebView and its draw functor
  72. // is using vulkan.
  73. const char kWebViewDrawFunctorUsesVulkan[] = "webview-draw-functor-uses-vulkan";
  74. // Enables using protected memory for vulkan resources.
  75. const char kEnableVulkanProtectedMemory[] = "enable-vulkan-protected-memory";
  76. // Disables falling back to GL based hardware rendering if initializing Vulkan
  77. // fails. This is to allow tests to catch regressions in Vulkan.
  78. const char kDisableVulkanFallbackToGLForTesting[] =
  79. "disable-vulkan-fallback-to-gl-for-testing";
  80. // Specifies the heap limit for Vulkan memory.
  81. // TODO(crbug/1158000): Remove this switch.
  82. const char kVulkanHeapMemoryLimitMb[] = "vulkan-heap-memory-limit-mb";
  83. // Specifies the sync CPU limit for total Vulkan memory.
  84. // TODO(crbug/1158000): Remove this switch.
  85. const char kVulkanSyncCpuMemoryLimitMb[] = "vulkan-sync-cpu-memory-limit-mb";
  86. // Crash Chrome if GPU process crashes. This is to force a test to fail when
  87. // GPU process crashes unexpectedly.
  88. const char kForceBrowserCrashOnGpuCrash[] = "force-browser-crash-on-gpu-crash";
  89. // Override value for the GPU watchdog timeout in seconds.
  90. const char kGpuWatchdogTimeoutSeconds[] = "gpu-watchdog-timeout-seconds";
  91. } // namespace switches