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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 SetupShaderForUniform(GL_FLOAT_MAT3); | 465 SetupShaderForUniform(GL_FLOAT_MAT3); |
466 }; | 466 }; |
467 | 467 |
468 template <> | 468 template <> |
469 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>( | 469 void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>( |
470 bool /* valid */) { | 470 bool /* valid */) { |
471 SetupShaderForUniform(GL_FLOAT_MAT4); | 471 SetupShaderForUniform(GL_FLOAT_MAT4); |
472 }; | 472 }; |
473 | 473 |
474 template <> | 474 template <> |
475 void GLES2DecoderTestBase::SpecializedSetup<cmds::RenderbufferStorage, 0>( | |
476 bool valid) { | |
477 DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_, | |
478 kServiceRenderbufferId); | |
479 if (valid) { | |
480 EXPECT_CALL(*gl_, GetError()) | |
481 .WillOnce(Return(GL_NO_ERROR)) | |
482 .RetiresOnSaturation(); | |
483 EXPECT_CALL(*gl_, | |
484 RenderbufferStorageEXT(GL_RENDERBUFFER, _, 3, 4)) | |
485 .Times(1) | |
486 .RetiresOnSaturation(); | |
487 EXPECT_CALL(*gl_, GetError()) | |
488 .WillOnce(Return(GL_NO_ERROR)) | |
489 .RetiresOnSaturation(); | |
490 } | |
491 }; | |
492 | |
493 template <> | |
494 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterf, 0>( | 475 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterf, 0>( |
495 bool /* valid */) { | 476 bool /* valid */) { |
496 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 477 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
497 }; | 478 }; |
498 | 479 |
499 template <> | 480 template <> |
500 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameteri, 0>( | 481 void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameteri, 0>( |
501 bool /* valid */) { | 482 bool /* valid */) { |
502 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 483 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
503 }; | 484 }; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f); | 553 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f); |
573 } | 554 } |
574 | 555 |
575 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) { | 556 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) { |
576 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f); | 557 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f); |
577 } | 558 } |
578 | 559 |
579 } // namespace gles2 | 560 } // namespace gles2 |
580 } // namespace gpu | 561 } // namespace gpu |
581 | 562 |
OLD | NEW |