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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 OffsetOf_CompressedTexSubImage2D_height_not_24); | 1161 OffsetOf_CompressedTexSubImage2D_height_not_24); |
1162 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28, | 1162 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28, |
1163 OffsetOf_CompressedTexSubImage2D_format_not_28); | 1163 OffsetOf_CompressedTexSubImage2D_format_not_28); |
1164 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32, | 1164 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32, |
1165 OffsetOf_CompressedTexSubImage2D_imageSize_not_32); | 1165 OffsetOf_CompressedTexSubImage2D_imageSize_not_32); |
1166 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, | 1166 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, |
1167 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36); | 1167 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36); |
1168 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, | 1168 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, |
1169 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40); | 1169 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40); |
1170 | 1170 |
| 1171 struct CopyBufferSubData { |
| 1172 typedef CopyBufferSubData ValueType; |
| 1173 static const CommandId kCmdId = kCopyBufferSubData; |
| 1174 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 1175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 1176 |
| 1177 static uint32_t ComputeSize() { |
| 1178 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 1179 } |
| 1180 |
| 1181 void SetHeader() { header.SetCmd<ValueType>(); } |
| 1182 |
| 1183 void Init(GLenum _readtarget, |
| 1184 GLenum _writetarget, |
| 1185 GLintptr _readoffset, |
| 1186 GLintptr _writeoffset, |
| 1187 GLsizeiptr _size) { |
| 1188 SetHeader(); |
| 1189 readtarget = _readtarget; |
| 1190 writetarget = _writetarget; |
| 1191 readoffset = _readoffset; |
| 1192 writeoffset = _writeoffset; |
| 1193 size = _size; |
| 1194 } |
| 1195 |
| 1196 void* Set(void* cmd, |
| 1197 GLenum _readtarget, |
| 1198 GLenum _writetarget, |
| 1199 GLintptr _readoffset, |
| 1200 GLintptr _writeoffset, |
| 1201 GLsizeiptr _size) { |
| 1202 static_cast<ValueType*>(cmd) |
| 1203 ->Init(_readtarget, _writetarget, _readoffset, _writeoffset, _size); |
| 1204 return NextCmdAddress<ValueType>(cmd); |
| 1205 } |
| 1206 |
| 1207 gpu::CommandHeader header; |
| 1208 uint32_t readtarget; |
| 1209 uint32_t writetarget; |
| 1210 int32_t readoffset; |
| 1211 int32_t writeoffset; |
| 1212 int32_t size; |
| 1213 }; |
| 1214 |
| 1215 COMPILE_ASSERT(sizeof(CopyBufferSubData) == 24, |
| 1216 Sizeof_CopyBufferSubData_is_not_24); |
| 1217 COMPILE_ASSERT(offsetof(CopyBufferSubData, header) == 0, |
| 1218 OffsetOf_CopyBufferSubData_header_not_0); |
| 1219 COMPILE_ASSERT(offsetof(CopyBufferSubData, readtarget) == 4, |
| 1220 OffsetOf_CopyBufferSubData_readtarget_not_4); |
| 1221 COMPILE_ASSERT(offsetof(CopyBufferSubData, writetarget) == 8, |
| 1222 OffsetOf_CopyBufferSubData_writetarget_not_8); |
| 1223 COMPILE_ASSERT(offsetof(CopyBufferSubData, readoffset) == 12, |
| 1224 OffsetOf_CopyBufferSubData_readoffset_not_12); |
| 1225 COMPILE_ASSERT(offsetof(CopyBufferSubData, writeoffset) == 16, |
| 1226 OffsetOf_CopyBufferSubData_writeoffset_not_16); |
| 1227 COMPILE_ASSERT(offsetof(CopyBufferSubData, size) == 20, |
| 1228 OffsetOf_CopyBufferSubData_size_not_20); |
| 1229 |
1171 struct CopyTexImage2D { | 1230 struct CopyTexImage2D { |
1172 typedef CopyTexImage2D ValueType; | 1231 typedef CopyTexImage2D ValueType; |
1173 static const CommandId kCmdId = kCopyTexImage2D; | 1232 static const CommandId kCmdId = kCopyTexImage2D; |
1174 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1233 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1175 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1234 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1176 | 1235 |
1177 static uint32_t ComputeSize() { | 1236 static uint32_t ComputeSize() { |
1178 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1237 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1179 } | 1238 } |
1180 | 1239 |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2143 OffsetOf_FramebufferTexture2D_header_not_0); | 2202 OffsetOf_FramebufferTexture2D_header_not_0); |
2144 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4, | 2203 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4, |
2145 OffsetOf_FramebufferTexture2D_target_not_4); | 2204 OffsetOf_FramebufferTexture2D_target_not_4); |
2146 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8, | 2205 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8, |
2147 OffsetOf_FramebufferTexture2D_attachment_not_8); | 2206 OffsetOf_FramebufferTexture2D_attachment_not_8); |
2148 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12, | 2207 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12, |
2149 OffsetOf_FramebufferTexture2D_textarget_not_12); | 2208 OffsetOf_FramebufferTexture2D_textarget_not_12); |
2150 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16, | 2209 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16, |
2151 OffsetOf_FramebufferTexture2D_texture_not_16); | 2210 OffsetOf_FramebufferTexture2D_texture_not_16); |
2152 | 2211 |
| 2212 struct FramebufferTextureLayer { |
| 2213 typedef FramebufferTextureLayer ValueType; |
| 2214 static const CommandId kCmdId = kFramebufferTextureLayer; |
| 2215 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 2216 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 2217 |
| 2218 static uint32_t ComputeSize() { |
| 2219 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 2220 } |
| 2221 |
| 2222 void SetHeader() { header.SetCmd<ValueType>(); } |
| 2223 |
| 2224 void Init(GLenum _target, |
| 2225 GLenum _attachment, |
| 2226 GLuint _texture, |
| 2227 GLint _level, |
| 2228 GLint _layer) { |
| 2229 SetHeader(); |
| 2230 target = _target; |
| 2231 attachment = _attachment; |
| 2232 texture = _texture; |
| 2233 level = _level; |
| 2234 layer = _layer; |
| 2235 } |
| 2236 |
| 2237 void* Set(void* cmd, |
| 2238 GLenum _target, |
| 2239 GLenum _attachment, |
| 2240 GLuint _texture, |
| 2241 GLint _level, |
| 2242 GLint _layer) { |
| 2243 static_cast<ValueType*>(cmd) |
| 2244 ->Init(_target, _attachment, _texture, _level, _layer); |
| 2245 return NextCmdAddress<ValueType>(cmd); |
| 2246 } |
| 2247 |
| 2248 gpu::CommandHeader header; |
| 2249 uint32_t target; |
| 2250 uint32_t attachment; |
| 2251 uint32_t texture; |
| 2252 int32_t level; |
| 2253 int32_t layer; |
| 2254 }; |
| 2255 |
| 2256 COMPILE_ASSERT(sizeof(FramebufferTextureLayer) == 24, |
| 2257 Sizeof_FramebufferTextureLayer_is_not_24); |
| 2258 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, header) == 0, |
| 2259 OffsetOf_FramebufferTextureLayer_header_not_0); |
| 2260 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, target) == 4, |
| 2261 OffsetOf_FramebufferTextureLayer_target_not_4); |
| 2262 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, attachment) == 8, |
| 2263 OffsetOf_FramebufferTextureLayer_attachment_not_8); |
| 2264 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, texture) == 12, |
| 2265 OffsetOf_FramebufferTextureLayer_texture_not_12); |
| 2266 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, level) == 16, |
| 2267 OffsetOf_FramebufferTextureLayer_level_not_16); |
| 2268 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, layer) == 20, |
| 2269 OffsetOf_FramebufferTextureLayer_layer_not_20); |
| 2270 |
2153 struct FrontFace { | 2271 struct FrontFace { |
2154 typedef FrontFace ValueType; | 2272 typedef FrontFace ValueType; |
2155 static const CommandId kCmdId = kFrontFace; | 2273 static const CommandId kCmdId = kFrontFace; |
2156 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2274 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2157 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2158 | 2276 |
2159 static uint32_t ComputeSize() { | 2277 static uint32_t ComputeSize() { |
2160 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2161 } | 2279 } |
2162 | 2280 |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2923 COMPILE_ASSERT(sizeof(GetIntegerv) == 16, Sizeof_GetIntegerv_is_not_16); | 3041 COMPILE_ASSERT(sizeof(GetIntegerv) == 16, Sizeof_GetIntegerv_is_not_16); |
2924 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0, | 3042 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0, |
2925 OffsetOf_GetIntegerv_header_not_0); | 3043 OffsetOf_GetIntegerv_header_not_0); |
2926 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4, | 3044 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4, |
2927 OffsetOf_GetIntegerv_pname_not_4); | 3045 OffsetOf_GetIntegerv_pname_not_4); |
2928 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8, | 3046 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8, |
2929 OffsetOf_GetIntegerv_params_shm_id_not_8); | 3047 OffsetOf_GetIntegerv_params_shm_id_not_8); |
2930 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12, | 3048 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12, |
2931 OffsetOf_GetIntegerv_params_shm_offset_not_12); | 3049 OffsetOf_GetIntegerv_params_shm_offset_not_12); |
2932 | 3050 |
| 3051 struct GetInternalformativ { |
| 3052 typedef GetInternalformativ ValueType; |
| 3053 static const CommandId kCmdId = kGetInternalformativ; |
| 3054 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 3055 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 3056 |
| 3057 typedef SizedResult<GLint> Result; |
| 3058 |
| 3059 static uint32_t ComputeSize() { |
| 3060 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 3061 } |
| 3062 |
| 3063 void SetHeader() { header.SetCmd<ValueType>(); } |
| 3064 |
| 3065 void Init(GLenum _target, |
| 3066 GLenum _format, |
| 3067 GLenum _pname, |
| 3068 GLsizei _bufSize, |
| 3069 uint32_t _params_shm_id, |
| 3070 uint32_t _params_shm_offset) { |
| 3071 SetHeader(); |
| 3072 target = _target; |
| 3073 format = _format; |
| 3074 pname = _pname; |
| 3075 bufSize = _bufSize; |
| 3076 params_shm_id = _params_shm_id; |
| 3077 params_shm_offset = _params_shm_offset; |
| 3078 } |
| 3079 |
| 3080 void* Set(void* cmd, |
| 3081 GLenum _target, |
| 3082 GLenum _format, |
| 3083 GLenum _pname, |
| 3084 GLsizei _bufSize, |
| 3085 uint32_t _params_shm_id, |
| 3086 uint32_t _params_shm_offset) { |
| 3087 static_cast<ValueType*>(cmd)->Init(_target, _format, _pname, _bufSize, |
| 3088 _params_shm_id, _params_shm_offset); |
| 3089 return NextCmdAddress<ValueType>(cmd); |
| 3090 } |
| 3091 |
| 3092 gpu::CommandHeader header; |
| 3093 uint32_t target; |
| 3094 uint32_t format; |
| 3095 uint32_t pname; |
| 3096 int32_t bufSize; |
| 3097 uint32_t params_shm_id; |
| 3098 uint32_t params_shm_offset; |
| 3099 }; |
| 3100 |
| 3101 COMPILE_ASSERT(sizeof(GetInternalformativ) == 28, |
| 3102 Sizeof_GetInternalformativ_is_not_28); |
| 3103 COMPILE_ASSERT(offsetof(GetInternalformativ, header) == 0, |
| 3104 OffsetOf_GetInternalformativ_header_not_0); |
| 3105 COMPILE_ASSERT(offsetof(GetInternalformativ, target) == 4, |
| 3106 OffsetOf_GetInternalformativ_target_not_4); |
| 3107 COMPILE_ASSERT(offsetof(GetInternalformativ, format) == 8, |
| 3108 OffsetOf_GetInternalformativ_format_not_8); |
| 3109 COMPILE_ASSERT(offsetof(GetInternalformativ, pname) == 12, |
| 3110 OffsetOf_GetInternalformativ_pname_not_12); |
| 3111 COMPILE_ASSERT(offsetof(GetInternalformativ, bufSize) == 16, |
| 3112 OffsetOf_GetInternalformativ_bufSize_not_16); |
| 3113 COMPILE_ASSERT(offsetof(GetInternalformativ, params_shm_id) == 20, |
| 3114 OffsetOf_GetInternalformativ_params_shm_id_not_20); |
| 3115 COMPILE_ASSERT(offsetof(GetInternalformativ, params_shm_offset) == 24, |
| 3116 OffsetOf_GetInternalformativ_params_shm_offset_not_24); |
| 3117 |
2933 struct GetProgramiv { | 3118 struct GetProgramiv { |
2934 typedef GetProgramiv ValueType; | 3119 typedef GetProgramiv ValueType; |
2935 static const CommandId kCmdId = kGetProgramiv; | 3120 static const CommandId kCmdId = kGetProgramiv; |
2936 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3121 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2937 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3122 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2938 | 3123 |
2939 typedef SizedResult<GLint> Result; | 3124 typedef SizedResult<GLint> Result; |
2940 | 3125 |
2941 static uint32_t ComputeSize() { | 3126 static uint32_t ComputeSize() { |
2942 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3127 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5086 | 5271 |
5087 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12, | 5272 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12, |
5088 Sizeof_TexParameterivImmediate_is_not_12); | 5273 Sizeof_TexParameterivImmediate_is_not_12); |
5089 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0, | 5274 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0, |
5090 OffsetOf_TexParameterivImmediate_header_not_0); | 5275 OffsetOf_TexParameterivImmediate_header_not_0); |
5091 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4, | 5276 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4, |
5092 OffsetOf_TexParameterivImmediate_target_not_4); | 5277 OffsetOf_TexParameterivImmediate_target_not_4); |
5093 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8, | 5278 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8, |
5094 OffsetOf_TexParameterivImmediate_pname_not_8); | 5279 OffsetOf_TexParameterivImmediate_pname_not_8); |
5095 | 5280 |
| 5281 struct TexStorage3D { |
| 5282 typedef TexStorage3D ValueType; |
| 5283 static const CommandId kCmdId = kTexStorage3D; |
| 5284 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 5285 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5286 |
| 5287 static uint32_t ComputeSize() { |
| 5288 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 5289 } |
| 5290 |
| 5291 void SetHeader() { header.SetCmd<ValueType>(); } |
| 5292 |
| 5293 void Init(GLenum _target, |
| 5294 GLsizei _levels, |
| 5295 GLenum _internalFormat, |
| 5296 GLsizei _width, |
| 5297 GLsizei _height, |
| 5298 GLsizei _depth) { |
| 5299 SetHeader(); |
| 5300 target = _target; |
| 5301 levels = _levels; |
| 5302 internalFormat = _internalFormat; |
| 5303 width = _width; |
| 5304 height = _height; |
| 5305 depth = _depth; |
| 5306 } |
| 5307 |
| 5308 void* Set(void* cmd, |
| 5309 GLenum _target, |
| 5310 GLsizei _levels, |
| 5311 GLenum _internalFormat, |
| 5312 GLsizei _width, |
| 5313 GLsizei _height, |
| 5314 GLsizei _depth) { |
| 5315 static_cast<ValueType*>(cmd) |
| 5316 ->Init(_target, _levels, _internalFormat, _width, _height, _depth); |
| 5317 return NextCmdAddress<ValueType>(cmd); |
| 5318 } |
| 5319 |
| 5320 gpu::CommandHeader header; |
| 5321 uint32_t target; |
| 5322 int32_t levels; |
| 5323 uint32_t internalFormat; |
| 5324 int32_t width; |
| 5325 int32_t height; |
| 5326 int32_t depth; |
| 5327 }; |
| 5328 |
| 5329 COMPILE_ASSERT(sizeof(TexStorage3D) == 28, Sizeof_TexStorage3D_is_not_28); |
| 5330 COMPILE_ASSERT(offsetof(TexStorage3D, header) == 0, |
| 5331 OffsetOf_TexStorage3D_header_not_0); |
| 5332 COMPILE_ASSERT(offsetof(TexStorage3D, target) == 4, |
| 5333 OffsetOf_TexStorage3D_target_not_4); |
| 5334 COMPILE_ASSERT(offsetof(TexStorage3D, levels) == 8, |
| 5335 OffsetOf_TexStorage3D_levels_not_8); |
| 5336 COMPILE_ASSERT(offsetof(TexStorage3D, internalFormat) == 12, |
| 5337 OffsetOf_TexStorage3D_internalFormat_not_12); |
| 5338 COMPILE_ASSERT(offsetof(TexStorage3D, width) == 16, |
| 5339 OffsetOf_TexStorage3D_width_not_16); |
| 5340 COMPILE_ASSERT(offsetof(TexStorage3D, height) == 20, |
| 5341 OffsetOf_TexStorage3D_height_not_20); |
| 5342 COMPILE_ASSERT(offsetof(TexStorage3D, depth) == 24, |
| 5343 OffsetOf_TexStorage3D_depth_not_24); |
| 5344 |
5096 struct TexSubImage2D { | 5345 struct TexSubImage2D { |
5097 typedef TexSubImage2D ValueType; | 5346 typedef TexSubImage2D ValueType; |
5098 static const CommandId kCmdId = kTexSubImage2D; | 5347 static const CommandId kCmdId = kTexSubImage2D; |
5099 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5348 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5100 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5349 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5101 | 5350 |
5102 static uint32_t ComputeSize() { | 5351 static uint32_t ComputeSize() { |
5103 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5352 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5104 } | 5353 } |
5105 | 5354 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5343 | 5592 |
5344 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12, | 5593 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12, |
5345 Sizeof_Uniform1ivImmediate_is_not_12); | 5594 Sizeof_Uniform1ivImmediate_is_not_12); |
5346 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0, | 5595 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0, |
5347 OffsetOf_Uniform1ivImmediate_header_not_0); | 5596 OffsetOf_Uniform1ivImmediate_header_not_0); |
5348 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4, | 5597 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4, |
5349 OffsetOf_Uniform1ivImmediate_location_not_4); | 5598 OffsetOf_Uniform1ivImmediate_location_not_4); |
5350 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8, | 5599 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8, |
5351 OffsetOf_Uniform1ivImmediate_count_not_8); | 5600 OffsetOf_Uniform1ivImmediate_count_not_8); |
5352 | 5601 |
| 5602 struct Uniform1ui { |
| 5603 typedef Uniform1ui ValueType; |
| 5604 static const CommandId kCmdId = kUniform1ui; |
| 5605 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 5606 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5607 |
| 5608 static uint32_t ComputeSize() { |
| 5609 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 5610 } |
| 5611 |
| 5612 void SetHeader() { header.SetCmd<ValueType>(); } |
| 5613 |
| 5614 void Init(GLint _location, GLuint _x) { |
| 5615 SetHeader(); |
| 5616 location = _location; |
| 5617 x = _x; |
| 5618 } |
| 5619 |
| 5620 void* Set(void* cmd, GLint _location, GLuint _x) { |
| 5621 static_cast<ValueType*>(cmd)->Init(_location, _x); |
| 5622 return NextCmdAddress<ValueType>(cmd); |
| 5623 } |
| 5624 |
| 5625 gpu::CommandHeader header; |
| 5626 int32_t location; |
| 5627 uint32_t x; |
| 5628 }; |
| 5629 |
| 5630 COMPILE_ASSERT(sizeof(Uniform1ui) == 12, Sizeof_Uniform1ui_is_not_12); |
| 5631 COMPILE_ASSERT(offsetof(Uniform1ui, header) == 0, |
| 5632 OffsetOf_Uniform1ui_header_not_0); |
| 5633 COMPILE_ASSERT(offsetof(Uniform1ui, location) == 4, |
| 5634 OffsetOf_Uniform1ui_location_not_4); |
| 5635 COMPILE_ASSERT(offsetof(Uniform1ui, x) == 8, OffsetOf_Uniform1ui_x_not_8); |
| 5636 |
| 5637 struct Uniform1uivImmediate { |
| 5638 typedef Uniform1uivImmediate ValueType; |
| 5639 static const CommandId kCmdId = kUniform1uivImmediate; |
| 5640 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 5641 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5642 |
| 5643 static uint32_t ComputeDataSize(GLsizei count) { |
| 5644 return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT |
| 5645 } |
| 5646 |
| 5647 static uint32_t ComputeSize(GLsizei count) { |
| 5648 return static_cast<uint32_t>(sizeof(ValueType) + |
| 5649 ComputeDataSize(count)); // NOLINT |
| 5650 } |
| 5651 |
| 5652 void SetHeader(GLsizei count) { |
| 5653 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 5654 } |
| 5655 |
| 5656 void Init(GLint _location, GLsizei _count, const GLuint* _v) { |
| 5657 SetHeader(_count); |
| 5658 location = _location; |
| 5659 count = _count; |
| 5660 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); |
| 5661 } |
| 5662 |
| 5663 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) { |
| 5664 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
| 5665 const uint32_t size = ComputeSize(_count); |
| 5666 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 5667 } |
| 5668 |
| 5669 gpu::CommandHeader header; |
| 5670 int32_t location; |
| 5671 int32_t count; |
| 5672 }; |
| 5673 |
| 5674 COMPILE_ASSERT(sizeof(Uniform1uivImmediate) == 12, |
| 5675 Sizeof_Uniform1uivImmediate_is_not_12); |
| 5676 COMPILE_ASSERT(offsetof(Uniform1uivImmediate, header) == 0, |
| 5677 OffsetOf_Uniform1uivImmediate_header_not_0); |
| 5678 COMPILE_ASSERT(offsetof(Uniform1uivImmediate, location) == 4, |
| 5679 OffsetOf_Uniform1uivImmediate_location_not_4); |
| 5680 COMPILE_ASSERT(offsetof(Uniform1uivImmediate, count) == 8, |
| 5681 OffsetOf_Uniform1uivImmediate_count_not_8); |
| 5682 |
5353 struct Uniform2f { | 5683 struct Uniform2f { |
5354 typedef Uniform2f ValueType; | 5684 typedef Uniform2f ValueType; |
5355 static const CommandId kCmdId = kUniform2f; | 5685 static const CommandId kCmdId = kUniform2f; |
5356 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5686 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5357 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5687 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5358 | 5688 |
5359 static uint32_t ComputeSize() { | 5689 static uint32_t ComputeSize() { |
5360 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5690 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5361 } | 5691 } |
5362 | 5692 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5511 | 5841 |
5512 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12, | 5842 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12, |
5513 Sizeof_Uniform2ivImmediate_is_not_12); | 5843 Sizeof_Uniform2ivImmediate_is_not_12); |
5514 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0, | 5844 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0, |
5515 OffsetOf_Uniform2ivImmediate_header_not_0); | 5845 OffsetOf_Uniform2ivImmediate_header_not_0); |
5516 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4, | 5846 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4, |
5517 OffsetOf_Uniform2ivImmediate_location_not_4); | 5847 OffsetOf_Uniform2ivImmediate_location_not_4); |
5518 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8, | 5848 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8, |
5519 OffsetOf_Uniform2ivImmediate_count_not_8); | 5849 OffsetOf_Uniform2ivImmediate_count_not_8); |
5520 | 5850 |
| 5851 struct Uniform2ui { |
| 5852 typedef Uniform2ui ValueType; |
| 5853 static const CommandId kCmdId = kUniform2ui; |
| 5854 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 5855 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5856 |
| 5857 static uint32_t ComputeSize() { |
| 5858 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 5859 } |
| 5860 |
| 5861 void SetHeader() { header.SetCmd<ValueType>(); } |
| 5862 |
| 5863 void Init(GLint _location, GLuint _x, GLuint _y) { |
| 5864 SetHeader(); |
| 5865 location = _location; |
| 5866 x = _x; |
| 5867 y = _y; |
| 5868 } |
| 5869 |
| 5870 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y) { |
| 5871 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); |
| 5872 return NextCmdAddress<ValueType>(cmd); |
| 5873 } |
| 5874 |
| 5875 gpu::CommandHeader header; |
| 5876 int32_t location; |
| 5877 uint32_t x; |
| 5878 uint32_t y; |
| 5879 }; |
| 5880 |
| 5881 COMPILE_ASSERT(sizeof(Uniform2ui) == 16, Sizeof_Uniform2ui_is_not_16); |
| 5882 COMPILE_ASSERT(offsetof(Uniform2ui, header) == 0, |
| 5883 OffsetOf_Uniform2ui_header_not_0); |
| 5884 COMPILE_ASSERT(offsetof(Uniform2ui, location) == 4, |
| 5885 OffsetOf_Uniform2ui_location_not_4); |
| 5886 COMPILE_ASSERT(offsetof(Uniform2ui, x) == 8, OffsetOf_Uniform2ui_x_not_8); |
| 5887 COMPILE_ASSERT(offsetof(Uniform2ui, y) == 12, OffsetOf_Uniform2ui_y_not_12); |
| 5888 |
| 5889 struct Uniform2uivImmediate { |
| 5890 typedef Uniform2uivImmediate ValueType; |
| 5891 static const CommandId kCmdId = kUniform2uivImmediate; |
| 5892 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 5893 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5894 |
| 5895 static uint32_t ComputeDataSize(GLsizei count) { |
| 5896 return static_cast<uint32_t>(sizeof(GLuint) * 2 * count); // NOLINT |
| 5897 } |
| 5898 |
| 5899 static uint32_t ComputeSize(GLsizei count) { |
| 5900 return static_cast<uint32_t>(sizeof(ValueType) + |
| 5901 ComputeDataSize(count)); // NOLINT |
| 5902 } |
| 5903 |
| 5904 void SetHeader(GLsizei count) { |
| 5905 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 5906 } |
| 5907 |
| 5908 void Init(GLint _location, GLsizei _count, const GLuint* _v) { |
| 5909 SetHeader(_count); |
| 5910 location = _location; |
| 5911 count = _count; |
| 5912 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); |
| 5913 } |
| 5914 |
| 5915 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) { |
| 5916 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
| 5917 const uint32_t size = ComputeSize(_count); |
| 5918 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 5919 } |
| 5920 |
| 5921 gpu::CommandHeader header; |
| 5922 int32_t location; |
| 5923 int32_t count; |
| 5924 }; |
| 5925 |
| 5926 COMPILE_ASSERT(sizeof(Uniform2uivImmediate) == 12, |
| 5927 Sizeof_Uniform2uivImmediate_is_not_12); |
| 5928 COMPILE_ASSERT(offsetof(Uniform2uivImmediate, header) == 0, |
| 5929 OffsetOf_Uniform2uivImmediate_header_not_0); |
| 5930 COMPILE_ASSERT(offsetof(Uniform2uivImmediate, location) == 4, |
| 5931 OffsetOf_Uniform2uivImmediate_location_not_4); |
| 5932 COMPILE_ASSERT(offsetof(Uniform2uivImmediate, count) == 8, |
| 5933 OffsetOf_Uniform2uivImmediate_count_not_8); |
| 5934 |
5521 struct Uniform3f { | 5935 struct Uniform3f { |
5522 typedef Uniform3f ValueType; | 5936 typedef Uniform3f ValueType; |
5523 static const CommandId kCmdId = kUniform3f; | 5937 static const CommandId kCmdId = kUniform3f; |
5524 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5938 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5525 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5939 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5526 | 5940 |
5527 static uint32_t ComputeSize() { | 5941 static uint32_t ComputeSize() { |
5528 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5942 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5529 } | 5943 } |
5530 | 5944 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5685 | 6099 |
5686 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12, | 6100 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12, |
5687 Sizeof_Uniform3ivImmediate_is_not_12); | 6101 Sizeof_Uniform3ivImmediate_is_not_12); |
5688 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0, | 6102 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0, |
5689 OffsetOf_Uniform3ivImmediate_header_not_0); | 6103 OffsetOf_Uniform3ivImmediate_header_not_0); |
5690 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4, | 6104 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4, |
5691 OffsetOf_Uniform3ivImmediate_location_not_4); | 6105 OffsetOf_Uniform3ivImmediate_location_not_4); |
5692 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8, | 6106 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8, |
5693 OffsetOf_Uniform3ivImmediate_count_not_8); | 6107 OffsetOf_Uniform3ivImmediate_count_not_8); |
5694 | 6108 |
5695 struct Uniform4f { | 6109 struct Uniform3ui { |
5696 typedef Uniform4f ValueType; | 6110 typedef Uniform3ui ValueType; |
5697 static const CommandId kCmdId = kUniform4f; | 6111 static const CommandId kCmdId = kUniform3ui; |
5698 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6112 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5699 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5700 | 6114 |
5701 static uint32_t ComputeSize() { | 6115 static uint32_t ComputeSize() { |
5702 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6116 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5703 } | 6117 } |
5704 | 6118 |
5705 void SetHeader() { header.SetCmd<ValueType>(); } | 6119 void SetHeader() { header.SetCmd<ValueType>(); } |
5706 | 6120 |
| 6121 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z) { |
| 6122 SetHeader(); |
| 6123 location = _location; |
| 6124 x = _x; |
| 6125 y = _y; |
| 6126 z = _z; |
| 6127 } |
| 6128 |
| 6129 void* Set(void* cmd, GLint _location, GLuint _x, GLuint _y, GLuint _z) { |
| 6130 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z); |
| 6131 return NextCmdAddress<ValueType>(cmd); |
| 6132 } |
| 6133 |
| 6134 gpu::CommandHeader header; |
| 6135 int32_t location; |
| 6136 uint32_t x; |
| 6137 uint32_t y; |
| 6138 uint32_t z; |
| 6139 }; |
| 6140 |
| 6141 COMPILE_ASSERT(sizeof(Uniform3ui) == 20, Sizeof_Uniform3ui_is_not_20); |
| 6142 COMPILE_ASSERT(offsetof(Uniform3ui, header) == 0, |
| 6143 OffsetOf_Uniform3ui_header_not_0); |
| 6144 COMPILE_ASSERT(offsetof(Uniform3ui, location) == 4, |
| 6145 OffsetOf_Uniform3ui_location_not_4); |
| 6146 COMPILE_ASSERT(offsetof(Uniform3ui, x) == 8, OffsetOf_Uniform3ui_x_not_8); |
| 6147 COMPILE_ASSERT(offsetof(Uniform3ui, y) == 12, OffsetOf_Uniform3ui_y_not_12); |
| 6148 COMPILE_ASSERT(offsetof(Uniform3ui, z) == 16, OffsetOf_Uniform3ui_z_not_16); |
| 6149 |
| 6150 struct Uniform3uivImmediate { |
| 6151 typedef Uniform3uivImmediate ValueType; |
| 6152 static const CommandId kCmdId = kUniform3uivImmediate; |
| 6153 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6154 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6155 |
| 6156 static uint32_t ComputeDataSize(GLsizei count) { |
| 6157 return static_cast<uint32_t>(sizeof(GLuint) * 3 * count); // NOLINT |
| 6158 } |
| 6159 |
| 6160 static uint32_t ComputeSize(GLsizei count) { |
| 6161 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6162 ComputeDataSize(count)); // NOLINT |
| 6163 } |
| 6164 |
| 6165 void SetHeader(GLsizei count) { |
| 6166 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6167 } |
| 6168 |
| 6169 void Init(GLint _location, GLsizei _count, const GLuint* _v) { |
| 6170 SetHeader(_count); |
| 6171 location = _location; |
| 6172 count = _count; |
| 6173 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); |
| 6174 } |
| 6175 |
| 6176 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) { |
| 6177 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
| 6178 const uint32_t size = ComputeSize(_count); |
| 6179 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6180 } |
| 6181 |
| 6182 gpu::CommandHeader header; |
| 6183 int32_t location; |
| 6184 int32_t count; |
| 6185 }; |
| 6186 |
| 6187 COMPILE_ASSERT(sizeof(Uniform3uivImmediate) == 12, |
| 6188 Sizeof_Uniform3uivImmediate_is_not_12); |
| 6189 COMPILE_ASSERT(offsetof(Uniform3uivImmediate, header) == 0, |
| 6190 OffsetOf_Uniform3uivImmediate_header_not_0); |
| 6191 COMPILE_ASSERT(offsetof(Uniform3uivImmediate, location) == 4, |
| 6192 OffsetOf_Uniform3uivImmediate_location_not_4); |
| 6193 COMPILE_ASSERT(offsetof(Uniform3uivImmediate, count) == 8, |
| 6194 OffsetOf_Uniform3uivImmediate_count_not_8); |
| 6195 |
| 6196 struct Uniform4f { |
| 6197 typedef Uniform4f ValueType; |
| 6198 static const CommandId kCmdId = kUniform4f; |
| 6199 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 6200 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6201 |
| 6202 static uint32_t ComputeSize() { |
| 6203 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 6204 } |
| 6205 |
| 6206 void SetHeader() { header.SetCmd<ValueType>(); } |
| 6207 |
5707 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) { | 6208 void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) { |
5708 SetHeader(); | 6209 SetHeader(); |
5709 location = _location; | 6210 location = _location; |
5710 x = _x; | 6211 x = _x; |
5711 y = _y; | 6212 y = _y; |
5712 z = _z; | 6213 z = _z; |
5713 w = _w; | 6214 w = _w; |
5714 } | 6215 } |
5715 | 6216 |
5716 void* Set(void* cmd, | 6217 void* Set(void* cmd, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5875 | 6376 |
5876 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12, | 6377 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12, |
5877 Sizeof_Uniform4ivImmediate_is_not_12); | 6378 Sizeof_Uniform4ivImmediate_is_not_12); |
5878 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0, | 6379 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0, |
5879 OffsetOf_Uniform4ivImmediate_header_not_0); | 6380 OffsetOf_Uniform4ivImmediate_header_not_0); |
5880 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4, | 6381 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4, |
5881 OffsetOf_Uniform4ivImmediate_location_not_4); | 6382 OffsetOf_Uniform4ivImmediate_location_not_4); |
5882 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8, | 6383 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8, |
5883 OffsetOf_Uniform4ivImmediate_count_not_8); | 6384 OffsetOf_Uniform4ivImmediate_count_not_8); |
5884 | 6385 |
| 6386 struct Uniform4ui { |
| 6387 typedef Uniform4ui ValueType; |
| 6388 static const CommandId kCmdId = kUniform4ui; |
| 6389 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 6390 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6391 |
| 6392 static uint32_t ComputeSize() { |
| 6393 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 6394 } |
| 6395 |
| 6396 void SetHeader() { header.SetCmd<ValueType>(); } |
| 6397 |
| 6398 void Init(GLint _location, GLuint _x, GLuint _y, GLuint _z, GLuint _w) { |
| 6399 SetHeader(); |
| 6400 location = _location; |
| 6401 x = _x; |
| 6402 y = _y; |
| 6403 z = _z; |
| 6404 w = _w; |
| 6405 } |
| 6406 |
| 6407 void* Set(void* cmd, |
| 6408 GLint _location, |
| 6409 GLuint _x, |
| 6410 GLuint _y, |
| 6411 GLuint _z, |
| 6412 GLuint _w) { |
| 6413 static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w); |
| 6414 return NextCmdAddress<ValueType>(cmd); |
| 6415 } |
| 6416 |
| 6417 gpu::CommandHeader header; |
| 6418 int32_t location; |
| 6419 uint32_t x; |
| 6420 uint32_t y; |
| 6421 uint32_t z; |
| 6422 uint32_t w; |
| 6423 }; |
| 6424 |
| 6425 COMPILE_ASSERT(sizeof(Uniform4ui) == 24, Sizeof_Uniform4ui_is_not_24); |
| 6426 COMPILE_ASSERT(offsetof(Uniform4ui, header) == 0, |
| 6427 OffsetOf_Uniform4ui_header_not_0); |
| 6428 COMPILE_ASSERT(offsetof(Uniform4ui, location) == 4, |
| 6429 OffsetOf_Uniform4ui_location_not_4); |
| 6430 COMPILE_ASSERT(offsetof(Uniform4ui, x) == 8, OffsetOf_Uniform4ui_x_not_8); |
| 6431 COMPILE_ASSERT(offsetof(Uniform4ui, y) == 12, OffsetOf_Uniform4ui_y_not_12); |
| 6432 COMPILE_ASSERT(offsetof(Uniform4ui, z) == 16, OffsetOf_Uniform4ui_z_not_16); |
| 6433 COMPILE_ASSERT(offsetof(Uniform4ui, w) == 20, OffsetOf_Uniform4ui_w_not_20); |
| 6434 |
| 6435 struct Uniform4uivImmediate { |
| 6436 typedef Uniform4uivImmediate ValueType; |
| 6437 static const CommandId kCmdId = kUniform4uivImmediate; |
| 6438 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6439 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6440 |
| 6441 static uint32_t ComputeDataSize(GLsizei count) { |
| 6442 return static_cast<uint32_t>(sizeof(GLuint) * 4 * count); // NOLINT |
| 6443 } |
| 6444 |
| 6445 static uint32_t ComputeSize(GLsizei count) { |
| 6446 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6447 ComputeDataSize(count)); // NOLINT |
| 6448 } |
| 6449 |
| 6450 void SetHeader(GLsizei count) { |
| 6451 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6452 } |
| 6453 |
| 6454 void Init(GLint _location, GLsizei _count, const GLuint* _v) { |
| 6455 SetHeader(_count); |
| 6456 location = _location; |
| 6457 count = _count; |
| 6458 memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); |
| 6459 } |
| 6460 |
| 6461 void* Set(void* cmd, GLint _location, GLsizei _count, const GLuint* _v) { |
| 6462 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
| 6463 const uint32_t size = ComputeSize(_count); |
| 6464 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6465 } |
| 6466 |
| 6467 gpu::CommandHeader header; |
| 6468 int32_t location; |
| 6469 int32_t count; |
| 6470 }; |
| 6471 |
| 6472 COMPILE_ASSERT(sizeof(Uniform4uivImmediate) == 12, |
| 6473 Sizeof_Uniform4uivImmediate_is_not_12); |
| 6474 COMPILE_ASSERT(offsetof(Uniform4uivImmediate, header) == 0, |
| 6475 OffsetOf_Uniform4uivImmediate_header_not_0); |
| 6476 COMPILE_ASSERT(offsetof(Uniform4uivImmediate, location) == 4, |
| 6477 OffsetOf_Uniform4uivImmediate_location_not_4); |
| 6478 COMPILE_ASSERT(offsetof(Uniform4uivImmediate, count) == 8, |
| 6479 OffsetOf_Uniform4uivImmediate_count_not_8); |
| 6480 |
5885 struct UniformMatrix2fvImmediate { | 6481 struct UniformMatrix2fvImmediate { |
5886 typedef UniformMatrix2fvImmediate ValueType; | 6482 typedef UniformMatrix2fvImmediate ValueType; |
5887 static const CommandId kCmdId = kUniformMatrix2fvImmediate; | 6483 static const CommandId kCmdId = kUniformMatrix2fvImmediate; |
5888 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6484 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
5889 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6485 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5890 | 6486 |
5891 static uint32_t ComputeDataSize(GLsizei count) { | 6487 static uint32_t ComputeDataSize(GLsizei count) { |
5892 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT | 6488 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT |
5893 } | 6489 } |
5894 | 6490 |
(...skipping 27 matching lines...) Expand all Loading... |
5922 | 6518 |
5923 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 12, | 6519 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 12, |
5924 Sizeof_UniformMatrix2fvImmediate_is_not_12); | 6520 Sizeof_UniformMatrix2fvImmediate_is_not_12); |
5925 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0, | 6521 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0, |
5926 OffsetOf_UniformMatrix2fvImmediate_header_not_0); | 6522 OffsetOf_UniformMatrix2fvImmediate_header_not_0); |
5927 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4, | 6523 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4, |
5928 OffsetOf_UniformMatrix2fvImmediate_location_not_4); | 6524 OffsetOf_UniformMatrix2fvImmediate_location_not_4); |
5929 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8, | 6525 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8, |
5930 OffsetOf_UniformMatrix2fvImmediate_count_not_8); | 6526 OffsetOf_UniformMatrix2fvImmediate_count_not_8); |
5931 | 6527 |
| 6528 struct UniformMatrix2x3fvImmediate { |
| 6529 typedef UniformMatrix2x3fvImmediate ValueType; |
| 6530 static const CommandId kCmdId = kUniformMatrix2x3fvImmediate; |
| 6531 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6532 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6533 |
| 6534 static uint32_t ComputeDataSize(GLsizei count) { |
| 6535 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT |
| 6536 } |
| 6537 |
| 6538 static uint32_t ComputeSize(GLsizei count) { |
| 6539 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6540 ComputeDataSize(count)); // NOLINT |
| 6541 } |
| 6542 |
| 6543 void SetHeader(GLsizei count) { |
| 6544 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6545 } |
| 6546 |
| 6547 void Init(GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6548 SetHeader(_count); |
| 6549 location = _location; |
| 6550 count = _count; |
| 6551 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); |
| 6552 } |
| 6553 |
| 6554 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6555 static_cast<ValueType*>(cmd)->Init(_location, _count, _value); |
| 6556 const uint32_t size = ComputeSize(_count); |
| 6557 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6558 } |
| 6559 |
| 6560 gpu::CommandHeader header; |
| 6561 int32_t location; |
| 6562 int32_t count; |
| 6563 static const uint32_t transpose = false; |
| 6564 }; |
| 6565 |
| 6566 COMPILE_ASSERT(sizeof(UniformMatrix2x3fvImmediate) == 12, |
| 6567 Sizeof_UniformMatrix2x3fvImmediate_is_not_12); |
| 6568 COMPILE_ASSERT(offsetof(UniformMatrix2x3fvImmediate, header) == 0, |
| 6569 OffsetOf_UniformMatrix2x3fvImmediate_header_not_0); |
| 6570 COMPILE_ASSERT(offsetof(UniformMatrix2x3fvImmediate, location) == 4, |
| 6571 OffsetOf_UniformMatrix2x3fvImmediate_location_not_4); |
| 6572 COMPILE_ASSERT(offsetof(UniformMatrix2x3fvImmediate, count) == 8, |
| 6573 OffsetOf_UniformMatrix2x3fvImmediate_count_not_8); |
| 6574 |
| 6575 struct UniformMatrix2x4fvImmediate { |
| 6576 typedef UniformMatrix2x4fvImmediate ValueType; |
| 6577 static const CommandId kCmdId = kUniformMatrix2x4fvImmediate; |
| 6578 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6579 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6580 |
| 6581 static uint32_t ComputeDataSize(GLsizei count) { |
| 6582 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT |
| 6583 } |
| 6584 |
| 6585 static uint32_t ComputeSize(GLsizei count) { |
| 6586 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6587 ComputeDataSize(count)); // NOLINT |
| 6588 } |
| 6589 |
| 6590 void SetHeader(GLsizei count) { |
| 6591 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6592 } |
| 6593 |
| 6594 void Init(GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6595 SetHeader(_count); |
| 6596 location = _location; |
| 6597 count = _count; |
| 6598 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); |
| 6599 } |
| 6600 |
| 6601 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6602 static_cast<ValueType*>(cmd)->Init(_location, _count, _value); |
| 6603 const uint32_t size = ComputeSize(_count); |
| 6604 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6605 } |
| 6606 |
| 6607 gpu::CommandHeader header; |
| 6608 int32_t location; |
| 6609 int32_t count; |
| 6610 static const uint32_t transpose = false; |
| 6611 }; |
| 6612 |
| 6613 COMPILE_ASSERT(sizeof(UniformMatrix2x4fvImmediate) == 12, |
| 6614 Sizeof_UniformMatrix2x4fvImmediate_is_not_12); |
| 6615 COMPILE_ASSERT(offsetof(UniformMatrix2x4fvImmediate, header) == 0, |
| 6616 OffsetOf_UniformMatrix2x4fvImmediate_header_not_0); |
| 6617 COMPILE_ASSERT(offsetof(UniformMatrix2x4fvImmediate, location) == 4, |
| 6618 OffsetOf_UniformMatrix2x4fvImmediate_location_not_4); |
| 6619 COMPILE_ASSERT(offsetof(UniformMatrix2x4fvImmediate, count) == 8, |
| 6620 OffsetOf_UniformMatrix2x4fvImmediate_count_not_8); |
| 6621 |
5932 struct UniformMatrix3fvImmediate { | 6622 struct UniformMatrix3fvImmediate { |
5933 typedef UniformMatrix3fvImmediate ValueType; | 6623 typedef UniformMatrix3fvImmediate ValueType; |
5934 static const CommandId kCmdId = kUniformMatrix3fvImmediate; | 6624 static const CommandId kCmdId = kUniformMatrix3fvImmediate; |
5935 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6625 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
5936 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6626 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5937 | 6627 |
5938 static uint32_t ComputeDataSize(GLsizei count) { | 6628 static uint32_t ComputeDataSize(GLsizei count) { |
5939 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT | 6629 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT |
5940 } | 6630 } |
5941 | 6631 |
(...skipping 27 matching lines...) Expand all Loading... |
5969 | 6659 |
5970 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 12, | 6660 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 12, |
5971 Sizeof_UniformMatrix3fvImmediate_is_not_12); | 6661 Sizeof_UniformMatrix3fvImmediate_is_not_12); |
5972 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0, | 6662 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0, |
5973 OffsetOf_UniformMatrix3fvImmediate_header_not_0); | 6663 OffsetOf_UniformMatrix3fvImmediate_header_not_0); |
5974 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4, | 6664 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4, |
5975 OffsetOf_UniformMatrix3fvImmediate_location_not_4); | 6665 OffsetOf_UniformMatrix3fvImmediate_location_not_4); |
5976 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8, | 6666 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8, |
5977 OffsetOf_UniformMatrix3fvImmediate_count_not_8); | 6667 OffsetOf_UniformMatrix3fvImmediate_count_not_8); |
5978 | 6668 |
| 6669 struct UniformMatrix3x2fvImmediate { |
| 6670 typedef UniformMatrix3x2fvImmediate ValueType; |
| 6671 static const CommandId kCmdId = kUniformMatrix3x2fvImmediate; |
| 6672 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6673 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6674 |
| 6675 static uint32_t ComputeDataSize(GLsizei count) { |
| 6676 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT |
| 6677 } |
| 6678 |
| 6679 static uint32_t ComputeSize(GLsizei count) { |
| 6680 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6681 ComputeDataSize(count)); // NOLINT |
| 6682 } |
| 6683 |
| 6684 void SetHeader(GLsizei count) { |
| 6685 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6686 } |
| 6687 |
| 6688 void Init(GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6689 SetHeader(_count); |
| 6690 location = _location; |
| 6691 count = _count; |
| 6692 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); |
| 6693 } |
| 6694 |
| 6695 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6696 static_cast<ValueType*>(cmd)->Init(_location, _count, _value); |
| 6697 const uint32_t size = ComputeSize(_count); |
| 6698 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6699 } |
| 6700 |
| 6701 gpu::CommandHeader header; |
| 6702 int32_t location; |
| 6703 int32_t count; |
| 6704 static const uint32_t transpose = false; |
| 6705 }; |
| 6706 |
| 6707 COMPILE_ASSERT(sizeof(UniformMatrix3x2fvImmediate) == 12, |
| 6708 Sizeof_UniformMatrix3x2fvImmediate_is_not_12); |
| 6709 COMPILE_ASSERT(offsetof(UniformMatrix3x2fvImmediate, header) == 0, |
| 6710 OffsetOf_UniformMatrix3x2fvImmediate_header_not_0); |
| 6711 COMPILE_ASSERT(offsetof(UniformMatrix3x2fvImmediate, location) == 4, |
| 6712 OffsetOf_UniformMatrix3x2fvImmediate_location_not_4); |
| 6713 COMPILE_ASSERT(offsetof(UniformMatrix3x2fvImmediate, count) == 8, |
| 6714 OffsetOf_UniformMatrix3x2fvImmediate_count_not_8); |
| 6715 |
| 6716 struct UniformMatrix3x4fvImmediate { |
| 6717 typedef UniformMatrix3x4fvImmediate ValueType; |
| 6718 static const CommandId kCmdId = kUniformMatrix3x4fvImmediate; |
| 6719 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6720 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6721 |
| 6722 static uint32_t ComputeDataSize(GLsizei count) { |
| 6723 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT |
| 6724 } |
| 6725 |
| 6726 static uint32_t ComputeSize(GLsizei count) { |
| 6727 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6728 ComputeDataSize(count)); // NOLINT |
| 6729 } |
| 6730 |
| 6731 void SetHeader(GLsizei count) { |
| 6732 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6733 } |
| 6734 |
| 6735 void Init(GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6736 SetHeader(_count); |
| 6737 location = _location; |
| 6738 count = _count; |
| 6739 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); |
| 6740 } |
| 6741 |
| 6742 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6743 static_cast<ValueType*>(cmd)->Init(_location, _count, _value); |
| 6744 const uint32_t size = ComputeSize(_count); |
| 6745 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6746 } |
| 6747 |
| 6748 gpu::CommandHeader header; |
| 6749 int32_t location; |
| 6750 int32_t count; |
| 6751 static const uint32_t transpose = false; |
| 6752 }; |
| 6753 |
| 6754 COMPILE_ASSERT(sizeof(UniformMatrix3x4fvImmediate) == 12, |
| 6755 Sizeof_UniformMatrix3x4fvImmediate_is_not_12); |
| 6756 COMPILE_ASSERT(offsetof(UniformMatrix3x4fvImmediate, header) == 0, |
| 6757 OffsetOf_UniformMatrix3x4fvImmediate_header_not_0); |
| 6758 COMPILE_ASSERT(offsetof(UniformMatrix3x4fvImmediate, location) == 4, |
| 6759 OffsetOf_UniformMatrix3x4fvImmediate_location_not_4); |
| 6760 COMPILE_ASSERT(offsetof(UniformMatrix3x4fvImmediate, count) == 8, |
| 6761 OffsetOf_UniformMatrix3x4fvImmediate_count_not_8); |
| 6762 |
5979 struct UniformMatrix4fvImmediate { | 6763 struct UniformMatrix4fvImmediate { |
5980 typedef UniformMatrix4fvImmediate ValueType; | 6764 typedef UniformMatrix4fvImmediate ValueType; |
5981 static const CommandId kCmdId = kUniformMatrix4fvImmediate; | 6765 static const CommandId kCmdId = kUniformMatrix4fvImmediate; |
5982 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6766 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
5983 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6767 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5984 | 6768 |
5985 static uint32_t ComputeDataSize(GLsizei count) { | 6769 static uint32_t ComputeDataSize(GLsizei count) { |
5986 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT | 6770 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT |
5987 } | 6771 } |
5988 | 6772 |
(...skipping 27 matching lines...) Expand all Loading... |
6016 | 6800 |
6017 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 12, | 6801 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 12, |
6018 Sizeof_UniformMatrix4fvImmediate_is_not_12); | 6802 Sizeof_UniformMatrix4fvImmediate_is_not_12); |
6019 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0, | 6803 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0, |
6020 OffsetOf_UniformMatrix4fvImmediate_header_not_0); | 6804 OffsetOf_UniformMatrix4fvImmediate_header_not_0); |
6021 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4, | 6805 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4, |
6022 OffsetOf_UniformMatrix4fvImmediate_location_not_4); | 6806 OffsetOf_UniformMatrix4fvImmediate_location_not_4); |
6023 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8, | 6807 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8, |
6024 OffsetOf_UniformMatrix4fvImmediate_count_not_8); | 6808 OffsetOf_UniformMatrix4fvImmediate_count_not_8); |
6025 | 6809 |
| 6810 struct UniformMatrix4x2fvImmediate { |
| 6811 typedef UniformMatrix4x2fvImmediate ValueType; |
| 6812 static const CommandId kCmdId = kUniformMatrix4x2fvImmediate; |
| 6813 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6814 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6815 |
| 6816 static uint32_t ComputeDataSize(GLsizei count) { |
| 6817 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT |
| 6818 } |
| 6819 |
| 6820 static uint32_t ComputeSize(GLsizei count) { |
| 6821 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6822 ComputeDataSize(count)); // NOLINT |
| 6823 } |
| 6824 |
| 6825 void SetHeader(GLsizei count) { |
| 6826 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6827 } |
| 6828 |
| 6829 void Init(GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6830 SetHeader(_count); |
| 6831 location = _location; |
| 6832 count = _count; |
| 6833 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); |
| 6834 } |
| 6835 |
| 6836 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6837 static_cast<ValueType*>(cmd)->Init(_location, _count, _value); |
| 6838 const uint32_t size = ComputeSize(_count); |
| 6839 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6840 } |
| 6841 |
| 6842 gpu::CommandHeader header; |
| 6843 int32_t location; |
| 6844 int32_t count; |
| 6845 static const uint32_t transpose = false; |
| 6846 }; |
| 6847 |
| 6848 COMPILE_ASSERT(sizeof(UniformMatrix4x2fvImmediate) == 12, |
| 6849 Sizeof_UniformMatrix4x2fvImmediate_is_not_12); |
| 6850 COMPILE_ASSERT(offsetof(UniformMatrix4x2fvImmediate, header) == 0, |
| 6851 OffsetOf_UniformMatrix4x2fvImmediate_header_not_0); |
| 6852 COMPILE_ASSERT(offsetof(UniformMatrix4x2fvImmediate, location) == 4, |
| 6853 OffsetOf_UniformMatrix4x2fvImmediate_location_not_4); |
| 6854 COMPILE_ASSERT(offsetof(UniformMatrix4x2fvImmediate, count) == 8, |
| 6855 OffsetOf_UniformMatrix4x2fvImmediate_count_not_8); |
| 6856 |
| 6857 struct UniformMatrix4x3fvImmediate { |
| 6858 typedef UniformMatrix4x3fvImmediate ValueType; |
| 6859 static const CommandId kCmdId = kUniformMatrix4x3fvImmediate; |
| 6860 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 6861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 6862 |
| 6863 static uint32_t ComputeDataSize(GLsizei count) { |
| 6864 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT |
| 6865 } |
| 6866 |
| 6867 static uint32_t ComputeSize(GLsizei count) { |
| 6868 return static_cast<uint32_t>(sizeof(ValueType) + |
| 6869 ComputeDataSize(count)); // NOLINT |
| 6870 } |
| 6871 |
| 6872 void SetHeader(GLsizei count) { |
| 6873 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 6874 } |
| 6875 |
| 6876 void Init(GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6877 SetHeader(_count); |
| 6878 location = _location; |
| 6879 count = _count; |
| 6880 memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); |
| 6881 } |
| 6882 |
| 6883 void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _value) { |
| 6884 static_cast<ValueType*>(cmd)->Init(_location, _count, _value); |
| 6885 const uint32_t size = ComputeSize(_count); |
| 6886 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 6887 } |
| 6888 |
| 6889 gpu::CommandHeader header; |
| 6890 int32_t location; |
| 6891 int32_t count; |
| 6892 static const uint32_t transpose = false; |
| 6893 }; |
| 6894 |
| 6895 COMPILE_ASSERT(sizeof(UniformMatrix4x3fvImmediate) == 12, |
| 6896 Sizeof_UniformMatrix4x3fvImmediate_is_not_12); |
| 6897 COMPILE_ASSERT(offsetof(UniformMatrix4x3fvImmediate, header) == 0, |
| 6898 OffsetOf_UniformMatrix4x3fvImmediate_header_not_0); |
| 6899 COMPILE_ASSERT(offsetof(UniformMatrix4x3fvImmediate, location) == 4, |
| 6900 OffsetOf_UniformMatrix4x3fvImmediate_location_not_4); |
| 6901 COMPILE_ASSERT(offsetof(UniformMatrix4x3fvImmediate, count) == 8, |
| 6902 OffsetOf_UniformMatrix4x3fvImmediate_count_not_8); |
| 6903 |
6026 struct UseProgram { | 6904 struct UseProgram { |
6027 typedef UseProgram ValueType; | 6905 typedef UseProgram ValueType; |
6028 static const CommandId kCmdId = kUseProgram; | 6906 static const CommandId kCmdId = kUseProgram; |
6029 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6907 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6030 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6908 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6031 | 6909 |
6032 static uint32_t ComputeSize() { | 6910 static uint32_t ComputeSize() { |
6033 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6911 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6034 } | 6912 } |
6035 | 6913 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6413 uint32_t indx; | 7291 uint32_t indx; |
6414 }; | 7292 }; |
6415 | 7293 |
6416 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8, | 7294 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8, |
6417 Sizeof_VertexAttrib4fvImmediate_is_not_8); | 7295 Sizeof_VertexAttrib4fvImmediate_is_not_8); |
6418 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0, | 7296 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0, |
6419 OffsetOf_VertexAttrib4fvImmediate_header_not_0); | 7297 OffsetOf_VertexAttrib4fvImmediate_header_not_0); |
6420 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4, | 7298 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4, |
6421 OffsetOf_VertexAttrib4fvImmediate_indx_not_4); | 7299 OffsetOf_VertexAttrib4fvImmediate_indx_not_4); |
6422 | 7300 |
| 7301 struct VertexAttribI4i { |
| 7302 typedef VertexAttribI4i ValueType; |
| 7303 static const CommandId kCmdId = kVertexAttribI4i; |
| 7304 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 7305 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 7306 |
| 7307 static uint32_t ComputeSize() { |
| 7308 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 7309 } |
| 7310 |
| 7311 void SetHeader() { header.SetCmd<ValueType>(); } |
| 7312 |
| 7313 void Init(GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) { |
| 7314 SetHeader(); |
| 7315 indx = _indx; |
| 7316 x = _x; |
| 7317 y = _y; |
| 7318 z = _z; |
| 7319 w = _w; |
| 7320 } |
| 7321 |
| 7322 void* Set(void* cmd, GLuint _indx, GLint _x, GLint _y, GLint _z, GLint _w) { |
| 7323 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w); |
| 7324 return NextCmdAddress<ValueType>(cmd); |
| 7325 } |
| 7326 |
| 7327 gpu::CommandHeader header; |
| 7328 uint32_t indx; |
| 7329 int32_t x; |
| 7330 int32_t y; |
| 7331 int32_t z; |
| 7332 int32_t w; |
| 7333 }; |
| 7334 |
| 7335 COMPILE_ASSERT(sizeof(VertexAttribI4i) == 24, Sizeof_VertexAttribI4i_is_not_24); |
| 7336 COMPILE_ASSERT(offsetof(VertexAttribI4i, header) == 0, |
| 7337 OffsetOf_VertexAttribI4i_header_not_0); |
| 7338 COMPILE_ASSERT(offsetof(VertexAttribI4i, indx) == 4, |
| 7339 OffsetOf_VertexAttribI4i_indx_not_4); |
| 7340 COMPILE_ASSERT(offsetof(VertexAttribI4i, x) == 8, |
| 7341 OffsetOf_VertexAttribI4i_x_not_8); |
| 7342 COMPILE_ASSERT(offsetof(VertexAttribI4i, y) == 12, |
| 7343 OffsetOf_VertexAttribI4i_y_not_12); |
| 7344 COMPILE_ASSERT(offsetof(VertexAttribI4i, z) == 16, |
| 7345 OffsetOf_VertexAttribI4i_z_not_16); |
| 7346 COMPILE_ASSERT(offsetof(VertexAttribI4i, w) == 20, |
| 7347 OffsetOf_VertexAttribI4i_w_not_20); |
| 7348 |
| 7349 struct VertexAttribI4ivImmediate { |
| 7350 typedef VertexAttribI4ivImmediate ValueType; |
| 7351 static const CommandId kCmdId = kVertexAttribI4ivImmediate; |
| 7352 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 7353 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 7354 |
| 7355 static uint32_t ComputeDataSize() { |
| 7356 return static_cast<uint32_t>(sizeof(GLint) * 4); // NOLINT |
| 7357 } |
| 7358 |
| 7359 static uint32_t ComputeSize() { |
| 7360 return static_cast<uint32_t>(sizeof(ValueType) + |
| 7361 ComputeDataSize()); // NOLINT |
| 7362 } |
| 7363 |
| 7364 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } |
| 7365 |
| 7366 void Init(GLuint _indx, const GLint* _values) { |
| 7367 SetHeader(); |
| 7368 indx = _indx; |
| 7369 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize()); |
| 7370 } |
| 7371 |
| 7372 void* Set(void* cmd, GLuint _indx, const GLint* _values) { |
| 7373 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
| 7374 const uint32_t size = ComputeSize(); |
| 7375 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 7376 } |
| 7377 |
| 7378 gpu::CommandHeader header; |
| 7379 uint32_t indx; |
| 7380 }; |
| 7381 |
| 7382 COMPILE_ASSERT(sizeof(VertexAttribI4ivImmediate) == 8, |
| 7383 Sizeof_VertexAttribI4ivImmediate_is_not_8); |
| 7384 COMPILE_ASSERT(offsetof(VertexAttribI4ivImmediate, header) == 0, |
| 7385 OffsetOf_VertexAttribI4ivImmediate_header_not_0); |
| 7386 COMPILE_ASSERT(offsetof(VertexAttribI4ivImmediate, indx) == 4, |
| 7387 OffsetOf_VertexAttribI4ivImmediate_indx_not_4); |
| 7388 |
| 7389 struct VertexAttribI4ui { |
| 7390 typedef VertexAttribI4ui ValueType; |
| 7391 static const CommandId kCmdId = kVertexAttribI4ui; |
| 7392 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 7393 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 7394 |
| 7395 static uint32_t ComputeSize() { |
| 7396 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 7397 } |
| 7398 |
| 7399 void SetHeader() { header.SetCmd<ValueType>(); } |
| 7400 |
| 7401 void Init(GLuint _indx, GLuint _x, GLuint _y, GLuint _z, GLuint _w) { |
| 7402 SetHeader(); |
| 7403 indx = _indx; |
| 7404 x = _x; |
| 7405 y = _y; |
| 7406 z = _z; |
| 7407 w = _w; |
| 7408 } |
| 7409 |
| 7410 void* Set(void* cmd, |
| 7411 GLuint _indx, |
| 7412 GLuint _x, |
| 7413 GLuint _y, |
| 7414 GLuint _z, |
| 7415 GLuint _w) { |
| 7416 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w); |
| 7417 return NextCmdAddress<ValueType>(cmd); |
| 7418 } |
| 7419 |
| 7420 gpu::CommandHeader header; |
| 7421 uint32_t indx; |
| 7422 uint32_t x; |
| 7423 uint32_t y; |
| 7424 uint32_t z; |
| 7425 uint32_t w; |
| 7426 }; |
| 7427 |
| 7428 COMPILE_ASSERT(sizeof(VertexAttribI4ui) == 24, |
| 7429 Sizeof_VertexAttribI4ui_is_not_24); |
| 7430 COMPILE_ASSERT(offsetof(VertexAttribI4ui, header) == 0, |
| 7431 OffsetOf_VertexAttribI4ui_header_not_0); |
| 7432 COMPILE_ASSERT(offsetof(VertexAttribI4ui, indx) == 4, |
| 7433 OffsetOf_VertexAttribI4ui_indx_not_4); |
| 7434 COMPILE_ASSERT(offsetof(VertexAttribI4ui, x) == 8, |
| 7435 OffsetOf_VertexAttribI4ui_x_not_8); |
| 7436 COMPILE_ASSERT(offsetof(VertexAttribI4ui, y) == 12, |
| 7437 OffsetOf_VertexAttribI4ui_y_not_12); |
| 7438 COMPILE_ASSERT(offsetof(VertexAttribI4ui, z) == 16, |
| 7439 OffsetOf_VertexAttribI4ui_z_not_16); |
| 7440 COMPILE_ASSERT(offsetof(VertexAttribI4ui, w) == 20, |
| 7441 OffsetOf_VertexAttribI4ui_w_not_20); |
| 7442 |
| 7443 struct VertexAttribI4uivImmediate { |
| 7444 typedef VertexAttribI4uivImmediate ValueType; |
| 7445 static const CommandId kCmdId = kVertexAttribI4uivImmediate; |
| 7446 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 7447 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 7448 |
| 7449 static uint32_t ComputeDataSize() { |
| 7450 return static_cast<uint32_t>(sizeof(GLuint) * 4); // NOLINT |
| 7451 } |
| 7452 |
| 7453 static uint32_t ComputeSize() { |
| 7454 return static_cast<uint32_t>(sizeof(ValueType) + |
| 7455 ComputeDataSize()); // NOLINT |
| 7456 } |
| 7457 |
| 7458 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } |
| 7459 |
| 7460 void Init(GLuint _indx, const GLuint* _values) { |
| 7461 SetHeader(); |
| 7462 indx = _indx; |
| 7463 memcpy(ImmediateDataAddress(this), _values, ComputeDataSize()); |
| 7464 } |
| 7465 |
| 7466 void* Set(void* cmd, GLuint _indx, const GLuint* _values) { |
| 7467 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
| 7468 const uint32_t size = ComputeSize(); |
| 7469 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 7470 } |
| 7471 |
| 7472 gpu::CommandHeader header; |
| 7473 uint32_t indx; |
| 7474 }; |
| 7475 |
| 7476 COMPILE_ASSERT(sizeof(VertexAttribI4uivImmediate) == 8, |
| 7477 Sizeof_VertexAttribI4uivImmediate_is_not_8); |
| 7478 COMPILE_ASSERT(offsetof(VertexAttribI4uivImmediate, header) == 0, |
| 7479 OffsetOf_VertexAttribI4uivImmediate_header_not_0); |
| 7480 COMPILE_ASSERT(offsetof(VertexAttribI4uivImmediate, indx) == 4, |
| 7481 OffsetOf_VertexAttribI4uivImmediate_indx_not_4); |
| 7482 |
| 7483 struct VertexAttribIPointer { |
| 7484 typedef VertexAttribIPointer ValueType; |
| 7485 static const CommandId kCmdId = kVertexAttribIPointer; |
| 7486 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 7487 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 7488 |
| 7489 static uint32_t ComputeSize() { |
| 7490 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 7491 } |
| 7492 |
| 7493 void SetHeader() { header.SetCmd<ValueType>(); } |
| 7494 |
| 7495 void Init(GLuint _indx, |
| 7496 GLint _size, |
| 7497 GLenum _type, |
| 7498 GLsizei _stride, |
| 7499 GLuint _offset) { |
| 7500 SetHeader(); |
| 7501 indx = _indx; |
| 7502 size = _size; |
| 7503 type = _type; |
| 7504 stride = _stride; |
| 7505 offset = _offset; |
| 7506 } |
| 7507 |
| 7508 void* Set(void* cmd, |
| 7509 GLuint _indx, |
| 7510 GLint _size, |
| 7511 GLenum _type, |
| 7512 GLsizei _stride, |
| 7513 GLuint _offset) { |
| 7514 static_cast<ValueType*>(cmd)->Init(_indx, _size, _type, _stride, _offset); |
| 7515 return NextCmdAddress<ValueType>(cmd); |
| 7516 } |
| 7517 |
| 7518 gpu::CommandHeader header; |
| 7519 uint32_t indx; |
| 7520 int32_t size; |
| 7521 uint32_t type; |
| 7522 int32_t stride; |
| 7523 uint32_t offset; |
| 7524 }; |
| 7525 |
| 7526 COMPILE_ASSERT(sizeof(VertexAttribIPointer) == 24, |
| 7527 Sizeof_VertexAttribIPointer_is_not_24); |
| 7528 COMPILE_ASSERT(offsetof(VertexAttribIPointer, header) == 0, |
| 7529 OffsetOf_VertexAttribIPointer_header_not_0); |
| 7530 COMPILE_ASSERT(offsetof(VertexAttribIPointer, indx) == 4, |
| 7531 OffsetOf_VertexAttribIPointer_indx_not_4); |
| 7532 COMPILE_ASSERT(offsetof(VertexAttribIPointer, size) == 8, |
| 7533 OffsetOf_VertexAttribIPointer_size_not_8); |
| 7534 COMPILE_ASSERT(offsetof(VertexAttribIPointer, type) == 12, |
| 7535 OffsetOf_VertexAttribIPointer_type_not_12); |
| 7536 COMPILE_ASSERT(offsetof(VertexAttribIPointer, stride) == 16, |
| 7537 OffsetOf_VertexAttribIPointer_stride_not_16); |
| 7538 COMPILE_ASSERT(offsetof(VertexAttribIPointer, offset) == 20, |
| 7539 OffsetOf_VertexAttribIPointer_offset_not_20); |
| 7540 |
6423 struct VertexAttribPointer { | 7541 struct VertexAttribPointer { |
6424 typedef VertexAttribPointer ValueType; | 7542 typedef VertexAttribPointer ValueType; |
6425 static const CommandId kCmdId = kVertexAttribPointer; | 7543 static const CommandId kCmdId = kVertexAttribPointer; |
6426 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7544 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6427 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7545 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6428 | 7546 |
6429 static uint32_t ComputeSize() { | 7547 static uint32_t ComputeSize() { |
6430 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7548 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6431 } | 7549 } |
6432 | 7550 |
(...skipping 2737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9170 } | 10288 } |
9171 | 10289 |
9172 gpu::CommandHeader header; | 10290 gpu::CommandHeader header; |
9173 }; | 10291 }; |
9174 | 10292 |
9175 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); | 10293 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); |
9176 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, | 10294 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, |
9177 OffsetOf_BlendBarrierKHR_header_not_0); | 10295 OffsetOf_BlendBarrierKHR_header_not_0); |
9178 | 10296 |
9179 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 10297 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |