Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format_autogen.h

Issue 2639973002: Add target argument to Copy{Sub}TextureCHROMIUM entry point (Closed)
Patch Set: use dest_target instead of target Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12428 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 GLint _source_level,
12449 GLenum _dest_target,
12449 GLenum _dest_id, 12450 GLenum _dest_id,
12450 GLint _dest_level, 12451 GLint _dest_level,
12451 GLint _internalformat, 12452 GLint _internalformat,
12452 GLenum _dest_type, 12453 GLenum _dest_type,
12453 GLboolean _unpack_flip_y, 12454 GLboolean _unpack_flip_y,
12454 GLboolean _unpack_premultiply_alpha, 12455 GLboolean _unpack_premultiply_alpha,
12455 GLboolean _unpack_unmultiply_alpha) { 12456 GLboolean _unpack_unmultiply_alpha) {
12456 SetHeader(); 12457 SetHeader();
12457 source_id = _source_id; 12458 source_id = _source_id;
12458 source_level = _source_level; 12459 source_level = _source_level;
12460 dest_target = _dest_target;
12459 dest_id = _dest_id; 12461 dest_id = _dest_id;
12460 dest_level = _dest_level; 12462 dest_level = _dest_level;
12461 internalformat = _internalformat; 12463 internalformat = _internalformat;
12462 dest_type = _dest_type; 12464 dest_type = _dest_type;
12463 unpack_flip_y = _unpack_flip_y; 12465 unpack_flip_y = _unpack_flip_y;
12464 unpack_premultiply_alpha = _unpack_premultiply_alpha; 12466 unpack_premultiply_alpha = _unpack_premultiply_alpha;
12465 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; 12467 unpack_unmultiply_alpha = _unpack_unmultiply_alpha;
12466 } 12468 }
12467 12469
12468 void* Set(void* cmd, 12470 void* Set(void* cmd,
12469 GLenum _source_id, 12471 GLenum _source_id,
12470 GLint _source_level, 12472 GLint _source_level,
12473 GLenum _dest_target,
12471 GLenum _dest_id, 12474 GLenum _dest_id,
12472 GLint _dest_level, 12475 GLint _dest_level,
12473 GLint _internalformat, 12476 GLint _internalformat,
12474 GLenum _dest_type, 12477 GLenum _dest_type,
12475 GLboolean _unpack_flip_y, 12478 GLboolean _unpack_flip_y,
12476 GLboolean _unpack_premultiply_alpha, 12479 GLboolean _unpack_premultiply_alpha,
12477 GLboolean _unpack_unmultiply_alpha) { 12480 GLboolean _unpack_unmultiply_alpha) {
12478 static_cast<ValueType*>(cmd)->Init( 12481 static_cast<ValueType*>(cmd)->Init(
12479 _source_id, _source_level, _dest_id, _dest_level, _internalformat, 12482 _source_id, _source_level, _dest_target, _dest_id, _dest_level,
12480 _dest_type, _unpack_flip_y, _unpack_premultiply_alpha, 12483 _internalformat, _dest_type, _unpack_flip_y, _unpack_premultiply_alpha,
12481 _unpack_unmultiply_alpha); 12484 _unpack_unmultiply_alpha);
12482 return NextCmdAddress<ValueType>(cmd); 12485 return NextCmdAddress<ValueType>(cmd);
12483 } 12486 }
12484 12487
12485 gpu::CommandHeader header; 12488 gpu::CommandHeader header;
12486 uint32_t source_id; 12489 uint32_t source_id;
12487 int32_t source_level; 12490 int32_t source_level;
12491 uint32_t dest_target;
12488 uint32_t dest_id; 12492 uint32_t dest_id;
12489 int32_t dest_level; 12493 int32_t dest_level;
12490 int32_t internalformat; 12494 int32_t internalformat;
12491 uint32_t dest_type; 12495 uint32_t dest_type;
12492 uint32_t unpack_flip_y; 12496 uint32_t unpack_flip_y;
12493 uint32_t unpack_premultiply_alpha; 12497 uint32_t unpack_premultiply_alpha;
12494 uint32_t unpack_unmultiply_alpha; 12498 uint32_t unpack_unmultiply_alpha;
12495 }; 12499 };
12496 12500
12497 static_assert(sizeof(CopyTextureCHROMIUM) == 40, 12501 static_assert(sizeof(CopyTextureCHROMIUM) == 44,
12498 "size of CopyTextureCHROMIUM should be 40"); 12502 "size of CopyTextureCHROMIUM should be 44");
12499 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0, 12503 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0,
12500 "offset of CopyTextureCHROMIUM header should be 0"); 12504 "offset of CopyTextureCHROMIUM header should be 0");
12501 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 4, 12505 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 4,
12502 "offset of CopyTextureCHROMIUM source_id should be 4"); 12506 "offset of CopyTextureCHROMIUM source_id should be 4");
12503 static_assert(offsetof(CopyTextureCHROMIUM, source_level) == 8, 12507 static_assert(offsetof(CopyTextureCHROMIUM, source_level) == 8,
12504 "offset of CopyTextureCHROMIUM source_level should be 8"); 12508 "offset of CopyTextureCHROMIUM source_level should be 8");
12505 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12, 12509 static_assert(offsetof(CopyTextureCHROMIUM, dest_target) == 12,
12506 "offset of CopyTextureCHROMIUM dest_id should be 12"); 12510 "offset of CopyTextureCHROMIUM dest_target should be 12");
12507 static_assert(offsetof(CopyTextureCHROMIUM, dest_level) == 16, 12511 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 16,
12508 "offset of CopyTextureCHROMIUM dest_level should be 16"); 12512 "offset of CopyTextureCHROMIUM dest_id should be 16");
12509 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 20, 12513 static_assert(offsetof(CopyTextureCHROMIUM, dest_level) == 20,
12510 "offset of CopyTextureCHROMIUM internalformat should be 20"); 12514 "offset of CopyTextureCHROMIUM dest_level should be 20");
12511 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 24, 12515 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 24,
12512 "offset of CopyTextureCHROMIUM dest_type should be 24"); 12516 "offset of CopyTextureCHROMIUM internalformat should be 24");
12513 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 28, 12517 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 28,
12514 "offset of CopyTextureCHROMIUM unpack_flip_y should be 28"); 12518 "offset of CopyTextureCHROMIUM dest_type should be 28");
12519 static_assert(offsetof(CopyTextureCHROMIUM, unpack_flip_y) == 32,
12520 "offset of CopyTextureCHROMIUM unpack_flip_y should be 32");
12515 static_assert( 12521 static_assert(
12516 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 32, 12522 offsetof(CopyTextureCHROMIUM, unpack_premultiply_alpha) == 36,
12517 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 32"); 12523 "offset of CopyTextureCHROMIUM unpack_premultiply_alpha should be 36");
12518 static_assert( 12524 static_assert(
12519 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 36, 12525 offsetof(CopyTextureCHROMIUM, unpack_unmultiply_alpha) == 40,
12520 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 36"); 12526 "offset of CopyTextureCHROMIUM unpack_unmultiply_alpha should be 40");
12521 12527
12522 struct CopySubTextureCHROMIUM { 12528 struct CopySubTextureCHROMIUM {
12523 typedef CopySubTextureCHROMIUM ValueType; 12529 typedef CopySubTextureCHROMIUM ValueType;
12524 static const CommandId kCmdId = kCopySubTextureCHROMIUM; 12530 static const CommandId kCmdId = kCopySubTextureCHROMIUM;
12525 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 12531 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12526 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); 12532 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
12527 12533
12528 static uint32_t ComputeSize() { 12534 static uint32_t ComputeSize() {
12529 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 12535 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12530 } 12536 }
12531 12537
12532 void SetHeader() { header.SetCmd<ValueType>(); } 12538 void SetHeader() { header.SetCmd<ValueType>(); }
12533 12539
12534 void Init(GLenum _source_id, 12540 void Init(GLenum _source_id,
12535 GLint _source_level, 12541 GLint _source_level,
12542 GLenum _dest_target,
12536 GLenum _dest_id, 12543 GLenum _dest_id,
12537 GLint _dest_level, 12544 GLint _dest_level,
12538 GLint _xoffset, 12545 GLint _xoffset,
12539 GLint _yoffset, 12546 GLint _yoffset,
12540 GLint _x, 12547 GLint _x,
12541 GLint _y, 12548 GLint _y,
12542 GLsizei _width, 12549 GLsizei _width,
12543 GLsizei _height, 12550 GLsizei _height,
12544 GLboolean _unpack_flip_y, 12551 GLboolean _unpack_flip_y,
12545 GLboolean _unpack_premultiply_alpha, 12552 GLboolean _unpack_premultiply_alpha,
12546 GLboolean _unpack_unmultiply_alpha) { 12553 GLboolean _unpack_unmultiply_alpha) {
12547 SetHeader(); 12554 SetHeader();
12548 source_id = _source_id; 12555 source_id = _source_id;
12549 source_level = _source_level; 12556 source_level = _source_level;
12557 dest_target = _dest_target;
12550 dest_id = _dest_id; 12558 dest_id = _dest_id;
12551 dest_level = _dest_level; 12559 dest_level = _dest_level;
12552 xoffset = _xoffset; 12560 xoffset = _xoffset;
12553 yoffset = _yoffset; 12561 yoffset = _yoffset;
12554 x = _x; 12562 x = _x;
12555 y = _y; 12563 y = _y;
12556 width = _width; 12564 width = _width;
12557 height = _height; 12565 height = _height;
12558 unpack_flip_y = _unpack_flip_y; 12566 unpack_flip_y = _unpack_flip_y;
12559 unpack_premultiply_alpha = _unpack_premultiply_alpha; 12567 unpack_premultiply_alpha = _unpack_premultiply_alpha;
12560 unpack_unmultiply_alpha = _unpack_unmultiply_alpha; 12568 unpack_unmultiply_alpha = _unpack_unmultiply_alpha;
12561 } 12569 }
12562 12570
12563 void* Set(void* cmd, 12571 void* Set(void* cmd,
12564 GLenum _source_id, 12572 GLenum _source_id,
12565 GLint _source_level, 12573 GLint _source_level,
12574 GLenum _dest_target,
12566 GLenum _dest_id, 12575 GLenum _dest_id,
12567 GLint _dest_level, 12576 GLint _dest_level,
12568 GLint _xoffset, 12577 GLint _xoffset,
12569 GLint _yoffset, 12578 GLint _yoffset,
12570 GLint _x, 12579 GLint _x,
12571 GLint _y, 12580 GLint _y,
12572 GLsizei _width, 12581 GLsizei _width,
12573 GLsizei _height, 12582 GLsizei _height,
12574 GLboolean _unpack_flip_y, 12583 GLboolean _unpack_flip_y,
12575 GLboolean _unpack_premultiply_alpha, 12584 GLboolean _unpack_premultiply_alpha,
12576 GLboolean _unpack_unmultiply_alpha) { 12585 GLboolean _unpack_unmultiply_alpha) {
12577 static_cast<ValueType*>(cmd)->Init( 12586 static_cast<ValueType*>(cmd)->Init(
12578 _source_id, _source_level, _dest_id, _dest_level, _xoffset, _yoffset, 12587 _source_id, _source_level, _dest_target, _dest_id, _dest_level,
12579 _x, _y, _width, _height, _unpack_flip_y, _unpack_premultiply_alpha, 12588 _xoffset, _yoffset, _x, _y, _width, _height, _unpack_flip_y,
12580 _unpack_unmultiply_alpha); 12589 _unpack_premultiply_alpha, _unpack_unmultiply_alpha);
12581 return NextCmdAddress<ValueType>(cmd); 12590 return NextCmdAddress<ValueType>(cmd);
12582 } 12591 }
12583 12592
12584 gpu::CommandHeader header; 12593 gpu::CommandHeader header;
12585 uint32_t source_id; 12594 uint32_t source_id;
12586 int32_t source_level; 12595 int32_t source_level;
12596 uint32_t dest_target;
12587 uint32_t dest_id; 12597 uint32_t dest_id;
12588 int32_t dest_level; 12598 int32_t dest_level;
12589 int32_t xoffset; 12599 int32_t xoffset;
12590 int32_t yoffset; 12600 int32_t yoffset;
12591 int32_t x; 12601 int32_t x;
12592 int32_t y; 12602 int32_t y;
12593 int32_t width; 12603 int32_t width;
12594 int32_t height; 12604 int32_t height;
12595 uint32_t unpack_flip_y; 12605 uint32_t unpack_flip_y;
12596 uint32_t unpack_premultiply_alpha; 12606 uint32_t unpack_premultiply_alpha;
12597 uint32_t unpack_unmultiply_alpha; 12607 uint32_t unpack_unmultiply_alpha;
12598 }; 12608 };
12599 12609
12600 static_assert(sizeof(CopySubTextureCHROMIUM) == 56, 12610 static_assert(sizeof(CopySubTextureCHROMIUM) == 60,
12601 "size of CopySubTextureCHROMIUM should be 56"); 12611 "size of CopySubTextureCHROMIUM should be 60");
12602 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0, 12612 static_assert(offsetof(CopySubTextureCHROMIUM, header) == 0,
12603 "offset of CopySubTextureCHROMIUM header should be 0"); 12613 "offset of CopySubTextureCHROMIUM header should be 0");
12604 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 4, 12614 static_assert(offsetof(CopySubTextureCHROMIUM, source_id) == 4,
12605 "offset of CopySubTextureCHROMIUM source_id should be 4"); 12615 "offset of CopySubTextureCHROMIUM source_id should be 4");
12606 static_assert(offsetof(CopySubTextureCHROMIUM, source_level) == 8, 12616 static_assert(offsetof(CopySubTextureCHROMIUM, source_level) == 8,
12607 "offset of CopySubTextureCHROMIUM source_level should be 8"); 12617 "offset of CopySubTextureCHROMIUM source_level should be 8");
12608 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 12, 12618 static_assert(offsetof(CopySubTextureCHROMIUM, dest_target) == 12,
12609 "offset of CopySubTextureCHROMIUM dest_id should be 12"); 12619 "offset of CopySubTextureCHROMIUM dest_target should be 12");
12610 static_assert(offsetof(CopySubTextureCHROMIUM, dest_level) == 16, 12620 static_assert(offsetof(CopySubTextureCHROMIUM, dest_id) == 16,
12611 "offset of CopySubTextureCHROMIUM dest_level should be 16"); 12621 "offset of CopySubTextureCHROMIUM dest_id should be 16");
12612 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 20, 12622 static_assert(offsetof(CopySubTextureCHROMIUM, dest_level) == 20,
12613 "offset of CopySubTextureCHROMIUM xoffset should be 20"); 12623 "offset of CopySubTextureCHROMIUM dest_level should be 20");
12614 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 24, 12624 static_assert(offsetof(CopySubTextureCHROMIUM, xoffset) == 24,
12615 "offset of CopySubTextureCHROMIUM yoffset should be 24"); 12625 "offset of CopySubTextureCHROMIUM xoffset should be 24");
12616 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 28, 12626 static_assert(offsetof(CopySubTextureCHROMIUM, yoffset) == 28,
12617 "offset of CopySubTextureCHROMIUM x should be 28"); 12627 "offset of CopySubTextureCHROMIUM yoffset should be 28");
12618 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 32, 12628 static_assert(offsetof(CopySubTextureCHROMIUM, x) == 32,
12619 "offset of CopySubTextureCHROMIUM y should be 32"); 12629 "offset of CopySubTextureCHROMIUM x should be 32");
12620 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 36, 12630 static_assert(offsetof(CopySubTextureCHROMIUM, y) == 36,
12621 "offset of CopySubTextureCHROMIUM width should be 36"); 12631 "offset of CopySubTextureCHROMIUM y should be 36");
12622 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 40, 12632 static_assert(offsetof(CopySubTextureCHROMIUM, width) == 40,
12623 "offset of CopySubTextureCHROMIUM height should be 40"); 12633 "offset of CopySubTextureCHROMIUM width should be 40");
12624 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 44, 12634 static_assert(offsetof(CopySubTextureCHROMIUM, height) == 44,
12625 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 44"); 12635 "offset of CopySubTextureCHROMIUM height should be 44");
12636 static_assert(offsetof(CopySubTextureCHROMIUM, unpack_flip_y) == 48,
12637 "offset of CopySubTextureCHROMIUM unpack_flip_y should be 48");
12626 static_assert( 12638 static_assert(
12627 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 48, 12639 offsetof(CopySubTextureCHROMIUM, unpack_premultiply_alpha) == 52,
12628 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 48"); 12640 "offset of CopySubTextureCHROMIUM unpack_premultiply_alpha should be 52");
12629 static_assert( 12641 static_assert(
12630 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 52, 12642 offsetof(CopySubTextureCHROMIUM, unpack_unmultiply_alpha) == 56,
12631 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 52"); 12643 "offset of CopySubTextureCHROMIUM unpack_unmultiply_alpha should be 56");
12632 12644
12633 struct CompressedCopyTextureCHROMIUM { 12645 struct CompressedCopyTextureCHROMIUM {
12634 typedef CompressedCopyTextureCHROMIUM ValueType; 12646 typedef CompressedCopyTextureCHROMIUM ValueType;
12635 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM; 12647 static const CommandId kCmdId = kCompressedCopyTextureCHROMIUM;
12636 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 12648 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
12637 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 12649 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
12638 12650
12639 static uint32_t ComputeSize() { 12651 static uint32_t ComputeSize() {
12640 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 12652 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
12641 } 12653 }
(...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after
15672 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4, 15684 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4,
15673 "offset of SwapBuffersWithDamageCHROMIUM x should be 4"); 15685 "offset of SwapBuffersWithDamageCHROMIUM x should be 4");
15674 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8, 15686 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8,
15675 "offset of SwapBuffersWithDamageCHROMIUM y should be 8"); 15687 "offset of SwapBuffersWithDamageCHROMIUM y should be 8");
15676 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12, 15688 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12,
15677 "offset of SwapBuffersWithDamageCHROMIUM width should be 12"); 15689 "offset of SwapBuffersWithDamageCHROMIUM width should be 12");
15678 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16, 15690 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16,
15679 "offset of SwapBuffersWithDamageCHROMIUM height should be 16"); 15691 "offset of SwapBuffersWithDamageCHROMIUM height should be 16");
15680 15692
15681 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 15693 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698