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 8208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8219 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0, | 8219 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0, |
8220 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0); | 8220 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0); |
8221 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, | 8221 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, |
8222 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4); | 8222 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4); |
8223 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, | 8223 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, |
8224 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8); | 8224 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8); |
8225 COMPILE_ASSERT( | 8225 COMPILE_ASSERT( |
8226 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, | 8226 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, |
8227 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); | 8227 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); |
8228 | 8228 |
8229 struct GenValuebuffersCHROMIUMImmediate { | |
8230 typedef GenValuebuffersCHROMIUMImmediate ValueType; | |
8231 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate; | |
8232 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | |
8233 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8234 | |
8235 static uint32_t ComputeDataSize(GLsizei n) { | |
8236 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | |
8237 } | |
8238 | |
8239 static uint32_t ComputeSize(GLsizei n) { | |
8240 return static_cast<uint32_t>(sizeof(ValueType) + | |
8241 ComputeDataSize(n)); // NOLINT | |
8242 } | |
8243 | |
8244 void SetHeader(GLsizei n) { | |
8245 header.SetCmdByTotalSize<ValueType>(ComputeSize(n)); | |
8246 } | |
8247 | |
8248 void Init(GLsizei _n, GLuint* _buffers) { | |
8249 SetHeader(_n); | |
8250 n = _n; | |
8251 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n)); | |
8252 } | |
8253 | |
8254 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { | |
8255 static_cast<ValueType*>(cmd)->Init(_n, _buffers); | |
8256 const uint32_t size = ComputeSize(_n); | |
8257 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | |
8258 } | |
8259 | |
8260 gpu::CommandHeader header; | |
8261 int32_t n; | |
8262 }; | |
8263 | |
8264 COMPILE_ASSERT(sizeof(GenValuebuffersCHROMIUMImmediate) == 8, | |
8265 Sizeof_GenValuebuffersCHROMIUMImmediate_is_not_8); | |
8266 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0, | |
8267 OffsetOf_GenValuebuffersCHROMIUMImmediate_header_not_0); | |
8268 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4, | |
8269 OffsetOf_GenValuebuffersCHROMIUMImmediate_n_not_4); | |
8270 | |
8271 struct DeleteValuebuffersCHROMIUMImmediate { | |
8272 typedef DeleteValuebuffersCHROMIUMImmediate ValueType; | |
8273 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate; | |
8274 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | |
8275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8276 | |
8277 static uint32_t ComputeDataSize(GLsizei n) { | |
8278 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | |
8279 } | |
8280 | |
8281 static uint32_t ComputeSize(GLsizei n) { | |
8282 return static_cast<uint32_t>(sizeof(ValueType) + | |
8283 ComputeDataSize(n)); // NOLINT | |
8284 } | |
8285 | |
8286 void SetHeader(GLsizei n) { | |
8287 header.SetCmdByTotalSize<ValueType>(ComputeSize(n)); | |
8288 } | |
8289 | |
8290 void Init(GLsizei _n, const GLuint* _valuebuffers) { | |
8291 SetHeader(_n); | |
8292 n = _n; | |
8293 memcpy(ImmediateDataAddress(this), _valuebuffers, ComputeDataSize(_n)); | |
8294 } | |
8295 | |
8296 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) { | |
8297 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers); | |
8298 const uint32_t size = ComputeSize(_n); | |
8299 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | |
8300 } | |
8301 | |
8302 gpu::CommandHeader header; | |
8303 int32_t n; | |
8304 }; | |
8305 | |
8306 COMPILE_ASSERT(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8, | |
8307 Sizeof_DeleteValuebuffersCHROMIUMImmediate_is_not_8); | |
8308 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0, | |
8309 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_header_not_0); | |
8310 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4, | |
8311 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_n_not_4); | |
8312 | |
8313 struct IsValuebufferCHROMIUM { | |
8314 typedef IsValuebufferCHROMIUM ValueType; | |
8315 static const CommandId kCmdId = kIsValuebufferCHROMIUM; | |
8316 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
8317 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8318 | |
8319 typedef uint32_t Result; | |
8320 | |
8321 static uint32_t ComputeSize() { | |
8322 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
8323 } | |
8324 | |
8325 void SetHeader() { header.SetCmd<ValueType>(); } | |
8326 | |
8327 void Init(GLuint _valuebuffer, | |
8328 uint32_t _result_shm_id, | |
8329 uint32_t _result_shm_offset) { | |
8330 SetHeader(); | |
8331 valuebuffer = _valuebuffer; | |
8332 result_shm_id = _result_shm_id; | |
8333 result_shm_offset = _result_shm_offset; | |
8334 } | |
8335 | |
8336 void* Set(void* cmd, | |
8337 GLuint _valuebuffer, | |
8338 uint32_t _result_shm_id, | |
8339 uint32_t _result_shm_offset) { | |
8340 static_cast<ValueType*>(cmd) | |
8341 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset); | |
8342 return NextCmdAddress<ValueType>(cmd); | |
8343 } | |
8344 | |
8345 gpu::CommandHeader header; | |
8346 uint32_t valuebuffer; | |
8347 uint32_t result_shm_id; | |
8348 uint32_t result_shm_offset; | |
8349 }; | |
8350 | |
8351 COMPILE_ASSERT(sizeof(IsValuebufferCHROMIUM) == 16, | |
8352 Sizeof_IsValuebufferCHROMIUM_is_not_16); | |
8353 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, header) == 0, | |
8354 OffsetOf_IsValuebufferCHROMIUM_header_not_0); | |
8355 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4, | |
8356 OffsetOf_IsValuebufferCHROMIUM_valuebuffer_not_4); | |
8357 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8, | |
8358 OffsetOf_IsValuebufferCHROMIUM_result_shm_id_not_8); | |
8359 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12, | |
8360 OffsetOf_IsValuebufferCHROMIUM_result_shm_offset_not_12); | |
8361 | |
8362 struct BindValuebufferCHROMIUM { | |
8363 typedef BindValuebufferCHROMIUM ValueType; | |
8364 static const CommandId kCmdId = kBindValuebufferCHROMIUM; | |
8365 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
8366 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8367 | |
8368 static uint32_t ComputeSize() { | |
8369 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
8370 } | |
8371 | |
8372 void SetHeader() { header.SetCmd<ValueType>(); } | |
8373 | |
8374 void Init(GLenum _target, GLuint _valuebuffer) { | |
8375 SetHeader(); | |
8376 target = _target; | |
8377 valuebuffer = _valuebuffer; | |
8378 } | |
8379 | |
8380 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) { | |
8381 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer); | |
8382 return NextCmdAddress<ValueType>(cmd); | |
8383 } | |
8384 | |
8385 gpu::CommandHeader header; | |
8386 uint32_t target; | |
8387 uint32_t valuebuffer; | |
8388 }; | |
8389 | |
8390 COMPILE_ASSERT(sizeof(BindValuebufferCHROMIUM) == 12, | |
8391 Sizeof_BindValuebufferCHROMIUM_is_not_12); | |
8392 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, header) == 0, | |
8393 OffsetOf_BindValuebufferCHROMIUM_header_not_0); | |
8394 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, target) == 4, | |
8395 OffsetOf_BindValuebufferCHROMIUM_target_not_4); | |
8396 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8, | |
8397 OffsetOf_BindValuebufferCHROMIUM_valuebuffer_not_8); | |
8398 | |
8399 struct SubscribeValueCHROMIUM { | |
8400 typedef SubscribeValueCHROMIUM ValueType; | |
8401 static const CommandId kCmdId = kSubscribeValueCHROMIUM; | |
8402 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
8403 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8404 | |
8405 static uint32_t ComputeSize() { | |
8406 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
8407 } | |
8408 | |
8409 void SetHeader() { header.SetCmd<ValueType>(); } | |
8410 | |
8411 void Init(GLenum _target, GLenum _subscription) { | |
8412 SetHeader(); | |
8413 target = _target; | |
8414 subscription = _subscription; | |
8415 } | |
8416 | |
8417 void* Set(void* cmd, GLenum _target, GLenum _subscription) { | |
8418 static_cast<ValueType*>(cmd)->Init(_target, _subscription); | |
8419 return NextCmdAddress<ValueType>(cmd); | |
8420 } | |
8421 | |
8422 gpu::CommandHeader header; | |
8423 uint32_t target; | |
8424 uint32_t subscription; | |
8425 }; | |
8426 | |
8427 COMPILE_ASSERT(sizeof(SubscribeValueCHROMIUM) == 12, | |
8428 Sizeof_SubscribeValueCHROMIUM_is_not_12); | |
8429 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, header) == 0, | |
8430 OffsetOf_SubscribeValueCHROMIUM_header_not_0); | |
8431 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, target) == 4, | |
8432 OffsetOf_SubscribeValueCHROMIUM_target_not_4); | |
8433 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, subscription) == 8, | |
8434 OffsetOf_SubscribeValueCHROMIUM_subscription_not_8); | |
8435 | |
8436 struct PopulateSubscribedValuesCHROMIUM { | |
8437 typedef PopulateSubscribedValuesCHROMIUM ValueType; | |
8438 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM; | |
8439 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
8440 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8441 | |
8442 static uint32_t ComputeSize() { | |
8443 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
8444 } | |
8445 | |
8446 void SetHeader() { header.SetCmd<ValueType>(); } | |
8447 | |
8448 void Init(GLenum _target) { | |
8449 SetHeader(); | |
8450 target = _target; | |
8451 } | |
8452 | |
8453 void* Set(void* cmd, GLenum _target) { | |
8454 static_cast<ValueType*>(cmd)->Init(_target); | |
8455 return NextCmdAddress<ValueType>(cmd); | |
8456 } | |
8457 | |
8458 gpu::CommandHeader header; | |
8459 uint32_t target; | |
8460 }; | |
8461 | |
8462 COMPILE_ASSERT(sizeof(PopulateSubscribedValuesCHROMIUM) == 8, | |
8463 Sizeof_PopulateSubscribedValuesCHROMIUM_is_not_8); | |
8464 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0, | |
8465 OffsetOf_PopulateSubscribedValuesCHROMIUM_header_not_0); | |
8466 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4, | |
8467 OffsetOf_PopulateSubscribedValuesCHROMIUM_target_not_4); | |
8468 | |
8469 struct UniformValuebufferCHROMIUM { | |
8470 typedef UniformValuebufferCHROMIUM ValueType; | |
8471 static const CommandId kCmdId = kUniformValuebufferCHROMIUM; | |
8472 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
8473 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
8474 | |
8475 static uint32_t ComputeSize() { | |
8476 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
8477 } | |
8478 | |
8479 void SetHeader() { header.SetCmd<ValueType>(); } | |
8480 | |
8481 void Init(GLint _location, GLenum _target, GLenum _subscription) { | |
8482 SetHeader(); | |
8483 location = _location; | |
8484 target = _target; | |
8485 subscription = _subscription; | |
8486 } | |
8487 | |
8488 void* Set(void* cmd, GLint _location, GLenum _target, GLenum _subscription) { | |
8489 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription); | |
8490 return NextCmdAddress<ValueType>(cmd); | |
8491 } | |
8492 | |
8493 gpu::CommandHeader header; | |
8494 int32_t location; | |
8495 uint32_t target; | |
8496 uint32_t subscription; | |
8497 }; | |
8498 | |
8499 COMPILE_ASSERT(sizeof(UniformValuebufferCHROMIUM) == 16, | |
8500 Sizeof_UniformValuebufferCHROMIUM_is_not_16); | |
8501 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, header) == 0, | |
8502 OffsetOf_UniformValuebufferCHROMIUM_header_not_0); | |
8503 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, location) == 4, | |
8504 OffsetOf_UniformValuebufferCHROMIUM_location_not_4); | |
8505 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, target) == 8, | |
8506 OffsetOf_UniformValuebufferCHROMIUM_target_not_8); | |
8507 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, subscription) == 12, | |
8508 OffsetOf_UniformValuebufferCHROMIUM_subscription_not_12); | |
8509 | |
8510 struct BindTexImage2DCHROMIUM { | 8229 struct BindTexImage2DCHROMIUM { |
8511 typedef BindTexImage2DCHROMIUM ValueType; | 8230 typedef BindTexImage2DCHROMIUM ValueType; |
8512 static const CommandId kCmdId = kBindTexImage2DCHROMIUM; | 8231 static const CommandId kCmdId = kBindTexImage2DCHROMIUM; |
8513 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8232 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8514 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8233 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8515 | 8234 |
8516 static uint32_t ComputeSize() { | 8235 static uint32_t ComputeSize() { |
8517 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8236 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8518 } | 8237 } |
8519 | 8238 |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9315 } | 9034 } |
9316 | 9035 |
9317 gpu::CommandHeader header; | 9036 gpu::CommandHeader header; |
9318 }; | 9037 }; |
9319 | 9038 |
9320 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); | 9039 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); |
9321 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, | 9040 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, |
9322 OffsetOf_BlendBarrierKHR_header_not_0); | 9041 OffsetOf_BlendBarrierKHR_header_not_0); |
9323 | 9042 |
9324 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 9043 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |