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

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

Issue 863253002: Update from https://crrev.com/312600 (Closed) Base URL: https://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 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 int32_t n; 2064 int32_t n;
2065 }; 2065 };
2066 2066
2067 static_assert(sizeof(DeleteSamplersImmediate) == 8, 2067 static_assert(sizeof(DeleteSamplersImmediate) == 8,
2068 "size of DeleteSamplersImmediate should be 8"); 2068 "size of DeleteSamplersImmediate should be 8");
2069 static_assert(offsetof(DeleteSamplersImmediate, header) == 0, 2069 static_assert(offsetof(DeleteSamplersImmediate, header) == 0,
2070 "offset of DeleteSamplersImmediate header should be 0"); 2070 "offset of DeleteSamplersImmediate header should be 0");
2071 static_assert(offsetof(DeleteSamplersImmediate, n) == 4, 2071 static_assert(offsetof(DeleteSamplersImmediate, n) == 4,
2072 "offset of DeleteSamplersImmediate n should be 4"); 2072 "offset of DeleteSamplersImmediate n should be 4");
2073 2073
2074 struct DeleteSync {
2075 typedef DeleteSync ValueType;
2076 static const CommandId kCmdId = kDeleteSync;
2077 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2078 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2079
2080 static uint32_t ComputeSize() {
2081 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2082 }
2083
2084 void SetHeader() { header.SetCmd<ValueType>(); }
2085
2086 void Init(GLuint _sync) {
2087 SetHeader();
2088 sync = _sync;
2089 }
2090
2091 void* Set(void* cmd, GLuint _sync) {
2092 static_cast<ValueType*>(cmd)->Init(_sync);
2093 return NextCmdAddress<ValueType>(cmd);
2094 }
2095
2096 gpu::CommandHeader header;
2097 uint32_t sync;
2098 };
2099
2100 static_assert(sizeof(DeleteSync) == 8, "size of DeleteSync should be 8");
2101 static_assert(offsetof(DeleteSync, header) == 0,
2102 "offset of DeleteSync header should be 0");
2103 static_assert(offsetof(DeleteSync, sync) == 4,
2104 "offset of DeleteSync sync should be 4");
2105
2074 struct DeleteShader { 2106 struct DeleteShader {
2075 typedef DeleteShader ValueType; 2107 typedef DeleteShader ValueType;
2076 static const CommandId kCmdId = kDeleteShader; 2108 static const CommandId kCmdId = kDeleteShader;
2077 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 2109 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2078 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 2110 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2079 2111
2080 static uint32_t ComputeSize() { 2112 static uint32_t ComputeSize() {
2081 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 2113 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2082 } 2114 }
2083 2115
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2532 uint32_t index; 2564 uint32_t index;
2533 }; 2565 };
2534 2566
2535 static_assert(sizeof(EnableVertexAttribArray) == 8, 2567 static_assert(sizeof(EnableVertexAttribArray) == 8,
2536 "size of EnableVertexAttribArray should be 8"); 2568 "size of EnableVertexAttribArray should be 8");
2537 static_assert(offsetof(EnableVertexAttribArray, header) == 0, 2569 static_assert(offsetof(EnableVertexAttribArray, header) == 0,
2538 "offset of EnableVertexAttribArray header should be 0"); 2570 "offset of EnableVertexAttribArray header should be 0");
2539 static_assert(offsetof(EnableVertexAttribArray, index) == 4, 2571 static_assert(offsetof(EnableVertexAttribArray, index) == 4,
2540 "offset of EnableVertexAttribArray index should be 4"); 2572 "offset of EnableVertexAttribArray index should be 4");
2541 2573
2574 struct FenceSync {
2575 typedef FenceSync ValueType;
2576 static const CommandId kCmdId = kFenceSync;
2577 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2578 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2579
2580 static uint32_t ComputeSize() {
2581 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2582 }
2583
2584 void SetHeader() { header.SetCmd<ValueType>(); }
2585
2586 void Init(uint32_t _client_id) {
2587 SetHeader();
2588 client_id = _client_id;
2589 }
2590
2591 void* Set(void* cmd, uint32_t _client_id) {
2592 static_cast<ValueType*>(cmd)->Init(_client_id);
2593 return NextCmdAddress<ValueType>(cmd);
2594 }
2595
2596 gpu::CommandHeader header;
2597 uint32_t client_id;
2598 static const uint32_t condition = 0x9117;
2599 static const uint32_t flags = 0;
2600 };
2601
2602 static_assert(sizeof(FenceSync) == 8, "size of FenceSync should be 8");
2603 static_assert(offsetof(FenceSync, header) == 0,
2604 "offset of FenceSync header should be 0");
2605 static_assert(offsetof(FenceSync, client_id) == 4,
2606 "offset of FenceSync client_id should be 4");
2607
2542 struct Finish { 2608 struct Finish {
2543 typedef Finish ValueType; 2609 typedef Finish ValueType;
2544 static const CommandId kCmdId = kFinish; 2610 static const CommandId kCmdId = kFinish;
2545 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 2611 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
2546 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 2612 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
2547 2613
2548 static uint32_t ComputeSize() { 2614 static uint32_t ComputeSize() {
2549 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 2615 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
2550 } 2616 }
2551 2617
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
5127 static_assert(sizeof(IsShader) == 16, "size of IsShader should be 16"); 5193 static_assert(sizeof(IsShader) == 16, "size of IsShader should be 16");
5128 static_assert(offsetof(IsShader, header) == 0, 5194 static_assert(offsetof(IsShader, header) == 0,
5129 "offset of IsShader header should be 0"); 5195 "offset of IsShader header should be 0");
5130 static_assert(offsetof(IsShader, shader) == 4, 5196 static_assert(offsetof(IsShader, shader) == 4,
5131 "offset of IsShader shader should be 4"); 5197 "offset of IsShader shader should be 4");
5132 static_assert(offsetof(IsShader, result_shm_id) == 8, 5198 static_assert(offsetof(IsShader, result_shm_id) == 8,
5133 "offset of IsShader result_shm_id should be 8"); 5199 "offset of IsShader result_shm_id should be 8");
5134 static_assert(offsetof(IsShader, result_shm_offset) == 12, 5200 static_assert(offsetof(IsShader, result_shm_offset) == 12,
5135 "offset of IsShader result_shm_offset should be 12"); 5201 "offset of IsShader result_shm_offset should be 12");
5136 5202
5203 struct IsSync {
5204 typedef IsSync ValueType;
5205 static const CommandId kCmdId = kIsSync;
5206 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5207 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5208
5209 typedef uint32_t Result;
5210
5211 static uint32_t ComputeSize() {
5212 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5213 }
5214
5215 void SetHeader() { header.SetCmd<ValueType>(); }
5216
5217 void Init(GLuint _sync,
5218 uint32_t _result_shm_id,
5219 uint32_t _result_shm_offset) {
5220 SetHeader();
5221 sync = _sync;
5222 result_shm_id = _result_shm_id;
5223 result_shm_offset = _result_shm_offset;
5224 }
5225
5226 void* Set(void* cmd,
5227 GLuint _sync,
5228 uint32_t _result_shm_id,
5229 uint32_t _result_shm_offset) {
5230 static_cast<ValueType*>(cmd)
5231 ->Init(_sync, _result_shm_id, _result_shm_offset);
5232 return NextCmdAddress<ValueType>(cmd);
5233 }
5234
5235 gpu::CommandHeader header;
5236 uint32_t sync;
5237 uint32_t result_shm_id;
5238 uint32_t result_shm_offset;
5239 };
5240
5241 static_assert(sizeof(IsSync) == 16, "size of IsSync should be 16");
5242 static_assert(offsetof(IsSync, header) == 0,
5243 "offset of IsSync header should be 0");
5244 static_assert(offsetof(IsSync, sync) == 4, "offset of IsSync sync should be 4");
5245 static_assert(offsetof(IsSync, result_shm_id) == 8,
5246 "offset of IsSync result_shm_id should be 8");
5247 static_assert(offsetof(IsSync, result_shm_offset) == 12,
5248 "offset of IsSync result_shm_offset should be 12");
5249
5137 struct IsTexture { 5250 struct IsTexture {
5138 typedef IsTexture ValueType; 5251 typedef IsTexture ValueType;
5139 static const CommandId kCmdId = kIsTexture; 5252 static const CommandId kCmdId = kIsTexture;
5140 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 5253 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5141 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 5254 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5142 5255
5143 typedef uint32_t Result; 5256 typedef uint32_t Result;
5144 5257
5145 static uint32_t ComputeSize() { 5258 static uint32_t ComputeSize() {
5146 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 5259 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
5957 static const CommandId kCmdId = kShaderSourceBucket; 6070 static const CommandId kCmdId = kShaderSourceBucket;
5958 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 6071 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5959 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 6072 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5960 6073
5961 static uint32_t ComputeSize() { 6074 static uint32_t ComputeSize() {
5962 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 6075 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
5963 } 6076 }
5964 6077
5965 void SetHeader() { header.SetCmd<ValueType>(); } 6078 void SetHeader() { header.SetCmd<ValueType>(); }
5966 6079
5967 void Init(GLuint _shader, uint32_t _data_bucket_id) { 6080 void Init(GLuint _shader, uint32_t _str_bucket_id) {
5968 SetHeader(); 6081 SetHeader();
5969 shader = _shader; 6082 shader = _shader;
5970 data_bucket_id = _data_bucket_id; 6083 str_bucket_id = _str_bucket_id;
5971 } 6084 }
5972 6085
5973 void* Set(void* cmd, GLuint _shader, uint32_t _data_bucket_id) { 6086 void* Set(void* cmd, GLuint _shader, uint32_t _str_bucket_id) {
5974 static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id); 6087 static_cast<ValueType*>(cmd)->Init(_shader, _str_bucket_id);
5975 return NextCmdAddress<ValueType>(cmd); 6088 return NextCmdAddress<ValueType>(cmd);
5976 } 6089 }
5977 6090
5978 gpu::CommandHeader header; 6091 gpu::CommandHeader header;
5979 uint32_t shader; 6092 uint32_t shader;
5980 uint32_t data_bucket_id; 6093 uint32_t str_bucket_id;
5981 }; 6094 };
5982 6095
5983 static_assert(sizeof(ShaderSourceBucket) == 12, 6096 static_assert(sizeof(ShaderSourceBucket) == 12,
5984 "size of ShaderSourceBucket should be 12"); 6097 "size of ShaderSourceBucket should be 12");
5985 static_assert(offsetof(ShaderSourceBucket, header) == 0, 6098 static_assert(offsetof(ShaderSourceBucket, header) == 0,
5986 "offset of ShaderSourceBucket header should be 0"); 6099 "offset of ShaderSourceBucket header should be 0");
5987 static_assert(offsetof(ShaderSourceBucket, shader) == 4, 6100 static_assert(offsetof(ShaderSourceBucket, shader) == 4,
5988 "offset of ShaderSourceBucket shader should be 4"); 6101 "offset of ShaderSourceBucket shader should be 4");
5989 static_assert(offsetof(ShaderSourceBucket, data_bucket_id) == 8, 6102 static_assert(offsetof(ShaderSourceBucket, str_bucket_id) == 8,
5990 "offset of ShaderSourceBucket data_bucket_id should be 8"); 6103 "offset of ShaderSourceBucket str_bucket_id should be 8");
5991 6104
5992 struct StencilFunc { 6105 struct StencilFunc {
5993 typedef StencilFunc ValueType; 6106 typedef StencilFunc ValueType;
5994 static const CommandId kCmdId = kStencilFunc; 6107 static const CommandId kCmdId = kStencilFunc;
5995 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 6108 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
5996 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 6109 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
5997 6110
5998 static uint32_t ComputeSize() { 6111 static uint32_t ComputeSize() {
5999 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 6112 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
6000 } 6113 }
(...skipping 5852 matching lines...) Expand 10 before | Expand all | Expand 10 after
11853 11966
11854 gpu::CommandHeader header; 11967 gpu::CommandHeader header;
11855 }; 11968 };
11856 11969
11857 static_assert(sizeof(BlendBarrierKHR) == 4, 11970 static_assert(sizeof(BlendBarrierKHR) == 4,
11858 "size of BlendBarrierKHR should be 4"); 11971 "size of BlendBarrierKHR should be 4");
11859 static_assert(offsetof(BlendBarrierKHR, header) == 0, 11972 static_assert(offsetof(BlendBarrierKHR, header) == 0,
11860 "offset of BlendBarrierKHR header should be 0"); 11973 "offset of BlendBarrierKHR header should be 0");
11861 11974
11862 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 11975 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698