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 // Tests for GLES2Implementation. | 5 // Tests for GLES2Implementation. |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 static const GLint kMaxFragmentUniformVectors = 16; | 371 static const GLint kMaxFragmentUniformVectors = 16; |
372 static const GLint kMaxRenderbufferSize = 64; | 372 static const GLint kMaxRenderbufferSize = 64; |
373 static const GLint kMaxTextureImageUnits = 8; | 373 static const GLint kMaxTextureImageUnits = 8; |
374 static const GLint kMaxTextureSize = 128; | 374 static const GLint kMaxTextureSize = 128; |
375 static const GLint kMaxVaryingVectors = 8; | 375 static const GLint kMaxVaryingVectors = 8; |
376 static const GLint kMaxVertexAttribs = 8; | 376 static const GLint kMaxVertexAttribs = 8; |
377 static const GLint kMaxVertexTextureImageUnits = 0; | 377 static const GLint kMaxVertexTextureImageUnits = 0; |
378 static const GLint kMaxVertexUniformVectors = 128; | 378 static const GLint kMaxVertexUniformVectors = 128; |
379 static const GLint kNumCompressedTextureFormats = 0; | 379 static const GLint kNumCompressedTextureFormats = 0; |
380 static const GLint kNumShaderBinaryFormats = 0; | 380 static const GLint kNumShaderBinaryFormats = 0; |
| 381 static const GLuint kMaxTransformFeedbackSeparateAttribs = 4; |
| 382 static const GLuint kMaxUniformBufferBindings = 36; |
381 static const GLuint kStartId = 1024; | 383 static const GLuint kStartId = 1024; |
382 static const GLuint kBuffersStartId = | 384 static const GLuint kBuffersStartId = |
383 GLES2Implementation::kClientSideArrayId + 2 * kNumTestContexts; | 385 GLES2Implementation::kClientSideArrayId + 2 * kNumTestContexts; |
384 static const GLuint kFramebuffersStartId = 1; | 386 static const GLuint kFramebuffersStartId = 1; |
385 static const GLuint kProgramsAndShadersStartId = 1; | 387 static const GLuint kProgramsAndShadersStartId = 1; |
386 static const GLuint kRenderbuffersStartId = 1; | 388 static const GLuint kRenderbuffersStartId = 1; |
387 static const GLuint kSamplersStartId = 1; | 389 static const GLuint kSamplersStartId = 1; |
388 static const GLuint kTexturesStartId = 1; | 390 static const GLuint kTexturesStartId = 1; |
389 static const GLuint kTransformFeedbacksStartId = 1; | 391 static const GLuint kTransformFeedbacksStartId = 1; |
390 static const GLuint kQueriesStartId = 1; | 392 static const GLuint kQueriesStartId = 1; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 capabilities.max_renderbuffer_size = kMaxRenderbufferSize; | 434 capabilities.max_renderbuffer_size = kMaxRenderbufferSize; |
433 capabilities.max_texture_image_units = kMaxTextureImageUnits; | 435 capabilities.max_texture_image_units = kMaxTextureImageUnits; |
434 capabilities.max_texture_size = kMaxTextureSize; | 436 capabilities.max_texture_size = kMaxTextureSize; |
435 capabilities.max_varying_vectors = kMaxVaryingVectors; | 437 capabilities.max_varying_vectors = kMaxVaryingVectors; |
436 capabilities.max_vertex_attribs = kMaxVertexAttribs; | 438 capabilities.max_vertex_attribs = kMaxVertexAttribs; |
437 capabilities.max_vertex_texture_image_units = kMaxVertexTextureImageUnits; | 439 capabilities.max_vertex_texture_image_units = kMaxVertexTextureImageUnits; |
438 capabilities.max_vertex_uniform_vectors = kMaxVertexUniformVectors; | 440 capabilities.max_vertex_uniform_vectors = kMaxVertexUniformVectors; |
439 capabilities.num_compressed_texture_formats = | 441 capabilities.num_compressed_texture_formats = |
440 kNumCompressedTextureFormats; | 442 kNumCompressedTextureFormats; |
441 capabilities.num_shader_binary_formats = kNumShaderBinaryFormats; | 443 capabilities.num_shader_binary_formats = kNumShaderBinaryFormats; |
| 444 capabilities.max_transform_feedback_separate_attribs = |
| 445 kMaxTransformFeedbackSeparateAttribs; |
| 446 capabilities.max_uniform_buffer_bindings = kMaxUniformBufferBindings; |
442 capabilities.bind_generates_resource_chromium = | 447 capabilities.bind_generates_resource_chromium = |
443 bind_generates_resource_service ? 1 : 0; | 448 bind_generates_resource_service ? 1 : 0; |
444 EXPECT_CALL(*gpu_control_, GetCapabilities()) | 449 EXPECT_CALL(*gpu_control_, GetCapabilities()) |
445 .WillOnce(testing::Return(capabilities)); | 450 .WillOnce(testing::Return(capabilities)); |
446 | 451 |
447 { | 452 { |
448 InSequence sequence; | 453 InSequence sequence; |
449 | 454 |
450 const bool support_client_side_arrays = true; | 455 const bool support_client_side_arrays = true; |
451 gl_.reset(new GLES2Implementation(helper_.get(), | 456 gl_.reset(new GLES2Implementation(helper_.get(), |
(...skipping 3084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3536 TEST_F(GLES2ImplementationManualInitTest, FailInitOnTransferBufferFail) { | 3541 TEST_F(GLES2ImplementationManualInitTest, FailInitOnTransferBufferFail) { |
3537 ContextInitOptions init_options; | 3542 ContextInitOptions init_options; |
3538 init_options.transfer_buffer_initialize_fail = true; | 3543 init_options.transfer_buffer_initialize_fail = true; |
3539 EXPECT_FALSE(Initialize(init_options)); | 3544 EXPECT_FALSE(Initialize(init_options)); |
3540 } | 3545 } |
3541 | 3546 |
3542 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 3547 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
3543 | 3548 |
3544 } // namespace gles2 | 3549 } // namespace gles2 |
3545 } // namespace gpu | 3550 } // namespace gpu |
OLD | NEW |