| 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 12314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12325 static const CommandId kCmdId = kCopyTextureCHROMIUM; | 12325 static const CommandId kCmdId = kCopyTextureCHROMIUM; |
| 12326 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12326 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 12327 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 12327 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
| 12328 | 12328 |
| 12329 static uint32_t ComputeSize() { | 12329 static uint32_t ComputeSize() { |
| 12330 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12330 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12331 } | 12331 } |
| 12332 | 12332 |
| 12333 void SetHeader() { header.SetCmd<ValueType>(); } | 12333 void SetHeader() { header.SetCmd<ValueType>(); } |
| 12334 | 12334 |
| 12335 void Init(GLenum _target, | 12335 void Init(GLenum _source_id, |
| 12336 GLenum _source_id, | |
| 12337 GLenum _dest_id, | 12336 GLenum _dest_id, |
| 12338 GLint _internalformat, | 12337 GLint _internalformat, |
| 12339 GLenum _dest_type, | 12338 GLenum _dest_type, |
| 12340 GLboolean _unpack_flip_y, | 12339 GLboolean _unpack_flip_y, |
| 12341 GLboolean _unpack_premultiply_alpha, | 12340 GLboolean _unpack_premultiply_alpha, |
| 12342 GLboolean _unpack_unmultiply_alpha) { | 12341 GLboolean _unpack_unmultiply_alpha) { |
| 12343 SetHeader(); | 12342 SetHeader(); |
| 12344 target = _target; | |
| 12345 source_id = _source_id; | 12343 source_id = _source_id; |
| 12346 dest_id = _dest_id; | 12344 dest_id = _dest_id; |
| 12347 internalformat = _internalformat; | 12345 internalformat = _internalformat; |
| 12348 dest_type = _dest_type; | 12346 dest_type = _dest_type; |
| 12349 unpack_flip_y = _unpack_flip_y; | 12347 unpack_flip_y = _unpack_flip_y; |
| 12350 unpack_premultiply_alpha = _unpack_premultiply_alpha; | 12348 unpack_premultiply_alpha = _unpack_premultiply_alpha; |
| 12351 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; | 12349 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; |
| 12352 } | 12350 } |
| 12353 | 12351 |
| 12354 void* Set(void* cmd, | 12352 void* Set(void* cmd, |
| 12355 GLenum _target, | |
| 12356 GLenum _source_id, | 12353 GLenum _source_id, |
| 12357 GLenum _dest_id, | 12354 GLenum _dest_id, |
| 12358 GLint _internalformat, | 12355 GLint _internalformat, |
| 12359 GLenum _dest_type, | 12356 GLenum _dest_type, |
| 12360 GLboolean _unpack_flip_y, | 12357 GLboolean _unpack_flip_y, |
| 12361 GLboolean _unpack_premultiply_alpha, | 12358 GLboolean _unpack_premultiply_alpha, |
| 12362 GLboolean _unpack_unmultiply_alpha) { | 12359 GLboolean _unpack_unmultiply_alpha) { |
| 12363 static_cast<ValueType*>(cmd)->Init( | 12360 static_cast<ValueType*>(cmd)->Init( |
| 12364 _target, _source_id, _dest_id, _internalformat, _dest_type, | 12361 _source_id, _dest_id, _internalformat, _dest_type, _unpack_flip_y, |
| 12365 _unpack_flip_y, _unpack_premultiply_alpha, _unpack_unmultiply_alpha); | 12362 _unpack_premultiply_alpha, _unpack_unmultiply_alpha); |
| 12366 return NextCmdAddress<ValueType>(cmd); | 12363 return NextCmdAddress<ValueType>(cmd); |
| 12367 } | 12364 } |
| 12368 | 12365 |
| 12369 gpu::CommandHeader header; | 12366 gpu::CommandHeader header; |
| 12370 uint32_t target; | |
| 12371 uint32_t source_id; | 12367 uint32_t source_id; |
| 12372 uint32_t dest_id; | 12368 uint32_t dest_id; |
| 12373 int32_t internalformat; | 12369 int32_t internalformat; |
| 12374 uint32_t dest_type; | 12370 uint32_t dest_type; |
| 12375 uint32_t unpack_flip_y; | 12371 uint32_t unpack_flip_y; |
| 12376 uint32_t unpack_premultiply_alpha; | 12372 uint32_t unpack_premultiply_alpha; |
| 12377 uint32_t unpack_unmultiply_alpha; | 12373 uint32_t unpack_unmultiply_alpha; |
| 12378 }; | 12374 }; |
| 12379 | 12375 |
| 12380 static_assert(sizeof(CopyTextureCHROMIUM) == 36, | 12376 static_assert(sizeof(CopyTextureCHROMIUM) == 32, |
| 12381 "size of CopyTextureCHROMIUM should be 36"); | 12377 "size of CopyTextureCHROMIUM should be 32"); |
| 12382 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0, | 12378 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0, |
| 12383 "offset of CopyTextureCHROMIUM header should be 0"); | 12379 "offset of CopyTextureCHROMIUM header should be 0"); |
| 12384 static_assert(offsetof(CopyTextureCHROMIUM, target) == 4, | 12380 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 4, |
| 12385 "offset of CopyTextureCHROMIUM target should be 4"); | 12381 "offset of CopyTextureCHROMIUM source_id should be 4"); |
| 12386 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 8, | 12382 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 8, |
| 12387 "offset of CopyTextureCHROMIUM source_id should be 8"); | 12383 "offset of CopyTextureCHROMIUM dest_id should be 8"); |
| 12388 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12, | 12384 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 12, |
| 12389 "offset of CopyTextureCHROMIUM dest_id should be 12"); | 12385 "offset of CopyTextureCHROMIUM internalformat should be 12"); |
| 12390 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 16, | 12386 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 16, |
| 12391 "offset of CopyTextureCHROMIUM internalformat should be 16"); | 12387 "offset of CopyTextureCHROMIUM dest_type should be 16"); |
| 12392 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 20, | 12388 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 20, |
| 12393 "offset of CopyTextureCHROMIUM dest_type should be 20"); | 12389 "offset of CopyTextureCHROMIUM unpack_flip_y should be 20"); |
| 12394 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 24, | |
| 12395 "offset of CopyTextureCHROMIUM unpack_flip_y should be 24"); | |
| 12396 static_assert( | 12390 static_assert( |
| 12397 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 28, | 12391 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 24, |
| 12398 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 28"); | 12392 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 24"); |
| 12399 static_assert( | 12393 static_assert( |
| 12400 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 32, | 12394 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 28, |
| 12401 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 32"); | 12395 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 28"); |
| 12402 | 12396 |
| 12403 struct CopySubTextureCHROMIUM { | 12397 struct CopySubTextureCHROMIUM { |
| 12404 typedef CopySubTextureCHROMIUM ValueType; | 12398 typedef CopySubTextureCHROMIUM ValueType; |
| 12405 static const CommandId kCmdId = kCopySubTextureCHROMIUM; | 12399 static const CommandId kCmdId = kCopySubTextureCHROMIUM; |
| 12406 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12400 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 12407 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 12401 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
| 12408 | 12402 |
| 12409 static uint32_t ComputeSize() { | 12403 static uint32_t ComputeSize() { |
| 12410 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12404 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12411 } | 12405 } |
| 12412 | 12406 |
| 12413 void SetHeader() { header.SetCmd<ValueType>(); } | 12407 void SetHeader() { header.SetCmd<ValueType>(); } |
| 12414 | 12408 |
| 12415 void Init(GLenum _target, | 12409 void Init(GLenum _source_id, |
| 12416 GLenum _source_id, | |
| 12417 GLenum _dest_id, | 12410 GLenum _dest_id, |
| 12418 GLint _xoffset, | 12411 GLint _xoffset, |
| 12419 GLint _yoffset, | 12412 GLint _yoffset, |
| 12420 GLint _x, | 12413 GLint _x, |
| 12421 GLint _y, | 12414 GLint _y, |
| 12422 GLsizei _width, | 12415 GLsizei _width, |
| 12423 GLsizei _height, | 12416 GLsizei _height, |
| 12424 GLboolean _unpack_flip_y, | 12417 GLboolean _unpack_flip_y, |
| 12425 GLboolean _unpack_premultiply_alpha, | 12418 GLboolean _unpack_premultiply_alpha, |
| 12426 GLboolean _unpack_unmultiply_alpha) { | 12419 GLboolean _unpack_unmultiply_alpha) { |
| 12427 SetHeader(); | 12420 SetHeader(); |
| 12428 target = _target; | |
| 12429 source_id = _source_id; | 12421 source_id = _source_id; |
| 12430 dest_id = _dest_id; | 12422 dest_id = _dest_id; |
| 12431 xoffset = _xoffset; | 12423 xoffset = _xoffset; |
| 12432 yoffset = _yoffset; | 12424 yoffset = _yoffset; |
| 12433 x = _x; | 12425 x = _x; |
| 12434 y = _y; | 12426 y = _y; |
| 12435 width = _width; | 12427 width = _width; |
| 12436 height = _height; | 12428 height = _height; |
| 12437 unpack_flip_y = _unpack_flip_y; | 12429 unpack_flip_y = _unpack_flip_y; |
| 12438 unpack_premultiply_alpha = _unpack_premultiply_alpha; | 12430 unpack_premultiply_alpha = _unpack_premultiply_alpha; |
| 12439 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; | 12431 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; |
| 12440 } | 12432 } |
| 12441 | 12433 |
| 12442 void* Set(void* cmd, | 12434 void* Set(void* cmd, |
| 12443 GLenum _target, | |
| 12444 GLenum _source_id, | 12435 GLenum _source_id, |
| 12445 GLenum _dest_id, | 12436 GLenum _dest_id, |
| 12446 GLint _xoffset, | 12437 GLint _xoffset, |
| 12447 GLint _yoffset, | 12438 GLint _yoffset, |
| 12448 GLint _x, | 12439 GLint _x, |
| 12449 GLint _y, | 12440 GLint _y, |
| 12450 GLsizei _width, | 12441 GLsizei _width, |
| 12451 GLsizei _height, | 12442 GLsizei _height, |
| 12452 GLboolean _unpack_flip_y, | 12443 GLboolean _unpack_flip_y, |
| 12453 GLboolean _unpack_premultiply_alpha, | 12444 GLboolean _unpack_premultiply_alpha, |
| 12454 GLboolean _unpack_unmultiply_alpha) { | 12445 GLboolean _unpack_unmultiply_alpha) { |
| 12455 static_cast<ValueType*>(cmd) | 12446 static_cast<ValueType*>(cmd)->Init( |
| 12456 ->Init(_target, _source_id, _dest_id, _xoffset, _yoffset, _x, _y, | 12447 _source_id, _dest_id, _xoffset, _yoffset, _x, _y, _width, _height, |
| 12457 _width, _height, _unpack_flip_y, _unpack_premultiply_alpha, | 12448 _unpack_flip_y, _unpack_premultiply_alpha, _unpack_unmultiply_alpha); |
| 12458 _unpack_unmultiply_alpha); | |
| 12459 return NextCmdAddress<ValueType>(cmd); | 12449 return NextCmdAddress<ValueType>(cmd); |
| 12460 } | 12450 } |
| 12461 | 12451 |
| 12462 gpu::CommandHeader header; | 12452 gpu::CommandHeader header; |
| 12463 uint32_t target; | |
| 12464 uint32_t source_id; | 12453 uint32_t source_id; |
| 12465 uint32_t dest_id; | 12454 uint32_t dest_id; |
| 12466 int32_t xoffset; | 12455 int32_t xoffset; |
| 12467 int32_t yoffset; | 12456 int32_t yoffset; |
| 12468 int32_t x; | 12457 int32_t x; |
| 12469 int32_t y; | 12458 int32_t y; |
| 12470 int32_t width; | 12459 int32_t width; |
| 12471 int32_t height; | 12460 int32_t height; |
| 12472 uint32_t unpack_flip_y; | 12461 uint32_t unpack_flip_y; |
| 12473 uint32_t unpack_premultiply_alpha; | 12462 uint32_t unpack_premultiply_alpha; |
| 12474 uint32_t unpack_unmultiply_alpha; | 12463 uint32_t unpack_unmultiply_alpha; |
| 12475 }; | 12464 }; |
| 12476 | 12465 |
| 12477 static_assert(sizeof(CopySubTextureCHROMIUM) == 52, | 12466 static_assert(sizeof(CopySubTextureCHROMIUM) == 48, |
| 12478 "size of CopySubTextureCHROMIUM should be 52"); | 12467 "size of CopySubTextureCHROMIUM should be 48"); |
| 12479 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0, | 12468 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0, |
| 12480 "offset of CopySubTextureCHROMIUM header should be 0"); | 12469 "offset of CopySubTextureCHROMIUM header should be 0"); |
| 12481 static_assert(offsetof(CopySubTextureCHROMIUM, target) == 4, | 12470 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 4, |
| 12482 "offset of CopySubTextureCHROMIUM target should be 4"); | 12471 "offset of CopySubTextureCHROMIUM source_id should be 4"); |
| 12483 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 8, | 12472 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 8, |
| 12484 "offset of CopySubTextureCHROMIUM source_id should be 8"); | 12473 "offset of CopySubTextureCHROMIUM dest_id should be 8"); |
| 12485 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 12, | 12474 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 12, |
| 12486 "offset of CopySubTextureCHROMIUM dest_id should be 12"); | 12475 "offset of CopySubTextureCHROMIUM xoffset should be 12"); |
| 12487 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 16, | 12476 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 16, |
| 12488 "offset of CopySubTextureCHROMIUM xoffset should be 16"); | 12477 "offset of CopySubTextureCHROMIUM yoffset should be 16"); |
| 12489 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 20, | 12478 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 20, |
| 12490 "offset of CopySubTextureCHROMIUM yoffset should be 20"); | 12479 "offset of CopySubTextureCHROMIUM x should be 20"); |
| 12491 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 24, | 12480 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 24, |
| 12492 "offset of CopySubTextureCHROMIUM x should be 24"); | 12481 "offset of CopySubTextureCHROMIUM y should be 24"); |
| 12493 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 28, | 12482 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 28, |
| 12494 "offset of CopySubTextureCHROMIUM y should be 28"); | 12483 "offset of CopySubTextureCHROMIUM width should be 28"); |
| 12495 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 32, | 12484 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 32, |
| 12496 "offset of CopySubTextureCHROMIUM width should be 32"); | 12485 "offset of CopySubTextureCHROMIUM height should be 32"); |
| 12497 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 36, | 12486 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 36, |
| 12498 "offset of CopySubTextureCHROMIUM height should be 36"); | 12487 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 36"); |
| 12499 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 40, | |
| 12500 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 40"); | |
| 12501 static_assert( | 12488 static_assert( |
| 12502 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 44, | 12489 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 40, |
| 12503 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 44"); | 12490 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 40"); |
| 12504 static_assert( | 12491 static_assert( |
| 12505 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 48, | 12492 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 44, |
| 12506 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 48"); | 12493 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 44"); |
| 12507 | 12494 |
| 12508 struct CompressedCopyTextureCHROMIUM { | 12495 struct CompressedCopyTextureCHROMIUM { |
| 12509 typedef CompressedCopyTextureCHROMIUM ValueType; | 12496 typedef CompressedCopyTextureCHROMIUM ValueType; |
| 12510 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM; | 12497 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM; |
| 12511 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12498 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 12512 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 12499 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 12513 | 12500 |
| 12514 static uint32_t ComputeSize() { | 12501 static uint32_t ComputeSize() { |
| 12515 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12502 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12516 } | 12503 } |
| (...skipping 3215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15732 static_assert(offsetof(GetFragDataIndexEXT, program) == 4, | 15719 static_assert(offsetof(GetFragDataIndexEXT, program) == 4, |
| 15733 "offset of GetFragDataIndexEXT program should be 4"); | 15720 "offset of GetFragDataIndexEXT program should be 4"); |
| 15734 static_assert(offsetof(GetFragDataIndexEXT, name_bucket_id) == 8, | 15721 static_assert(offsetof(GetFragDataIndexEXT, name_bucket_id) == 8, |
| 15735 "offset of GetFragDataIndexEXT name_bucket_id should be 8"); | 15722 "offset of GetFragDataIndexEXT name_bucket_id should be 8"); |
| 15736 static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12, | 15723 static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12, |
| 15737 "offset of GetFragDataIndexEXT index_shm_id should be 12"); | 15724 "offset of GetFragDataIndexEXT index_shm_id should be 12"); |
| 15738 static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16, | 15725 static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16, |
| 15739 "offset of GetFragDataIndexEXT index_shm_offset should be 16"); | 15726 "offset of GetFragDataIndexEXT index_shm_offset should be 16"); |
| 15740 | 15727 |
| 15741 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15728 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
| OLD | NEW |