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

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

Issue 1950233002: Fix a bug in texture validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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') | gpu/command_buffer/service/texture_manager.h » ('j') | 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const GLuint TestHelper::kServiceDefaultExternalTextureId; 72 const GLuint TestHelper::kServiceDefaultExternalTextureId;
73 const GLuint TestHelper::kServiceBlackRectangleTextureId; 73 const GLuint TestHelper::kServiceBlackRectangleTextureId;
74 const GLuint TestHelper::kServiceDefaultRectangleTextureId; 74 const GLuint TestHelper::kServiceDefaultRectangleTextureId;
75 75
76 const GLint TestHelper::kMaxSamples; 76 const GLint TestHelper::kMaxSamples;
77 const GLint TestHelper::kMaxRenderbufferSize; 77 const GLint TestHelper::kMaxRenderbufferSize;
78 const GLint TestHelper::kMaxTextureSize; 78 const GLint TestHelper::kMaxTextureSize;
79 const GLint TestHelper::kMaxCubeMapTextureSize; 79 const GLint TestHelper::kMaxCubeMapTextureSize;
80 const GLint TestHelper::kMaxRectangleTextureSize; 80 const GLint TestHelper::kMaxRectangleTextureSize;
81 const GLint TestHelper::kMax3DTextureSize; 81 const GLint TestHelper::kMax3DTextureSize;
82 const GLint TestHelper::kMaxArrayTextureLayers;
82 const GLint TestHelper::kNumVertexAttribs; 83 const GLint TestHelper::kNumVertexAttribs;
83 const GLint TestHelper::kNumTextureUnits; 84 const GLint TestHelper::kNumTextureUnits;
84 const GLint TestHelper::kMaxTextureImageUnits; 85 const GLint TestHelper::kMaxTextureImageUnits;
85 const GLint TestHelper::kMaxVertexTextureImageUnits; 86 const GLint TestHelper::kMaxVertexTextureImageUnits;
86 const GLint TestHelper::kMaxFragmentUniformVectors; 87 const GLint TestHelper::kMaxFragmentUniformVectors;
87 const GLint TestHelper::kMaxFragmentUniformComponents; 88 const GLint TestHelper::kMaxFragmentUniformComponents;
88 const GLint TestHelper::kMaxVaryingVectors; 89 const GLint TestHelper::kMaxVaryingVectors;
89 const GLint TestHelper::kMaxVaryingFloats; 90 const GLint TestHelper::kMaxVaryingFloats;
90 const GLint TestHelper::kMaxVertexUniformVectors; 91 const GLint TestHelper::kMaxVertexUniformVectors;
91 const GLint TestHelper::kMaxVertexUniformComponents; 92 const GLint TestHelper::kMaxVertexUniformComponents;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 .WillOnce(SetArgumentPointee<1>(kMaxTextureSize)) 384 .WillOnce(SetArgumentPointee<1>(kMaxTextureSize))
384 .RetiresOnSaturation(); 385 .RetiresOnSaturation();
385 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, _)) 386 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, _))
386 .WillOnce(SetArgumentPointee<1>(kMaxCubeMapTextureSize)) 387 .WillOnce(SetArgumentPointee<1>(kMaxCubeMapTextureSize))
387 .RetiresOnSaturation(); 388 .RetiresOnSaturation();
388 if (gl_info.IsES3Capable()) { 389 if (gl_info.IsES3Capable()) {
389 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_3D_TEXTURE_SIZE, _)) 390 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_3D_TEXTURE_SIZE, _))
390 .WillOnce(SetArgumentPointee<1>(kMax3DTextureSize)) 391 .WillOnce(SetArgumentPointee<1>(kMax3DTextureSize))
391 .RetiresOnSaturation(); 392 .RetiresOnSaturation();
392 } 393 }
394 if (gl_info.IsES3Capable()) {
395 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, _))
396 .WillOnce(SetArgumentPointee<1>(kMaxArrayTextureLayers))
397 .RetiresOnSaturation();
398 }
393 if (strstr(extensions, "GL_ARB_texture_rectangle")) { 399 if (strstr(extensions, "GL_ARB_texture_rectangle")) {
394 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE, _)) 400 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE, _))
395 .WillOnce(SetArgumentPointee<1>(kMaxRectangleTextureSize)) 401 .WillOnce(SetArgumentPointee<1>(kMaxRectangleTextureSize))
396 .RetiresOnSaturation(); 402 .RetiresOnSaturation();
397 } 403 }
398 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, _)) 404 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, _))
399 .WillOnce(SetArgumentPointee<1>(kMaxTextureImageUnits)) 405 .WillOnce(SetArgumentPointee<1>(kMaxTextureImageUnits))
400 .RetiresOnSaturation(); 406 .RetiresOnSaturation();
401 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, _)) 407 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, _))
402 .WillOnce(SetArgumentPointee<1>(kMaxVertexTextureImageUnits)) 408 .WillOnce(SetArgumentPointee<1>(kMaxVertexTextureImageUnits))
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 gfx::SetGLImplementation(implementation); 1167 gfx::SetGLImplementation(implementation);
1162 } 1168 }
1163 1169
1164 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() { 1170 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() {
1165 gfx::SetGLImplementation(old_implementation_); 1171 gfx::SetGLImplementation(old_implementation_);
1166 } 1172 }
1167 1173
1168 } // namespace gles2 1174 } // namespace gles2
1169 } // namespace gpu 1175 } // namespace gpu
1170 1176
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698