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