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

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

Issue 1309743005: command_buffer: Implement EXT_blend_func_extended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: address review comments Created 5 years, 3 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
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/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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 478 EXPECT_CALL(
479 *gl_, 479 *gl_,
480 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _)) 480 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _))
481 .WillOnce(SetArgumentPointee<2>(0)); 481 .WillOnce(SetArgumentPointee<2>(0));
482 if (feature_info()->feature_flags().ext_blend_func_extended) {
483 EXPECT_CALL(*gl_,
484 GetProgramInterfaceiv(kServiceProgramId, GL_PROGRAM_OUTPUT,
485 GL_ACTIVE_RESOURCES, _))
486 .WillOnce(SetArgumentPointee<3>(0));
482 487
488 EXPECT_CALL(*gl_,
489 GetProgramInterfaceiv(kServiceProgramId, GL_PROGRAM_OUTPUT,
490 GL_MAX_NAME_LENGTH, _))
491 .WillOnce(SetArgumentPointee<3>(0));
492 }
483 Program* program = GetProgram(client_program_id_); 493 Program* program = GetProgram(client_program_id_);
484 ASSERT_TRUE(program != NULL); 494 ASSERT_TRUE(program != NULL);
485 495
486 cmds::AttachShader attach_cmd; 496 cmds::AttachShader attach_cmd;
487 attach_cmd.Init(client_program_id_, kClientVertexShaderId); 497 attach_cmd.Init(client_program_id_, kClientVertexShaderId);
488 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); 498 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
489 499
490 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); 500 attach_cmd.Init(client_program_id_, kClientFragmentShaderId);
491 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); 501 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
492 502
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 EXPECT_CALL( 596 EXPECT_CALL(
587 *gl_, 597 *gl_,
588 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _)) 598 GetProgramiv(kServiceProgramId, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, _))
589 .WillOnce(SetArgumentPointee<2>(0)); 599 .WillOnce(SetArgumentPointee<2>(0));
590 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _)) 600 EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORMS, _))
591 .WillOnce(SetArgumentPointee<2>(0)); 601 .WillOnce(SetArgumentPointee<2>(0));
592 EXPECT_CALL( 602 EXPECT_CALL(
593 *gl_, 603 *gl_,
594 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _)) 604 GetProgramiv(kServiceProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, _))
595 .WillOnce(SetArgumentPointee<2>(0)); 605 .WillOnce(SetArgumentPointee<2>(0));
606 if (feature_info()->feature_flags().ext_blend_func_extended) {
607 EXPECT_CALL(*gl_,
608 GetProgramInterfaceiv(kServiceProgramId, GL_PROGRAM_OUTPUT,
609 GL_ACTIVE_RESOURCES, _))
610 .WillOnce(SetArgumentPointee<3>(0));
611
612 EXPECT_CALL(*gl_,
613 GetProgramInterfaceiv(kServiceProgramId, GL_PROGRAM_OUTPUT,
614 GL_MAX_NAME_LENGTH, _))
615 .WillOnce(SetArgumentPointee<3>(0));
616 }
596 617
597 cmds::AttachShader attach_cmd; 618 cmds::AttachShader attach_cmd;
598 attach_cmd.Init(client_program_id_, kClientVertexShaderId); 619 attach_cmd.Init(client_program_id_, kClientVertexShaderId);
599 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); 620 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
600 621
601 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); 622 attach_cmd.Init(client_program_id_, kClientFragmentShaderId);
602 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); 623 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
603 }; 624 };
604 625
605 template <> 626 template <>
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 TestAcceptedUniform(GL_FLOAT_MAT4x2, Program::kUniformMatrix4x2f, true); 932 TestAcceptedUniform(GL_FLOAT_MAT4x2, Program::kUniformMatrix4x2f, true);
912 } 933 }
913 934
914 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4x3) { 935 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4x3) {
915 TestAcceptedUniform(GL_FLOAT_MAT4x3, Program::kUniformMatrix4x3f, true); 936 TestAcceptedUniform(GL_FLOAT_MAT4x3, Program::kUniformMatrix4x3f, true);
916 } 937 }
917 938
918 } // namespace gles2 939 } // namespace gles2
919 } // namespace gpu 940 } // namespace gpu
920 941
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698