| 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 11973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11984 gpu::CommandHeader header; | 11984 gpu::CommandHeader header; |
| 11985 uint32_t target; | 11985 uint32_t target; |
| 11986 }; | 11986 }; |
| 11987 | 11987 |
| 11988 static_assert(sizeof(UnmapBuffer) == 8, "size of UnmapBuffer should be 8"); | 11988 static_assert(sizeof(UnmapBuffer) == 8, "size of UnmapBuffer should be 8"); |
| 11989 static_assert(offsetof(UnmapBuffer, header) == 0, | 11989 static_assert(offsetof(UnmapBuffer, header) == 0, |
| 11990 "offset of UnmapBuffer header should be 0"); | 11990 "offset of UnmapBuffer header should be 0"); |
| 11991 static_assert(offsetof(UnmapBuffer, target) == 4, | 11991 static_assert(offsetof(UnmapBuffer, target) == 4, |
| 11992 "offset of UnmapBuffer target should be 4"); | 11992 "offset of UnmapBuffer target should be 4"); |
| 11993 | 11993 |
| 11994 struct FlushMappedBufferRange { |
| 11995 typedef FlushMappedBufferRange ValueType; |
| 11996 static const CommandId kCmdId = kFlushMappedBufferRange; |
| 11997 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 11998 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
| 11999 |
| 12000 static uint32_t ComputeSize() { |
| 12001 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12002 } |
| 12003 |
| 12004 void SetHeader() { header.SetCmd<ValueType>(); } |
| 12005 |
| 12006 void Init(GLenum _target, GLintptr _offset, GLsizeiptr _size) { |
| 12007 SetHeader(); |
| 12008 target = _target; |
| 12009 offset = _offset; |
| 12010 size = _size; |
| 12011 } |
| 12012 |
| 12013 void* Set(void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size) { |
| 12014 static_cast<ValueType*>(cmd)->Init(_target, _offset, _size); |
| 12015 return NextCmdAddress<ValueType>(cmd); |
| 12016 } |
| 12017 |
| 12018 gpu::CommandHeader header; |
| 12019 uint32_t target; |
| 12020 int32_t offset; |
| 12021 int32_t size; |
| 12022 }; |
| 12023 |
| 12024 static_assert(sizeof(FlushMappedBufferRange) == 16, |
| 12025 "size of FlushMappedBufferRange should be 16"); |
| 12026 static_assert(offsetof(FlushMappedBufferRange, header) == 0, |
| 12027 "offset of FlushMappedBufferRange header should be 0"); |
| 12028 static_assert(offsetof(FlushMappedBufferRange, target) == 4, |
| 12029 "offset of FlushMappedBufferRange target should be 4"); |
| 12030 static_assert(offsetof(FlushMappedBufferRange, offset) == 8, |
| 12031 "offset of FlushMappedBufferRange offset should be 8"); |
| 12032 static_assert(offsetof(FlushMappedBufferRange, size) == 12, |
| 12033 "offset of FlushMappedBufferRange size should be 12"); |
| 12034 |
| 11994 struct ResizeCHROMIUM { | 12035 struct ResizeCHROMIUM { |
| 11995 typedef ResizeCHROMIUM ValueType; | 12036 typedef ResizeCHROMIUM ValueType; |
| 11996 static const CommandId kCmdId = kResizeCHROMIUM; | 12037 static const CommandId kCmdId = kResizeCHROMIUM; |
| 11997 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12038 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 11998 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 12039 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
| 11999 | 12040 |
| 12000 static uint32_t ComputeSize() { | 12041 static uint32_t ComputeSize() { |
| 12001 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12042 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 12002 } | 12043 } |
| 12003 | 12044 |
| (...skipping 3531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15535 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, | 15576 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, |
| 15536 location) == 4, | 15577 location) == 4, |
| 15537 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " | 15578 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " |
| 15538 "location should be 4"); | 15579 "location should be 4"); |
| 15539 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, | 15580 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, |
| 15540 transpose) == 8, | 15581 transpose) == 8, |
| 15541 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " | 15582 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " |
| 15542 "transpose should be 8"); | 15583 "transpose should be 8"); |
| 15543 | 15584 |
| 15544 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15585 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
| OLD | NEW |