OLD | NEW |
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 9695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9706 | 9706 |
9707 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12, | 9707 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12, |
9708 Sizeof_VertexAttribDivisorANGLE_is_not_12); | 9708 Sizeof_VertexAttribDivisorANGLE_is_not_12); |
9709 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0, | 9709 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0, |
9710 OffsetOf_VertexAttribDivisorANGLE_header_not_0); | 9710 OffsetOf_VertexAttribDivisorANGLE_header_not_0); |
9711 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4, | 9711 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4, |
9712 OffsetOf_VertexAttribDivisorANGLE_index_not_4); | 9712 OffsetOf_VertexAttribDivisorANGLE_index_not_4); |
9713 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8, | 9713 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8, |
9714 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8); | 9714 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8); |
9715 | 9715 |
| 9716 struct GenMailboxCHROMIUM { |
| 9717 typedef GenMailboxCHROMIUM ValueType; |
| 9718 static const CommandId kCmdId = kGenMailboxCHROMIUM; |
| 9719 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 9720 |
| 9721 typedef SizedResult<GLint> Result; |
| 9722 |
| 9723 static uint32 ComputeSize() { |
| 9724 return static_cast<uint32>(sizeof(ValueType)); // NOLINT |
| 9725 } |
| 9726 |
| 9727 void SetHeader() { |
| 9728 header.SetCmd<ValueType>(); |
| 9729 } |
| 9730 |
| 9731 void Init(GLuint _bucket_id) { |
| 9732 SetHeader(); |
| 9733 bucket_id = _bucket_id; |
| 9734 } |
| 9735 |
| 9736 void* Set(void* cmd, GLuint _bucket_id) { |
| 9737 static_cast<ValueType*>(cmd)->Init(_bucket_id); |
| 9738 return NextCmdAddress<ValueType>(cmd); |
| 9739 } |
| 9740 |
| 9741 gpu::CommandHeader header; |
| 9742 uint32 bucket_id; |
| 9743 }; |
| 9744 |
| 9745 COMPILE_ASSERT(sizeof(GenMailboxCHROMIUM) == 8, |
| 9746 Sizeof_GenMailboxCHROMIUM_is_not_8); |
| 9747 COMPILE_ASSERT(offsetof(GenMailboxCHROMIUM, header) == 0, |
| 9748 OffsetOf_GenMailboxCHROMIUM_header_not_0); |
| 9749 COMPILE_ASSERT(offsetof(GenMailboxCHROMIUM, bucket_id) == 4, |
| 9750 OffsetOf_GenMailboxCHROMIUM_bucket_id_not_4); |
| 9751 |
| 9752 struct ProduceTextureCHROMIUM { |
| 9753 typedef ProduceTextureCHROMIUM ValueType; |
| 9754 static const CommandId kCmdId = kProduceTextureCHROMIUM; |
| 9755 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 9756 |
| 9757 static uint32 ComputeSize() { |
| 9758 return static_cast<uint32>(sizeof(ValueType)); // NOLINT |
| 9759 } |
| 9760 |
| 9761 void SetHeader() { |
| 9762 header.SetCmd<ValueType>(); |
| 9763 } |
| 9764 |
| 9765 void Init( |
| 9766 GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) { |
| 9767 SetHeader(); |
| 9768 target = _target; |
| 9769 mailbox_shm_id = _mailbox_shm_id; |
| 9770 mailbox_shm_offset = _mailbox_shm_offset; |
| 9771 } |
| 9772 |
| 9773 void* Set( |
| 9774 void* cmd, GLenum _target, uint32 _mailbox_shm_id, |
| 9775 uint32 _mailbox_shm_offset) { |
| 9776 static_cast<ValueType*>( |
| 9777 cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset); |
| 9778 return NextCmdAddress<ValueType>(cmd); |
| 9779 } |
| 9780 |
| 9781 gpu::CommandHeader header; |
| 9782 uint32 target; |
| 9783 uint32 mailbox_shm_id; |
| 9784 uint32 mailbox_shm_offset; |
| 9785 }; |
| 9786 |
| 9787 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUM) == 16, |
| 9788 Sizeof_ProduceTextureCHROMIUM_is_not_16); |
| 9789 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, header) == 0, |
| 9790 OffsetOf_ProduceTextureCHROMIUM_header_not_0); |
| 9791 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, target) == 4, |
| 9792 OffsetOf_ProduceTextureCHROMIUM_target_not_4); |
| 9793 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_id) == 8, |
| 9794 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_id_not_8); |
| 9795 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUM, mailbox_shm_offset) == 12, |
| 9796 OffsetOf_ProduceTextureCHROMIUM_mailbox_shm_offset_not_12); |
| 9797 |
| 9798 struct ProduceTextureCHROMIUMImmediate { |
| 9799 typedef ProduceTextureCHROMIUMImmediate ValueType; |
| 9800 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate; |
| 9801 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 9802 |
| 9803 static uint32 ComputeDataSize() { |
| 9804 return static_cast<uint32>( |
| 9805 sizeof(GLbyte) * 64); // NOLINT |
| 9806 } |
| 9807 |
| 9808 static uint32 ComputeSize() { |
| 9809 return static_cast<uint32>( |
| 9810 sizeof(ValueType) + ComputeDataSize()); // NOLINT |
| 9811 } |
| 9812 |
| 9813 void SetHeader() { |
| 9814 header.SetCmdByTotalSize<ValueType>(ComputeSize()); |
| 9815 } |
| 9816 |
| 9817 void Init(GLenum _target, const GLbyte* _mailbox) { |
| 9818 SetHeader(); |
| 9819 target = _target; |
| 9820 memcpy(ImmediateDataAddress(this), |
| 9821 _mailbox, ComputeDataSize()); |
| 9822 } |
| 9823 |
| 9824 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { |
| 9825 static_cast<ValueType*>(cmd)->Init(_target, _mailbox); |
| 9826 const uint32 size = ComputeSize(); |
| 9827 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 9828 } |
| 9829 |
| 9830 gpu::CommandHeader header; |
| 9831 uint32 target; |
| 9832 }; |
| 9833 |
| 9834 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8, |
| 9835 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8); |
| 9836 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0, |
| 9837 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0); |
| 9838 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4, |
| 9839 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4); |
| 9840 |
| 9841 struct ConsumeTextureCHROMIUM { |
| 9842 typedef ConsumeTextureCHROMIUM ValueType; |
| 9843 static const CommandId kCmdId = kConsumeTextureCHROMIUM; |
| 9844 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 9845 |
| 9846 static uint32 ComputeSize() { |
| 9847 return static_cast<uint32>(sizeof(ValueType)); // NOLINT |
| 9848 } |
| 9849 |
| 9850 void SetHeader() { |
| 9851 header.SetCmd<ValueType>(); |
| 9852 } |
| 9853 |
| 9854 void Init( |
| 9855 GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) { |
| 9856 SetHeader(); |
| 9857 target = _target; |
| 9858 mailbox_shm_id = _mailbox_shm_id; |
| 9859 mailbox_shm_offset = _mailbox_shm_offset; |
| 9860 } |
| 9861 |
| 9862 void* Set( |
| 9863 void* cmd, GLenum _target, uint32 _mailbox_shm_id, |
| 9864 uint32 _mailbox_shm_offset) { |
| 9865 static_cast<ValueType*>( |
| 9866 cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset); |
| 9867 return NextCmdAddress<ValueType>(cmd); |
| 9868 } |
| 9869 |
| 9870 gpu::CommandHeader header; |
| 9871 uint32 target; |
| 9872 uint32 mailbox_shm_id; |
| 9873 uint32 mailbox_shm_offset; |
| 9874 }; |
| 9875 |
| 9876 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUM) == 16, |
| 9877 Sizeof_ConsumeTextureCHROMIUM_is_not_16); |
| 9878 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, header) == 0, |
| 9879 OffsetOf_ConsumeTextureCHROMIUM_header_not_0); |
| 9880 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, target) == 4, |
| 9881 OffsetOf_ConsumeTextureCHROMIUM_target_not_4); |
| 9882 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_id) == 8, |
| 9883 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_id_not_8); |
| 9884 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUM, mailbox_shm_offset) == 12, |
| 9885 OffsetOf_ConsumeTextureCHROMIUM_mailbox_shm_offset_not_12); |
| 9886 |
| 9887 struct ConsumeTextureCHROMIUMImmediate { |
| 9888 typedef ConsumeTextureCHROMIUMImmediate ValueType; |
| 9889 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate; |
| 9890 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 9891 |
| 9892 static uint32 ComputeDataSize() { |
| 9893 return static_cast<uint32>( |
| 9894 sizeof(GLbyte) * 64); // NOLINT |
| 9895 } |
| 9896 |
| 9897 static uint32 ComputeSize() { |
| 9898 return static_cast<uint32>( |
| 9899 sizeof(ValueType) + ComputeDataSize()); // NOLINT |
| 9900 } |
| 9901 |
| 9902 void SetHeader() { |
| 9903 header.SetCmdByTotalSize<ValueType>(ComputeSize()); |
| 9904 } |
| 9905 |
| 9906 void Init(GLenum _target, const GLbyte* _mailbox) { |
| 9907 SetHeader(); |
| 9908 target = _target; |
| 9909 memcpy(ImmediateDataAddress(this), |
| 9910 _mailbox, ComputeDataSize()); |
| 9911 } |
| 9912 |
| 9913 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { |
| 9914 static_cast<ValueType*>(cmd)->Init(_target, _mailbox); |
| 9915 const uint32 size = ComputeSize(); |
| 9916 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 9917 } |
| 9918 |
| 9919 gpu::CommandHeader header; |
| 9920 uint32 target; |
| 9921 }; |
| 9922 |
| 9923 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, |
| 9924 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); |
| 9925 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, |
| 9926 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); |
| 9927 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, |
| 9928 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); |
| 9929 |
9716 | 9930 |
9717 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 9931 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
9718 | 9932 |
OLD | NEW |