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 |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 typedef GLenum Result; | 1179 typedef GLenum Result; |
1180 | 1180 |
1181 static uint32_t ComputeSize() { | 1181 static uint32_t ComputeSize() { |
1182 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1182 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1183 } | 1183 } |
1184 | 1184 |
1185 void SetHeader() { header.SetCmd<ValueType>(); } | 1185 void SetHeader() { header.SetCmd<ValueType>(); } |
1186 | 1186 |
1187 void Init(GLuint _sync, | 1187 void Init(GLuint _sync, |
1188 GLbitfield _flags, | 1188 GLbitfield _flags, |
1189 GLuint _timeout_0, | 1189 GLuint64 _timeout, |
1190 GLuint _timeout_1, | |
1191 uint32_t _result_shm_id, | 1190 uint32_t _result_shm_id, |
1192 uint32_t _result_shm_offset) { | 1191 uint32_t _result_shm_offset) { |
1193 SetHeader(); | 1192 SetHeader(); |
1194 sync = _sync; | 1193 sync = _sync; |
1195 flags = _flags; | 1194 flags = _flags; |
1196 timeout_0 = _timeout_0; | 1195 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_timeout), &timeout_0, |
1197 timeout_1 = _timeout_1; | 1196 &timeout_1); |
1198 result_shm_id = _result_shm_id; | 1197 result_shm_id = _result_shm_id; |
1199 result_shm_offset = _result_shm_offset; | 1198 result_shm_offset = _result_shm_offset; |
1200 } | 1199 } |
1201 | 1200 |
1202 void* Set(void* cmd, | 1201 void* Set(void* cmd, |
1203 GLuint _sync, | 1202 GLuint _sync, |
1204 GLbitfield _flags, | 1203 GLbitfield _flags, |
1205 GLuint _timeout_0, | 1204 GLuint64 _timeout, |
1206 GLuint _timeout_1, | |
1207 uint32_t _result_shm_id, | 1205 uint32_t _result_shm_id, |
1208 uint32_t _result_shm_offset) { | 1206 uint32_t _result_shm_offset) { |
1209 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1, | 1207 static_cast<ValueType*>(cmd) |
1210 _result_shm_id, _result_shm_offset); | 1208 ->Init(_sync, _flags, _timeout, _result_shm_id, _result_shm_offset); |
1211 return NextCmdAddress<ValueType>(cmd); | 1209 return NextCmdAddress<ValueType>(cmd); |
1212 } | 1210 } |
1213 | 1211 |
| 1212 GLuint64 timeout() const { |
| 1213 return static_cast<GLuint64>( |
| 1214 GLES2Util::MapTwoUint32ToUint64(timeout_0, timeout_1)); |
| 1215 } |
| 1216 |
1214 gpu::CommandHeader header; | 1217 gpu::CommandHeader header; |
1215 uint32_t sync; | 1218 uint32_t sync; |
1216 uint32_t flags; | 1219 uint32_t flags; |
1217 uint32_t timeout_0; | 1220 uint32_t timeout_0; |
1218 uint32_t timeout_1; | 1221 uint32_t timeout_1; |
1219 uint32_t result_shm_id; | 1222 uint32_t result_shm_id; |
1220 uint32_t result_shm_offset; | 1223 uint32_t result_shm_offset; |
1221 }; | 1224 }; |
1222 | 1225 |
1223 static_assert(sizeof(ClientWaitSync) == 28, | 1226 static_assert(sizeof(ClientWaitSync) == 28, |
(...skipping 9418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10642 static const CommandId kCmdId = kWaitSync; | 10645 static const CommandId kCmdId = kWaitSync; |
10643 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10646 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10644 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 10647 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
10645 | 10648 |
10646 static uint32_t ComputeSize() { | 10649 static uint32_t ComputeSize() { |
10647 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10650 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10648 } | 10651 } |
10649 | 10652 |
10650 void SetHeader() { header.SetCmd<ValueType>(); } | 10653 void SetHeader() { header.SetCmd<ValueType>(); } |
10651 | 10654 |
10652 void Init(GLuint _sync, | 10655 void Init(GLuint _sync, GLbitfield _flags, GLuint64 _timeout) { |
10653 GLbitfield _flags, | |
10654 GLuint _timeout_0, | |
10655 GLuint _timeout_1) { | |
10656 SetHeader(); | 10656 SetHeader(); |
10657 sync = _sync; | 10657 sync = _sync; |
10658 flags = _flags; | 10658 flags = _flags; |
10659 timeout_0 = _timeout_0; | 10659 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_timeout), &timeout_0, |
10660 timeout_1 = _timeout_1; | 10660 &timeout_1); |
10661 } | 10661 } |
10662 | 10662 |
10663 void* Set(void* cmd, | 10663 void* Set(void* cmd, GLuint _sync, GLbitfield _flags, GLuint64 _timeout) { |
10664 GLuint _sync, | 10664 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout); |
10665 GLbitfield _flags, | |
10666 GLuint _timeout_0, | |
10667 GLuint _timeout_1) { | |
10668 static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout_0, _timeout_1); | |
10669 return NextCmdAddress<ValueType>(cmd); | 10665 return NextCmdAddress<ValueType>(cmd); |
10670 } | 10666 } |
10671 | 10667 |
| 10668 GLuint64 timeout() const { |
| 10669 return static_cast<GLuint64>( |
| 10670 GLES2Util::MapTwoUint32ToUint64(timeout_0, timeout_1)); |
| 10671 } |
| 10672 |
10672 gpu::CommandHeader header; | 10673 gpu::CommandHeader header; |
10673 uint32_t sync; | 10674 uint32_t sync; |
10674 uint32_t flags; | 10675 uint32_t flags; |
10675 uint32_t timeout_0; | 10676 uint32_t timeout_0; |
10676 uint32_t timeout_1; | 10677 uint32_t timeout_1; |
10677 }; | 10678 }; |
10678 | 10679 |
10679 static_assert(sizeof(WaitSync) == 20, "size of WaitSync should be 20"); | 10680 static_assert(sizeof(WaitSync) == 20, "size of WaitSync should be 20"); |
10680 static_assert(offsetof(WaitSync, header) == 0, | 10681 static_assert(offsetof(WaitSync, header) == 0, |
10681 "offset of WaitSync header should be 0"); | 10682 "offset of WaitSync header should be 0"); |
(...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13497 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 13498 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
13498 | 13499 |
13499 static uint32_t ComputeSize() { | 13500 static uint32_t ComputeSize() { |
13500 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 13501 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
13501 } | 13502 } |
13502 | 13503 |
13503 void SetHeader() { header.SetCmd<ValueType>(); } | 13504 void SetHeader() { header.SetCmd<ValueType>(); } |
13504 | 13505 |
13505 void Init(GLuint64 _release_count) { | 13506 void Init(GLuint64 _release_count) { |
13506 SetHeader(); | 13507 SetHeader(); |
13507 release_count = _release_count; | 13508 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_release_count), |
| 13509 &release_count_0, &release_count_1); |
13508 } | 13510 } |
13509 | 13511 |
13510 void* Set(void* cmd, GLuint64 _release_count) { | 13512 void* Set(void* cmd, GLuint64 _release_count) { |
13511 static_cast<ValueType*>(cmd)->Init(_release_count); | 13513 static_cast<ValueType*>(cmd)->Init(_release_count); |
13512 return NextCmdAddress<ValueType>(cmd); | 13514 return NextCmdAddress<ValueType>(cmd); |
13513 } | 13515 } |
13514 | 13516 |
| 13517 GLuint64 release_count() const { |
| 13518 return static_cast<GLuint64>( |
| 13519 GLES2Util::MapTwoUint32ToUint64(release_count_0, release_count_1)); |
| 13520 } |
| 13521 |
13515 gpu::CommandHeader header; | 13522 gpu::CommandHeader header; |
13516 uint32_t release_count; | 13523 uint32_t release_count_0; |
| 13524 uint32_t release_count_1; |
13517 }; | 13525 }; |
13518 | 13526 |
13519 static_assert(sizeof(InsertFenceSyncCHROMIUM) == 8, | 13527 static_assert(sizeof(InsertFenceSyncCHROMIUM) == 12, |
13520 "size of InsertFenceSyncCHROMIUM should be 8"); | 13528 "size of InsertFenceSyncCHROMIUM should be 12"); |
13521 static_assert(offsetof(InsertFenceSyncCHROMIUM, header) == 0, | 13529 static_assert(offsetof(InsertFenceSyncCHROMIUM, header) == 0, |
13522 "offset of InsertFenceSyncCHROMIUM header should be 0"); | 13530 "offset of InsertFenceSyncCHROMIUM header should be 0"); |
13523 static_assert(offsetof(InsertFenceSyncCHROMIUM, release_count) == 4, | 13531 static_assert(offsetof(InsertFenceSyncCHROMIUM, release_count_0) == 4, |
13524 "offset of InsertFenceSyncCHROMIUM release_count should be 4"); | 13532 "offset of InsertFenceSyncCHROMIUM release_count_0 should be 4"); |
| 13533 static_assert(offsetof(InsertFenceSyncCHROMIUM, release_count_1) == 8, |
| 13534 "offset of InsertFenceSyncCHROMIUM release_count_1 should be 8"); |
13525 | 13535 |
13526 struct GenSyncTokenCHROMIUMImmediate { | 13536 struct GenSyncTokenCHROMIUMImmediate { |
13527 typedef GenSyncTokenCHROMIUMImmediate ValueType; | 13537 typedef GenSyncTokenCHROMIUMImmediate ValueType; |
13528 static const CommandId kCmdId = kGenSyncTokenCHROMIUMImmediate; | 13538 static const CommandId kCmdId = kGenSyncTokenCHROMIUMImmediate; |
13529 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 13539 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
13530 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 13540 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
13531 | 13541 |
13532 static uint32_t ComputeSize(uint32_t size_in_bytes) { | 13542 static uint32_t ComputeSize(uint32_t size_in_bytes) { |
13533 return static_cast<uint32_t>(sizeof(ValueType) + // NOLINT | 13543 return static_cast<uint32_t>(sizeof(ValueType) + // NOLINT |
13534 RoundSizeToMultipleOfEntries(size_in_bytes)); | 13544 RoundSizeToMultipleOfEntries(size_in_bytes)); |
13535 } | 13545 } |
13536 | 13546 |
13537 void SetHeader(uint32_t size_in_bytes) { | 13547 void SetHeader(uint32_t size_in_bytes) { |
13538 header.SetCmdByTotalSize<ValueType>(size_in_bytes); | 13548 header.SetCmdByTotalSize<ValueType>(size_in_bytes); |
13539 } | 13549 } |
13540 | 13550 |
13541 void Init(GLuint64 _fence_sync) { | 13551 void Init(GLuint64 _fence_sync) { |
13542 uint32_t total_size = 0; // WARNING: compute correct size. | 13552 uint32_t total_size = 0; // WARNING: compute correct size. |
13543 SetHeader(total_size); | 13553 SetHeader(total_size); |
13544 fence_sync = _fence_sync; | 13554 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_fence_sync), |
| 13555 &fence_sync_0, &fence_sync_1); |
13545 } | 13556 } |
13546 | 13557 |
13547 void* Set(void* cmd, GLuint64 _fence_sync) { | 13558 void* Set(void* cmd, GLuint64 _fence_sync) { |
13548 uint32_t total_size = 0; // WARNING: compute correct size. | 13559 uint32_t total_size = 0; // WARNING: compute correct size. |
13549 static_cast<ValueType*>(cmd)->Init(_fence_sync); | 13560 static_cast<ValueType*>(cmd)->Init(_fence_sync); |
13550 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); | 13561 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); |
13551 } | 13562 } |
13552 | 13563 |
| 13564 GLuint64 fence_sync() const { |
| 13565 return static_cast<GLuint64>( |
| 13566 GLES2Util::MapTwoUint32ToUint64(fence_sync_0, fence_sync_1)); |
| 13567 } |
| 13568 |
13553 gpu::CommandHeader header; | 13569 gpu::CommandHeader header; |
13554 uint32_t fence_sync; | 13570 uint32_t fence_sync_0; |
| 13571 uint32_t fence_sync_1; |
13555 }; | 13572 }; |
13556 | 13573 |
13557 static_assert(sizeof(GenSyncTokenCHROMIUMImmediate) == 8, | 13574 static_assert(sizeof(GenSyncTokenCHROMIUMImmediate) == 12, |
13558 "size of GenSyncTokenCHROMIUMImmediate should be 8"); | 13575 "size of GenSyncTokenCHROMIUMImmediate should be 12"); |
13559 static_assert(offsetof(GenSyncTokenCHROMIUMImmediate, header) == 0, | 13576 static_assert(offsetof(GenSyncTokenCHROMIUMImmediate, header) == 0, |
13560 "offset of GenSyncTokenCHROMIUMImmediate header should be 0"); | 13577 "offset of GenSyncTokenCHROMIUMImmediate header should be 0"); |
13561 static_assert(offsetof(GenSyncTokenCHROMIUMImmediate, fence_sync) == 4, | 13578 static_assert( |
13562 "offset of GenSyncTokenCHROMIUMImmediate fence_sync should be 4"); | 13579 offsetof(GenSyncTokenCHROMIUMImmediate, fence_sync_0) == 4, |
| 13580 "offset of GenSyncTokenCHROMIUMImmediate fence_sync_0 should be 4"); |
| 13581 static_assert( |
| 13582 offsetof(GenSyncTokenCHROMIUMImmediate, fence_sync_1) == 8, |
| 13583 "offset of GenSyncTokenCHROMIUMImmediate fence_sync_1 should be 8"); |
13563 | 13584 |
13564 struct GenUnverifiedSyncTokenCHROMIUMImmediate { | 13585 struct GenUnverifiedSyncTokenCHROMIUMImmediate { |
13565 typedef GenUnverifiedSyncTokenCHROMIUMImmediate ValueType; | 13586 typedef GenUnverifiedSyncTokenCHROMIUMImmediate ValueType; |
13566 static const CommandId kCmdId = kGenUnverifiedSyncTokenCHROMIUMImmediate; | 13587 static const CommandId kCmdId = kGenUnverifiedSyncTokenCHROMIUMImmediate; |
13567 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 13588 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
13568 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 13589 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
13569 | 13590 |
13570 static uint32_t ComputeSize(uint32_t size_in_bytes) { | 13591 static uint32_t ComputeSize(uint32_t size_in_bytes) { |
13571 return static_cast<uint32_t>(sizeof(ValueType) + // NOLINT | 13592 return static_cast<uint32_t>(sizeof(ValueType) + // NOLINT |
13572 RoundSizeToMultipleOfEntries(size_in_bytes)); | 13593 RoundSizeToMultipleOfEntries(size_in_bytes)); |
13573 } | 13594 } |
13574 | 13595 |
13575 void SetHeader(uint32_t size_in_bytes) { | 13596 void SetHeader(uint32_t size_in_bytes) { |
13576 header.SetCmdByTotalSize<ValueType>(size_in_bytes); | 13597 header.SetCmdByTotalSize<ValueType>(size_in_bytes); |
13577 } | 13598 } |
13578 | 13599 |
13579 void Init(GLuint64 _fence_sync) { | 13600 void Init(GLuint64 _fence_sync) { |
13580 uint32_t total_size = 0; // WARNING: compute correct size. | 13601 uint32_t total_size = 0; // WARNING: compute correct size. |
13581 SetHeader(total_size); | 13602 SetHeader(total_size); |
13582 fence_sync = _fence_sync; | 13603 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_fence_sync), |
| 13604 &fence_sync_0, &fence_sync_1); |
13583 } | 13605 } |
13584 | 13606 |
13585 void* Set(void* cmd, GLuint64 _fence_sync) { | 13607 void* Set(void* cmd, GLuint64 _fence_sync) { |
13586 uint32_t total_size = 0; // WARNING: compute correct size. | 13608 uint32_t total_size = 0; // WARNING: compute correct size. |
13587 static_cast<ValueType*>(cmd)->Init(_fence_sync); | 13609 static_cast<ValueType*>(cmd)->Init(_fence_sync); |
13588 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); | 13610 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); |
13589 } | 13611 } |
13590 | 13612 |
| 13613 GLuint64 fence_sync() const { |
| 13614 return static_cast<GLuint64>( |
| 13615 GLES2Util::MapTwoUint32ToUint64(fence_sync_0, fence_sync_1)); |
| 13616 } |
| 13617 |
13591 gpu::CommandHeader header; | 13618 gpu::CommandHeader header; |
13592 uint32_t fence_sync; | 13619 uint32_t fence_sync_0; |
| 13620 uint32_t fence_sync_1; |
13593 }; | 13621 }; |
13594 | 13622 |
13595 static_assert(sizeof(GenUnverifiedSyncTokenCHROMIUMImmediate) == 8, | 13623 static_assert(sizeof(GenUnverifiedSyncTokenCHROMIUMImmediate) == 12, |
13596 "size of GenUnverifiedSyncTokenCHROMIUMImmediate should be 8"); | 13624 "size of GenUnverifiedSyncTokenCHROMIUMImmediate should be 12"); |
13597 static_assert( | 13625 static_assert( |
13598 offsetof(GenUnverifiedSyncTokenCHROMIUMImmediate, header) == 0, | 13626 offsetof(GenUnverifiedSyncTokenCHROMIUMImmediate, header) == 0, |
13599 "offset of GenUnverifiedSyncTokenCHROMIUMImmediate header should be 0"); | 13627 "offset of GenUnverifiedSyncTokenCHROMIUMImmediate header should be 0"); |
13600 static_assert( | 13628 static_assert(offsetof(GenUnverifiedSyncTokenCHROMIUMImmediate, fence_sync_0) == |
13601 offsetof(GenUnverifiedSyncTokenCHROMIUMImmediate, fence_sync) == 4, | 13629 4, |
13602 "offset of GenUnverifiedSyncTokenCHROMIUMImmediate fence_sync should be 4"); | 13630 "offset of GenUnverifiedSyncTokenCHROMIUMImmediate fence_sync_0 " |
| 13631 "should be 4"); |
| 13632 static_assert(offsetof(GenUnverifiedSyncTokenCHROMIUMImmediate, fence_sync_1) == |
| 13633 8, |
| 13634 "offset of GenUnverifiedSyncTokenCHROMIUMImmediate fence_sync_1 " |
| 13635 "should be 8"); |
13603 | 13636 |
13604 struct VerifySyncTokensCHROMIUMImmediate { | 13637 struct VerifySyncTokensCHROMIUMImmediate { |
13605 typedef VerifySyncTokensCHROMIUMImmediate ValueType; | 13638 typedef VerifySyncTokensCHROMIUMImmediate ValueType; |
13606 static const CommandId kCmdId = kVerifySyncTokensCHROMIUMImmediate; | 13639 static const CommandId kCmdId = kVerifySyncTokensCHROMIUMImmediate; |
13607 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 13640 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
13608 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 13641 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
13609 | 13642 |
13610 static uint32_t ComputeSize(uint32_t size_in_bytes) { | 13643 static uint32_t ComputeSize(uint32_t size_in_bytes) { |
13611 return static_cast<uint32_t>(sizeof(ValueType) + // NOLINT | 13644 return static_cast<uint32_t>(sizeof(ValueType) + // NOLINT |
13612 RoundSizeToMultipleOfEntries(size_in_bytes)); | 13645 RoundSizeToMultipleOfEntries(size_in_bytes)); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13649 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 13682 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
13650 } | 13683 } |
13651 | 13684 |
13652 void SetHeader() { header.SetCmd<ValueType>(); } | 13685 void SetHeader() { header.SetCmd<ValueType>(); } |
13653 | 13686 |
13654 void Init(GLint _namespace_id, | 13687 void Init(GLint _namespace_id, |
13655 GLuint64 _command_buffer_id, | 13688 GLuint64 _command_buffer_id, |
13656 GLuint64 _release_count) { | 13689 GLuint64 _release_count) { |
13657 SetHeader(); | 13690 SetHeader(); |
13658 namespace_id = _namespace_id; | 13691 namespace_id = _namespace_id; |
13659 command_buffer_id = _command_buffer_id; | 13692 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_command_buffer_id), |
13660 release_count = _release_count; | 13693 &command_buffer_id_0, &command_buffer_id_1); |
| 13694 GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_release_count), |
| 13695 &release_count_0, &release_count_1); |
13661 } | 13696 } |
13662 | 13697 |
13663 void* Set(void* cmd, | 13698 void* Set(void* cmd, |
13664 GLint _namespace_id, | 13699 GLint _namespace_id, |
13665 GLuint64 _command_buffer_id, | 13700 GLuint64 _command_buffer_id, |
13666 GLuint64 _release_count) { | 13701 GLuint64 _release_count) { |
13667 static_cast<ValueType*>(cmd) | 13702 static_cast<ValueType*>(cmd) |
13668 ->Init(_namespace_id, _command_buffer_id, _release_count); | 13703 ->Init(_namespace_id, _command_buffer_id, _release_count); |
13669 return NextCmdAddress<ValueType>(cmd); | 13704 return NextCmdAddress<ValueType>(cmd); |
13670 } | 13705 } |
13671 | 13706 |
| 13707 GLuint64 command_buffer_id() const { |
| 13708 return static_cast<GLuint64>(GLES2Util::MapTwoUint32ToUint64( |
| 13709 command_buffer_id_0, command_buffer_id_1)); |
| 13710 } |
| 13711 |
| 13712 GLuint64 release_count() const { |
| 13713 return static_cast<GLuint64>( |
| 13714 GLES2Util::MapTwoUint32ToUint64(release_count_0, release_count_1)); |
| 13715 } |
| 13716 |
13672 gpu::CommandHeader header; | 13717 gpu::CommandHeader header; |
13673 int32_t namespace_id; | 13718 int32_t namespace_id; |
13674 uint32_t command_buffer_id; | 13719 uint32_t command_buffer_id_0; |
13675 uint32_t release_count; | 13720 uint32_t command_buffer_id_1; |
| 13721 uint32_t release_count_0; |
| 13722 uint32_t release_count_1; |
13676 }; | 13723 }; |
13677 | 13724 |
13678 static_assert(sizeof(WaitSyncTokenCHROMIUM) == 16, | 13725 static_assert(sizeof(WaitSyncTokenCHROMIUM) == 24, |
13679 "size of WaitSyncTokenCHROMIUM should be 16"); | 13726 "size of WaitSyncTokenCHROMIUM should be 24"); |
13680 static_assert(offsetof(WaitSyncTokenCHROMIUM, header) == 0, | 13727 static_assert(offsetof(WaitSyncTokenCHROMIUM, header) == 0, |
13681 "offset of WaitSyncTokenCHROMIUM header should be 0"); | 13728 "offset of WaitSyncTokenCHROMIUM header should be 0"); |
13682 static_assert(offsetof(WaitSyncTokenCHROMIUM, namespace_id) == 4, | 13729 static_assert(offsetof(WaitSyncTokenCHROMIUM, namespace_id) == 4, |
13683 "offset of WaitSyncTokenCHROMIUM namespace_id should be 4"); | 13730 "offset of WaitSyncTokenCHROMIUM namespace_id should be 4"); |
13684 static_assert(offsetof(WaitSyncTokenCHROMIUM, command_buffer_id) == 8, | 13731 static_assert( |
13685 "offset of WaitSyncTokenCHROMIUM command_buffer_id should be 8"); | 13732 offsetof(WaitSyncTokenCHROMIUM, command_buffer_id_0) == 8, |
13686 static_assert(offsetof(WaitSyncTokenCHROMIUM, release_count) == 12, | 13733 "offset of WaitSyncTokenCHROMIUM command_buffer_id_0 should be 8"); |
13687 "offset of WaitSyncTokenCHROMIUM release_count should be 12"); | 13734 static_assert( |
| 13735 offsetof(WaitSyncTokenCHROMIUM, command_buffer_id_1) == 12, |
| 13736 "offset of WaitSyncTokenCHROMIUM command_buffer_id_1 should be 12"); |
| 13737 static_assert(offsetof(WaitSyncTokenCHROMIUM, release_count_0) == 16, |
| 13738 "offset of WaitSyncTokenCHROMIUM release_count_0 should be 16"); |
| 13739 static_assert(offsetof(WaitSyncTokenCHROMIUM, release_count_1) == 20, |
| 13740 "offset of WaitSyncTokenCHROMIUM release_count_1 should be 20"); |
13688 | 13741 |
13689 struct DrawBuffersEXTImmediate { | 13742 struct DrawBuffersEXTImmediate { |
13690 typedef DrawBuffersEXTImmediate ValueType; | 13743 typedef DrawBuffersEXTImmediate ValueType; |
13691 static const CommandId kCmdId = kDrawBuffersEXTImmediate; | 13744 static const CommandId kCmdId = kDrawBuffersEXTImmediate; |
13692 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 13745 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
13693 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 13746 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
13694 | 13747 |
13695 static uint32_t ComputeDataSize(GLsizei count) { | 13748 static uint32_t ComputeDataSize(GLsizei count) { |
13696 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT | 13749 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT |
13697 } | 13750 } |
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15626 static_assert(offsetof(GetFragDataIndexEXT, program) == 4, | 15679 static_assert(offsetof(GetFragDataIndexEXT, program) == 4, |
15627 "offset of GetFragDataIndexEXT program should be 4"); | 15680 "offset of GetFragDataIndexEXT program should be 4"); |
15628 static_assert(offsetof(GetFragDataIndexEXT, name_bucket_id) == 8, | 15681 static_assert(offsetof(GetFragDataIndexEXT, name_bucket_id) == 8, |
15629 "offset of GetFragDataIndexEXT name_bucket_id should be 8"); | 15682 "offset of GetFragDataIndexEXT name_bucket_id should be 8"); |
15630 static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12, | 15683 static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12, |
15631 "offset of GetFragDataIndexEXT index_shm_id should be 12"); | 15684 "offset of GetFragDataIndexEXT index_shm_id should be 12"); |
15632 static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16, | 15685 static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16, |
15633 "offset of GetFragDataIndexEXT index_shm_offset should be 16"); | 15686 "offset of GetFragDataIndexEXT index_shm_offset should be 16"); |
15634 | 15687 |
15635 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15688 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |