Chromium Code Reviews| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 TestHelper::SetTexParameteriWithExpectations( | 103 TestHelper::SetTexParameteriWithExpectations( |
| 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 enable_es3 ? CONTEXT_TYPE_OPENGLES3 : feature_info_->context_type(), |
|
Zhenyao Mo
2016/10/21 17:51:20
This is really messy. I think the right fix is to
qiankun
2016/10/22 11:47:13
We may want to create ES2 context even the ES3 api
Zhenyao Mo
2016/10/25 22:41:14
I don't think we want to change test behaviors. We
qiankun
2016/10/25 23:08:13
So, according your last comments we cannot do this
Zhenyao Mo
2016/10/26 00:41:06
The inconsistency between FeatureInfo::context_typ
qiankun
2016/10/28 14:31:21
Featureinfo has a default context_type which is se
yunchao
2016/10/31 15:18:05
The original code is not correct, but the real fix
qiankun
2016/10/31 15:51:53
In this CL, I fixed some ES3 testing for texture m
| |
| 114 feature_info_->InitializeForTesting(); | 114 enable_es3); |
| 115 if (enable_es3) | |
| 116 feature_info_->InitializeForTesting(CONTEXT_TYPE_OPENGLES3); | |
| 117 else | |
| 118 feature_info_->InitializeForTesting(); | |
| 115 if (enable_es3) { | 119 if (enable_es3) { |
| 116 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) | 120 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| 117 .WillOnce(SetArgPointee<1>(8)) | 121 .WillOnce(SetArgPointee<1>(8)) |
| 118 .RetiresOnSaturation(); | 122 .RetiresOnSaturation(); |
| 119 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) | 123 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) |
| 120 .WillOnce(SetArgPointee<1>(8)) | 124 .WillOnce(SetArgPointee<1>(8)) |
| 121 .RetiresOnSaturation(); | 125 .RetiresOnSaturation(); |
| 122 feature_info_->EnableES3Validators(); | 126 feature_info_->EnableES3Validators(); |
| 123 } | 127 } |
| 124 } | 128 } |
| (...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2694 ExpectValid( | 2698 ExpectValid( |
| 2695 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); | 2699 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, | 2700 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, |
| 2697 GL_DEPTH32F_STENCIL8); | 2701 GL_DEPTH32F_STENCIL8); |
| 2698 | 2702 |
| 2699 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); | 2703 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); |
| 2700 } | 2704 } |
| 2701 | 2705 |
| 2702 } // namespace gles2 | 2706 } // namespace gles2 |
| 2703 } // namespace gpu | 2707 } // namespace gpu |
| OLD | NEW |