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 |
11 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 11 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
12 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 12 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
13 | 13 |
14 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 | |
15 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 | 14 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 |
16 | 15 |
17 struct ActiveTexture { | 16 struct ActiveTexture { |
18 typedef ActiveTexture ValueType; | 17 typedef ActiveTexture ValueType; |
19 static const CommandId kCmdId = kActiveTexture; | 18 static const CommandId kCmdId = kActiveTexture; |
20 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 19 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
21 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 20 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
22 | 21 |
23 static uint32_t ComputeSize() { | 22 static uint32_t ComputeSize() { |
24 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 23 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 gpu::CommandHeader header; | 1162 gpu::CommandHeader header; |
1164 int32_t s; | 1163 int32_t s; |
1165 }; | 1164 }; |
1166 | 1165 |
1167 static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8"); | 1166 static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8"); |
1168 static_assert(offsetof(ClearStencil, header) == 0, | 1167 static_assert(offsetof(ClearStencil, header) == 0, |
1169 "offset of ClearStencil header should be 0"); | 1168 "offset of ClearStencil header should be 0"); |
1170 static_assert(offsetof(ClearStencil, s) == 4, | 1169 static_assert(offsetof(ClearStencil, s) == 4, |
1171 "offset of ClearStencil s should be 4"); | 1170 "offset of ClearStencil s should be 4"); |
1172 | 1171 |
1173 struct ClientWaitSync { | |
1174 typedef ClientWaitSync ValueType; | |
1175 static const CommandId kCmdId = kClientWaitSync; | |
1176 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
1177 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
1178 | |
1179 typedef GLenum Result; | |
1180 | |
1181 static uint32_t ComputeSize() { | |
1182 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
1183 } | |
1184 | |
1185 void SetHeader() { header.SetCmd<ValueType>(); } | |
1186 | |
1187 void Init(GLuint _sync, | |
1188 GLbitfield _flags, | |
1189 GLuint _timeout_0, | |
1190 GLuint _timeout_1, | |
1191 uint32_t _result_shm_id, | |
1192 uint32_t _result_shm_offset) { | |
1193 SetHeader(); | |
1194 sync = _sync; | |
1195 flags = _flags; | |
1196 timeout_0 = _timeout_0; | |
1197 timeout_1 = _timeout_1; | |
1198 result_shm_id = _result_shm_id; | |
1199 result_shm_offset = _result_shm_offset; | |
1200 } | |
1201 | |
1202 void* Set(void* cmd, | |
1203 GLuint _sync, | |
1204 GLbitfield _flags, | |
1205 GLuint _timeout_0, | |
1206 GLuint _timeout_1, | |
1207 uint32_t _result_shm_id, | |
1208 uint32_t _result_shm_offset) { | |
1209 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1, | |
1210 _result_shm_id, _result_shm_offset); | |
1211 return NextCmdAddress<ValueType>(cmd); | |
1212 } | |
1213 | |
1214 gpu::CommandHeader header; | |
1215 uint32_t sync; | |
1216 uint32_t flags; | |
1217 uint32_t timeout_0; | |
1218 uint32_t timeout_1; | |
1219 uint32_t result_shm_id; | |
1220 uint32_t result_shm_offset; | |
1221 }; | |
1222 | |
1223 static_assert(sizeof(ClientWaitSync) == 28, | |
1224 "size of ClientWaitSync should be 28"); | |
1225 static_assert(offsetof(ClientWaitSync, header) == 0, | |
1226 "offset of ClientWaitSync header should be 0"); | |
1227 static_assert(offsetof(ClientWaitSync, sync) == 4, | |
1228 "offset of ClientWaitSync sync should be 4"); | |
1229 static_assert(offsetof(ClientWaitSync, flags) == 8, | |
1230 "offset of ClientWaitSync flags should be 8"); | |
1231 static_assert(offsetof(ClientWaitSync, timeout_0) == 12, | |
1232 "offset of ClientWaitSync timeout_0 should be 12"); | |
1233 static_assert(offsetof(ClientWaitSync, timeout_1) == 16, | |
1234 "offset of ClientWaitSync timeout_1 should be 16"); | |
1235 static_assert(offsetof(ClientWaitSync, result_shm_id) == 20, | |
1236 "offset of ClientWaitSync result_shm_id should be 20"); | |
1237 static_assert(offsetof(ClientWaitSync, result_shm_offset) == 24, | |
1238 "offset of ClientWaitSync result_shm_offset should be 24"); | |
1239 | |
1240 struct ColorMask { | 1172 struct ColorMask { |
1241 typedef ColorMask ValueType; | 1173 typedef ColorMask ValueType; |
1242 static const CommandId kCmdId = kColorMask; | 1174 static const CommandId kCmdId = kColorMask; |
1243 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1175 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1244 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1176 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1245 | 1177 |
1246 static uint32_t ComputeSize() { | 1178 static uint32_t ComputeSize() { |
1247 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1179 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1248 } | 1180 } |
1249 | 1181 |
(...skipping 8597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9847 static_assert(sizeof(Viewport) == 20, "size of Viewport should be 20"); | 9779 static_assert(sizeof(Viewport) == 20, "size of Viewport should be 20"); |
9848 static_assert(offsetof(Viewport, header) == 0, | 9780 static_assert(offsetof(Viewport, header) == 0, |
9849 "offset of Viewport header should be 0"); | 9781 "offset of Viewport header should be 0"); |
9850 static_assert(offsetof(Viewport, x) == 4, "offset of Viewport x should be 4"); | 9782 static_assert(offsetof(Viewport, x) == 4, "offset of Viewport x should be 4"); |
9851 static_assert(offsetof(Viewport, y) == 8, "offset of Viewport y should be 8"); | 9783 static_assert(offsetof(Viewport, y) == 8, "offset of Viewport y should be 8"); |
9852 static_assert(offsetof(Viewport, width) == 12, | 9784 static_assert(offsetof(Viewport, width) == 12, |
9853 "offset of Viewport width should be 12"); | 9785 "offset of Viewport width should be 12"); |
9854 static_assert(offsetof(Viewport, height) == 16, | 9786 static_assert(offsetof(Viewport, height) == 16, |
9855 "offset of Viewport height should be 16"); | 9787 "offset of Viewport height should be 16"); |
9856 | 9788 |
9857 struct WaitSync { | |
9858 typedef WaitSync ValueType; | |
9859 static const CommandId kCmdId = kWaitSync; | |
9860 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
9861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
9862 | |
9863 static uint32_t ComputeSize() { | |
9864 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
9865 } | |
9866 | |
9867 void SetHeader() { header.SetCmd<ValueType>(); } | |
9868 | |
9869 void Init(GLuint _sync, | |
9870 GLbitfield _flags, | |
9871 GLuint _timeout_0, | |
9872 GLuint _timeout_1) { | |
9873 SetHeader(); | |
9874 sync = _sync; | |
9875 flags = _flags; | |
9876 timeout_0 = _timeout_0; | |
9877 timeout_1 = _timeout_1; | |
9878 } | |
9879 | |
9880 void* Set(void* cmd, | |
9881 GLuint _sync, | |
9882 GLbitfield _flags, | |
9883 GLuint _timeout_0, | |
9884 GLuint _timeout_1) { | |
9885 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1); | |
9886 return NextCmdAddress<ValueType>(cmd); | |
9887 } | |
9888 | |
9889 gpu::CommandHeader header; | |
9890 uint32_t sync; | |
9891 uint32_t flags; | |
9892 uint32_t timeout_0; | |
9893 uint32_t timeout_1; | |
9894 }; | |
9895 | |
9896 static_assert(sizeof(WaitSync) == 20, "size of WaitSync should be 20"); | |
9897 static_assert(offsetof(WaitSync, header) == 0, | |
9898 "offset of WaitSync header should be 0"); | |
9899 static_assert(offsetof(WaitSync, sync) == 4, | |
9900 "offset of WaitSync sync should be 4"); | |
9901 static_assert(offsetof(WaitSync, flags) == 8, | |
9902 "offset of WaitSync flags should be 8"); | |
9903 static_assert(offsetof(WaitSync, timeout_0) == 12, | |
9904 "offset of WaitSync timeout_0 should be 12"); | |
9905 static_assert(offsetof(WaitSync, timeout_1) == 16, | |
9906 "offset of WaitSync timeout_1 should be 16"); | |
9907 | |
9908 struct BlitFramebufferCHROMIUM { | 9789 struct BlitFramebufferCHROMIUM { |
9909 typedef BlitFramebufferCHROMIUM ValueType; | 9790 typedef BlitFramebufferCHROMIUM ValueType; |
9910 static const CommandId kCmdId = kBlitFramebufferCHROMIUM; | 9791 static const CommandId kCmdId = kBlitFramebufferCHROMIUM; |
9911 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9792 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9912 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 9793 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
9913 | 9794 |
9914 static uint32_t ComputeSize() { | 9795 static uint32_t ComputeSize() { |
9915 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9796 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9916 } | 9797 } |
9917 | 9798 |
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12806 | 12687 |
12807 gpu::CommandHeader header; | 12688 gpu::CommandHeader header; |
12808 }; | 12689 }; |
12809 | 12690 |
12810 static_assert(sizeof(BlendBarrierKHR) == 4, | 12691 static_assert(sizeof(BlendBarrierKHR) == 4, |
12811 "size of BlendBarrierKHR should be 4"); | 12692 "size of BlendBarrierKHR should be 4"); |
12812 static_assert(offsetof(BlendBarrierKHR, header) == 0, | 12693 static_assert(offsetof(BlendBarrierKHR, header) == 0, |
12813 "offset of BlendBarrierKHR header should be 0"); | 12694 "offset of BlendBarrierKHR header should be 0"); |
12814 | 12695 |
12815 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 12696 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |