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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h

Issue 661220: Added support for glGetString, glGetShaderSource,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file is auto-generated. DO NOT EDIT! 5 // This file is auto-generated. DO NOT EDIT!
6 6
7 // It is included by gles2_cmd_decoder_unittest_2.cc 7 // It is included by gles2_cmd_decoder_unittest_2.cc
8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
9 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ 9 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
10 10
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 EXPECT_CALL( 660 EXPECT_CALL(
661 *gl_, 661 *gl_,
662 Uniform1fv(1, 2, 662 Uniform1fv(1, 2,
663 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 663 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
664 SpecializedSetup<Uniform1fvImmediate, 0>(); 664 SpecializedSetup<Uniform1fvImmediate, 0>();
665 GLfloat temp[1 * 2] = { 0, }; 665 GLfloat temp[1 * 2] = { 0, };
666 cmd.Init(1, 2, &temp[0]); 666 cmd.Init(1, 2, &temp[0]);
667 EXPECT_EQ(error::kNoError, 667 EXPECT_EQ(error::kNoError,
668 ExecuteImmediateCmd(cmd, sizeof(temp))); 668 ExecuteImmediateCmd(cmd, sizeof(temp)));
669 } 669 }
670
671 TEST_F(GLES2DecoderTest2, Uniform1fvImmediateInvalidArgs1_0) {
672 Uniform1fvImmediate& cmd = *GetImmediateAs<Uniform1fvImmediate>();
673 EXPECT_CALL(*gl_, Uniform1fv(_, _, _)).Times(0);
674 SpecializedSetup<Uniform1fvImmediate, 0>();
675 GLfloat temp[1 * 2] = { 0, };
676 cmd.Init(1, -1, &temp[0]);
677 EXPECT_EQ(error::kNoError,
678 ExecuteImmediateCmd(cmd, sizeof(temp)));
679 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
680 }
681 // TODO(gman): Uniform1i 670 // TODO(gman): Uniform1i
682 // TODO(gman): Uniform1iv 671 // TODO(gman): Uniform1iv
683 // TODO(gman): Uniform1ivImmediate 672 // TODO(gman): Uniform1ivImmediate
684 673
685 TEST_F(GLES2DecoderTest2, Uniform2fValidArgs) { 674 TEST_F(GLES2DecoderTest2, Uniform2fValidArgs) {
686 EXPECT_CALL(*gl_, Uniform2f(1, 2, 3)); 675 EXPECT_CALL(*gl_, Uniform2f(1, 2, 3));
687 SpecializedSetup<Uniform2f, 0>(); 676 SpecializedSetup<Uniform2f, 0>();
688 Uniform2f cmd; 677 Uniform2f cmd;
689 cmd.Init(1, 2, 3); 678 cmd.Init(1, 2, 3);
690 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 679 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 *gl_, 720 *gl_,
732 Uniform2fv(1, 2, 721 Uniform2fv(1, 2,
733 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 722 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
734 SpecializedSetup<Uniform2fvImmediate, 0>(); 723 SpecializedSetup<Uniform2fvImmediate, 0>();
735 GLfloat temp[2 * 2] = { 0, }; 724 GLfloat temp[2 * 2] = { 0, };
736 cmd.Init(1, 2, &temp[0]); 725 cmd.Init(1, 2, &temp[0]);
737 EXPECT_EQ(error::kNoError, 726 EXPECT_EQ(error::kNoError,
738 ExecuteImmediateCmd(cmd, sizeof(temp))); 727 ExecuteImmediateCmd(cmd, sizeof(temp)));
739 } 728 }
740 729
741 TEST_F(GLES2DecoderTest2, Uniform2fvImmediateInvalidArgs1_0) {
742 Uniform2fvImmediate& cmd = *GetImmediateAs<Uniform2fvImmediate>();
743 EXPECT_CALL(*gl_, Uniform2fv(_, _, _)).Times(0);
744 SpecializedSetup<Uniform2fvImmediate, 0>();
745 GLfloat temp[2 * 2] = { 0, };
746 cmd.Init(1, -1, &temp[0]);
747 EXPECT_EQ(error::kNoError,
748 ExecuteImmediateCmd(cmd, sizeof(temp)));
749 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
750 }
751
752 TEST_F(GLES2DecoderTest2, Uniform2iValidArgs) { 730 TEST_F(GLES2DecoderTest2, Uniform2iValidArgs) {
753 EXPECT_CALL(*gl_, Uniform2i(1, 2, 3)); 731 EXPECT_CALL(*gl_, Uniform2i(1, 2, 3));
754 SpecializedSetup<Uniform2i, 0>(); 732 SpecializedSetup<Uniform2i, 0>();
755 Uniform2i cmd; 733 Uniform2i cmd;
756 cmd.Init(1, 2, 3); 734 cmd.Init(1, 2, 3);
757 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 735 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
758 } 736 }
759 737
760 TEST_F(GLES2DecoderTest2, Uniform2ivValidArgs) { 738 TEST_F(GLES2DecoderTest2, Uniform2ivValidArgs) {
761 EXPECT_CALL( 739 EXPECT_CALL(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 *gl_, 776 *gl_,
799 Uniform2iv(1, 2, 777 Uniform2iv(1, 2,
800 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); 778 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
801 SpecializedSetup<Uniform2ivImmediate, 0>(); 779 SpecializedSetup<Uniform2ivImmediate, 0>();
802 GLint temp[2 * 2] = { 0, }; 780 GLint temp[2 * 2] = { 0, };
803 cmd.Init(1, 2, &temp[0]); 781 cmd.Init(1, 2, &temp[0]);
804 EXPECT_EQ(error::kNoError, 782 EXPECT_EQ(error::kNoError,
805 ExecuteImmediateCmd(cmd, sizeof(temp))); 783 ExecuteImmediateCmd(cmd, sizeof(temp)));
806 } 784 }
807 785
808 TEST_F(GLES2DecoderTest2, Uniform2ivImmediateInvalidArgs1_0) {
809 Uniform2ivImmediate& cmd = *GetImmediateAs<Uniform2ivImmediate>();
810 EXPECT_CALL(*gl_, Uniform2iv(_, _, _)).Times(0);
811 SpecializedSetup<Uniform2ivImmediate, 0>();
812 GLint temp[2 * 2] = { 0, };
813 cmd.Init(1, -1, &temp[0]);
814 EXPECT_EQ(error::kNoError,
815 ExecuteImmediateCmd(cmd, sizeof(temp)));
816 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
817 }
818
819 TEST_F(GLES2DecoderTest2, Uniform3fValidArgs) { 786 TEST_F(GLES2DecoderTest2, Uniform3fValidArgs) {
820 EXPECT_CALL(*gl_, Uniform3f(1, 2, 3, 4)); 787 EXPECT_CALL(*gl_, Uniform3f(1, 2, 3, 4));
821 SpecializedSetup<Uniform3f, 0>(); 788 SpecializedSetup<Uniform3f, 0>();
822 Uniform3f cmd; 789 Uniform3f cmd;
823 cmd.Init(1, 2, 3, 4); 790 cmd.Init(1, 2, 3, 4);
824 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 791 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
825 } 792 }
826 793
827 TEST_F(GLES2DecoderTest2, Uniform3fvValidArgs) { 794 TEST_F(GLES2DecoderTest2, Uniform3fvValidArgs) {
828 EXPECT_CALL( 795 EXPECT_CALL(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 *gl_, 832 *gl_,
866 Uniform3fv(1, 2, 833 Uniform3fv(1, 2,
867 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 834 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
868 SpecializedSetup<Uniform3fvImmediate, 0>(); 835 SpecializedSetup<Uniform3fvImmediate, 0>();
869 GLfloat temp[3 * 2] = { 0, }; 836 GLfloat temp[3 * 2] = { 0, };
870 cmd.Init(1, 2, &temp[0]); 837 cmd.Init(1, 2, &temp[0]);
871 EXPECT_EQ(error::kNoError, 838 EXPECT_EQ(error::kNoError,
872 ExecuteImmediateCmd(cmd, sizeof(temp))); 839 ExecuteImmediateCmd(cmd, sizeof(temp)));
873 } 840 }
874 841
875 TEST_F(GLES2DecoderTest2, Uniform3fvImmediateInvalidArgs1_0) {
876 Uniform3fvImmediate& cmd = *GetImmediateAs<Uniform3fvImmediate>();
877 EXPECT_CALL(*gl_, Uniform3fv(_, _, _)).Times(0);
878 SpecializedSetup<Uniform3fvImmediate, 0>();
879 GLfloat temp[3 * 2] = { 0, };
880 cmd.Init(1, -1, &temp[0]);
881 EXPECT_EQ(error::kNoError,
882 ExecuteImmediateCmd(cmd, sizeof(temp)));
883 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
884 }
885
886 TEST_F(GLES2DecoderTest2, Uniform3iValidArgs) { 842 TEST_F(GLES2DecoderTest2, Uniform3iValidArgs) {
887 EXPECT_CALL(*gl_, Uniform3i(1, 2, 3, 4)); 843 EXPECT_CALL(*gl_, Uniform3i(1, 2, 3, 4));
888 SpecializedSetup<Uniform3i, 0>(); 844 SpecializedSetup<Uniform3i, 0>();
889 Uniform3i cmd; 845 Uniform3i cmd;
890 cmd.Init(1, 2, 3, 4); 846 cmd.Init(1, 2, 3, 4);
891 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 847 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
892 } 848 }
893 849
894 TEST_F(GLES2DecoderTest2, Uniform3ivValidArgs) { 850 TEST_F(GLES2DecoderTest2, Uniform3ivValidArgs) {
895 EXPECT_CALL( 851 EXPECT_CALL(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 *gl_, 888 *gl_,
933 Uniform3iv(1, 2, 889 Uniform3iv(1, 2,
934 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); 890 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
935 SpecializedSetup<Uniform3ivImmediate, 0>(); 891 SpecializedSetup<Uniform3ivImmediate, 0>();
936 GLint temp[3 * 2] = { 0, }; 892 GLint temp[3 * 2] = { 0, };
937 cmd.Init(1, 2, &temp[0]); 893 cmd.Init(1, 2, &temp[0]);
938 EXPECT_EQ(error::kNoError, 894 EXPECT_EQ(error::kNoError,
939 ExecuteImmediateCmd(cmd, sizeof(temp))); 895 ExecuteImmediateCmd(cmd, sizeof(temp)));
940 } 896 }
941 897
942 TEST_F(GLES2DecoderTest2, Uniform3ivImmediateInvalidArgs1_0) {
943 Uniform3ivImmediate& cmd = *GetImmediateAs<Uniform3ivImmediate>();
944 EXPECT_CALL(*gl_, Uniform3iv(_, _, _)).Times(0);
945 SpecializedSetup<Uniform3ivImmediate, 0>();
946 GLint temp[3 * 2] = { 0, };
947 cmd.Init(1, -1, &temp[0]);
948 EXPECT_EQ(error::kNoError,
949 ExecuteImmediateCmd(cmd, sizeof(temp)));
950 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
951 }
952
953 TEST_F(GLES2DecoderTest2, Uniform4fValidArgs) { 898 TEST_F(GLES2DecoderTest2, Uniform4fValidArgs) {
954 EXPECT_CALL(*gl_, Uniform4f(1, 2, 3, 4, 5)); 899 EXPECT_CALL(*gl_, Uniform4f(1, 2, 3, 4, 5));
955 SpecializedSetup<Uniform4f, 0>(); 900 SpecializedSetup<Uniform4f, 0>();
956 Uniform4f cmd; 901 Uniform4f cmd;
957 cmd.Init(1, 2, 3, 4, 5); 902 cmd.Init(1, 2, 3, 4, 5);
958 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 903 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
959 } 904 }
960 905
961 TEST_F(GLES2DecoderTest2, Uniform4fvValidArgs) { 906 TEST_F(GLES2DecoderTest2, Uniform4fvValidArgs) {
962 EXPECT_CALL( 907 EXPECT_CALL(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 *gl_, 944 *gl_,
1000 Uniform4fv(1, 2, 945 Uniform4fv(1, 2,
1001 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 946 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
1002 SpecializedSetup<Uniform4fvImmediate, 0>(); 947 SpecializedSetup<Uniform4fvImmediate, 0>();
1003 GLfloat temp[4 * 2] = { 0, }; 948 GLfloat temp[4 * 2] = { 0, };
1004 cmd.Init(1, 2, &temp[0]); 949 cmd.Init(1, 2, &temp[0]);
1005 EXPECT_EQ(error::kNoError, 950 EXPECT_EQ(error::kNoError,
1006 ExecuteImmediateCmd(cmd, sizeof(temp))); 951 ExecuteImmediateCmd(cmd, sizeof(temp)));
1007 } 952 }
1008 953
1009 TEST_F(GLES2DecoderTest2, Uniform4fvImmediateInvalidArgs1_0) {
1010 Uniform4fvImmediate& cmd = *GetImmediateAs<Uniform4fvImmediate>();
1011 EXPECT_CALL(*gl_, Uniform4fv(_, _, _)).Times(0);
1012 SpecializedSetup<Uniform4fvImmediate, 0>();
1013 GLfloat temp[4 * 2] = { 0, };
1014 cmd.Init(1, -1, &temp[0]);
1015 EXPECT_EQ(error::kNoError,
1016 ExecuteImmediateCmd(cmd, sizeof(temp)));
1017 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1018 }
1019
1020 TEST_F(GLES2DecoderTest2, Uniform4iValidArgs) { 954 TEST_F(GLES2DecoderTest2, Uniform4iValidArgs) {
1021 EXPECT_CALL(*gl_, Uniform4i(1, 2, 3, 4, 5)); 955 EXPECT_CALL(*gl_, Uniform4i(1, 2, 3, 4, 5));
1022 SpecializedSetup<Uniform4i, 0>(); 956 SpecializedSetup<Uniform4i, 0>();
1023 Uniform4i cmd; 957 Uniform4i cmd;
1024 cmd.Init(1, 2, 3, 4, 5); 958 cmd.Init(1, 2, 3, 4, 5);
1025 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 959 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1026 } 960 }
1027 961
1028 TEST_F(GLES2DecoderTest2, Uniform4ivValidArgs) { 962 TEST_F(GLES2DecoderTest2, Uniform4ivValidArgs) {
1029 EXPECT_CALL( 963 EXPECT_CALL(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 *gl_, 1000 *gl_,
1067 Uniform4iv(1, 2, 1001 Uniform4iv(1, 2,
1068 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); 1002 reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
1069 SpecializedSetup<Uniform4ivImmediate, 0>(); 1003 SpecializedSetup<Uniform4ivImmediate, 0>();
1070 GLint temp[4 * 2] = { 0, }; 1004 GLint temp[4 * 2] = { 0, };
1071 cmd.Init(1, 2, &temp[0]); 1005 cmd.Init(1, 2, &temp[0]);
1072 EXPECT_EQ(error::kNoError, 1006 EXPECT_EQ(error::kNoError,
1073 ExecuteImmediateCmd(cmd, sizeof(temp))); 1007 ExecuteImmediateCmd(cmd, sizeof(temp)));
1074 } 1008 }
1075 1009
1076 TEST_F(GLES2DecoderTest2, Uniform4ivImmediateInvalidArgs1_0) {
1077 Uniform4ivImmediate& cmd = *GetImmediateAs<Uniform4ivImmediate>();
1078 EXPECT_CALL(*gl_, Uniform4iv(_, _, _)).Times(0);
1079 SpecializedSetup<Uniform4ivImmediate, 0>();
1080 GLint temp[4 * 2] = { 0, };
1081 cmd.Init(1, -1, &temp[0]);
1082 EXPECT_EQ(error::kNoError,
1083 ExecuteImmediateCmd(cmd, sizeof(temp)));
1084 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1085 }
1086
1087 TEST_F(GLES2DecoderTest2, UniformMatrix2fvValidArgs) { 1010 TEST_F(GLES2DecoderTest2, UniformMatrix2fvValidArgs) {
1088 EXPECT_CALL( 1011 EXPECT_CALL(
1089 *gl_, UniformMatrix2fv( 1012 *gl_, UniformMatrix2fv(
1090 1, 2, false, reinterpret_cast<const GLfloat*>( 1013 1, 2, false, reinterpret_cast<const GLfloat*>(
1091 shared_memory_address_))); 1014 shared_memory_address_)));
1092 SpecializedSetup<UniformMatrix2fv, 0>(); 1015 SpecializedSetup<UniformMatrix2fv, 0>();
1093 UniformMatrix2fv cmd; 1016 UniformMatrix2fv cmd;
1094 cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_); 1017 cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_);
1095 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1018 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1096 } 1019 }
1097 1020
1098 TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs1_0) { 1021 TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs1_0) {
1099 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0); 1022 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
1100 SpecializedSetup<UniformMatrix2fv, 0>(); 1023 SpecializedSetup<UniformMatrix2fv, 0>();
1101 UniformMatrix2fv cmd; 1024 UniformMatrix2fv cmd;
1102 cmd.Init(1, -1, false, shared_memory_id_, shared_memory_offset_); 1025 cmd.Init(1, -1, false, shared_memory_id_, shared_memory_offset_);
1103 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1026 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1104 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 1027 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1105 } 1028 }
1106 1029
1107 TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs2_0) { 1030 TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs2_0) {
1108 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0); 1031 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
1109 SpecializedSetup<UniformMatrix2fv, 0>(); 1032 SpecializedSetup<UniformMatrix2fv, 0>();
1110 UniformMatrix2fv cmd; 1033 UniformMatrix2fv cmd;
1111 cmd.Init(1, 2, true, shared_memory_id_, shared_memory_offset_); 1034 cmd.Init(1, 2, true, shared_memory_id_, shared_memory_offset_);
1112 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1035 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1113 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); 1036 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1114 } 1037 }
1115 1038
1116 TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs3_0) { 1039 TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs3_0) {
1117 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0); 1040 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
1118 SpecializedSetup<UniformMatrix2fv, 0>(); 1041 SpecializedSetup<UniformMatrix2fv, 0>();
1119 UniformMatrix2fv cmd; 1042 UniformMatrix2fv cmd;
1120 cmd.Init(1, 2, false, kInvalidSharedMemoryId, 0); 1043 cmd.Init(1, 2, false, kInvalidSharedMemoryId, 0);
1121 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1044 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1122 } 1045 }
1123 1046
(...skipping 12 matching lines...) Expand all
1136 *gl_, 1059 *gl_,
1137 UniformMatrix2fv(1, 2, false, 1060 UniformMatrix2fv(1, 2, false,
1138 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 1061 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
1139 SpecializedSetup<UniformMatrix2fvImmediate, 0>(); 1062 SpecializedSetup<UniformMatrix2fvImmediate, 0>();
1140 GLfloat temp[4 * 2] = { 0, }; 1063 GLfloat temp[4 * 2] = { 0, };
1141 cmd.Init(1, 2, false, &temp[0]); 1064 cmd.Init(1, 2, false, &temp[0]);
1142 EXPECT_EQ(error::kNoError, 1065 EXPECT_EQ(error::kNoError,
1143 ExecuteImmediateCmd(cmd, sizeof(temp))); 1066 ExecuteImmediateCmd(cmd, sizeof(temp)));
1144 } 1067 }
1145 1068
1146 TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateInvalidArgs1_0) {
1147 UniformMatrix2fvImmediate& cmd =
1148 *GetImmediateAs<UniformMatrix2fvImmediate>();
1149 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
1150 SpecializedSetup<UniformMatrix2fvImmediate, 0>();
1151 GLfloat temp[4 * 2] = { 0, };
1152 cmd.Init(1, -1, false, &temp[0]);
1153 EXPECT_EQ(error::kNoError,
1154 ExecuteImmediateCmd(cmd, sizeof(temp)));
1155 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1156 }
1157
1158 TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateInvalidArgs2_0) { 1069 TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateInvalidArgs2_0) {
1159 UniformMatrix2fvImmediate& cmd = 1070 UniformMatrix2fvImmediate& cmd =
1160 *GetImmediateAs<UniformMatrix2fvImmediate>(); 1071 *GetImmediateAs<UniformMatrix2fvImmediate>();
1161 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0); 1072 EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
1162 SpecializedSetup<UniformMatrix2fvImmediate, 0>(); 1073 SpecializedSetup<UniformMatrix2fvImmediate, 0>();
1163 GLfloat temp[4 * 2] = { 0, }; 1074 GLfloat temp[4 * 2] = { 0, };
1164 cmd.Init(1, 2, true, &temp[0]); 1075 cmd.Init(1, 2, true, &temp[0]);
1165 EXPECT_EQ(error::kNoError, 1076 EXPECT_EQ(error::kNoError,
1166 ExecuteImmediateCmd(cmd, sizeof(temp))); 1077 ExecuteImmediateCmd(cmd, sizeof(temp)));
1167 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); 1078 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1168 } 1079 }
1169 1080
1170 TEST_F(GLES2DecoderTest2, UniformMatrix3fvValidArgs) { 1081 TEST_F(GLES2DecoderTest2, UniformMatrix3fvValidArgs) {
1171 EXPECT_CALL( 1082 EXPECT_CALL(
1172 *gl_, UniformMatrix3fv( 1083 *gl_, UniformMatrix3fv(
1173 1, 2, false, reinterpret_cast<const GLfloat*>( 1084 1, 2, false, reinterpret_cast<const GLfloat*>(
1174 shared_memory_address_))); 1085 shared_memory_address_)));
1175 SpecializedSetup<UniformMatrix3fv, 0>(); 1086 SpecializedSetup<UniformMatrix3fv, 0>();
1176 UniformMatrix3fv cmd; 1087 UniformMatrix3fv cmd;
1177 cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_); 1088 cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_);
1178 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1089 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1179 } 1090 }
1180 1091
1181 TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs1_0) { 1092 TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs1_0) {
1182 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0); 1093 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
1183 SpecializedSetup<UniformMatrix3fv, 0>(); 1094 SpecializedSetup<UniformMatrix3fv, 0>();
1184 UniformMatrix3fv cmd; 1095 UniformMatrix3fv cmd;
1185 cmd.Init(1, -1, false, shared_memory_id_, shared_memory_offset_); 1096 cmd.Init(1, -1, false, shared_memory_id_, shared_memory_offset_);
1186 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1097 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1187 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 1098 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1188 } 1099 }
1189 1100
1190 TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs2_0) { 1101 TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs2_0) {
1191 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0); 1102 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
1192 SpecializedSetup<UniformMatrix3fv, 0>(); 1103 SpecializedSetup<UniformMatrix3fv, 0>();
1193 UniformMatrix3fv cmd; 1104 UniformMatrix3fv cmd;
1194 cmd.Init(1, 2, true, shared_memory_id_, shared_memory_offset_); 1105 cmd.Init(1, 2, true, shared_memory_id_, shared_memory_offset_);
1195 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1106 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1196 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); 1107 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1197 } 1108 }
1198 1109
1199 TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs3_0) { 1110 TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs3_0) {
1200 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0); 1111 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
1201 SpecializedSetup<UniformMatrix3fv, 0>(); 1112 SpecializedSetup<UniformMatrix3fv, 0>();
1202 UniformMatrix3fv cmd; 1113 UniformMatrix3fv cmd;
1203 cmd.Init(1, 2, false, kInvalidSharedMemoryId, 0); 1114 cmd.Init(1, 2, false, kInvalidSharedMemoryId, 0);
1204 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1115 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1205 } 1116 }
1206 1117
(...skipping 12 matching lines...) Expand all
1219 *gl_, 1130 *gl_,
1220 UniformMatrix3fv(1, 2, false, 1131 UniformMatrix3fv(1, 2, false,
1221 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 1132 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
1222 SpecializedSetup<UniformMatrix3fvImmediate, 0>(); 1133 SpecializedSetup<UniformMatrix3fvImmediate, 0>();
1223 GLfloat temp[9 * 2] = { 0, }; 1134 GLfloat temp[9 * 2] = { 0, };
1224 cmd.Init(1, 2, false, &temp[0]); 1135 cmd.Init(1, 2, false, &temp[0]);
1225 EXPECT_EQ(error::kNoError, 1136 EXPECT_EQ(error::kNoError,
1226 ExecuteImmediateCmd(cmd, sizeof(temp))); 1137 ExecuteImmediateCmd(cmd, sizeof(temp)));
1227 } 1138 }
1228 1139
1229 TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateInvalidArgs1_0) {
1230 UniformMatrix3fvImmediate& cmd =
1231 *GetImmediateAs<UniformMatrix3fvImmediate>();
1232 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
1233 SpecializedSetup<UniformMatrix3fvImmediate, 0>();
1234 GLfloat temp[9 * 2] = { 0, };
1235 cmd.Init(1, -1, false, &temp[0]);
1236 EXPECT_EQ(error::kNoError,
1237 ExecuteImmediateCmd(cmd, sizeof(temp)));
1238 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1239 }
1240
1241 TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateInvalidArgs2_0) { 1140 TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateInvalidArgs2_0) {
1242 UniformMatrix3fvImmediate& cmd = 1141 UniformMatrix3fvImmediate& cmd =
1243 *GetImmediateAs<UniformMatrix3fvImmediate>(); 1142 *GetImmediateAs<UniformMatrix3fvImmediate>();
1244 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0); 1143 EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
1245 SpecializedSetup<UniformMatrix3fvImmediate, 0>(); 1144 SpecializedSetup<UniformMatrix3fvImmediate, 0>();
1246 GLfloat temp[9 * 2] = { 0, }; 1145 GLfloat temp[9 * 2] = { 0, };
1247 cmd.Init(1, 2, true, &temp[0]); 1146 cmd.Init(1, 2, true, &temp[0]);
1248 EXPECT_EQ(error::kNoError, 1147 EXPECT_EQ(error::kNoError,
1249 ExecuteImmediateCmd(cmd, sizeof(temp))); 1148 ExecuteImmediateCmd(cmd, sizeof(temp)));
1250 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); 1149 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1251 } 1150 }
1252 1151
1253 TEST_F(GLES2DecoderTest2, UniformMatrix4fvValidArgs) { 1152 TEST_F(GLES2DecoderTest2, UniformMatrix4fvValidArgs) {
1254 EXPECT_CALL( 1153 EXPECT_CALL(
1255 *gl_, UniformMatrix4fv( 1154 *gl_, UniformMatrix4fv(
1256 1, 2, false, reinterpret_cast<const GLfloat*>( 1155 1, 2, false, reinterpret_cast<const GLfloat*>(
1257 shared_memory_address_))); 1156 shared_memory_address_)));
1258 SpecializedSetup<UniformMatrix4fv, 0>(); 1157 SpecializedSetup<UniformMatrix4fv, 0>();
1259 UniformMatrix4fv cmd; 1158 UniformMatrix4fv cmd;
1260 cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_); 1159 cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_);
1261 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1160 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1262 } 1161 }
1263 1162
1264 TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs1_0) { 1163 TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs1_0) {
1265 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0); 1164 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
1266 SpecializedSetup<UniformMatrix4fv, 0>(); 1165 SpecializedSetup<UniformMatrix4fv, 0>();
1267 UniformMatrix4fv cmd; 1166 UniformMatrix4fv cmd;
1268 cmd.Init(1, -1, false, shared_memory_id_, shared_memory_offset_); 1167 cmd.Init(1, -1, false, shared_memory_id_, shared_memory_offset_);
1269 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1168 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1270 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 1169 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1271 } 1170 }
1272 1171
1273 TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs2_0) { 1172 TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs2_0) {
1274 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0); 1173 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
1275 SpecializedSetup<UniformMatrix4fv, 0>(); 1174 SpecializedSetup<UniformMatrix4fv, 0>();
1276 UniformMatrix4fv cmd; 1175 UniformMatrix4fv cmd;
1277 cmd.Init(1, 2, true, shared_memory_id_, shared_memory_offset_); 1176 cmd.Init(1, 2, true, shared_memory_id_, shared_memory_offset_);
1278 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1177 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1279 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); 1178 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1280 } 1179 }
1281 1180
1282 TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs3_0) { 1181 TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs3_0) {
1283 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0); 1182 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
1284 SpecializedSetup<UniformMatrix4fv, 0>(); 1183 SpecializedSetup<UniformMatrix4fv, 0>();
1285 UniformMatrix4fv cmd; 1184 UniformMatrix4fv cmd;
1286 cmd.Init(1, 2, false, kInvalidSharedMemoryId, 0); 1185 cmd.Init(1, 2, false, kInvalidSharedMemoryId, 0);
1287 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1186 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1288 } 1187 }
1289 1188
(...skipping 12 matching lines...) Expand all
1302 *gl_, 1201 *gl_,
1303 UniformMatrix4fv(1, 2, false, 1202 UniformMatrix4fv(1, 2, false,
1304 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); 1203 reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
1305 SpecializedSetup<UniformMatrix4fvImmediate, 0>(); 1204 SpecializedSetup<UniformMatrix4fvImmediate, 0>();
1306 GLfloat temp[16 * 2] = { 0, }; 1205 GLfloat temp[16 * 2] = { 0, };
1307 cmd.Init(1, 2, false, &temp[0]); 1206 cmd.Init(1, 2, false, &temp[0]);
1308 EXPECT_EQ(error::kNoError, 1207 EXPECT_EQ(error::kNoError,
1309 ExecuteImmediateCmd(cmd, sizeof(temp))); 1208 ExecuteImmediateCmd(cmd, sizeof(temp)));
1310 } 1209 }
1311 1210
1312 TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateInvalidArgs1_0) {
1313 UniformMatrix4fvImmediate& cmd =
1314 *GetImmediateAs<UniformMatrix4fvImmediate>();
1315 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
1316 SpecializedSetup<UniformMatrix4fvImmediate, 0>();
1317 GLfloat temp[16 * 2] = { 0, };
1318 cmd.Init(1, -1, false, &temp[0]);
1319 EXPECT_EQ(error::kNoError,
1320 ExecuteImmediateCmd(cmd, sizeof(temp)));
1321 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1322 }
1323
1324 TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateInvalidArgs2_0) { 1211 TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateInvalidArgs2_0) {
1325 UniformMatrix4fvImmediate& cmd = 1212 UniformMatrix4fvImmediate& cmd =
1326 *GetImmediateAs<UniformMatrix4fvImmediate>(); 1213 *GetImmediateAs<UniformMatrix4fvImmediate>();
1327 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0); 1214 EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
1328 SpecializedSetup<UniformMatrix4fvImmediate, 0>(); 1215 SpecializedSetup<UniformMatrix4fvImmediate, 0>();
1329 GLfloat temp[16 * 2] = { 0, }; 1216 GLfloat temp[16 * 2] = { 0, };
1330 cmd.Init(1, 2, true, &temp[0]); 1217 cmd.Init(1, 2, true, &temp[0]);
1331 EXPECT_EQ(error::kNoError, 1218 EXPECT_EQ(error::kNoError,
1332 ExecuteImmediateCmd(cmd, sizeof(temp))); 1219 ExecuteImmediateCmd(cmd, sizeof(temp)));
1333 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); 1220 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1334 } 1221 }
1335 // TODO(gman): UseProgram 1222 // TODO(gman): UseProgram
1336 1223
1337 TEST_F(GLES2DecoderTest2, ValidateProgramValidArgs) { 1224 TEST_F(GLES2DecoderTest2, ValidateProgramValidArgs) {
1338 EXPECT_CALL(*gl_, ValidateProgram(kServiceProgramId)); 1225 EXPECT_CALL(*gl_, ValidateProgram(kServiceProgramId));
1339 SpecializedSetup<ValidateProgram, 0>(); 1226 SpecializedSetup<ValidateProgram, 0>();
1340 ValidateProgram cmd; 1227 ValidateProgram cmd;
1341 cmd.Init(client_program_id_); 1228 cmd.Init(client_program_id_);
1342 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1229 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1343 } 1230 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 EXPECT_CALL(*gl_, Viewport(_, _, _, _)).Times(0); 1440 EXPECT_CALL(*gl_, Viewport(_, _, _, _)).Times(0);
1554 SpecializedSetup<Viewport, 0>(); 1441 SpecializedSetup<Viewport, 0>();
1555 Viewport cmd; 1442 Viewport cmd;
1556 cmd.Init(1, 2, 3, -1); 1443 cmd.Init(1, 2, 3, -1);
1557 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1444 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1558 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 1445 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
1559 } 1446 }
1560 // TODO(gman): SwapBuffers 1447 // TODO(gman): SwapBuffers
1561 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ 1448 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
1562 1449
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698