OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 }; | 72 }; |
73 | 73 |
74 COMPILE_ASSERT(sizeof(AttachShader) == 12, Sizeof_AttachShader_is_not_12); | 74 COMPILE_ASSERT(sizeof(AttachShader) == 12, Sizeof_AttachShader_is_not_12); |
75 COMPILE_ASSERT(offsetof(AttachShader, header) == 0, | 75 COMPILE_ASSERT(offsetof(AttachShader, header) == 0, |
76 OffsetOf_AttachShader_header_not_0); | 76 OffsetOf_AttachShader_header_not_0); |
77 COMPILE_ASSERT(offsetof(AttachShader, program) == 4, | 77 COMPILE_ASSERT(offsetof(AttachShader, program) == 4, |
78 OffsetOf_AttachShader_program_not_4); | 78 OffsetOf_AttachShader_program_not_4); |
79 COMPILE_ASSERT(offsetof(AttachShader, shader) == 8, | 79 COMPILE_ASSERT(offsetof(AttachShader, shader) == 8, |
80 OffsetOf_AttachShader_shader_not_8); | 80 OffsetOf_AttachShader_shader_not_8); |
81 | 81 |
82 struct BindAttribLocation { | |
83 typedef BindAttribLocation ValueType; | |
84 static const CommandId kCmdId = kBindAttribLocation; | |
85 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
86 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
87 | |
88 static uint32_t ComputeSize() { | |
89 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
90 } | |
91 | |
92 void SetHeader() { header.SetCmd<ValueType>(); } | |
93 | |
94 void Init(GLuint _program, | |
95 GLuint _index, | |
96 uint32_t _name_shm_id, | |
97 uint32_t _name_shm_offset, | |
98 uint32_t _data_size) { | |
99 SetHeader(); | |
100 program = _program; | |
101 index = _index; | |
102 name_shm_id = _name_shm_id; | |
103 name_shm_offset = _name_shm_offset; | |
104 data_size = _data_size; | |
105 } | |
106 | |
107 void* Set(void* cmd, | |
108 GLuint _program, | |
109 GLuint _index, | |
110 uint32_t _name_shm_id, | |
111 uint32_t _name_shm_offset, | |
112 uint32_t _data_size) { | |
113 static_cast<ValueType*>(cmd) | |
114 ->Init(_program, _index, _name_shm_id, _name_shm_offset, _data_size); | |
115 return NextCmdAddress<ValueType>(cmd); | |
116 } | |
117 | |
118 gpu::CommandHeader header; | |
119 uint32_t program; | |
120 uint32_t index; | |
121 uint32_t name_shm_id; | |
122 uint32_t name_shm_offset; | |
123 uint32_t data_size; | |
124 }; | |
125 | |
126 COMPILE_ASSERT(sizeof(BindAttribLocation) == 24, | |
127 Sizeof_BindAttribLocation_is_not_24); | |
128 COMPILE_ASSERT(offsetof(BindAttribLocation, header) == 0, | |
129 OffsetOf_BindAttribLocation_header_not_0); | |
130 COMPILE_ASSERT(offsetof(BindAttribLocation, program) == 4, | |
131 OffsetOf_BindAttribLocation_program_not_4); | |
132 COMPILE_ASSERT(offsetof(BindAttribLocation, index) == 8, | |
133 OffsetOf_BindAttribLocation_index_not_8); | |
134 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_id) == 12, | |
135 OffsetOf_BindAttribLocation_name_shm_id_not_12); | |
136 COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_offset) == 16, | |
137 OffsetOf_BindAttribLocation_name_shm_offset_not_16); | |
138 COMPILE_ASSERT(offsetof(BindAttribLocation, data_size) == 20, | |
139 OffsetOf_BindAttribLocation_data_size_not_20); | |
140 | |
141 struct BindAttribLocationBucket { | 82 struct BindAttribLocationBucket { |
142 typedef BindAttribLocationBucket ValueType; | 83 typedef BindAttribLocationBucket ValueType; |
143 static const CommandId kCmdId = kBindAttribLocationBucket; | 84 static const CommandId kCmdId = kBindAttribLocationBucket; |
144 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 85 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
145 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 86 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
146 | 87 |
147 static uint32_t ComputeSize() { | 88 static uint32_t ComputeSize() { |
148 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 89 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
149 } | 90 } |
150 | 91 |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 gpu::CommandHeader header; | 849 gpu::CommandHeader header; |
909 uint32_t shader; | 850 uint32_t shader; |
910 }; | 851 }; |
911 | 852 |
912 COMPILE_ASSERT(sizeof(CompileShader) == 8, Sizeof_CompileShader_is_not_8); | 853 COMPILE_ASSERT(sizeof(CompileShader) == 8, Sizeof_CompileShader_is_not_8); |
913 COMPILE_ASSERT(offsetof(CompileShader, header) == 0, | 854 COMPILE_ASSERT(offsetof(CompileShader, header) == 0, |
914 OffsetOf_CompileShader_header_not_0); | 855 OffsetOf_CompileShader_header_not_0); |
915 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4, | 856 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4, |
916 OffsetOf_CompileShader_shader_not_4); | 857 OffsetOf_CompileShader_shader_not_4); |
917 | 858 |
| 859 struct CompressedTexImage2DBucket { |
| 860 typedef CompressedTexImage2DBucket ValueType; |
| 861 static const CommandId kCmdId = kCompressedTexImage2DBucket; |
| 862 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 863 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 864 |
| 865 static uint32_t ComputeSize() { |
| 866 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 867 } |
| 868 |
| 869 void SetHeader() { header.SetCmd<ValueType>(); } |
| 870 |
| 871 void Init(GLenum _target, |
| 872 GLint _level, |
| 873 GLenum _internalformat, |
| 874 GLsizei _width, |
| 875 GLsizei _height, |
| 876 GLuint _bucket_id) { |
| 877 SetHeader(); |
| 878 target = _target; |
| 879 level = _level; |
| 880 internalformat = _internalformat; |
| 881 width = _width; |
| 882 height = _height; |
| 883 bucket_id = _bucket_id; |
| 884 } |
| 885 |
| 886 void* Set(void* cmd, |
| 887 GLenum _target, |
| 888 GLint _level, |
| 889 GLenum _internalformat, |
| 890 GLsizei _width, |
| 891 GLsizei _height, |
| 892 GLuint _bucket_id) { |
| 893 static_cast<ValueType*>(cmd) |
| 894 ->Init(_target, _level, _internalformat, _width, _height, _bucket_id); |
| 895 return NextCmdAddress<ValueType>(cmd); |
| 896 } |
| 897 |
| 898 gpu::CommandHeader header; |
| 899 uint32_t target; |
| 900 int32_t level; |
| 901 uint32_t internalformat; |
| 902 int32_t width; |
| 903 int32_t height; |
| 904 uint32_t bucket_id; |
| 905 static const int32_t border = 0; |
| 906 }; |
| 907 |
| 908 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 28, |
| 909 Sizeof_CompressedTexImage2DBucket_is_not_28); |
| 910 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0, |
| 911 OffsetOf_CompressedTexImage2DBucket_header_not_0); |
| 912 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4, |
| 913 OffsetOf_CompressedTexImage2DBucket_target_not_4); |
| 914 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8, |
| 915 OffsetOf_CompressedTexImage2DBucket_level_not_8); |
| 916 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12, |
| 917 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12); |
| 918 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16, |
| 919 OffsetOf_CompressedTexImage2DBucket_width_not_16); |
| 920 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20, |
| 921 OffsetOf_CompressedTexImage2DBucket_height_not_20); |
| 922 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 24, |
| 923 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_24); |
| 924 |
918 struct CompressedTexImage2D { | 925 struct CompressedTexImage2D { |
919 typedef CompressedTexImage2D ValueType; | 926 typedef CompressedTexImage2D ValueType; |
920 static const CommandId kCmdId = kCompressedTexImage2D; | 927 static const CommandId kCmdId = kCompressedTexImage2D; |
921 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 928 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
922 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 929 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
923 | 930 |
924 static uint32_t ComputeSize() { | 931 static uint32_t ComputeSize() { |
925 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 932 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
926 } | 933 } |
927 | 934 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 OffsetOf_CompressedTexImage2D_width_not_16); | 999 OffsetOf_CompressedTexImage2D_width_not_16); |
993 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20, | 1000 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20, |
994 OffsetOf_CompressedTexImage2D_height_not_20); | 1001 OffsetOf_CompressedTexImage2D_height_not_20); |
995 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 24, | 1002 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 24, |
996 OffsetOf_CompressedTexImage2D_imageSize_not_24); | 1003 OffsetOf_CompressedTexImage2D_imageSize_not_24); |
997 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 28, | 1004 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 28, |
998 OffsetOf_CompressedTexImage2D_data_shm_id_not_28); | 1005 OffsetOf_CompressedTexImage2D_data_shm_id_not_28); |
999 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 32, | 1006 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 32, |
1000 OffsetOf_CompressedTexImage2D_data_shm_offset_not_32); | 1007 OffsetOf_CompressedTexImage2D_data_shm_offset_not_32); |
1001 | 1008 |
1002 struct CompressedTexImage2DBucket { | 1009 struct CompressedTexSubImage2DBucket { |
1003 typedef CompressedTexImage2DBucket ValueType; | 1010 typedef CompressedTexSubImage2DBucket ValueType; |
1004 static const CommandId kCmdId = kCompressedTexImage2DBucket; | 1011 static const CommandId kCmdId = kCompressedTexSubImage2DBucket; |
1005 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1012 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1006 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1013 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1007 | 1014 |
1008 static uint32_t ComputeSize() { | 1015 static uint32_t ComputeSize() { |
1009 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1016 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1010 } | 1017 } |
1011 | 1018 |
1012 void SetHeader() { header.SetCmd<ValueType>(); } | 1019 void SetHeader() { header.SetCmd<ValueType>(); } |
1013 | 1020 |
1014 void Init(GLenum _target, | 1021 void Init(GLenum _target, |
1015 GLint _level, | 1022 GLint _level, |
1016 GLenum _internalformat, | 1023 GLint _xoffset, |
| 1024 GLint _yoffset, |
1017 GLsizei _width, | 1025 GLsizei _width, |
1018 GLsizei _height, | 1026 GLsizei _height, |
| 1027 GLenum _format, |
1019 GLuint _bucket_id) { | 1028 GLuint _bucket_id) { |
1020 SetHeader(); | 1029 SetHeader(); |
1021 target = _target; | 1030 target = _target; |
1022 level = _level; | 1031 level = _level; |
1023 internalformat = _internalformat; | 1032 xoffset = _xoffset; |
| 1033 yoffset = _yoffset; |
1024 width = _width; | 1034 width = _width; |
1025 height = _height; | 1035 height = _height; |
| 1036 format = _format; |
1026 bucket_id = _bucket_id; | 1037 bucket_id = _bucket_id; |
1027 } | 1038 } |
1028 | 1039 |
1029 void* Set(void* cmd, | 1040 void* Set(void* cmd, |
1030 GLenum _target, | 1041 GLenum _target, |
1031 GLint _level, | 1042 GLint _level, |
1032 GLenum _internalformat, | 1043 GLint _xoffset, |
| 1044 GLint _yoffset, |
1033 GLsizei _width, | 1045 GLsizei _width, |
1034 GLsizei _height, | 1046 GLsizei _height, |
| 1047 GLenum _format, |
1035 GLuint _bucket_id) { | 1048 GLuint _bucket_id) { |
1036 static_cast<ValueType*>(cmd) | 1049 static_cast<ValueType*>(cmd)->Init(_target, |
1037 ->Init(_target, _level, _internalformat, _width, _height, _bucket_id); | 1050 _level, |
| 1051 _xoffset, |
| 1052 _yoffset, |
| 1053 _width, |
| 1054 _height, |
| 1055 _format, |
| 1056 _bucket_id); |
1038 return NextCmdAddress<ValueType>(cmd); | 1057 return NextCmdAddress<ValueType>(cmd); |
1039 } | 1058 } |
1040 | 1059 |
1041 gpu::CommandHeader header; | 1060 gpu::CommandHeader header; |
1042 uint32_t target; | 1061 uint32_t target; |
1043 int32_t level; | 1062 int32_t level; |
1044 uint32_t internalformat; | 1063 int32_t xoffset; |
| 1064 int32_t yoffset; |
1045 int32_t width; | 1065 int32_t width; |
1046 int32_t height; | 1066 int32_t height; |
| 1067 uint32_t format; |
1047 uint32_t bucket_id; | 1068 uint32_t bucket_id; |
1048 static const int32_t border = 0; | |
1049 }; | 1069 }; |
1050 | 1070 |
1051 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 28, | 1071 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36, |
1052 Sizeof_CompressedTexImage2DBucket_is_not_28); | 1072 Sizeof_CompressedTexSubImage2DBucket_is_not_36); |
1053 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0, | 1073 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0, |
1054 OffsetOf_CompressedTexImage2DBucket_header_not_0); | 1074 OffsetOf_CompressedTexSubImage2DBucket_header_not_0); |
1055 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4, | 1075 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4, |
1056 OffsetOf_CompressedTexImage2DBucket_target_not_4); | 1076 OffsetOf_CompressedTexSubImage2DBucket_target_not_4); |
1057 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8, | 1077 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8, |
1058 OffsetOf_CompressedTexImage2DBucket_level_not_8); | 1078 OffsetOf_CompressedTexSubImage2DBucket_level_not_8); |
1059 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12, | 1079 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12, |
1060 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12); | 1080 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12); |
1061 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16, | 1081 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16, |
1062 OffsetOf_CompressedTexImage2DBucket_width_not_16); | 1082 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16); |
1063 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20, | 1083 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20, |
1064 OffsetOf_CompressedTexImage2DBucket_height_not_20); | 1084 OffsetOf_CompressedTexSubImage2DBucket_width_not_20); |
1065 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 24, | 1085 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24, |
1066 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_24); | 1086 OffsetOf_CompressedTexSubImage2DBucket_height_not_24); |
| 1087 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28, |
| 1088 OffsetOf_CompressedTexSubImage2DBucket_format_not_28); |
| 1089 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32, |
| 1090 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32); |
1067 | 1091 |
1068 struct CompressedTexSubImage2D { | 1092 struct CompressedTexSubImage2D { |
1069 typedef CompressedTexSubImage2D ValueType; | 1093 typedef CompressedTexSubImage2D ValueType; |
1070 static const CommandId kCmdId = kCompressedTexSubImage2D; | 1094 static const CommandId kCmdId = kCompressedTexSubImage2D; |
1071 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1095 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1072 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1096 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1073 | 1097 |
1074 static uint32_t ComputeSize() { | 1098 static uint32_t ComputeSize() { |
1075 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1099 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1076 } | 1100 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 OffsetOf_CompressedTexSubImage2D_height_not_24); | 1179 OffsetOf_CompressedTexSubImage2D_height_not_24); |
1156 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28, | 1180 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28, |
1157 OffsetOf_CompressedTexSubImage2D_format_not_28); | 1181 OffsetOf_CompressedTexSubImage2D_format_not_28); |
1158 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32, | 1182 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32, |
1159 OffsetOf_CompressedTexSubImage2D_imageSize_not_32); | 1183 OffsetOf_CompressedTexSubImage2D_imageSize_not_32); |
1160 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, | 1184 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, |
1161 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36); | 1185 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36); |
1162 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, | 1186 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, |
1163 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40); | 1187 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40); |
1164 | 1188 |
1165 struct CompressedTexSubImage2DBucket { | |
1166 typedef CompressedTexSubImage2DBucket ValueType; | |
1167 static const CommandId kCmdId = kCompressedTexSubImage2DBucket; | |
1168 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
1169 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
1170 | |
1171 static uint32_t ComputeSize() { | |
1172 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
1173 } | |
1174 | |
1175 void SetHeader() { header.SetCmd<ValueType>(); } | |
1176 | |
1177 void Init(GLenum _target, | |
1178 GLint _level, | |
1179 GLint _xoffset, | |
1180 GLint _yoffset, | |
1181 GLsizei _width, | |
1182 GLsizei _height, | |
1183 GLenum _format, | |
1184 GLuint _bucket_id) { | |
1185 SetHeader(); | |
1186 target = _target; | |
1187 level = _level; | |
1188 xoffset = _xoffset; | |
1189 yoffset = _yoffset; | |
1190 width = _width; | |
1191 height = _height; | |
1192 format = _format; | |
1193 bucket_id = _bucket_id; | |
1194 } | |
1195 | |
1196 void* Set(void* cmd, | |
1197 GLenum _target, | |
1198 GLint _level, | |
1199 GLint _xoffset, | |
1200 GLint _yoffset, | |
1201 GLsizei _width, | |
1202 GLsizei _height, | |
1203 GLenum _format, | |
1204 GLuint _bucket_id) { | |
1205 static_cast<ValueType*>(cmd)->Init(_target, | |
1206 _level, | |
1207 _xoffset, | |
1208 _yoffset, | |
1209 _width, | |
1210 _height, | |
1211 _format, | |
1212 _bucket_id); | |
1213 return NextCmdAddress<ValueType>(cmd); | |
1214 } | |
1215 | |
1216 gpu::CommandHeader header; | |
1217 uint32_t target; | |
1218 int32_t level; | |
1219 int32_t xoffset; | |
1220 int32_t yoffset; | |
1221 int32_t width; | |
1222 int32_t height; | |
1223 uint32_t format; | |
1224 uint32_t bucket_id; | |
1225 }; | |
1226 | |
1227 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36, | |
1228 Sizeof_CompressedTexSubImage2DBucket_is_not_36); | |
1229 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0, | |
1230 OffsetOf_CompressedTexSubImage2DBucket_header_not_0); | |
1231 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4, | |
1232 OffsetOf_CompressedTexSubImage2DBucket_target_not_4); | |
1233 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8, | |
1234 OffsetOf_CompressedTexSubImage2DBucket_level_not_8); | |
1235 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12, | |
1236 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12); | |
1237 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16, | |
1238 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16); | |
1239 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20, | |
1240 OffsetOf_CompressedTexSubImage2DBucket_width_not_20); | |
1241 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24, | |
1242 OffsetOf_CompressedTexSubImage2DBucket_height_not_24); | |
1243 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28, | |
1244 OffsetOf_CompressedTexSubImage2DBucket_format_not_28); | |
1245 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32, | |
1246 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32); | |
1247 | |
1248 struct CopyTexImage2D { | 1189 struct CopyTexImage2D { |
1249 typedef CopyTexImage2D ValueType; | 1190 typedef CopyTexImage2D ValueType; |
1250 static const CommandId kCmdId = kCopyTexImage2D; | 1191 static const CommandId kCmdId = kCopyTexImage2D; |
1251 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1192 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1252 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1193 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1253 | 1194 |
1254 static uint32_t ComputeSize() { | 1195 static uint32_t ComputeSize() { |
1255 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1196 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1256 } | 1197 } |
1257 | 1198 |
(...skipping 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4536 OffsetOf_ShaderBinary_shaders_shm_offset_not_12); | 4477 OffsetOf_ShaderBinary_shaders_shm_offset_not_12); |
4537 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16, | 4478 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16, |
4538 OffsetOf_ShaderBinary_binaryformat_not_16); | 4479 OffsetOf_ShaderBinary_binaryformat_not_16); |
4539 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20, | 4480 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20, |
4540 OffsetOf_ShaderBinary_binary_shm_id_not_20); | 4481 OffsetOf_ShaderBinary_binary_shm_id_not_20); |
4541 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24, | 4482 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24, |
4542 OffsetOf_ShaderBinary_binary_shm_offset_not_24); | 4483 OffsetOf_ShaderBinary_binary_shm_offset_not_24); |
4543 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28, | 4484 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28, |
4544 OffsetOf_ShaderBinary_length_not_28); | 4485 OffsetOf_ShaderBinary_length_not_28); |
4545 | 4486 |
4546 struct ShaderSource { | |
4547 typedef ShaderSource ValueType; | |
4548 static const CommandId kCmdId = kShaderSource; | |
4549 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
4550 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
4551 | |
4552 static uint32_t ComputeSize() { | |
4553 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
4554 } | |
4555 | |
4556 void SetHeader() { header.SetCmd<ValueType>(); } | |
4557 | |
4558 void Init(GLuint _shader, | |
4559 uint32_t _data_shm_id, | |
4560 uint32_t _data_shm_offset, | |
4561 uint32_t _data_size) { | |
4562 SetHeader(); | |
4563 shader = _shader; | |
4564 data_shm_id = _data_shm_id; | |
4565 data_shm_offset = _data_shm_offset; | |
4566 data_size = _data_size; | |
4567 } | |
4568 | |
4569 void* Set(void* cmd, | |
4570 GLuint _shader, | |
4571 uint32_t _data_shm_id, | |
4572 uint32_t _data_shm_offset, | |
4573 uint32_t _data_size) { | |
4574 static_cast<ValueType*>(cmd) | |
4575 ->Init(_shader, _data_shm_id, _data_shm_offset, _data_size); | |
4576 return NextCmdAddress<ValueType>(cmd); | |
4577 } | |
4578 | |
4579 gpu::CommandHeader header; | |
4580 uint32_t shader; | |
4581 uint32_t data_shm_id; | |
4582 uint32_t data_shm_offset; | |
4583 uint32_t data_size; | |
4584 }; | |
4585 | |
4586 COMPILE_ASSERT(sizeof(ShaderSource) == 20, Sizeof_ShaderSource_is_not_20); | |
4587 COMPILE_ASSERT(offsetof(ShaderSource, header) == 0, | |
4588 OffsetOf_ShaderSource_header_not_0); | |
4589 COMPILE_ASSERT(offsetof(ShaderSource, shader) == 4, | |
4590 OffsetOf_ShaderSource_shader_not_4); | |
4591 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_id) == 8, | |
4592 OffsetOf_ShaderSource_data_shm_id_not_8); | |
4593 COMPILE_ASSERT(offsetof(ShaderSource, data_shm_offset) == 12, | |
4594 OffsetOf_ShaderSource_data_shm_offset_not_12); | |
4595 COMPILE_ASSERT(offsetof(ShaderSource, data_size) == 16, | |
4596 OffsetOf_ShaderSource_data_size_not_16); | |
4597 | |
4598 struct ShaderSourceBucket { | 4487 struct ShaderSourceBucket { |
4599 typedef ShaderSourceBucket ValueType; | 4488 typedef ShaderSourceBucket ValueType; |
4600 static const CommandId kCmdId = kShaderSourceBucket; | 4489 static const CommandId kCmdId = kShaderSourceBucket; |
4601 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4490 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4602 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4491 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4603 | 4492 |
4604 static uint32_t ComputeSize() { | 4493 static uint32_t ComputeSize() { |
4605 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 4494 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
4606 } | 4495 } |
4607 | 4496 |
(...skipping 3732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8340 uint32_t target; | 8229 uint32_t target; |
8341 }; | 8230 }; |
8342 | 8231 |
8343 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, | 8232 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, |
8344 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); | 8233 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); |
8345 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, | 8234 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, |
8346 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); | 8235 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); |
8347 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, | 8236 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, |
8348 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); | 8237 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); |
8349 | 8238 |
8350 struct BindUniformLocationCHROMIUM { | |
8351 typedef BindUniformLocationCHROMIUM ValueType; | |
8352 static const CommandId kCmdId = kBindUniformLocationCHROMIUM; | |
8353 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
8354 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8355 | |
8356 static uint32_t ComputeSize() { | |
8357 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
8358 } | |
8359 | |
8360 void SetHeader() { header.SetCmd<ValueType>(); } | |
8361 | |
8362 void Init(GLuint _program, | |
8363 GLint _location, | |
8364 uint32_t _name_shm_id, | |
8365 uint32_t _name_shm_offset, | |
8366 uint32_t _data_size) { | |
8367 SetHeader(); | |
8368 program = _program; | |
8369 location = _location; | |
8370 name_shm_id = _name_shm_id; | |
8371 name_shm_offset = _name_shm_offset; | |
8372 data_size = _data_size; | |
8373 } | |
8374 | |
8375 void* Set(void* cmd, | |
8376 GLuint _program, | |
8377 GLint _location, | |
8378 uint32_t _name_shm_id, | |
8379 uint32_t _name_shm_offset, | |
8380 uint32_t _data_size) { | |
8381 static_cast<ValueType*>(cmd) | |
8382 ->Init(_program, _location, _name_shm_id, _name_shm_offset, _data_size); | |
8383 return NextCmdAddress<ValueType>(cmd); | |
8384 } | |
8385 | |
8386 gpu::CommandHeader header; | |
8387 uint32_t program; | |
8388 int32_t location; | |
8389 uint32_t name_shm_id; | |
8390 uint32_t name_shm_offset; | |
8391 uint32_t data_size; | |
8392 }; | |
8393 | |
8394 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUM) == 24, | |
8395 Sizeof_BindUniformLocationCHROMIUM_is_not_24); | |
8396 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, header) == 0, | |
8397 OffsetOf_BindUniformLocationCHROMIUM_header_not_0); | |
8398 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, program) == 4, | |
8399 OffsetOf_BindUniformLocationCHROMIUM_program_not_4); | |
8400 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, location) == 8, | |
8401 OffsetOf_BindUniformLocationCHROMIUM_location_not_8); | |
8402 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_id) == 12, | |
8403 OffsetOf_BindUniformLocationCHROMIUM_name_shm_id_not_12); | |
8404 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_offset) == 16, | |
8405 OffsetOf_BindUniformLocationCHROMIUM_name_shm_offset_not_16); | |
8406 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, data_size) == 20, | |
8407 OffsetOf_BindUniformLocationCHROMIUM_data_size_not_20); | |
8408 | |
8409 struct BindUniformLocationCHROMIUMBucket { | 8239 struct BindUniformLocationCHROMIUMBucket { |
8410 typedef BindUniformLocationCHROMIUMBucket ValueType; | 8240 typedef BindUniformLocationCHROMIUMBucket ValueType; |
8411 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket; | 8241 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket; |
8412 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8242 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8413 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8243 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8414 | 8244 |
8415 static uint32_t ComputeSize() { | 8245 static uint32_t ComputeSize() { |
8416 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8246 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8417 } | 8247 } |
8418 | 8248 |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9160 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, | 8990 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, |
9161 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); | 8991 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); |
9162 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, | 8992 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, |
9163 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); | 8993 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); |
9164 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, | 8994 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, |
9165 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); | 8995 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); |
9166 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, | 8996 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, |
9167 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); | 8997 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); |
9168 | 8998 |
9169 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 8999 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |