| 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 <memory> | 10 #include <memory> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 gl_.get(), error_state_.get(), manager_.get(), | 104 gl_.get(), error_state_.get(), manager_.get(), |
| 105 texture_ref, pname, value, error); | 105 texture_ref, pname, value, error); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void SetupFeatureInfo(const char* gl_extensions, | 108 void SetupFeatureInfo(const char* gl_extensions, |
| 109 const char* gl_version, | 109 const char* gl_version, |
| 110 bool enable_es3) { | 110 bool enable_es3) { |
| 111 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( | 111 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
| 112 gl_.get(), gl_extensions, "", gl_version, | 112 gl_.get(), gl_extensions, "", gl_version, |
| 113 feature_info_->context_type(), enable_es3); | 113 feature_info_->context_type(), enable_es3); |
| 114 feature_info_->InitializeForTesting(); | 114 if (enable_es3) { |
| 115 EXPECT_CALL(*gl_, GetIntegerv(35055, _)) |
| 116 .Times(1) |
| 117 .RetiresOnSaturation(); |
| 118 } |
| 119 feature_info_->InitializeForTesting( |
| 120 enable_es3 ? CONTEXT_TYPE_OPENGLES3 : CONTEXT_TYPE_OPENGLES2); |
| 115 if (enable_es3) { | 121 if (enable_es3) { |
| 116 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) | 122 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| 117 .WillOnce(SetArgPointee<1>(8)) | 123 .WillOnce(SetArgPointee<1>(8)) |
| 118 .RetiresOnSaturation(); | 124 .RetiresOnSaturation(); |
| 119 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) | 125 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) |
| 120 .WillOnce(SetArgPointee<1>(8)) | 126 .WillOnce(SetArgPointee<1>(8)) |
| 121 .RetiresOnSaturation(); | 127 .RetiresOnSaturation(); |
| 122 feature_info_->EnableES3Validators(); | 128 feature_info_->EnableES3Validators(); |
| 123 } | 129 } |
| 124 } | 130 } |
| (...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 ExpectValid( | 2700 ExpectValid( |
| 2695 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); | 2701 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); |
| 2696 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, | 2702 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, |
| 2697 GL_DEPTH32F_STENCIL8); | 2703 GL_DEPTH32F_STENCIL8); |
| 2698 | 2704 |
| 2699 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); | 2705 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); |
| 2700 } | 2706 } |
| 2701 | 2707 |
| 2702 } // namespace gles2 | 2708 } // namespace gles2 |
| 2703 } // namespace gpu | 2709 } // namespace gpu |
| OLD | NEW |