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/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 static const GLint kMaxCubeMapLevels = 4; | 64 static const GLint kMaxCubeMapLevels = 4; |
65 static const GLint kMaxExternalLevels = 1; | 65 static const GLint kMaxExternalLevels = 1; |
66 static const GLint kMax3dLevels = 9; | 66 static const GLint kMax3dLevels = 9; |
67 static const bool kUseDefaultTextures = false; | 67 static const bool kUseDefaultTextures = false; |
68 | 68 |
69 TextureManagerTest() { | 69 TextureManagerTest() { |
70 // Always run with this command line, but the ES3 features are not | 70 // Always run with this command line, but the ES3 features are not |
71 // enabled without FeatureInfo::EnableES3Validators(). | 71 // enabled without FeatureInfo::EnableES3Validators(). |
72 base::CommandLine command_line(0, nullptr); | 72 base::CommandLine command_line(0, nullptr); |
73 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); | 73 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); |
74 feature_info_ = new FeatureInfo(command_line); | 74 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); |
| 75 feature_info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround); |
75 } | 76 } |
76 | 77 |
77 ~TextureManagerTest() override {} | 78 ~TextureManagerTest() override {} |
78 | 79 |
79 protected: | 80 protected: |
80 void SetUp() override { | 81 void SetUp() override { |
81 GpuServiceTest::SetUp(); | 82 GpuServiceTest::SetUp(); |
82 manager_.reset(new TextureManager(NULL, | 83 manager_.reset(new TextureManager(NULL, |
83 feature_info_.get(), | 84 feature_info_.get(), |
84 kMaxTextureSize, | 85 kMaxTextureSize, |
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2673 ExpectValid( | 2674 ExpectValid( |
2674 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); | 2675 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); |
2675 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, | 2676 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, |
2676 GL_DEPTH32F_STENCIL8); | 2677 GL_DEPTH32F_STENCIL8); |
2677 | 2678 |
2678 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); | 2679 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); |
2679 } | 2680 } |
2680 | 2681 |
2681 } // namespace gles2 | 2682 } // namespace gles2 |
2682 } // namespace gpu | 2683 } // namespace gpu |
OLD | NEW |