1 // Copyright (c) 2012 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 #include "gpu/command_buffer/service/gpu_switches.h"
6 #include "base/basictypes.h"
10 // Always return success when compiling a shader. Linking will still fail.
11 const char kCompileShaderAlwaysSucceeds[] = "compile-shader-always-succeeds";
13 // Disable the GL error log limit.
14 const char kDisableGLErrorLimit[] = "disable-gl-error-limit";
16 // Disable the GLSL translator.
17 const char kDisableGLSLTranslator[] = "disable-glsl-translator";
19 // Disable workarounds for various GPU driver bugs.
20 const char kDisableGpuDriverBugWorkarounds[] =
21 "disable-gpu-driver-bug-workarounds";
23 // Turn off user-defined name hashing in shaders.
24 const char kDisableShaderNameHashing[] = "disable-shader-name-hashing";
26 // Turn on Logging GPU commands.
27 const char kEnableGPUCommandLogging[] = "enable-gpu-command-logging";
29 // Turn on Calling GL Error after every command.
30 const char kEnableGPUDebugging[] = "enable-gpu-debugging";
32 // Enable GPU service logging. Note: This is the same switch as the one in
33 // gl_switches.cc. It's defined here again to avoid dependencies between
35 const char kEnableGPUServiceLoggingGPU[] = "enable-gpu-service-logging";
37 // Turn off gpu program caching
38 const char kDisableGpuProgramCache[] = "disable-gpu-program-cache";
40 // Enforce GL minimums.
41 const char kEnforceGLMinimums[] = "enforce-gl-minimums";
43 // Force the use of a workaround for graphics hangs seen on certain
44 // Mac OS systems. Enabled by default (and can't be disabled) on known
46 const char kForceGLFinishWorkaround[] = "force-glfinish-workaround";
48 // Sets the total amount of memory that may be allocated for GPU resources
49 const char kForceGpuMemAvailableMb[] = "force-gpu-mem-available-mb";
51 // Force the synchronous copy path in compositing_iosurface_mac.
52 const char kForceSynchronousGLReadPixels[] = "force-synchronous-glreadpixels";
54 // Pass a set of GpuDriverBugWorkaroundType ids, seperated by ','.
55 const char kGpuDriverBugWorkarounds[] = "gpu-driver-bug-workarounds";
57 // Sets the maximum size of the in-memory gpu program cache, in kb
58 const char kGpuProgramCacheSizeKb[] = "gpu-program-cache-size-kb";
60 // Disables the GPU shader on disk cache.
61 const char kDisableGpuShaderDiskCache[] = "disable-gpu-shader-disk-cache";
63 // Allows async texture uploads (off main thread) via GL context sharing.
64 const char kEnableShareGroupAsyncTextureUpload[] =
65 "enable-share-group-async-texture-upload";
67 const char* kGpuSwitches[] = {
68 kCompileShaderAlwaysSucceeds,
70 kDisableGLSLTranslator,
71 kDisableGpuDriverBugWorkarounds,
72 kDisableShaderNameHashing,
73 kEnableGPUCommandLogging,
75 kEnableGPUServiceLoggingGPU,
76 kDisableGpuProgramCache,
78 kForceGLFinishWorkaround,
79 kForceGpuMemAvailableMb,
80 kForceSynchronousGLReadPixels,
81 kGpuDriverBugWorkarounds,
82 kGpuProgramCacheSizeKb,
83 kDisableGpuShaderDiskCache,
84 kEnableShareGroupAsyncTextureUpload,
87 const int kNumGpuSwitches = arraysize(kGpuSwitches);
89 } // namespace switches