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

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

Issue 10106015: Allow textures to be moved from one GL context group to another. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // DO NOT EDIT! 7 // DO NOT EDIT!
8 8
9 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 9 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
10 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 10 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
(...skipping 9451 matching lines...) Expand 10 before | Expand all | Expand 10 after
9462 OffsetOf_PostSubBufferCHROMIUM_header_not_0); 9462 OffsetOf_PostSubBufferCHROMIUM_header_not_0);
9463 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4, 9463 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4,
9464 OffsetOf_PostSubBufferCHROMIUM_x_not_4); 9464 OffsetOf_PostSubBufferCHROMIUM_x_not_4);
9465 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8, 9465 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8,
9466 OffsetOf_PostSubBufferCHROMIUM_y_not_8); 9466 OffsetOf_PostSubBufferCHROMIUM_y_not_8);
9467 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12, 9467 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12,
9468 OffsetOf_PostSubBufferCHROMIUM_width_not_12); 9468 OffsetOf_PostSubBufferCHROMIUM_width_not_12);
9469 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16, 9469 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16,
9470 OffsetOf_PostSubBufferCHROMIUM_height_not_16); 9470 OffsetOf_PostSubBufferCHROMIUM_height_not_16);
9471 9471
9472 struct ProduceTextureCHROMIUM {
9473 typedef ProduceTextureCHROMIUM ValueType;
9474 static const CommandId kCmdId = kProduceTextureCHROMIUM;
9475 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9476
9477 static uint32 ComputeSize() {
9478 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9479 }
9480
9481 void SetHeader() {
9482 header.SetCmd<ValueType>();
9483 }
9484
9485 void Init(
9486 GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) {
9487 SetHeader();
9488 target = _target;
9489 mailbox_shm_id = _mailbox_shm_id;
9490 mailbox_shm_offset = _mailbox_shm_offset;
9491 }
9492
9493 void* Set(
9494 void* cmd, GLenum _target, uint32 _mailbox_shm_id,
9495 uint32 _mailbox_shm_offset) {
9496 static_cast<ValueType*>(
9497 cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
9498 return NextCmdAddress<ValueType>(cmd);
9499 }
9500
9501 gpu::CommandHeader header;
9502 uint32 target;
9503 uint32 mailbox_shm_id;
9504 uint32 mailbox_shm_offset;
9505 };
9506
9507 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUM) == 16,
9508 Sizeof_ProduceTextureCHROMIUM_is_not_16);
9509 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, header) == 0,
9510 OffsetOf_ProduceTextureCHROMIUM_header_not_0);
9511 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, target) == 4,
9512 OffsetOf_ProduceTextureCHROMIUM_target_not_4);
9513 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_id) == 8,
9514 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_id_not_8);
9515 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_offset) == 12,
9516 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_offset_not_12);
9517
9518 struct ProduceTextureCHROMIUMImmediate {
9519 typedef ProduceTextureCHROMIUMImmediate ValueType;
9520 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate;
9521 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9522
9523 static uint32 ComputeDataSize() {
9524 return static_cast<uint32>(
9525 sizeof(GLint) * 32); // NOLINT
9526 }
9527
9528 static uint32 ComputeSize() {
9529 return static_cast<uint32>(
9530 sizeof(ValueType) + ComputeDataSize()); // NOLINT
9531 }
9532
9533 void SetHeader() {
9534 header.SetCmdByTotalSize<ValueType>(ComputeSize());
9535 }
9536
9537 void Init(GLenum _target, const GLint* _mailbox) {
9538 SetHeader();
9539 target = _target;
9540 memcpy(ImmediateDataAddress(this),
9541 _mailbox, ComputeDataSize());
9542 }
9543
9544 void* Set(void* cmd, GLenum _target, const GLint* _mailbox) {
9545 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
9546 const uint32 size = ComputeSize();
9547 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9548 }
9549
9550 gpu::CommandHeader header;
9551 uint32 target;
9552 };
9553
9554 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
9555 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8);
9556 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
9557 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0);
9558 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
9559 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4);
9560
9561 struct ConsumeTextureCHROMIUM {
9562 typedef ConsumeTextureCHROMIUM ValueType;
9563 static const CommandId kCmdId = kConsumeTextureCHROMIUM;
9564 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9565
9566 static uint32 ComputeSize() {
9567 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9568 }
9569
9570 void SetHeader() {
9571 header.SetCmd<ValueType>();
9572 }
9573
9574 void Init(
9575 GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) {
9576 SetHeader();
9577 target = _target;
9578 mailbox_shm_id = _mailbox_shm_id;
9579 mailbox_shm_offset = _mailbox_shm_offset;
9580 }
9581
9582 void* Set(
9583 void* cmd, GLenum _target, uint32 _mailbox_shm_id,
9584 uint32 _mailbox_shm_offset) {
9585 static_cast<ValueType*>(
9586 cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset);
9587 return NextCmdAddress<ValueType>(cmd);
9588 }
9589
9590 gpu::CommandHeader header;
9591 uint32 target;
9592 uint32 mailbox_shm_id;
9593 uint32 mailbox_shm_offset;
9594 };
9595
9596 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUM) == 16,
9597 Sizeof_ConsumeTextureCHROMIUM_is_not_16);
9598 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, header) == 0,
9599 OffsetOf_ConsumeTextureCHROMIUM_header_not_0);
9600 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, target) == 4,
9601 OffsetOf_ConsumeTextureCHROMIUM_target_not_4);
9602 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_id) == 8,
9603 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_id_not_8);
9604 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_offset) == 12,
9605 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_offset_not_12);
9606
9607 struct ConsumeTextureCHROMIUMImmediate {
9608 typedef ConsumeTextureCHROMIUMImmediate ValueType;
9609 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate;
9610 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9611
9612 static uint32 ComputeDataSize() {
9613 return static_cast<uint32>(
9614 sizeof(GLint) * 32); // NOLINT
9615 }
9616
9617 static uint32 ComputeSize() {
9618 return static_cast<uint32>(
9619 sizeof(ValueType) + ComputeDataSize()); // NOLINT
9620 }
9621
9622 void SetHeader() {
9623 header.SetCmdByTotalSize<ValueType>(ComputeSize());
9624 }
9625
9626 void Init(GLenum _target, const GLint* _mailbox) {
9627 SetHeader();
9628 target = _target;
9629 memcpy(ImmediateDataAddress(this),
9630 _mailbox, ComputeDataSize());
9631 }
9632
9633 void* Set(void* cmd, GLenum _target, const GLint* _mailbox) {
9634 static_cast<ValueType*>(cmd)->Init(_target, _mailbox);
9635 const uint32 size = ComputeSize();
9636 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9637 }
9638
9639 gpu::CommandHeader header;
9640 uint32 target;
9641 };
9642
9643 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
9644 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8);
9645 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
9646 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0);
9647 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
9648 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4);
9649
9472 struct TexImageIOSurface2DCHROMIUM { 9650 struct TexImageIOSurface2DCHROMIUM {
9473 typedef TexImageIOSurface2DCHROMIUM ValueType; 9651 typedef TexImageIOSurface2DCHROMIUM ValueType;
9474 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM; 9652 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
9475 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 9653 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9476 9654
9477 static uint32 ComputeSize() { 9655 static uint32 ComputeSize() {
9478 return static_cast<uint32>(sizeof(ValueType)); // NOLINT 9656 return static_cast<uint32>(sizeof(ValueType)); // NOLINT
9479 } 9657 }
9480 9658
9481 void SetHeader() { 9659 void SetHeader() {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
9661 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0, 9839 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0,
9662 OffsetOf_VertexAttribDivisorANGLE_header_not_0); 9840 OffsetOf_VertexAttribDivisorANGLE_header_not_0);
9663 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4, 9841 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4,
9664 OffsetOf_VertexAttribDivisorANGLE_index_not_4); 9842 OffsetOf_VertexAttribDivisorANGLE_index_not_4);
9665 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8, 9843 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8,
9666 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8); 9844 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8);
9667 9845
9668 9846
9669 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 9847 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
9670 9848
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698