| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/gpu_switches.h" | 5 #include "gpu/command_buffer/service/gpu_switches.h" |
| 6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
| 7 | 7 |
| 8 namespace switches { | 8 namespace switches { |
| 9 | 9 |
| 10 // Always return success when compiling a shader. Linking will still fail. | 10 // Always return success when compiling a shader. Linking will still fail. |
| 11 const char kCompileShaderAlwaysSucceeds[] = "compile-shader-always-succeeds"; | 11 const char kCompileShaderAlwaysSucceeds[] = "compile-shader-always-succeeds"; |
| 12 | 12 |
| 13 // Disable the GL error log limit. | 13 // Disable the GL error log limit. |
| 14 const char kDisableGLErrorLimit[] = "disable-gl-error-limit"; | 14 const char kDisableGLErrorLimit[] = "disable-gl-error-limit"; |
| 15 | 15 |
| 16 // Disable the GLSL translator. | 16 // Disable the GLSL translator. |
| 17 const char kDisableGLSLTranslator[] = "disable-glsl-translator"; | 17 const char kDisableGLSLTranslator[] = "disable-glsl-translator"; |
| 18 | 18 |
| 19 // Disable workarounds for various GPU driver bugs. | 19 // Disable workarounds for various GPU driver bugs. |
| 20 const char kDisableGpuDriverBugWorkarounds[] = | 20 const char kDisableGpuDriverBugWorkarounds[] = |
| 21 "disable-gpu-driver-bug-workarounds"; | 21 "disable-gpu-driver-bug-workarounds"; |
| 22 | 22 |
| 23 // Turn off user-defined name hashing in shaders. | 23 // Turn off user-defined name hashing in shaders. |
| 24 const char kDisableShaderNameHashing[] = "disable-shader-name-hashing"; | 24 const char kDisableShaderNameHashing[] = "disable-shader-name-hashing"; |
| 25 | 25 |
| 26 // Turn on Logging GPU commands. | |
| 27 const char kEnableGPUCommandLogging[] = "enable-gpu-command-logging"; | |
| 28 | |
| 29 // Turn on Calling GL Error after every command. | 26 // Turn on Calling GL Error after every command. |
| 30 const char kEnableGPUDebugging[] = "enable-gpu-debugging"; | 27 const char kEnableGPUDebugging[] = "enable-gpu-debugging"; |
| 31 | 28 |
| 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 | |
| 34 // dlls. | |
| 35 const char kEnableGPUServiceLoggingGPU[] = "enable-gpu-service-logging"; | |
| 36 | |
| 37 // Turn off gpu program caching | 29 // Turn off gpu program caching |
| 38 const char kDisableGpuProgramCache[] = "disable-gpu-program-cache"; | 30 const char kDisableGpuProgramCache[] = "disable-gpu-program-cache"; |
| 39 | 31 |
| 40 // Enforce GL minimums. | 32 // Enforce GL minimums. |
| 41 const char kEnforceGLMinimums[] = "enforce-gl-minimums"; | 33 const char kEnforceGLMinimums[] = "enforce-gl-minimums"; |
| 42 | 34 |
| 43 // Force the use of a workaround for graphics hangs seen on certain | 35 // 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 | 36 // Mac OS systems. Enabled by default (and can't be disabled) on known |
| 45 // affected systems. | 37 // affected systems. |
| 46 const char kForceGLFinishWorkaround[] = "force-glfinish-workaround"; | 38 const char kForceGLFinishWorkaround[] = "force-glfinish-workaround"; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 63 // Allows async texture uploads (off main thread) via GL context sharing. | 55 // Allows async texture uploads (off main thread) via GL context sharing. |
| 64 const char kEnableShareGroupAsyncTextureUpload[] = | 56 const char kEnableShareGroupAsyncTextureUpload[] = |
| 65 "enable-share-group-async-texture-upload"; | 57 "enable-share-group-async-texture-upload"; |
| 66 | 58 |
| 67 const char* kGpuSwitches[] = { | 59 const char* kGpuSwitches[] = { |
| 68 kCompileShaderAlwaysSucceeds, | 60 kCompileShaderAlwaysSucceeds, |
| 69 kDisableGLErrorLimit, | 61 kDisableGLErrorLimit, |
| 70 kDisableGLSLTranslator, | 62 kDisableGLSLTranslator, |
| 71 kDisableGpuDriverBugWorkarounds, | 63 kDisableGpuDriverBugWorkarounds, |
| 72 kDisableShaderNameHashing, | 64 kDisableShaderNameHashing, |
| 73 kEnableGPUCommandLogging, | |
| 74 kEnableGPUDebugging, | 65 kEnableGPUDebugging, |
| 75 kEnableGPUServiceLoggingGPU, | |
| 76 kDisableGpuProgramCache, | 66 kDisableGpuProgramCache, |
| 77 kEnforceGLMinimums, | 67 kEnforceGLMinimums, |
| 78 kForceGLFinishWorkaround, | 68 kForceGLFinishWorkaround, |
| 79 kForceGpuMemAvailableMb, | 69 kForceGpuMemAvailableMb, |
| 80 kForceSynchronousGLReadPixels, | 70 kForceSynchronousGLReadPixels, |
| 81 kGpuDriverBugWorkarounds, | 71 kGpuDriverBugWorkarounds, |
| 82 kGpuProgramCacheSizeKb, | 72 kGpuProgramCacheSizeKb, |
| 83 kDisableGpuShaderDiskCache, | 73 kDisableGpuShaderDiskCache, |
| 84 kEnableShareGroupAsyncTextureUpload, | 74 kEnableShareGroupAsyncTextureUpload, |
| 85 }; | 75 }; |
| 86 | 76 |
| 87 const int kNumGpuSwitches = arraysize(kGpuSwitches); | 77 const int kNumGpuSwitches = arraysize(kGpuSwitches); |
| 88 | 78 |
| 89 } // namespace switches | 79 } // namespace switches |
| OLD | NEW |