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 |
14 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 | 15 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 |
15 | 16 |
16 struct ActiveTexture { | 17 struct ActiveTexture { |
17 typedef ActiveTexture ValueType; | 18 typedef ActiveTexture ValueType; |
18 static const CommandId kCmdId = kActiveTexture; | 19 static const CommandId kCmdId = kActiveTexture; |
19 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 20 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
20 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 21 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
21 | 22 |
22 static uint32_t ComputeSize() { | 23 static uint32_t ComputeSize() { |
23 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 24 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 gpu::CommandHeader header; | 1163 gpu::CommandHeader header; |
1163 int32_t s; | 1164 int32_t s; |
1164 }; | 1165 }; |
1165 | 1166 |
1166 static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8"); | 1167 static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8"); |
1167 static_assert(offsetof(ClearStencil, header) == 0, | 1168 static_assert(offsetof(ClearStencil, header) == 0, |
1168 "offset of ClearStencil header should be 0"); | 1169 "offset of ClearStencil header should be 0"); |
1169 static_assert(offsetof(ClearStencil, s) == 4, | 1170 static_assert(offsetof(ClearStencil, s) == 4, |
1170 "offset of ClearStencil s should be 4"); | 1171 "offset of ClearStencil s should be 4"); |
1171 | 1172 |
| 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 |
1172 struct ColorMask { | 1240 struct ColorMask { |
1173 typedef ColorMask ValueType; | 1241 typedef ColorMask ValueType; |
1174 static const CommandId kCmdId = kColorMask; | 1242 static const CommandId kCmdId = kColorMask; |
1175 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1243 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1176 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1244 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1177 | 1245 |
1178 static uint32_t ComputeSize() { | 1246 static uint32_t ComputeSize() { |
1179 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1247 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1180 } | 1248 } |
1181 | 1249 |
(...skipping 11505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12687 | 12755 |
12688 gpu::CommandHeader header; | 12756 gpu::CommandHeader header; |
12689 }; | 12757 }; |
12690 | 12758 |
12691 static_assert(sizeof(BlendBarrierKHR) == 4, | 12759 static_assert(sizeof(BlendBarrierKHR) == 4, |
12692 "size of BlendBarrierKHR should be 4"); | 12760 "size of BlendBarrierKHR should be 4"); |
12693 static_assert(offsetof(BlendBarrierKHR, header) == 0, | 12761 static_assert(offsetof(BlendBarrierKHR, header) == 0, |
12694 "offset of BlendBarrierKHR header should be 0"); | 12762 "offset of BlendBarrierKHR header should be 0"); |
12695 | 12763 |
12696 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 12764 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |