| 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 12427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12438 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12438 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 12439 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 12439 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
| 12440 | 12440 |
| 12441 static uint32_t ComputeSize() { | 12441 static uint32_t ComputeSize() { |
| 12442 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12442 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12443 } | 12443 } |
| 12444 | 12444 |
| 12445 void SetHeader() { header.SetCmd<ValueType>(); } | 12445 void SetHeader() { header.SetCmd<ValueType>(); } |
| 12446 | 12446 |
| 12447 void Init(GLenum _source_id, | 12447 void Init(GLenum _source_id, |
| 12448 GLint _source_level, |
| 12448 GLenum _dest_id, | 12449 GLenum _dest_id, |
| 12450 GLint _dest_level, |
| 12449 GLint _internalformat, | 12451 GLint _internalformat, |
| 12450 GLenum _dest_type, | 12452 GLenum _dest_type, |
| 12451 GLboolean _unpack_flip_y, | 12453 GLboolean _unpack_flip_y, |
| 12452 GLboolean _unpack_premultiply_alpha, | 12454 GLboolean _unpack_premultiply_alpha, |
| 12453 GLboolean _unpack_unmultiply_alpha) { | 12455 GLboolean _unpack_unmultiply_alpha) { |
| 12454 SetHeader(); | 12456 SetHeader(); |
| 12455 source_id = _source_id; | 12457 source_id = _source_id; |
| 12458 source_level = _source_level; |
| 12456 dest_id = _dest_id; | 12459 dest_id = _dest_id; |
| 12460 dest_level = _dest_level; |
| 12457 internalformat = _internalformat; | 12461 internalformat = _internalformat; |
| 12458 dest_type = _dest_type; | 12462 dest_type = _dest_type; |
| 12459 unpack_flip_y = _unpack_flip_y; | 12463 unpack_flip_y = _unpack_flip_y; |
| 12460 unpack_premultiply_alpha = _unpack_premultiply_alpha; | 12464 unpack_premultiply_alpha = _unpack_premultiply_alpha; |
| 12461 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; | 12465 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; |
| 12462 } | 12466 } |
| 12463 | 12467 |
| 12464 void* Set(void* cmd, | 12468 void* Set(void* cmd, |
| 12465 GLenum _source_id, | 12469 GLenum _source_id, |
| 12470 GLint _source_level, |
| 12466 GLenum _dest_id, | 12471 GLenum _dest_id, |
| 12472 GLint _dest_level, |
| 12467 GLint _internalformat, | 12473 GLint _internalformat, |
| 12468 GLenum _dest_type, | 12474 GLenum _dest_type, |
| 12469 GLboolean _unpack_flip_y, | 12475 GLboolean _unpack_flip_y, |
| 12470 GLboolean _unpack_premultiply_alpha, | 12476 GLboolean _unpack_premultiply_alpha, |
| 12471 GLboolean _unpack_unmultiply_alpha) { | 12477 GLboolean _unpack_unmultiply_alpha) { |
| 12472 static_cast<ValueType*>(cmd)->Init( | 12478 static_cast<ValueType*>(cmd)->Init( |
| 12473 _source_id, _dest_id, _internalformat, _dest_type, _unpack_flip_y, | 12479 _source_id, _source_level, _dest_id, _dest_level, _internalformat, |
| 12474 _unpack_premultiply_alpha, _unpack_unmultiply_alpha); | 12480 _dest_type, _unpack_flip_y, _unpack_premultiply_alpha, |
| 12481 _unpack_unmultiply_alpha); |
| 12475 return NextCmdAddress<ValueType>(cmd); | 12482 return NextCmdAddress<ValueType>(cmd); |
| 12476 } | 12483 } |
| 12477 | 12484 |
| 12478 gpu::CommandHeader header; | 12485 gpu::CommandHeader header; |
| 12479 uint32_t source_id; | 12486 uint32_t source_id; |
| 12487 int32_t source_level; |
| 12480 uint32_t dest_id; | 12488 uint32_t dest_id; |
| 12489 int32_t dest_level; |
| 12481 int32_t internalformat; | 12490 int32_t internalformat; |
| 12482 uint32_t dest_type; | 12491 uint32_t dest_type; |
| 12483 uint32_t unpack_flip_y; | 12492 uint32_t unpack_flip_y; |
| 12484 uint32_t unpack_premultiply_alpha; | 12493 uint32_t unpack_premultiply_alpha; |
| 12485 uint32_t unpack_unmultiply_alpha; | 12494 uint32_t unpack_unmultiply_alpha; |
| 12486 }; | 12495 }; |
| 12487 | 12496 |
| 12488 static_assert(sizeof(CopyTextureCHROMIUM) == 32, | 12497 static_assert(sizeof(CopyTextureCHROMIUM) == 40, |
| 12489 "size of CopyTextureCHROMIUM should be 32"); | 12498 "size of CopyTextureCHROMIUM should be 40"); |
| 12490 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0, | 12499 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0, |
| 12491 "offset of CopyTextureCHROMIUM header should be 0"); | 12500 "offset of CopyTextureCHROMIUM header should be 0"); |
| 12492 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 4, | 12501 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 4, |
| 12493 "offset of CopyTextureCHROMIUM source_id should be 4"); | 12502 "offset of CopyTextureCHROMIUM source_id should be 4"); |
| 12494 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 8, | 12503 static_assert(offsetof(CopyTextureCHROMIUM, source_level) == 8, |
| 12495 "offset of CopyTextureCHROMIUM dest_id should be 8"); | 12504 "offset of CopyTextureCHROMIUM source_level should be 8"); |
| 12496 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 12, | 12505 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12, |
| 12497 "offset of CopyTextureCHROMIUM internalformat should be 12"); | 12506 "offset of CopyTextureCHROMIUM dest_id should be 12"); |
| 12498 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 16, | 12507 static_assert(offsetof(CopyTextureCHROMIUM, dest_level) == 16, |
| 12499 "offset of CopyTextureCHROMIUM dest_type should be 16"); | 12508 "offset of CopyTextureCHROMIUM dest_level should be 16"); |
| 12500 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 20, | 12509 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 20, |
| 12501 "offset of CopyTextureCHROMIUM unpack_flip_y should be 20"); | 12510 "offset of CopyTextureCHROMIUM internalformat should be 20"); |
| 12511 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 24, |
| 12512 "offset of CopyTextureCHROMIUM dest_type should be 24"); |
| 12513 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 28, |
| 12514 "offset of CopyTextureCHROMIUM unpack_flip_y should be 28"); |
| 12502 static_assert( | 12515 static_assert( |
| 12503 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 24, | 12516 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 32, |
| 12504 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 24"); | 12517 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 32"); |
| 12505 static_assert( | 12518 static_assert( |
| 12506 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 28, | 12519 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 36, |
| 12507 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 28"); | 12520 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 36"); |
| 12508 | 12521 |
| 12509 struct CopySubTextureCHROMIUM { | 12522 struct CopySubTextureCHROMIUM { |
| 12510 typedef CopySubTextureCHROMIUM ValueType; | 12523 typedef CopySubTextureCHROMIUM ValueType; |
| 12511 static const CommandId kCmdId = kCopySubTextureCHROMIUM; | 12524 static const CommandId kCmdId = kCopySubTextureCHROMIUM; |
| 12512 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12525 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 12513 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 12526 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
| 12514 | 12527 |
| 12515 static uint32_t ComputeSize() { | 12528 static uint32_t ComputeSize() { |
| 12516 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12529 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12517 } | 12530 } |
| 12518 | 12531 |
| 12519 void SetHeader() { header.SetCmd<ValueType>(); } | 12532 void SetHeader() { header.SetCmd<ValueType>(); } |
| 12520 | 12533 |
| 12521 void Init(GLenum _source_id, | 12534 void Init(GLenum _source_id, |
| 12535 GLint _source_level, |
| 12522 GLenum _dest_id, | 12536 GLenum _dest_id, |
| 12537 GLint _dest_level, |
| 12523 GLint _xoffset, | 12538 GLint _xoffset, |
| 12524 GLint _yoffset, | 12539 GLint _yoffset, |
| 12525 GLint _x, | 12540 GLint _x, |
| 12526 GLint _y, | 12541 GLint _y, |
| 12527 GLsizei _width, | 12542 GLsizei _width, |
| 12528 GLsizei _height, | 12543 GLsizei _height, |
| 12529 GLboolean _unpack_flip_y, | 12544 GLboolean _unpack_flip_y, |
| 12530 GLboolean _unpack_premultiply_alpha, | 12545 GLboolean _unpack_premultiply_alpha, |
| 12531 GLboolean _unpack_unmultiply_alpha) { | 12546 GLboolean _unpack_unmultiply_alpha) { |
| 12532 SetHeader(); | 12547 SetHeader(); |
| 12533 source_id = _source_id; | 12548 source_id = _source_id; |
| 12549 source_level = _source_level; |
| 12534 dest_id = _dest_id; | 12550 dest_id = _dest_id; |
| 12551 dest_level = _dest_level; |
| 12535 xoffset = _xoffset; | 12552 xoffset = _xoffset; |
| 12536 yoffset = _yoffset; | 12553 yoffset = _yoffset; |
| 12537 x = _x; | 12554 x = _x; |
| 12538 y = _y; | 12555 y = _y; |
| 12539 width = _width; | 12556 width = _width; |
| 12540 height = _height; | 12557 height = _height; |
| 12541 unpack_flip_y = _unpack_flip_y; | 12558 unpack_flip_y = _unpack_flip_y; |
| 12542 unpack_premultiply_alpha = _unpack_premultiply_alpha; | 12559 unpack_premultiply_alpha = _unpack_premultiply_alpha; |
| 12543 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; | 12560 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; |
| 12544 } | 12561 } |
| 12545 | 12562 |
| 12546 void* Set(void* cmd, | 12563 void* Set(void* cmd, |
| 12547 GLenum _source_id, | 12564 GLenum _source_id, |
| 12565 GLint _source_level, |
| 12548 GLenum _dest_id, | 12566 GLenum _dest_id, |
| 12567 GLint _dest_level, |
| 12549 GLint _xoffset, | 12568 GLint _xoffset, |
| 12550 GLint _yoffset, | 12569 GLint _yoffset, |
| 12551 GLint _x, | 12570 GLint _x, |
| 12552 GLint _y, | 12571 GLint _y, |
| 12553 GLsizei _width, | 12572 GLsizei _width, |
| 12554 GLsizei _height, | 12573 GLsizei _height, |
| 12555 GLboolean _unpack_flip_y, | 12574 GLboolean _unpack_flip_y, |
| 12556 GLboolean _unpack_premultiply_alpha, | 12575 GLboolean _unpack_premultiply_alpha, |
| 12557 GLboolean _unpack_unmultiply_alpha) { | 12576 GLboolean _unpack_unmultiply_alpha) { |
| 12558 static_cast<ValueType*>(cmd)->Init( | 12577 static_cast<ValueType*>(cmd)->Init( |
| 12559 _source_id, _dest_id, _xoffset, _yoffset, _x, _y, _width, _height, | 12578 _source_id, _source_level, _dest_id, _dest_level, _xoffset, _yoffset, |
| 12560 _unpack_flip_y, _unpack_premultiply_alpha, _unpack_unmultiply_alpha); | 12579 _x, _y, _width, _height, _unpack_flip_y, _unpack_premultiply_alpha, |
| 12580 _unpack_unmultiply_alpha); |
| 12561 return NextCmdAddress<ValueType>(cmd); | 12581 return NextCmdAddress<ValueType>(cmd); |
| 12562 } | 12582 } |
| 12563 | 12583 |
| 12564 gpu::CommandHeader header; | 12584 gpu::CommandHeader header; |
| 12565 uint32_t source_id; | 12585 uint32_t source_id; |
| 12586 int32_t source_level; |
| 12566 uint32_t dest_id; | 12587 uint32_t dest_id; |
| 12588 int32_t dest_level; |
| 12567 int32_t xoffset; | 12589 int32_t xoffset; |
| 12568 int32_t yoffset; | 12590 int32_t yoffset; |
| 12569 int32_t x; | 12591 int32_t x; |
| 12570 int32_t y; | 12592 int32_t y; |
| 12571 int32_t width; | 12593 int32_t width; |
| 12572 int32_t height; | 12594 int32_t height; |
| 12573 uint32_t unpack_flip_y; | 12595 uint32_t unpack_flip_y; |
| 12574 uint32_t unpack_premultiply_alpha; | 12596 uint32_t unpack_premultiply_alpha; |
| 12575 uint32_t unpack_unmultiply_alpha; | 12597 uint32_t unpack_unmultiply_alpha; |
| 12576 }; | 12598 }; |
| 12577 | 12599 |
| 12578 static_assert(sizeof(CopySubTextureCHROMIUM) == 48, | 12600 static_assert(sizeof(CopySubTextureCHROMIUM) == 56, |
| 12579 "size of CopySubTextureCHROMIUM should be 48"); | 12601 "size of CopySubTextureCHROMIUM should be 56"); |
| 12580 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0, | 12602 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0, |
| 12581 "offset of CopySubTextureCHROMIUM header should be 0"); | 12603 "offset of CopySubTextureCHROMIUM header should be 0"); |
| 12582 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 4, | 12604 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 4, |
| 12583 "offset of CopySubTextureCHROMIUM source_id should be 4"); | 12605 "offset of CopySubTextureCHROMIUM source_id should be 4"); |
| 12584 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 8, | 12606 static_assert(offsetof(CopySubTextureCHROMIUM, source_level) == 8, |
| 12585 "offset of CopySubTextureCHROMIUM dest_id should be 8"); | 12607 "offset of CopySubTextureCHROMIUM source_level should be 8"); |
| 12586 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 12, | 12608 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 12, |
| 12587 "offset of CopySubTextureCHROMIUM xoffset should be 12"); | 12609 "offset of CopySubTextureCHROMIUM dest_id should be 12"); |
| 12588 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 16, | 12610 static_assert(offsetof(CopySubTextureCHROMIUM, dest_level) == 16, |
| 12589 "offset of CopySubTextureCHROMIUM yoffset should be 16"); | 12611 "offset of CopySubTextureCHROMIUM dest_level should be 16"); |
| 12590 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 20, | 12612 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 20, |
| 12591 "offset of CopySubTextureCHROMIUM x should be 20"); | 12613 "offset of CopySubTextureCHROMIUM xoffset should be 20"); |
| 12592 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 24, | 12614 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 24, |
| 12593 "offset of CopySubTextureCHROMIUM y should be 24"); | 12615 "offset of CopySubTextureCHROMIUM yoffset should be 24"); |
| 12594 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 28, | 12616 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 28, |
| 12595 "offset of CopySubTextureCHROMIUM width should be 28"); | 12617 "offset of CopySubTextureCHROMIUM x should be 28"); |
| 12596 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 32, | 12618 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 32, |
| 12597 "offset of CopySubTextureCHROMIUM height should be 32"); | 12619 "offset of CopySubTextureCHROMIUM y should be 32"); |
| 12598 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 36, | 12620 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 36, |
| 12599 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 36"); | 12621 "offset of CopySubTextureCHROMIUM width should be 36"); |
| 12622 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 40, |
| 12623 "offset of CopySubTextureCHROMIUM height should be 40"); |
| 12624 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 44, |
| 12625 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 44"); |
| 12600 static_assert( | 12626 static_assert( |
| 12601 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 40, | 12627 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 48, |
| 12602 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 40"); | 12628 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 48"); |
| 12603 static_assert( | 12629 static_assert( |
| 12604 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 44, | 12630 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 52, |
| 12605 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 44"); | 12631 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 52"); |
| 12606 | 12632 |
| 12607 struct CompressedCopyTextureCHROMIUM { | 12633 struct CompressedCopyTextureCHROMIUM { |
| 12608 typedef CompressedCopyTextureCHROMIUM ValueType; | 12634 typedef CompressedCopyTextureCHROMIUM ValueType; |
| 12609 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM; | 12635 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM; |
| 12610 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12636 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 12611 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 12637 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 12612 | 12638 |
| 12613 static uint32_t ComputeSize() { | 12639 static uint32_t ComputeSize() { |
| 12614 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12640 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12615 } | 12641 } |
| (...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15646 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4, | 15672 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4, |
| 15647 "offset of SwapBuffersWithDamageCHROMIUM x should be 4"); | 15673 "offset of SwapBuffersWithDamageCHROMIUM x should be 4"); |
| 15648 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8, | 15674 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8, |
| 15649 "offset of SwapBuffersWithDamageCHROMIUM y should be 8"); | 15675 "offset of SwapBuffersWithDamageCHROMIUM y should be 8"); |
| 15650 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12, | 15676 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12, |
| 15651 "offset of SwapBuffersWithDamageCHROMIUM width should be 12"); | 15677 "offset of SwapBuffersWithDamageCHROMIUM width should be 12"); |
| 15652 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16, | 15678 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16, |
| 15653 "offset of SwapBuffersWithDamageCHROMIUM height should be 16"); | 15679 "offset of SwapBuffersWithDamageCHROMIUM height should be 16"); |
| 15654 | 15680 |
| 15655 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15681 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
| OLD | NEW |