Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: gpu/command_buffer/service/test_helper.cc

Issue 1905743002: Improve BindBufferBase/BindBufferRange in GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/test_helper.h" 5 #include "gpu/command_buffer/service/test_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const GLint TestHelper::kMaxFragmentUniformVectors; 86 const GLint TestHelper::kMaxFragmentUniformVectors;
87 const GLint TestHelper::kMaxFragmentUniformComponents; 87 const GLint TestHelper::kMaxFragmentUniformComponents;
88 const GLint TestHelper::kMaxVaryingVectors; 88 const GLint TestHelper::kMaxVaryingVectors;
89 const GLint TestHelper::kMaxVaryingFloats; 89 const GLint TestHelper::kMaxVaryingFloats;
90 const GLint TestHelper::kMaxVertexUniformVectors; 90 const GLint TestHelper::kMaxVertexUniformVectors;
91 const GLint TestHelper::kMaxVertexUniformComponents; 91 const GLint TestHelper::kMaxVertexUniformComponents;
92 const GLint TestHelper::kMaxVertexOutputComponents; 92 const GLint TestHelper::kMaxVertexOutputComponents;
93 const GLint TestHelper::kMaxFragmentInputComponents; 93 const GLint TestHelper::kMaxFragmentInputComponents;
94 const GLint TestHelper::kMaxProgramTexelOffset; 94 const GLint TestHelper::kMaxProgramTexelOffset;
95 const GLint TestHelper::kMinProgramTexelOffset; 95 const GLint TestHelper::kMinProgramTexelOffset;
96 const GLint TestHelper::kMaxTransformFeedbackSeparateAttribs;
97 const GLint TestHelper::kMaxUniformBufferBindings;
98 const GLint TestHelper::kUniformBufferOffsetAlignment;
96 #endif 99 #endif
97 100
98 std::vector<std::string> TestHelper::split_extensions_; 101 std::vector<std::string> TestHelper::split_extensions_;
99 102
100 void TestHelper::SetupTextureInitializationExpectations( 103 void TestHelper::SetupTextureInitializationExpectations(
101 ::gfx::MockGLInterface* gl, 104 ::gfx::MockGLInterface* gl,
102 GLenum target, 105 GLenum target,
103 bool use_default_textures) { 106 bool use_default_textures) {
104 InSequence sequence; 107 InSequence sequence;
105 108
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 354
352 if (gl_info.IsAtLeastGL(3, 3) || 355 if (gl_info.IsAtLeastGL(3, 3) ||
353 (gl_info.IsAtLeastGL(3, 2) && 356 (gl_info.IsAtLeastGL(3, 2) &&
354 strstr(extensions, "GL_ARB_blend_func_extended")) || 357 strstr(extensions, "GL_ARB_blend_func_extended")) ||
355 (gl_info.is_es && strstr(extensions, "GL_EXT_blend_func_extended"))) { 358 (gl_info.is_es && strstr(extensions, "GL_EXT_blend_func_extended"))) {
356 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT, _)) 359 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT, _))
357 .WillOnce(SetArgumentPointee<1>(8)) 360 .WillOnce(SetArgumentPointee<1>(8))
358 .RetiresOnSaturation(); 361 .RetiresOnSaturation();
359 } 362 }
360 363
364 if (gl_info.IsES3Capable()) {
365 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, _))
366 .WillOnce(SetArgumentPointee<1>(kMaxTransformFeedbackSeparateAttribs))
367 .RetiresOnSaturation();
368 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, _))
369 .WillOnce(SetArgumentPointee<1>(kMaxUniformBufferBindings))
370 .RetiresOnSaturation();
371 EXPECT_CALL(*gl, GetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, _))
372 .WillOnce(SetArgumentPointee<1>(kUniformBufferOffsetAlignment))
373 .RetiresOnSaturation();
374 }
375
361 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_ATTRIBS, _)) 376 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_ATTRIBS, _))
362 .WillOnce(SetArgumentPointee<1>(kNumVertexAttribs)) 377 .WillOnce(SetArgumentPointee<1>(kNumVertexAttribs))
363 .RetiresOnSaturation(); 378 .RetiresOnSaturation();
364 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, _)) 379 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, _))
365 .WillOnce(SetArgumentPointee<1>(kNumTextureUnits)) 380 .WillOnce(SetArgumentPointee<1>(kNumTextureUnits))
366 .RetiresOnSaturation(); 381 .RetiresOnSaturation();
367 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_SIZE, _)) 382 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_SIZE, _))
368 .WillOnce(SetArgumentPointee<1>(kMaxTextureSize)) 383 .WillOnce(SetArgumentPointee<1>(kMaxTextureSize))
369 .RetiresOnSaturation(); 384 .RetiresOnSaturation();
370 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, _)) 385 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, _))
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 gfx::SetGLImplementation(implementation); 1161 gfx::SetGLImplementation(implementation);
1147 } 1162 }
1148 1163
1149 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() { 1164 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() {
1150 gfx::SetGLImplementation(old_implementation_); 1165 gfx::SetGLImplementation(old_implementation_);
1151 } 1166 }
1152 1167
1153 } // namespace gles2 1168 } // namespace gles2
1154 } // namespace gpu 1169 } // namespace gpu
1155 1170
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698