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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 }; 152 };
153 153
154 static_assert(sizeof(BindBuffer) == 12, "size of BindBuffer should be 12"); 154 static_assert(sizeof(BindBuffer) == 12, "size of BindBuffer should be 12");
155 static_assert(offsetof(BindBuffer, header) == 0, 155 static_assert(offsetof(BindBuffer, header) == 0,
156 "offset of BindBuffer header should be 0"); 156 "offset of BindBuffer header should be 0");
157 static_assert(offsetof(BindBuffer, target) == 4, 157 static_assert(offsetof(BindBuffer, target) == 4,
158 "offset of BindBuffer target should be 4"); 158 "offset of BindBuffer target should be 4");
159 static_assert(offsetof(BindBuffer, buffer) == 8, 159 static_assert(offsetof(BindBuffer, buffer) == 8,
160 "offset of BindBuffer buffer should be 8"); 160 "offset of BindBuffer buffer should be 8");
161 161
162 struct BindBufferBase {
163 typedef BindBufferBase ValueType;
164 static const CommandId kCmdId = kBindBufferBase;
165 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
167
168 static uint32_t ComputeSize() {
169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
170 }
171
172 void SetHeader() { header.SetCmd<ValueType>(); }
173
174 void Init(GLenum _target, GLuint _index, GLuint _buffer) {
175 SetHeader();
176 target = _target;
177 index = _index;
178 buffer = _buffer;
179 }
180
181 void* Set(void* cmd, GLenum _target, GLuint _index, GLuint _buffer) {
182 static_cast<ValueType*>(cmd)->Init(_target, _index, _buffer);
183 return NextCmdAddress<ValueType>(cmd);
184 }
185
186 gpu::CommandHeader header;
187 uint32_t target;
188 uint32_t index;
189 uint32_t buffer;
190 };
191
192 static_assert(sizeof(BindBufferBase) == 16,
193 "size of BindBufferBase should be 16");
194 static_assert(offsetof(BindBufferBase, header) == 0,
195 "offset of BindBufferBase header should be 0");
196 static_assert(offsetof(BindBufferBase, target) == 4,
197 "offset of BindBufferBase target should be 4");
198 static_assert(offsetof(BindBufferBase, index) == 8,
199 "offset of BindBufferBase index should be 8");
200 static_assert(offsetof(BindBufferBase, buffer) == 12,
201 "offset of BindBufferBase buffer should be 12");
202
162 struct BindFramebuffer { 203 struct BindFramebuffer {
163 typedef BindFramebuffer ValueType; 204 typedef BindFramebuffer ValueType;
164 static const CommandId kCmdId = kBindFramebuffer; 205 static const CommandId kCmdId = kBindFramebuffer;
165 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 206 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); 207 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
167 208
168 static uint32_t ComputeSize() { 209 static uint32_t ComputeSize() {
169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 210 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
170 } 211 }
171 212
(...skipping 5829 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 "offset of TexImage2D height should be 20"); 6042 "offset of TexImage2D height should be 20");
6002 static_assert(offsetof(TexImage2D, format) == 24, 6043 static_assert(offsetof(TexImage2D, format) == 24,
6003 "offset of TexImage2D format should be 24"); 6044 "offset of TexImage2D format should be 24");
6004 static_assert(offsetof(TexImage2D, type) == 28, 6045 static_assert(offsetof(TexImage2D, type) == 28,
6005 "offset of TexImage2D type should be 28"); 6046 "offset of TexImage2D type should be 28");
6006 static_assert(offsetof(TexImage2D, pixels_shm_id) == 32, 6047 static_assert(offsetof(TexImage2D, pixels_shm_id) == 32,
6007 "offset of TexImage2D pixels_shm_id should be 32"); 6048 "offset of TexImage2D pixels_shm_id should be 32");
6008 static_assert(offsetof(TexImage2D, pixels_shm_offset) == 36, 6049 static_assert(offsetof(TexImage2D, pixels_shm_offset) == 36,
6009 "offset of TexImage2D pixels_shm_offset should be 36"); 6050 "offset of TexImage2D pixels_shm_offset should be 36");
6010 6051
6052 struct TexImage3D {
6053 typedef TexImage3D ValueType;
6054 static const CommandId kCmdId = kTexImage3D;
6055 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6056 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6057
6058 static uint32_t ComputeSize() {
6059 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6060 }
6061
6062 void SetHeader() { header.SetCmd<ValueType>(); }
6063
6064 void Init(GLenum _target,
6065 GLint _level,
6066 GLint _internalformat,
6067 GLsizei _width,
6068 GLsizei _height,
6069 GLsizei _depth,
6070 GLenum _format,
6071 GLenum _type,
6072 uint32_t _pixels_shm_id,
6073 uint32_t _pixels_shm_offset) {
6074 SetHeader();
6075 target = _target;
6076 level = _level;
6077 internalformat = _internalformat;
6078 width = _width;
6079 height = _height;
6080 depth = _depth;
6081 format = _format;
6082 type = _type;
6083 pixels_shm_id = _pixels_shm_id;
6084 pixels_shm_offset = _pixels_shm_offset;
6085 }
6086
6087 void* Set(void* cmd,
6088 GLenum _target,
6089 GLint _level,
6090 GLint _internalformat,
6091 GLsizei _width,
6092 GLsizei _height,
6093 GLsizei _depth,
6094 GLenum _format,
6095 GLenum _type,
6096 uint32_t _pixels_shm_id,
6097 uint32_t _pixels_shm_offset) {
6098 static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
6099 _height, _depth, _format, _type,
6100 _pixels_shm_id, _pixels_shm_offset);
6101 return NextCmdAddress<ValueType>(cmd);
6102 }
6103
6104 gpu::CommandHeader header;
6105 uint32_t target;
6106 int32_t level;
6107 int32_t internalformat;
6108 int32_t width;
6109 int32_t height;
6110 int32_t depth;
6111 uint32_t format;
6112 uint32_t type;
6113 uint32_t pixels_shm_id;
6114 uint32_t pixels_shm_offset;
6115 static const int32_t border = 0;
6116 };
6117
6118 static_assert(sizeof(TexImage3D) == 44, "size of TexImage3D should be 44");
6119 static_assert(offsetof(TexImage3D, header) == 0,
6120 "offset of TexImage3D header should be 0");
6121 static_assert(offsetof(TexImage3D, target) == 4,
6122 "offset of TexImage3D target should be 4");
6123 static_assert(offsetof(TexImage3D, level) == 8,
6124 "offset of TexImage3D level should be 8");
6125 static_assert(offsetof(TexImage3D, internalformat) == 12,
6126 "offset of TexImage3D internalformat should be 12");
6127 static_assert(offsetof(TexImage3D, width) == 16,
6128 "offset of TexImage3D width should be 16");
6129 static_assert(offsetof(TexImage3D, height) == 20,
6130 "offset of TexImage3D height should be 20");
6131 static_assert(offsetof(TexImage3D, depth) == 24,
6132 "offset of TexImage3D depth should be 24");
6133 static_assert(offsetof(TexImage3D, format) == 28,
6134 "offset of TexImage3D format should be 28");
6135 static_assert(offsetof(TexImage3D, type) == 32,
6136 "offset of TexImage3D type should be 32");
6137 static_assert(offsetof(TexImage3D, pixels_shm_id) == 36,
6138 "offset of TexImage3D pixels_shm_id should be 36");
6139 static_assert(offsetof(TexImage3D, pixels_shm_offset) == 40,
6140 "offset of TexImage3D pixels_shm_offset should be 40");
6141
6011 struct TexParameterf { 6142 struct TexParameterf {
6012 typedef TexParameterf ValueType; 6143 typedef TexParameterf ValueType;
6013 static const CommandId kCmdId = kTexParameterf; 6144 static const CommandId kCmdId = kTexParameterf;
6014 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 6145 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6015 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 6146 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6016 6147
6017 static uint32_t ComputeSize() { 6148 static uint32_t ComputeSize() {
6018 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 6149 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6019 } 6150 }
6020 6151
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 "offset of TexSubImage2D format should be 28"); 6462 "offset of TexSubImage2D format should be 28");
6332 static_assert(offsetof(TexSubImage2D, type) == 32, 6463 static_assert(offsetof(TexSubImage2D, type) == 32,
6333 "offset of TexSubImage2D type should be 32"); 6464 "offset of TexSubImage2D type should be 32");
6334 static_assert(offsetof(TexSubImage2D, pixels_shm_id) == 36, 6465 static_assert(offsetof(TexSubImage2D, pixels_shm_id) == 36,
6335 "offset of TexSubImage2D pixels_shm_id should be 36"); 6466 "offset of TexSubImage2D pixels_shm_id should be 36");
6336 static_assert(offsetof(TexSubImage2D, pixels_shm_offset) == 40, 6467 static_assert(offsetof(TexSubImage2D, pixels_shm_offset) == 40,
6337 "offset of TexSubImage2D pixels_shm_offset should be 40"); 6468 "offset of TexSubImage2D pixels_shm_offset should be 40");
6338 static_assert(offsetof(TexSubImage2D, internal) == 44, 6469 static_assert(offsetof(TexSubImage2D, internal) == 44,
6339 "offset of TexSubImage2D internal should be 44"); 6470 "offset of TexSubImage2D internal should be 44");
6340 6471
6472 struct TexSubImage3D {
6473 typedef TexSubImage3D ValueType;
6474 static const CommandId kCmdId = kTexSubImage3D;
6475 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6476 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6477
6478 static uint32_t ComputeSize() {
6479 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6480 }
6481
6482 void SetHeader() { header.SetCmd<ValueType>(); }
6483
6484 void Init(GLenum _target,
6485 GLint _level,
6486 GLint _xoffset,
6487 GLint _yoffset,
6488 GLint _zoffset,
6489 GLsizei _width,
6490 GLsizei _height,
6491 GLsizei _depth,
6492 GLenum _format,
6493 GLenum _type,
6494 uint32_t _pixels_shm_id,
6495 uint32_t _pixels_shm_offset,
6496 GLboolean _internal) {
6497 SetHeader();
6498 target = _target;
6499 level = _level;
6500 xoffset = _xoffset;
6501 yoffset = _yoffset;
6502 zoffset = _zoffset;
6503 width = _width;
6504 height = _height;
6505 depth = _depth;
6506 format = _format;
6507 type = _type;
6508 pixels_shm_id = _pixels_shm_id;
6509 pixels_shm_offset = _pixels_shm_offset;
6510 internal = _internal;
6511 }
6512
6513 void* Set(void* cmd,
6514 GLenum _target,
6515 GLint _level,
6516 GLint _xoffset,
6517 GLint _yoffset,
6518 GLint _zoffset,
6519 GLsizei _width,
6520 GLsizei _height,
6521 GLsizei _depth,
6522 GLenum _format,
6523 GLenum _type,
6524 uint32_t _pixels_shm_id,
6525 uint32_t _pixels_shm_offset,
6526 GLboolean _internal) {
6527 static_cast<ValueType*>(cmd)->Init(
6528 _target, _level, _xoffset, _yoffset, _zoffset, _width, _height, _depth,
6529 _format, _type, _pixels_shm_id, _pixels_shm_offset, _internal);
6530 return NextCmdAddress<ValueType>(cmd);
6531 }
6532
6533 gpu::CommandHeader header;
6534 uint32_t target;
6535 int32_t level;
6536 int32_t xoffset;
6537 int32_t yoffset;
6538 int32_t zoffset;
6539 int32_t width;
6540 int32_t height;
6541 int32_t depth;
6542 uint32_t format;
6543 uint32_t type;
6544 uint32_t pixels_shm_id;
6545 uint32_t pixels_shm_offset;
6546 uint32_t internal;
6547 };
6548
6549 static_assert(sizeof(TexSubImage3D) == 56,
6550 "size of TexSubImage3D should be 56");
6551 static_assert(offsetof(TexSubImage3D, header) == 0,
6552 "offset of TexSubImage3D header should be 0");
6553 static_assert(offsetof(TexSubImage3D, target) == 4,
6554 "offset of TexSubImage3D target should be 4");
6555 static_assert(offsetof(TexSubImage3D, level) == 8,
6556 "offset of TexSubImage3D level should be 8");
6557 static_assert(offsetof(TexSubImage3D, xoffset) == 12,
6558 "offset of TexSubImage3D xoffset should be 12");
6559 static_assert(offsetof(TexSubImage3D, yoffset) == 16,
6560 "offset of TexSubImage3D yoffset should be 16");
6561 static_assert(offsetof(TexSubImage3D, zoffset) == 20,
6562 "offset of TexSubImage3D zoffset should be 20");
6563 static_assert(offsetof(TexSubImage3D, width) == 24,
6564 "offset of TexSubImage3D width should be 24");
6565 static_assert(offsetof(TexSubImage3D, height) == 28,
6566 "offset of TexSubImage3D height should be 28");
6567 static_assert(offsetof(TexSubImage3D, depth) == 32,
6568 "offset of TexSubImage3D depth should be 32");
6569 static_assert(offsetof(TexSubImage3D, format) == 36,
6570 "offset of TexSubImage3D format should be 36");
6571 static_assert(offsetof(TexSubImage3D, type) == 40,
6572 "offset of TexSubImage3D type should be 40");
6573 static_assert(offsetof(TexSubImage3D, pixels_shm_id) == 44,
6574 "offset of TexSubImage3D pixels_shm_id should be 44");
6575 static_assert(offsetof(TexSubImage3D, pixels_shm_offset) == 48,
6576 "offset of TexSubImage3D pixels_shm_offset should be 48");
6577 static_assert(offsetof(TexSubImage3D, internal) == 52,
6578 "offset of TexSubImage3D internal should be 52");
6579
6341 struct Uniform1f { 6580 struct Uniform1f {
6342 typedef Uniform1f ValueType; 6581 typedef Uniform1f ValueType;
6343 static const CommandId kCmdId = kUniform1f; 6582 static const CommandId kCmdId = kUniform1f;
6344 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 6583 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
6345 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 6584 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
6346 6585
6347 static uint32_t ComputeSize() { 6586 static uint32_t ComputeSize() {
6348 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 6587 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6349 } 6588 }
6350 6589
(...skipping 5008 matching lines...) Expand 10 before | Expand all | Expand 10 after
11359 11598
11360 gpu::CommandHeader header; 11599 gpu::CommandHeader header;
11361 }; 11600 };
11362 11601
11363 static_assert(sizeof(BlendBarrierKHR) == 4, 11602 static_assert(sizeof(BlendBarrierKHR) == 4,
11364 "size of BlendBarrierKHR should be 4"); 11603 "size of BlendBarrierKHR should be 4");
11365 static_assert(offsetof(BlendBarrierKHR, header) == 0, 11604 static_assert(offsetof(BlendBarrierKHR, header) == 0,
11366 "offset of BlendBarrierKHR header should be 0"); 11605 "offset of BlendBarrierKHR header should be 0");
11367 11606
11368 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 11607 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_test_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698