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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 SetArrayArgument<3>(log, log + strlen(log) + 1))) | 468 SetArrayArgument<3>(log, log + strlen(log) + 1))) |
469 .RetiresOnSaturation(); | 469 .RetiresOnSaturation(); |
470 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _)) | 470 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _)) |
471 .WillOnce(SetArgumentPointee<2>(0)); | 471 .WillOnce(SetArgumentPointee<2>(0)); |
472 EXPECT_CALL( | 472 EXPECT_CALL( |
473 *gl_, | 473 *gl_, |
474 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _)) | 474 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _)) |
475 .WillOnce(SetArgumentPointee<2>(0)); | 475 .WillOnce(SetArgumentPointee<2>(0)); |
476 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _)) | 476 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _)) |
477 .WillOnce(SetArgumentPointee<2>(0)); | 477 .WillOnce(SetArgumentPointee<2>(0)); |
478 EXPECT_CALL( | |
479 *gl_, | |
480 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _)) | |
481 .WillOnce(SetArgumentPointee<2>(0)); | |
482 | 478 |
483 Program* program = GetProgram(client_program_id_); | 479 Program* program = GetProgram(client_program_id_); |
484 ASSERT_TRUE(program != NULL); | 480 ASSERT_TRUE(program != NULL); |
485 | 481 |
486 cmds::AttachShader attach_cmd; | 482 cmds::AttachShader attach_cmd; |
487 attach_cmd.Init(client_program_id_, kClientVertexShaderId); | 483 attach_cmd.Init(client_program_id_, kClientVertexShaderId); |
488 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); | 484 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); |
489 | 485 |
490 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); | 486 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); |
491 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); | 487 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 .WillOnce(SetArgumentPointee<2>(0)) | 578 .WillOnce(SetArgumentPointee<2>(0)) |
583 .RetiresOnSaturation(); | 579 .RetiresOnSaturation(); |
584 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _)) | 580 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTES, _)) |
585 .WillOnce(SetArgumentPointee<2>(0)); | 581 .WillOnce(SetArgumentPointee<2>(0)); |
586 EXPECT_CALL( | 582 EXPECT_CALL( |
587 *gl_, | 583 *gl_, |
588 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _)) | 584 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _)) |
589 .WillOnce(SetArgumentPointee<2>(0)); | 585 .WillOnce(SetArgumentPointee<2>(0)); |
590 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _)) | 586 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _)) |
591 .WillOnce(SetArgumentPointee<2>(0)); | 587 .WillOnce(SetArgumentPointee<2>(0)); |
592 EXPECT_CALL( | |
593 *gl_, | |
594 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _)) | |
595 .WillOnce(SetArgumentPointee<2>(0)); | |
596 | 588 |
597 cmds::AttachShader attach_cmd; | 589 cmds::AttachShader attach_cmd; |
598 attach_cmd.Init(client_program_id_, kClientVertexShaderId); | 590 attach_cmd.Init(client_program_id_, kClientVertexShaderId); |
599 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); | 591 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); |
600 | 592 |
601 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); | 593 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); |
602 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); | 594 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); |
603 }; | 595 }; |
604 | 596 |
605 template <> | 597 template <> |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 TestAcceptedUniform(GL_FLOAT_MAT4x2, Program::kUniformMatrix4x2f, true); | 903 TestAcceptedUniform(GL_FLOAT_MAT4x2, Program::kUniformMatrix4x2f, true); |
912 } | 904 } |
913 | 905 |
914 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4x3) { | 906 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4x3) { |
915 TestAcceptedUniform(GL_FLOAT_MAT4x3, Program::kUniformMatrix4x3f, true); | 907 TestAcceptedUniform(GL_FLOAT_MAT4x3, Program::kUniformMatrix4x3f, true); |
916 } | 908 } |
917 | 909 |
918 } // namespace gles2 | 910 } // namespace gles2 |
919 } // namespace gpu | 911 } // namespace gpu |
920 | 912 |
OLD | NEW |