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

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

Issue 299043003: Adding bindless variants mailbox produce/consume (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 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 9703 matching lines...) Expand 10 before | Expand all | Expand 10 after
9714 uint32_t target; 9714 uint32_t target;
9715 }; 9715 };
9716 9716
9717 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8, 9717 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8,
9718 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8); 9718 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8);
9719 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0, 9719 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0,
9720 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0); 9720 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0);
9721 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4, 9721 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4,
9722 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4); 9722 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4);
9723 9723
9724 struct ProduceTextureBindlessCHROMIUM {
9725 typedef ProduceTextureBindlessCHROMIUM ValueType;
9726 static const CommandId kCmdId = kProduceTextureBindlessCHROMIUM;
9727 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9728 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9729
9730 static uint32_t ComputeSize() {
9731 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9732 }
9733
9734 void SetHeader() { header.SetCmd<ValueType>(); }
9735
9736 void Init(GLuint _texture,
9737 GLenum _target,
9738 uint32_t _mailbox_shm_id,
9739 uint32_t _mailbox_shm_offset) {
9740 SetHeader();
9741 texture = _texture;
9742 target = _target;
9743 mailbox_shm_id = _mailbox_shm_id;
9744 mailbox_shm_offset = _mailbox_shm_offset;
9745 }
9746
9747 void* Set(void* cmd,
9748 GLuint _texture,
9749 GLenum _target,
9750 uint32_t _mailbox_shm_id,
9751 uint32_t _mailbox_shm_offset) {
9752 static_cast<ValueType*>(cmd)
9753 ->Init(_texture, _target, _mailbox_shm_id, _mailbox_shm_offset);
9754 return NextCmdAddress<ValueType>(cmd);
9755 }
9756
9757 gpu::CommandHeader header;
9758 uint32_t texture;
9759 uint32_t target;
9760 uint32_t mailbox_shm_id;
9761 uint32_t mailbox_shm_offset;
9762 };
9763
9764 COMPILE_ASSERT(sizeof(ProduceTextureBindlessCHROMIUM) == 20,
9765 Sizeof_ProduceTextureBindlessCHROMIUM_is_not_20);
9766 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUM, header) == 0,
9767 OffsetOf_ProduceTextureBindlessCHROMIUM_header_not_0);
9768 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUM, texture) == 4,
9769 OffsetOf_ProduceTextureBindlessCHROMIUM_texture_not_4);
9770 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUM, target) == 8,
9771 OffsetOf_ProduceTextureBindlessCHROMIUM_target_not_8);
9772 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUM, mailbox_shm_id) == 12,
9773 OffsetOf_ProduceTextureBindlessCHROMIUM_mailbox_shm_id_not_12);
9774 COMPILE_ASSERT(
9775 offsetof(ProduceTextureBindlessCHROMIUM, mailbox_shm_offset) == 16,
9776 OffsetOf_ProduceTextureBindlessCHROMIUM_mailbox_shm_offset_not_16);
9777
9778 struct ProduceTextureBindlessCHROMIUMImmediate {
9779 typedef ProduceTextureBindlessCHROMIUMImmediate ValueType;
9780 static const CommandId kCmdId = kProduceTextureBindlessCHROMIUMImmediate;
9781 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9782 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9783
9784 static uint32_t ComputeDataSize() {
9785 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
9786 }
9787
9788 static uint32_t ComputeSize() {
9789 return static_cast<uint32_t>(sizeof(ValueType) +
9790 ComputeDataSize()); // NOLINT
9791 }
9792
9793 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
9794
9795 void Init(GLuint _texture, GLenum _target, const GLbyte* _mailbox) {
9796 SetHeader();
9797 texture = _texture;
9798 target = _target;
9799 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
9800 }
9801
9802 void* Set(void* cmd,
9803 GLuint _texture,
9804 GLenum _target,
9805 const GLbyte* _mailbox) {
9806 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox);
9807 const uint32_t size = ComputeSize();
9808 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9809 }
9810
9811 gpu::CommandHeader header;
9812 uint32_t texture;
9813 uint32_t target;
9814 };
9815
9816 COMPILE_ASSERT(sizeof(ProduceTextureBindlessCHROMIUMImmediate) == 12,
9817 Sizeof_ProduceTextureBindlessCHROMIUMImmediate_is_not_12);
9818 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUMImmediate, header) == 0,
9819 OffsetOf_ProduceTextureBindlessCHROMIUMImmediate_header_not_0);
9820 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUMImmediate, texture) == 4,
9821 OffsetOf_ProduceTextureBindlessCHROMIUMImmediate_texture_not_4);
9822 COMPILE_ASSERT(offsetof(ProduceTextureBindlessCHROMIUMImmediate, target) == 8,
9823 OffsetOf_ProduceTextureBindlessCHROMIUMImmediate_target_not_8);
9824
9724 struct ConsumeTextureCHROMIUM { 9825 struct ConsumeTextureCHROMIUM {
9725 typedef ConsumeTextureCHROMIUM ValueType; 9826 typedef ConsumeTextureCHROMIUM ValueType;
9726 static const CommandId kCmdId = kConsumeTextureCHROMIUM; 9827 static const CommandId kCmdId = kConsumeTextureCHROMIUM;
9727 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 9828 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9728 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); 9829 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9729 9830
9730 static uint32_t ComputeSize() { 9831 static uint32_t ComputeSize() {
9731 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 9832 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9732 } 9833 }
9733 9834
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
9801 uint32_t target; 9902 uint32_t target;
9802 }; 9903 };
9803 9904
9804 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, 9905 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8,
9805 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); 9906 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8);
9806 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, 9907 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
9807 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); 9908 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0);
9808 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, 9909 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
9809 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); 9910 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4);
9810 9911
9912 struct CreateAndConsumeTextureCHROMIUM {
9913 typedef CreateAndConsumeTextureCHROMIUM ValueType;
9914 static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUM;
9915 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9916 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9917
9918 static uint32_t ComputeSize() {
9919 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9920 }
9921
9922 void SetHeader() { header.SetCmd<ValueType>(); }
9923
9924 void Init(GLenum _target,
9925 uint32_t _mailbox_shm_id,
9926 uint32_t _mailbox_shm_offset,
9927 uint32_t _client_id) {
9928 SetHeader();
9929 target = _target;
9930 mailbox_shm_id = _mailbox_shm_id;
9931 mailbox_shm_offset = _mailbox_shm_offset;
9932 client_id = _client_id;
9933 }
9934
9935 void* Set(void* cmd,
9936 GLenum _target,
9937 uint32_t _mailbox_shm_id,
9938 uint32_t _mailbox_shm_offset,
9939 uint32_t _client_id) {
9940 static_cast<ValueType*>(cmd)
9941 ->Init(_target, _mailbox_shm_id, _mailbox_shm_offset, _client_id);
9942 return NextCmdAddress<ValueType>(cmd);
9943 }
9944
9945 gpu::CommandHeader header;
9946 uint32_t target;
9947 uint32_t mailbox_shm_id;
9948 uint32_t mailbox_shm_offset;
9949 uint32_t client_id;
9950 };
9951
9952 COMPILE_ASSERT(sizeof(CreateAndConsumeTextureCHROMIUM) == 20,
9953 Sizeof_CreateAndConsumeTextureCHROMIUM_is_not_20);
9954 COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUM, header) == 0,
9955 OffsetOf_CreateAndConsumeTextureCHROMIUM_header_not_0);
9956 COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUM, target) == 4,
9957 OffsetOf_CreateAndConsumeTextureCHROMIUM_target_not_4);
9958 COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUM, mailbox_shm_id) == 8,
9959 OffsetOf_CreateAndConsumeTextureCHROMIUM_mailbox_shm_id_not_8);
9960 COMPILE_ASSERT(
9961 offsetof(CreateAndConsumeTextureCHROMIUM, mailbox_shm_offset) == 12,
9962 OffsetOf_CreateAndConsumeTextureCHROMIUM_mailbox_shm_offset_not_12);
9963 COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUM, client_id) == 16,
9964 OffsetOf_CreateAndConsumeTextureCHROMIUM_client_id_not_16);
9965
9966 struct CreateAndConsumeTextureCHROMIUMImmediate {
9967 typedef CreateAndConsumeTextureCHROMIUMImmediate ValueType;
9968 static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUMImmediate;
9969 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
9970 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
9971
9972 static uint32_t ComputeDataSize() {
9973 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
9974 }
9975
9976 static uint32_t ComputeSize() {
9977 return static_cast<uint32_t>(sizeof(ValueType) +
9978 ComputeDataSize()); // NOLINT
9979 }
9980
9981 void SetHeader(uint32_t size_in_bytes) {
9982 header.SetCmdByTotalSize<ValueType>(size_in_bytes);
9983 }
9984
9985 void Init(GLenum _target, uint32_t _client_id, const GLbyte* _mailbox) {
9986 SetHeader(ComputeSize());
9987 target = _target;
9988 client_id = _client_id;
9989 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
9990 }
9991
9992 void* Set(void* cmd,
9993 GLenum _target,
9994 uint32_t _client_id,
9995 const GLbyte* _mailbox) {
9996 static_cast<ValueType*>(cmd)->Init(_target, _client_id, _mailbox);
9997 const uint32_t size = ComputeSize();
9998 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
9999 }
10000
10001 gpu::CommandHeader header;
10002 uint32_t target;
10003 uint32_t client_id;
10004 };
10005
10006 COMPILE_ASSERT(sizeof(CreateAndConsumeTextureCHROMIUMImmediate) == 12,
10007 Sizeof_CreateAndConsumeTextureCHROMIUMImmediate_is_not_12);
10008 COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, header) == 0,
10009 OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_header_not_0);
10010 COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, target) == 4,
10011 OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_target_not_4);
10012 COMPILE_ASSERT(
10013 offsetof(CreateAndConsumeTextureCHROMIUMImmediate, client_id) == 8,
10014 OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_client_id_not_8);
10015
9811 struct BindUniformLocationCHROMIUM { 10016 struct BindUniformLocationCHROMIUM {
9812 typedef BindUniformLocationCHROMIUM ValueType; 10017 typedef BindUniformLocationCHROMIUM ValueType;
9813 static const CommandId kCmdId = kBindUniformLocationCHROMIUM; 10018 static const CommandId kCmdId = kBindUniformLocationCHROMIUM;
9814 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 10019 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
9815 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 10020 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
9816 10021
9817 static uint32_t ComputeSize() { 10022 static uint32_t ComputeSize() {
9818 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 10023 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
9819 } 10024 }
9820 10025
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
10717 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, 10922 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32,
10718 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); 10923 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32);
10719 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, 10924 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36,
10720 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); 10925 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36);
10721 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, 10926 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40,
10722 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); 10927 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40);
10723 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, 10928 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44,
10724 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); 10929 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44);
10725 10930
10726 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 10931 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698