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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 void* Set(void* cmd, GLenum _texture) { | 31 void* Set(void* cmd, GLenum _texture) { |
32 static_cast<ValueType*>(cmd)->Init(_texture); | 32 static_cast<ValueType*>(cmd)->Init(_texture); |
33 return NextCmdAddress<ValueType>(cmd); | 33 return NextCmdAddress<ValueType>(cmd); |
34 } | 34 } |
35 | 35 |
36 gpu::CommandHeader header; | 36 gpu::CommandHeader header; |
37 uint32_t texture; | 37 uint32_t texture; |
38 }; | 38 }; |
39 | 39 |
40 COMPILE_ASSERT(sizeof(ActiveTexture) == 8, Sizeof_ActiveTexture_is_not_8); | 40 static_assert(sizeof(ActiveTexture) == 8, "size of ActiveTexture should be 8"); |
41 COMPILE_ASSERT(offsetof(ActiveTexture, header) == 0, | 41 static_assert(offsetof(ActiveTexture, header) == 0, |
42 OffsetOf_ActiveTexture_header_not_0); | 42 "offset of ActiveTexture header should be 0"); |
43 COMPILE_ASSERT(offsetof(ActiveTexture, texture) == 4, | 43 static_assert(offsetof(ActiveTexture, texture) == 4, |
44 OffsetOf_ActiveTexture_texture_not_4); | 44 "offset of ActiveTexture texture should be 4"); |
45 | 45 |
46 struct AttachShader { | 46 struct AttachShader { |
47 typedef AttachShader ValueType; | 47 typedef AttachShader ValueType; |
48 static const CommandId kCmdId = kAttachShader; | 48 static const CommandId kCmdId = kAttachShader; |
49 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 49 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
50 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 50 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
51 | 51 |
52 static uint32_t ComputeSize() { | 52 static uint32_t ComputeSize() { |
53 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 53 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
54 } | 54 } |
55 | 55 |
56 void SetHeader() { header.SetCmd<ValueType>(); } | 56 void SetHeader() { header.SetCmd<ValueType>(); } |
57 | 57 |
58 void Init(GLuint _program, GLuint _shader) { | 58 void Init(GLuint _program, GLuint _shader) { |
59 SetHeader(); | 59 SetHeader(); |
60 program = _program; | 60 program = _program; |
61 shader = _shader; | 61 shader = _shader; |
62 } | 62 } |
63 | 63 |
64 void* Set(void* cmd, GLuint _program, GLuint _shader) { | 64 void* Set(void* cmd, GLuint _program, GLuint _shader) { |
65 static_cast<ValueType*>(cmd)->Init(_program, _shader); | 65 static_cast<ValueType*>(cmd)->Init(_program, _shader); |
66 return NextCmdAddress<ValueType>(cmd); | 66 return NextCmdAddress<ValueType>(cmd); |
67 } | 67 } |
68 | 68 |
69 gpu::CommandHeader header; | 69 gpu::CommandHeader header; |
70 uint32_t program; | 70 uint32_t program; |
71 uint32_t shader; | 71 uint32_t shader; |
72 }; | 72 }; |
73 | 73 |
74 COMPILE_ASSERT(sizeof(AttachShader) == 12, Sizeof_AttachShader_is_not_12); | 74 static_assert(sizeof(AttachShader) == 12, "size of AttachShader should be 12"); |
75 COMPILE_ASSERT(offsetof(AttachShader, header) == 0, | 75 static_assert(offsetof(AttachShader, header) == 0, |
76 OffsetOf_AttachShader_header_not_0); | 76 "offset of AttachShader header should be 0"); |
77 COMPILE_ASSERT(offsetof(AttachShader, program) == 4, | 77 static_assert(offsetof(AttachShader, program) == 4, |
78 OffsetOf_AttachShader_program_not_4); | 78 "offset of AttachShader program should be 4"); |
79 COMPILE_ASSERT(offsetof(AttachShader, shader) == 8, | 79 static_assert(offsetof(AttachShader, shader) == 8, |
80 OffsetOf_AttachShader_shader_not_8); | 80 "offset of AttachShader shader should be 8"); |
81 | 81 |
82 struct BindAttribLocationBucket { | 82 struct BindAttribLocationBucket { |
83 typedef BindAttribLocationBucket ValueType; | 83 typedef BindAttribLocationBucket ValueType; |
84 static const CommandId kCmdId = kBindAttribLocationBucket; | 84 static const CommandId kCmdId = kBindAttribLocationBucket; |
85 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 85 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
86 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 86 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
87 | 87 |
88 static uint32_t ComputeSize() { | 88 static uint32_t ComputeSize() { |
89 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 89 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
90 } | 90 } |
(...skipping 14 matching lines...) Expand all Loading... |
105 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id); | 105 static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id); |
106 return NextCmdAddress<ValueType>(cmd); | 106 return NextCmdAddress<ValueType>(cmd); |
107 } | 107 } |
108 | 108 |
109 gpu::CommandHeader header; | 109 gpu::CommandHeader header; |
110 uint32_t program; | 110 uint32_t program; |
111 uint32_t index; | 111 uint32_t index; |
112 uint32_t name_bucket_id; | 112 uint32_t name_bucket_id; |
113 }; | 113 }; |
114 | 114 |
115 COMPILE_ASSERT(sizeof(BindAttribLocationBucket) == 16, | 115 static_assert(sizeof(BindAttribLocationBucket) == 16, |
116 Sizeof_BindAttribLocationBucket_is_not_16); | 116 "size of BindAttribLocationBucket should be 16"); |
117 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, header) == 0, | 117 static_assert(offsetof(BindAttribLocationBucket, header) == 0, |
118 OffsetOf_BindAttribLocationBucket_header_not_0); | 118 "offset of BindAttribLocationBucket header should be 0"); |
119 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, program) == 4, | 119 static_assert(offsetof(BindAttribLocationBucket, program) == 4, |
120 OffsetOf_BindAttribLocationBucket_program_not_4); | 120 "offset of BindAttribLocationBucket program should be 4"); |
121 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, index) == 8, | 121 static_assert(offsetof(BindAttribLocationBucket, index) == 8, |
122 OffsetOf_BindAttribLocationBucket_index_not_8); | 122 "offset of BindAttribLocationBucket index should be 8"); |
123 COMPILE_ASSERT(offsetof(BindAttribLocationBucket, name_bucket_id) == 12, | 123 static_assert(offsetof(BindAttribLocationBucket, name_bucket_id) == 12, |
124 OffsetOf_BindAttribLocationBucket_name_bucket_id_not_12); | 124 "offset of BindAttribLocationBucket name_bucket_id should be 12"); |
125 | 125 |
126 struct BindBuffer { | 126 struct BindBuffer { |
127 typedef BindBuffer ValueType; | 127 typedef BindBuffer ValueType; |
128 static const CommandId kCmdId = kBindBuffer; | 128 static const CommandId kCmdId = kBindBuffer; |
129 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 129 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
130 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 130 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
131 | 131 |
132 static uint32_t ComputeSize() { | 132 static uint32_t ComputeSize() { |
133 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 133 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
134 } | 134 } |
135 | 135 |
136 void SetHeader() { header.SetCmd<ValueType>(); } | 136 void SetHeader() { header.SetCmd<ValueType>(); } |
137 | 137 |
138 void Init(GLenum _target, GLuint _buffer) { | 138 void Init(GLenum _target, GLuint _buffer) { |
139 SetHeader(); | 139 SetHeader(); |
140 target = _target; | 140 target = _target; |
141 buffer = _buffer; | 141 buffer = _buffer; |
142 } | 142 } |
143 | 143 |
144 void* Set(void* cmd, GLenum _target, GLuint _buffer) { | 144 void* Set(void* cmd, GLenum _target, GLuint _buffer) { |
145 static_cast<ValueType*>(cmd)->Init(_target, _buffer); | 145 static_cast<ValueType*>(cmd)->Init(_target, _buffer); |
146 return NextCmdAddress<ValueType>(cmd); | 146 return NextCmdAddress<ValueType>(cmd); |
147 } | 147 } |
148 | 148 |
149 gpu::CommandHeader header; | 149 gpu::CommandHeader header; |
150 uint32_t target; | 150 uint32_t target; |
151 uint32_t buffer; | 151 uint32_t buffer; |
152 }; | 152 }; |
153 | 153 |
154 COMPILE_ASSERT(sizeof(BindBuffer) == 12, Sizeof_BindBuffer_is_not_12); | 154 static_assert(sizeof(BindBuffer) == 12, "size of BindBuffer should be 12"); |
155 COMPILE_ASSERT(offsetof(BindBuffer, header) == 0, | 155 static_assert(offsetof(BindBuffer, header) == 0, |
156 OffsetOf_BindBuffer_header_not_0); | 156 "offset of BindBuffer header should be 0"); |
157 COMPILE_ASSERT(offsetof(BindBuffer, target) == 4, | 157 static_assert(offsetof(BindBuffer, target) == 4, |
158 OffsetOf_BindBuffer_target_not_4); | 158 "offset of BindBuffer target should be 4"); |
159 COMPILE_ASSERT(offsetof(BindBuffer, buffer) == 8, | 159 static_assert(offsetof(BindBuffer, buffer) == 8, |
160 OffsetOf_BindBuffer_buffer_not_8); | 160 "offset of BindBuffer buffer should be 8"); |
161 | 161 |
162 struct BindFramebuffer { | 162 struct BindFramebuffer { |
163 typedef BindFramebuffer ValueType; | 163 typedef BindFramebuffer ValueType; |
164 static const CommandId kCmdId = kBindFramebuffer; | 164 static const CommandId kCmdId = kBindFramebuffer; |
165 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 165 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
167 | 167 |
168 static uint32_t ComputeSize() { | 168 static uint32_t ComputeSize() { |
169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
170 } | 170 } |
171 | 171 |
172 void SetHeader() { header.SetCmd<ValueType>(); } | 172 void SetHeader() { header.SetCmd<ValueType>(); } |
173 | 173 |
174 void Init(GLenum _target, GLuint _framebuffer) { | 174 void Init(GLenum _target, GLuint _framebuffer) { |
175 SetHeader(); | 175 SetHeader(); |
176 target = _target; | 176 target = _target; |
177 framebuffer = _framebuffer; | 177 framebuffer = _framebuffer; |
178 } | 178 } |
179 | 179 |
180 void* Set(void* cmd, GLenum _target, GLuint _framebuffer) { | 180 void* Set(void* cmd, GLenum _target, GLuint _framebuffer) { |
181 static_cast<ValueType*>(cmd)->Init(_target, _framebuffer); | 181 static_cast<ValueType*>(cmd)->Init(_target, _framebuffer); |
182 return NextCmdAddress<ValueType>(cmd); | 182 return NextCmdAddress<ValueType>(cmd); |
183 } | 183 } |
184 | 184 |
185 gpu::CommandHeader header; | 185 gpu::CommandHeader header; |
186 uint32_t target; | 186 uint32_t target; |
187 uint32_t framebuffer; | 187 uint32_t framebuffer; |
188 }; | 188 }; |
189 | 189 |
190 COMPILE_ASSERT(sizeof(BindFramebuffer) == 12, Sizeof_BindFramebuffer_is_not_12); | 190 static_assert(sizeof(BindFramebuffer) == 12, |
191 COMPILE_ASSERT(offsetof(BindFramebuffer, header) == 0, | 191 "size of BindFramebuffer should be 12"); |
192 OffsetOf_BindFramebuffer_header_not_0); | 192 static_assert(offsetof(BindFramebuffer, header) == 0, |
193 COMPILE_ASSERT(offsetof(BindFramebuffer, target) == 4, | 193 "offset of BindFramebuffer header should be 0"); |
194 OffsetOf_BindFramebuffer_target_not_4); | 194 static_assert(offsetof(BindFramebuffer, target) == 4, |
195 COMPILE_ASSERT(offsetof(BindFramebuffer, framebuffer) == 8, | 195 "offset of BindFramebuffer target should be 4"); |
196 OffsetOf_BindFramebuffer_framebuffer_not_8); | 196 static_assert(offsetof(BindFramebuffer, framebuffer) == 8, |
| 197 "offset of BindFramebuffer framebuffer should be 8"); |
197 | 198 |
198 struct BindRenderbuffer { | 199 struct BindRenderbuffer { |
199 typedef BindRenderbuffer ValueType; | 200 typedef BindRenderbuffer ValueType; |
200 static const CommandId kCmdId = kBindRenderbuffer; | 201 static const CommandId kCmdId = kBindRenderbuffer; |
201 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 202 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
202 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 203 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
203 | 204 |
204 static uint32_t ComputeSize() { | 205 static uint32_t ComputeSize() { |
205 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 206 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
206 } | 207 } |
207 | 208 |
208 void SetHeader() { header.SetCmd<ValueType>(); } | 209 void SetHeader() { header.SetCmd<ValueType>(); } |
209 | 210 |
210 void Init(GLenum _target, GLuint _renderbuffer) { | 211 void Init(GLenum _target, GLuint _renderbuffer) { |
211 SetHeader(); | 212 SetHeader(); |
212 target = _target; | 213 target = _target; |
213 renderbuffer = _renderbuffer; | 214 renderbuffer = _renderbuffer; |
214 } | 215 } |
215 | 216 |
216 void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) { | 217 void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) { |
217 static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer); | 218 static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer); |
218 return NextCmdAddress<ValueType>(cmd); | 219 return NextCmdAddress<ValueType>(cmd); |
219 } | 220 } |
220 | 221 |
221 gpu::CommandHeader header; | 222 gpu::CommandHeader header; |
222 uint32_t target; | 223 uint32_t target; |
223 uint32_t renderbuffer; | 224 uint32_t renderbuffer; |
224 }; | 225 }; |
225 | 226 |
226 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12, | 227 static_assert(sizeof(BindRenderbuffer) == 12, |
227 Sizeof_BindRenderbuffer_is_not_12); | 228 "size of BindRenderbuffer should be 12"); |
228 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0, | 229 static_assert(offsetof(BindRenderbuffer, header) == 0, |
229 OffsetOf_BindRenderbuffer_header_not_0); | 230 "offset of BindRenderbuffer header should be 0"); |
230 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4, | 231 static_assert(offsetof(BindRenderbuffer, target) == 4, |
231 OffsetOf_BindRenderbuffer_target_not_4); | 232 "offset of BindRenderbuffer target should be 4"); |
232 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8, | 233 static_assert(offsetof(BindRenderbuffer, renderbuffer) == 8, |
233 OffsetOf_BindRenderbuffer_renderbuffer_not_8); | 234 "offset of BindRenderbuffer renderbuffer should be 8"); |
234 | 235 |
235 struct BindSampler { | 236 struct BindSampler { |
236 typedef BindSampler ValueType; | 237 typedef BindSampler ValueType; |
237 static const CommandId kCmdId = kBindSampler; | 238 static const CommandId kCmdId = kBindSampler; |
238 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 239 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
239 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 240 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
240 | 241 |
241 static uint32_t ComputeSize() { | 242 static uint32_t ComputeSize() { |
242 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 243 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
243 } | 244 } |
244 | 245 |
245 void SetHeader() { header.SetCmd<ValueType>(); } | 246 void SetHeader() { header.SetCmd<ValueType>(); } |
246 | 247 |
247 void Init(GLuint _unit, GLuint _sampler) { | 248 void Init(GLuint _unit, GLuint _sampler) { |
248 SetHeader(); | 249 SetHeader(); |
249 unit = _unit; | 250 unit = _unit; |
250 sampler = _sampler; | 251 sampler = _sampler; |
251 } | 252 } |
252 | 253 |
253 void* Set(void* cmd, GLuint _unit, GLuint _sampler) { | 254 void* Set(void* cmd, GLuint _unit, GLuint _sampler) { |
254 static_cast<ValueType*>(cmd)->Init(_unit, _sampler); | 255 static_cast<ValueType*>(cmd)->Init(_unit, _sampler); |
255 return NextCmdAddress<ValueType>(cmd); | 256 return NextCmdAddress<ValueType>(cmd); |
256 } | 257 } |
257 | 258 |
258 gpu::CommandHeader header; | 259 gpu::CommandHeader header; |
259 uint32_t unit; | 260 uint32_t unit; |
260 uint32_t sampler; | 261 uint32_t sampler; |
261 }; | 262 }; |
262 | 263 |
263 COMPILE_ASSERT(sizeof(BindSampler) == 12, Sizeof_BindSampler_is_not_12); | 264 static_assert(sizeof(BindSampler) == 12, "size of BindSampler should be 12"); |
264 COMPILE_ASSERT(offsetof(BindSampler, header) == 0, | 265 static_assert(offsetof(BindSampler, header) == 0, |
265 OffsetOf_BindSampler_header_not_0); | 266 "offset of BindSampler header should be 0"); |
266 COMPILE_ASSERT(offsetof(BindSampler, unit) == 4, | 267 static_assert(offsetof(BindSampler, unit) == 4, |
267 OffsetOf_BindSampler_unit_not_4); | 268 "offset of BindSampler unit should be 4"); |
268 COMPILE_ASSERT(offsetof(BindSampler, sampler) == 8, | 269 static_assert(offsetof(BindSampler, sampler) == 8, |
269 OffsetOf_BindSampler_sampler_not_8); | 270 "offset of BindSampler sampler should be 8"); |
270 | 271 |
271 struct BindTexture { | 272 struct BindTexture { |
272 typedef BindTexture ValueType; | 273 typedef BindTexture ValueType; |
273 static const CommandId kCmdId = kBindTexture; | 274 static const CommandId kCmdId = kBindTexture; |
274 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 275 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 276 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
276 | 277 |
277 static uint32_t ComputeSize() { | 278 static uint32_t ComputeSize() { |
278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 279 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
279 } | 280 } |
280 | 281 |
281 void SetHeader() { header.SetCmd<ValueType>(); } | 282 void SetHeader() { header.SetCmd<ValueType>(); } |
282 | 283 |
283 void Init(GLenum _target, GLuint _texture) { | 284 void Init(GLenum _target, GLuint _texture) { |
284 SetHeader(); | 285 SetHeader(); |
285 target = _target; | 286 target = _target; |
286 texture = _texture; | 287 texture = _texture; |
287 } | 288 } |
288 | 289 |
289 void* Set(void* cmd, GLenum _target, GLuint _texture) { | 290 void* Set(void* cmd, GLenum _target, GLuint _texture) { |
290 static_cast<ValueType*>(cmd)->Init(_target, _texture); | 291 static_cast<ValueType*>(cmd)->Init(_target, _texture); |
291 return NextCmdAddress<ValueType>(cmd); | 292 return NextCmdAddress<ValueType>(cmd); |
292 } | 293 } |
293 | 294 |
294 gpu::CommandHeader header; | 295 gpu::CommandHeader header; |
295 uint32_t target; | 296 uint32_t target; |
296 uint32_t texture; | 297 uint32_t texture; |
297 }; | 298 }; |
298 | 299 |
299 COMPILE_ASSERT(sizeof(BindTexture) == 12, Sizeof_BindTexture_is_not_12); | 300 static_assert(sizeof(BindTexture) == 12, "size of BindTexture should be 12"); |
300 COMPILE_ASSERT(offsetof(BindTexture, header) == 0, | 301 static_assert(offsetof(BindTexture, header) == 0, |
301 OffsetOf_BindTexture_header_not_0); | 302 "offset of BindTexture header should be 0"); |
302 COMPILE_ASSERT(offsetof(BindTexture, target) == 4, | 303 static_assert(offsetof(BindTexture, target) == 4, |
303 OffsetOf_BindTexture_target_not_4); | 304 "offset of BindTexture target should be 4"); |
304 COMPILE_ASSERT(offsetof(BindTexture, texture) == 8, | 305 static_assert(offsetof(BindTexture, texture) == 8, |
305 OffsetOf_BindTexture_texture_not_8); | 306 "offset of BindTexture texture should be 8"); |
306 | 307 |
307 struct BindTransformFeedback { | 308 struct BindTransformFeedback { |
308 typedef BindTransformFeedback ValueType; | 309 typedef BindTransformFeedback ValueType; |
309 static const CommandId kCmdId = kBindTransformFeedback; | 310 static const CommandId kCmdId = kBindTransformFeedback; |
310 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 311 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
311 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 312 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
312 | 313 |
313 static uint32_t ComputeSize() { | 314 static uint32_t ComputeSize() { |
314 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 315 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
315 } | 316 } |
316 | 317 |
317 void SetHeader() { header.SetCmd<ValueType>(); } | 318 void SetHeader() { header.SetCmd<ValueType>(); } |
318 | 319 |
319 void Init(GLenum _target, GLuint _transformfeedback) { | 320 void Init(GLenum _target, GLuint _transformfeedback) { |
320 SetHeader(); | 321 SetHeader(); |
321 target = _target; | 322 target = _target; |
322 transformfeedback = _transformfeedback; | 323 transformfeedback = _transformfeedback; |
323 } | 324 } |
324 | 325 |
325 void* Set(void* cmd, GLenum _target, GLuint _transformfeedback) { | 326 void* Set(void* cmd, GLenum _target, GLuint _transformfeedback) { |
326 static_cast<ValueType*>(cmd)->Init(_target, _transformfeedback); | 327 static_cast<ValueType*>(cmd)->Init(_target, _transformfeedback); |
327 return NextCmdAddress<ValueType>(cmd); | 328 return NextCmdAddress<ValueType>(cmd); |
328 } | 329 } |
329 | 330 |
330 gpu::CommandHeader header; | 331 gpu::CommandHeader header; |
331 uint32_t target; | 332 uint32_t target; |
332 uint32_t transformfeedback; | 333 uint32_t transformfeedback; |
333 }; | 334 }; |
334 | 335 |
335 COMPILE_ASSERT(sizeof(BindTransformFeedback) == 12, | 336 static_assert(sizeof(BindTransformFeedback) == 12, |
336 Sizeof_BindTransformFeedback_is_not_12); | 337 "size of BindTransformFeedback should be 12"); |
337 COMPILE_ASSERT(offsetof(BindTransformFeedback, header) == 0, | 338 static_assert(offsetof(BindTransformFeedback, header) == 0, |
338 OffsetOf_BindTransformFeedback_header_not_0); | 339 "offset of BindTransformFeedback header should be 0"); |
339 COMPILE_ASSERT(offsetof(BindTransformFeedback, target) == 4, | 340 static_assert(offsetof(BindTransformFeedback, target) == 4, |
340 OffsetOf_BindTransformFeedback_target_not_4); | 341 "offset of BindTransformFeedback target should be 4"); |
341 COMPILE_ASSERT(offsetof(BindTransformFeedback, transformfeedback) == 8, | 342 static_assert(offsetof(BindTransformFeedback, transformfeedback) == 8, |
342 OffsetOf_BindTransformFeedback_transformfeedback_not_8); | 343 "offset of BindTransformFeedback transformfeedback should be 8"); |
343 | 344 |
344 struct BlendColor { | 345 struct BlendColor { |
345 typedef BlendColor ValueType; | 346 typedef BlendColor ValueType; |
346 static const CommandId kCmdId = kBlendColor; | 347 static const CommandId kCmdId = kBlendColor; |
347 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 348 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
348 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 349 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
349 | 350 |
350 static uint32_t ComputeSize() { | 351 static uint32_t ComputeSize() { |
351 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 352 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
352 } | 353 } |
(...skipping 17 matching lines...) Expand all Loading... |
370 return NextCmdAddress<ValueType>(cmd); | 371 return NextCmdAddress<ValueType>(cmd); |
371 } | 372 } |
372 | 373 |
373 gpu::CommandHeader header; | 374 gpu::CommandHeader header; |
374 float red; | 375 float red; |
375 float green; | 376 float green; |
376 float blue; | 377 float blue; |
377 float alpha; | 378 float alpha; |
378 }; | 379 }; |
379 | 380 |
380 COMPILE_ASSERT(sizeof(BlendColor) == 20, Sizeof_BlendColor_is_not_20); | 381 static_assert(sizeof(BlendColor) == 20, "size of BlendColor should be 20"); |
381 COMPILE_ASSERT(offsetof(BlendColor, header) == 0, | 382 static_assert(offsetof(BlendColor, header) == 0, |
382 OffsetOf_BlendColor_header_not_0); | 383 "offset of BlendColor header should be 0"); |
383 COMPILE_ASSERT(offsetof(BlendColor, red) == 4, OffsetOf_BlendColor_red_not_4); | 384 static_assert(offsetof(BlendColor, red) == 4, |
384 COMPILE_ASSERT(offsetof(BlendColor, green) == 8, | 385 "offset of BlendColor red should be 4"); |
385 OffsetOf_BlendColor_green_not_8); | 386 static_assert(offsetof(BlendColor, green) == 8, |
386 COMPILE_ASSERT(offsetof(BlendColor, blue) == 12, | 387 "offset of BlendColor green should be 8"); |
387 OffsetOf_BlendColor_blue_not_12); | 388 static_assert(offsetof(BlendColor, blue) == 12, |
388 COMPILE_ASSERT(offsetof(BlendColor, alpha) == 16, | 389 "offset of BlendColor blue should be 12"); |
389 OffsetOf_BlendColor_alpha_not_16); | 390 static_assert(offsetof(BlendColor, alpha) == 16, |
| 391 "offset of BlendColor alpha should be 16"); |
390 | 392 |
391 struct BlendEquation { | 393 struct BlendEquation { |
392 typedef BlendEquation ValueType; | 394 typedef BlendEquation ValueType; |
393 static const CommandId kCmdId = kBlendEquation; | 395 static const CommandId kCmdId = kBlendEquation; |
394 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 396 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
395 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 397 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
396 | 398 |
397 static uint32_t ComputeSize() { | 399 static uint32_t ComputeSize() { |
398 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 400 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
399 } | 401 } |
400 | 402 |
401 void SetHeader() { header.SetCmd<ValueType>(); } | 403 void SetHeader() { header.SetCmd<ValueType>(); } |
402 | 404 |
403 void Init(GLenum _mode) { | 405 void Init(GLenum _mode) { |
404 SetHeader(); | 406 SetHeader(); |
405 mode = _mode; | 407 mode = _mode; |
406 } | 408 } |
407 | 409 |
408 void* Set(void* cmd, GLenum _mode) { | 410 void* Set(void* cmd, GLenum _mode) { |
409 static_cast<ValueType*>(cmd)->Init(_mode); | 411 static_cast<ValueType*>(cmd)->Init(_mode); |
410 return NextCmdAddress<ValueType>(cmd); | 412 return NextCmdAddress<ValueType>(cmd); |
411 } | 413 } |
412 | 414 |
413 gpu::CommandHeader header; | 415 gpu::CommandHeader header; |
414 uint32_t mode; | 416 uint32_t mode; |
415 }; | 417 }; |
416 | 418 |
417 COMPILE_ASSERT(sizeof(BlendEquation) == 8, Sizeof_BlendEquation_is_not_8); | 419 static_assert(sizeof(BlendEquation) == 8, "size of BlendEquation should be 8"); |
418 COMPILE_ASSERT(offsetof(BlendEquation, header) == 0, | 420 static_assert(offsetof(BlendEquation, header) == 0, |
419 OffsetOf_BlendEquation_header_not_0); | 421 "offset of BlendEquation header should be 0"); |
420 COMPILE_ASSERT(offsetof(BlendEquation, mode) == 4, | 422 static_assert(offsetof(BlendEquation, mode) == 4, |
421 OffsetOf_BlendEquation_mode_not_4); | 423 "offset of BlendEquation mode should be 4"); |
422 | 424 |
423 struct BlendEquationSeparate { | 425 struct BlendEquationSeparate { |
424 typedef BlendEquationSeparate ValueType; | 426 typedef BlendEquationSeparate ValueType; |
425 static const CommandId kCmdId = kBlendEquationSeparate; | 427 static const CommandId kCmdId = kBlendEquationSeparate; |
426 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 428 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
427 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 429 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
428 | 430 |
429 static uint32_t ComputeSize() { | 431 static uint32_t ComputeSize() { |
430 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 432 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
431 } | 433 } |
432 | 434 |
433 void SetHeader() { header.SetCmd<ValueType>(); } | 435 void SetHeader() { header.SetCmd<ValueType>(); } |
434 | 436 |
435 void Init(GLenum _modeRGB, GLenum _modeAlpha) { | 437 void Init(GLenum _modeRGB, GLenum _modeAlpha) { |
436 SetHeader(); | 438 SetHeader(); |
437 modeRGB = _modeRGB; | 439 modeRGB = _modeRGB; |
438 modeAlpha = _modeAlpha; | 440 modeAlpha = _modeAlpha; |
439 } | 441 } |
440 | 442 |
441 void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) { | 443 void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) { |
442 static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha); | 444 static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha); |
443 return NextCmdAddress<ValueType>(cmd); | 445 return NextCmdAddress<ValueType>(cmd); |
444 } | 446 } |
445 | 447 |
446 gpu::CommandHeader header; | 448 gpu::CommandHeader header; |
447 uint32_t modeRGB; | 449 uint32_t modeRGB; |
448 uint32_t modeAlpha; | 450 uint32_t modeAlpha; |
449 }; | 451 }; |
450 | 452 |
451 COMPILE_ASSERT(sizeof(BlendEquationSeparate) == 12, | 453 static_assert(sizeof(BlendEquationSeparate) == 12, |
452 Sizeof_BlendEquationSeparate_is_not_12); | 454 "size of BlendEquationSeparate should be 12"); |
453 COMPILE_ASSERT(offsetof(BlendEquationSeparate, header) == 0, | 455 static_assert(offsetof(BlendEquationSeparate, header) == 0, |
454 OffsetOf_BlendEquationSeparate_header_not_0); | 456 "offset of BlendEquationSeparate header should be 0"); |
455 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeRGB) == 4, | 457 static_assert(offsetof(BlendEquationSeparate, modeRGB) == 4, |
456 OffsetOf_BlendEquationSeparate_modeRGB_not_4); | 458 "offset of BlendEquationSeparate modeRGB should be 4"); |
457 COMPILE_ASSERT(offsetof(BlendEquationSeparate, modeAlpha) == 8, | 459 static_assert(offsetof(BlendEquationSeparate, modeAlpha) == 8, |
458 OffsetOf_BlendEquationSeparate_modeAlpha_not_8); | 460 "offset of BlendEquationSeparate modeAlpha should be 8"); |
459 | 461 |
460 struct BlendFunc { | 462 struct BlendFunc { |
461 typedef BlendFunc ValueType; | 463 typedef BlendFunc ValueType; |
462 static const CommandId kCmdId = kBlendFunc; | 464 static const CommandId kCmdId = kBlendFunc; |
463 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 465 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
464 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 466 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
465 | 467 |
466 static uint32_t ComputeSize() { | 468 static uint32_t ComputeSize() { |
467 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 469 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
468 } | 470 } |
469 | 471 |
470 void SetHeader() { header.SetCmd<ValueType>(); } | 472 void SetHeader() { header.SetCmd<ValueType>(); } |
471 | 473 |
472 void Init(GLenum _sfactor, GLenum _dfactor) { | 474 void Init(GLenum _sfactor, GLenum _dfactor) { |
473 SetHeader(); | 475 SetHeader(); |
474 sfactor = _sfactor; | 476 sfactor = _sfactor; |
475 dfactor = _dfactor; | 477 dfactor = _dfactor; |
476 } | 478 } |
477 | 479 |
478 void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) { | 480 void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) { |
479 static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor); | 481 static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor); |
480 return NextCmdAddress<ValueType>(cmd); | 482 return NextCmdAddress<ValueType>(cmd); |
481 } | 483 } |
482 | 484 |
483 gpu::CommandHeader header; | 485 gpu::CommandHeader header; |
484 uint32_t sfactor; | 486 uint32_t sfactor; |
485 uint32_t dfactor; | 487 uint32_t dfactor; |
486 }; | 488 }; |
487 | 489 |
488 COMPILE_ASSERT(sizeof(BlendFunc) == 12, Sizeof_BlendFunc_is_not_12); | 490 static_assert(sizeof(BlendFunc) == 12, "size of BlendFunc should be 12"); |
489 COMPILE_ASSERT(offsetof(BlendFunc, header) == 0, | 491 static_assert(offsetof(BlendFunc, header) == 0, |
490 OffsetOf_BlendFunc_header_not_0); | 492 "offset of BlendFunc header should be 0"); |
491 COMPILE_ASSERT(offsetof(BlendFunc, sfactor) == 4, | 493 static_assert(offsetof(BlendFunc, sfactor) == 4, |
492 OffsetOf_BlendFunc_sfactor_not_4); | 494 "offset of BlendFunc sfactor should be 4"); |
493 COMPILE_ASSERT(offsetof(BlendFunc, dfactor) == 8, | 495 static_assert(offsetof(BlendFunc, dfactor) == 8, |
494 OffsetOf_BlendFunc_dfactor_not_8); | 496 "offset of BlendFunc dfactor should be 8"); |
495 | 497 |
496 struct BlendFuncSeparate { | 498 struct BlendFuncSeparate { |
497 typedef BlendFuncSeparate ValueType; | 499 typedef BlendFuncSeparate ValueType; |
498 static const CommandId kCmdId = kBlendFuncSeparate; | 500 static const CommandId kCmdId = kBlendFuncSeparate; |
499 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 501 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
500 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 502 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
501 | 503 |
502 static uint32_t ComputeSize() { | 504 static uint32_t ComputeSize() { |
503 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 505 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
504 } | 506 } |
(...skipping 20 matching lines...) Expand all Loading... |
525 return NextCmdAddress<ValueType>(cmd); | 527 return NextCmdAddress<ValueType>(cmd); |
526 } | 528 } |
527 | 529 |
528 gpu::CommandHeader header; | 530 gpu::CommandHeader header; |
529 uint32_t srcRGB; | 531 uint32_t srcRGB; |
530 uint32_t dstRGB; | 532 uint32_t dstRGB; |
531 uint32_t srcAlpha; | 533 uint32_t srcAlpha; |
532 uint32_t dstAlpha; | 534 uint32_t dstAlpha; |
533 }; | 535 }; |
534 | 536 |
535 COMPILE_ASSERT(sizeof(BlendFuncSeparate) == 20, | 537 static_assert(sizeof(BlendFuncSeparate) == 20, |
536 Sizeof_BlendFuncSeparate_is_not_20); | 538 "size of BlendFuncSeparate should be 20"); |
537 COMPILE_ASSERT(offsetof(BlendFuncSeparate, header) == 0, | 539 static_assert(offsetof(BlendFuncSeparate, header) == 0, |
538 OffsetOf_BlendFuncSeparate_header_not_0); | 540 "offset of BlendFuncSeparate header should be 0"); |
539 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcRGB) == 4, | 541 static_assert(offsetof(BlendFuncSeparate, srcRGB) == 4, |
540 OffsetOf_BlendFuncSeparate_srcRGB_not_4); | 542 "offset of BlendFuncSeparate srcRGB should be 4"); |
541 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstRGB) == 8, | 543 static_assert(offsetof(BlendFuncSeparate, dstRGB) == 8, |
542 OffsetOf_BlendFuncSeparate_dstRGB_not_8); | 544 "offset of BlendFuncSeparate dstRGB should be 8"); |
543 COMPILE_ASSERT(offsetof(BlendFuncSeparate, srcAlpha) == 12, | 545 static_assert(offsetof(BlendFuncSeparate, srcAlpha) == 12, |
544 OffsetOf_BlendFuncSeparate_srcAlpha_not_12); | 546 "offset of BlendFuncSeparate srcAlpha should be 12"); |
545 COMPILE_ASSERT(offsetof(BlendFuncSeparate, dstAlpha) == 16, | 547 static_assert(offsetof(BlendFuncSeparate, dstAlpha) == 16, |
546 OffsetOf_BlendFuncSeparate_dstAlpha_not_16); | 548 "offset of BlendFuncSeparate dstAlpha should be 16"); |
547 | 549 |
548 struct BufferData { | 550 struct BufferData { |
549 typedef BufferData ValueType; | 551 typedef BufferData ValueType; |
550 static const CommandId kCmdId = kBufferData; | 552 static const CommandId kCmdId = kBufferData; |
551 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 553 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
552 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 554 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
553 | 555 |
554 static uint32_t ComputeSize() { | 556 static uint32_t ComputeSize() { |
555 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 557 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
556 } | 558 } |
(...skipping 25 matching lines...) Expand all Loading... |
582 } | 584 } |
583 | 585 |
584 gpu::CommandHeader header; | 586 gpu::CommandHeader header; |
585 uint32_t target; | 587 uint32_t target; |
586 int32_t size; | 588 int32_t size; |
587 uint32_t data_shm_id; | 589 uint32_t data_shm_id; |
588 uint32_t data_shm_offset; | 590 uint32_t data_shm_offset; |
589 uint32_t usage; | 591 uint32_t usage; |
590 }; | 592 }; |
591 | 593 |
592 COMPILE_ASSERT(sizeof(BufferData) == 24, Sizeof_BufferData_is_not_24); | 594 static_assert(sizeof(BufferData) == 24, "size of BufferData should be 24"); |
593 COMPILE_ASSERT(offsetof(BufferData, header) == 0, | 595 static_assert(offsetof(BufferData, header) == 0, |
594 OffsetOf_BufferData_header_not_0); | 596 "offset of BufferData header should be 0"); |
595 COMPILE_ASSERT(offsetof(BufferData, target) == 4, | 597 static_assert(offsetof(BufferData, target) == 4, |
596 OffsetOf_BufferData_target_not_4); | 598 "offset of BufferData target should be 4"); |
597 COMPILE_ASSERT(offsetof(BufferData, size) == 8, OffsetOf_BufferData_size_not_8); | 599 static_assert(offsetof(BufferData, size) == 8, |
598 COMPILE_ASSERT(offsetof(BufferData, data_shm_id) == 12, | 600 "offset of BufferData size should be 8"); |
599 OffsetOf_BufferData_data_shm_id_not_12); | 601 static_assert(offsetof(BufferData, data_shm_id) == 12, |
600 COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16, | 602 "offset of BufferData data_shm_id should be 12"); |
601 OffsetOf_BufferData_data_shm_offset_not_16); | 603 static_assert(offsetof(BufferData, data_shm_offset) == 16, |
602 COMPILE_ASSERT(offsetof(BufferData, usage) == 20, | 604 "offset of BufferData data_shm_offset should be 16"); |
603 OffsetOf_BufferData_usage_not_20); | 605 static_assert(offsetof(BufferData, usage) == 20, |
| 606 "offset of BufferData usage should be 20"); |
604 | 607 |
605 struct BufferSubData { | 608 struct BufferSubData { |
606 typedef BufferSubData ValueType; | 609 typedef BufferSubData ValueType; |
607 static const CommandId kCmdId = kBufferSubData; | 610 static const CommandId kCmdId = kBufferSubData; |
608 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 611 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
609 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 612 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
610 | 613 |
611 static uint32_t ComputeSize() { | 614 static uint32_t ComputeSize() { |
612 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 615 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
613 } | 616 } |
(...skipping 25 matching lines...) Expand all Loading... |
639 } | 642 } |
640 | 643 |
641 gpu::CommandHeader header; | 644 gpu::CommandHeader header; |
642 uint32_t target; | 645 uint32_t target; |
643 int32_t offset; | 646 int32_t offset; |
644 int32_t size; | 647 int32_t size; |
645 uint32_t data_shm_id; | 648 uint32_t data_shm_id; |
646 uint32_t data_shm_offset; | 649 uint32_t data_shm_offset; |
647 }; | 650 }; |
648 | 651 |
649 COMPILE_ASSERT(sizeof(BufferSubData) == 24, Sizeof_BufferSubData_is_not_24); | 652 static_assert(sizeof(BufferSubData) == 24, |
650 COMPILE_ASSERT(offsetof(BufferSubData, header) == 0, | 653 "size of BufferSubData should be 24"); |
651 OffsetOf_BufferSubData_header_not_0); | 654 static_assert(offsetof(BufferSubData, header) == 0, |
652 COMPILE_ASSERT(offsetof(BufferSubData, target) == 4, | 655 "offset of BufferSubData header should be 0"); |
653 OffsetOf_BufferSubData_target_not_4); | 656 static_assert(offsetof(BufferSubData, target) == 4, |
654 COMPILE_ASSERT(offsetof(BufferSubData, offset) == 8, | 657 "offset of BufferSubData target should be 4"); |
655 OffsetOf_BufferSubData_offset_not_8); | 658 static_assert(offsetof(BufferSubData, offset) == 8, |
656 COMPILE_ASSERT(offsetof(BufferSubData, size) == 12, | 659 "offset of BufferSubData offset should be 8"); |
657 OffsetOf_BufferSubData_size_not_12); | 660 static_assert(offsetof(BufferSubData, size) == 12, |
658 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_id) == 16, | 661 "offset of BufferSubData size should be 12"); |
659 OffsetOf_BufferSubData_data_shm_id_not_16); | 662 static_assert(offsetof(BufferSubData, data_shm_id) == 16, |
660 COMPILE_ASSERT(offsetof(BufferSubData, data_shm_offset) == 20, | 663 "offset of BufferSubData data_shm_id should be 16"); |
661 OffsetOf_BufferSubData_data_shm_offset_not_20); | 664 static_assert(offsetof(BufferSubData, data_shm_offset) == 20, |
| 665 "offset of BufferSubData data_shm_offset should be 20"); |
662 | 666 |
663 struct CheckFramebufferStatus { | 667 struct CheckFramebufferStatus { |
664 typedef CheckFramebufferStatus ValueType; | 668 typedef CheckFramebufferStatus ValueType; |
665 static const CommandId kCmdId = kCheckFramebufferStatus; | 669 static const CommandId kCmdId = kCheckFramebufferStatus; |
666 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 670 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
667 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 671 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
668 | 672 |
669 typedef GLenum Result; | 673 typedef GLenum Result; |
670 | 674 |
671 static uint32_t ComputeSize() { | 675 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
691 ->Init(_target, _result_shm_id, _result_shm_offset); | 695 ->Init(_target, _result_shm_id, _result_shm_offset); |
692 return NextCmdAddress<ValueType>(cmd); | 696 return NextCmdAddress<ValueType>(cmd); |
693 } | 697 } |
694 | 698 |
695 gpu::CommandHeader header; | 699 gpu::CommandHeader header; |
696 uint32_t target; | 700 uint32_t target; |
697 uint32_t result_shm_id; | 701 uint32_t result_shm_id; |
698 uint32_t result_shm_offset; | 702 uint32_t result_shm_offset; |
699 }; | 703 }; |
700 | 704 |
701 COMPILE_ASSERT(sizeof(CheckFramebufferStatus) == 16, | 705 static_assert(sizeof(CheckFramebufferStatus) == 16, |
702 Sizeof_CheckFramebufferStatus_is_not_16); | 706 "size of CheckFramebufferStatus should be 16"); |
703 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, header) == 0, | 707 static_assert(offsetof(CheckFramebufferStatus, header) == 0, |
704 OffsetOf_CheckFramebufferStatus_header_not_0); | 708 "offset of CheckFramebufferStatus header should be 0"); |
705 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, target) == 4, | 709 static_assert(offsetof(CheckFramebufferStatus, target) == 4, |
706 OffsetOf_CheckFramebufferStatus_target_not_4); | 710 "offset of CheckFramebufferStatus target should be 4"); |
707 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_id) == 8, | 711 static_assert(offsetof(CheckFramebufferStatus, result_shm_id) == 8, |
708 OffsetOf_CheckFramebufferStatus_result_shm_id_not_8); | 712 "offset of CheckFramebufferStatus result_shm_id should be 8"); |
709 COMPILE_ASSERT(offsetof(CheckFramebufferStatus, result_shm_offset) == 12, | 713 static_assert( |
710 OffsetOf_CheckFramebufferStatus_result_shm_offset_not_12); | 714 offsetof(CheckFramebufferStatus, result_shm_offset) == 12, |
| 715 "offset of CheckFramebufferStatus result_shm_offset should be 12"); |
711 | 716 |
712 struct Clear { | 717 struct Clear { |
713 typedef Clear ValueType; | 718 typedef Clear ValueType; |
714 static const CommandId kCmdId = kClear; | 719 static const CommandId kCmdId = kClear; |
715 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 720 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
716 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 721 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
717 | 722 |
718 static uint32_t ComputeSize() { | 723 static uint32_t ComputeSize() { |
719 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 724 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
720 } | 725 } |
721 | 726 |
722 void SetHeader() { header.SetCmd<ValueType>(); } | 727 void SetHeader() { header.SetCmd<ValueType>(); } |
723 | 728 |
724 void Init(GLbitfield _mask) { | 729 void Init(GLbitfield _mask) { |
725 SetHeader(); | 730 SetHeader(); |
726 mask = _mask; | 731 mask = _mask; |
727 } | 732 } |
728 | 733 |
729 void* Set(void* cmd, GLbitfield _mask) { | 734 void* Set(void* cmd, GLbitfield _mask) { |
730 static_cast<ValueType*>(cmd)->Init(_mask); | 735 static_cast<ValueType*>(cmd)->Init(_mask); |
731 return NextCmdAddress<ValueType>(cmd); | 736 return NextCmdAddress<ValueType>(cmd); |
732 } | 737 } |
733 | 738 |
734 gpu::CommandHeader header; | 739 gpu::CommandHeader header; |
735 uint32_t mask; | 740 uint32_t mask; |
736 }; | 741 }; |
737 | 742 |
738 COMPILE_ASSERT(sizeof(Clear) == 8, Sizeof_Clear_is_not_8); | 743 static_assert(sizeof(Clear) == 8, "size of Clear should be 8"); |
739 COMPILE_ASSERT(offsetof(Clear, header) == 0, OffsetOf_Clear_header_not_0); | 744 static_assert(offsetof(Clear, header) == 0, |
740 COMPILE_ASSERT(offsetof(Clear, mask) == 4, OffsetOf_Clear_mask_not_4); | 745 "offset of Clear header should be 0"); |
| 746 static_assert(offsetof(Clear, mask) == 4, "offset of Clear mask should be 4"); |
741 | 747 |
742 struct ClearColor { | 748 struct ClearColor { |
743 typedef ClearColor ValueType; | 749 typedef ClearColor ValueType; |
744 static const CommandId kCmdId = kClearColor; | 750 static const CommandId kCmdId = kClearColor; |
745 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 751 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
746 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 752 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
747 | 753 |
748 static uint32_t ComputeSize() { | 754 static uint32_t ComputeSize() { |
749 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 755 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
750 } | 756 } |
(...skipping 17 matching lines...) Expand all Loading... |
768 return NextCmdAddress<ValueType>(cmd); | 774 return NextCmdAddress<ValueType>(cmd); |
769 } | 775 } |
770 | 776 |
771 gpu::CommandHeader header; | 777 gpu::CommandHeader header; |
772 float red; | 778 float red; |
773 float green; | 779 float green; |
774 float blue; | 780 float blue; |
775 float alpha; | 781 float alpha; |
776 }; | 782 }; |
777 | 783 |
778 COMPILE_ASSERT(sizeof(ClearColor) == 20, Sizeof_ClearColor_is_not_20); | 784 static_assert(sizeof(ClearColor) == 20, "size of ClearColor should be 20"); |
779 COMPILE_ASSERT(offsetof(ClearColor, header) == 0, | 785 static_assert(offsetof(ClearColor, header) == 0, |
780 OffsetOf_ClearColor_header_not_0); | 786 "offset of ClearColor header should be 0"); |
781 COMPILE_ASSERT(offsetof(ClearColor, red) == 4, OffsetOf_ClearColor_red_not_4); | 787 static_assert(offsetof(ClearColor, red) == 4, |
782 COMPILE_ASSERT(offsetof(ClearColor, green) == 8, | 788 "offset of ClearColor red should be 4"); |
783 OffsetOf_ClearColor_green_not_8); | 789 static_assert(offsetof(ClearColor, green) == 8, |
784 COMPILE_ASSERT(offsetof(ClearColor, blue) == 12, | 790 "offset of ClearColor green should be 8"); |
785 OffsetOf_ClearColor_blue_not_12); | 791 static_assert(offsetof(ClearColor, blue) == 12, |
786 COMPILE_ASSERT(offsetof(ClearColor, alpha) == 16, | 792 "offset of ClearColor blue should be 12"); |
787 OffsetOf_ClearColor_alpha_not_16); | 793 static_assert(offsetof(ClearColor, alpha) == 16, |
| 794 "offset of ClearColor alpha should be 16"); |
788 | 795 |
789 struct ClearDepthf { | 796 struct ClearDepthf { |
790 typedef ClearDepthf ValueType; | 797 typedef ClearDepthf ValueType; |
791 static const CommandId kCmdId = kClearDepthf; | 798 static const CommandId kCmdId = kClearDepthf; |
792 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 799 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
793 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 800 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
794 | 801 |
795 static uint32_t ComputeSize() { | 802 static uint32_t ComputeSize() { |
796 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 803 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
797 } | 804 } |
798 | 805 |
799 void SetHeader() { header.SetCmd<ValueType>(); } | 806 void SetHeader() { header.SetCmd<ValueType>(); } |
800 | 807 |
801 void Init(GLclampf _depth) { | 808 void Init(GLclampf _depth) { |
802 SetHeader(); | 809 SetHeader(); |
803 depth = _depth; | 810 depth = _depth; |
804 } | 811 } |
805 | 812 |
806 void* Set(void* cmd, GLclampf _depth) { | 813 void* Set(void* cmd, GLclampf _depth) { |
807 static_cast<ValueType*>(cmd)->Init(_depth); | 814 static_cast<ValueType*>(cmd)->Init(_depth); |
808 return NextCmdAddress<ValueType>(cmd); | 815 return NextCmdAddress<ValueType>(cmd); |
809 } | 816 } |
810 | 817 |
811 gpu::CommandHeader header; | 818 gpu::CommandHeader header; |
812 float depth; | 819 float depth; |
813 }; | 820 }; |
814 | 821 |
815 COMPILE_ASSERT(sizeof(ClearDepthf) == 8, Sizeof_ClearDepthf_is_not_8); | 822 static_assert(sizeof(ClearDepthf) == 8, "size of ClearDepthf should be 8"); |
816 COMPILE_ASSERT(offsetof(ClearDepthf, header) == 0, | 823 static_assert(offsetof(ClearDepthf, header) == 0, |
817 OffsetOf_ClearDepthf_header_not_0); | 824 "offset of ClearDepthf header should be 0"); |
818 COMPILE_ASSERT(offsetof(ClearDepthf, depth) == 4, | 825 static_assert(offsetof(ClearDepthf, depth) == 4, |
819 OffsetOf_ClearDepthf_depth_not_4); | 826 "offset of ClearDepthf depth should be 4"); |
820 | 827 |
821 struct ClearStencil { | 828 struct ClearStencil { |
822 typedef ClearStencil ValueType; | 829 typedef ClearStencil ValueType; |
823 static const CommandId kCmdId = kClearStencil; | 830 static const CommandId kCmdId = kClearStencil; |
824 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 831 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
825 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 832 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
826 | 833 |
827 static uint32_t ComputeSize() { | 834 static uint32_t ComputeSize() { |
828 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 835 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
829 } | 836 } |
830 | 837 |
831 void SetHeader() { header.SetCmd<ValueType>(); } | 838 void SetHeader() { header.SetCmd<ValueType>(); } |
832 | 839 |
833 void Init(GLint _s) { | 840 void Init(GLint _s) { |
834 SetHeader(); | 841 SetHeader(); |
835 s = _s; | 842 s = _s; |
836 } | 843 } |
837 | 844 |
838 void* Set(void* cmd, GLint _s) { | 845 void* Set(void* cmd, GLint _s) { |
839 static_cast<ValueType*>(cmd)->Init(_s); | 846 static_cast<ValueType*>(cmd)->Init(_s); |
840 return NextCmdAddress<ValueType>(cmd); | 847 return NextCmdAddress<ValueType>(cmd); |
841 } | 848 } |
842 | 849 |
843 gpu::CommandHeader header; | 850 gpu::CommandHeader header; |
844 int32_t s; | 851 int32_t s; |
845 }; | 852 }; |
846 | 853 |
847 COMPILE_ASSERT(sizeof(ClearStencil) == 8, Sizeof_ClearStencil_is_not_8); | 854 static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8"); |
848 COMPILE_ASSERT(offsetof(ClearStencil, header) == 0, | 855 static_assert(offsetof(ClearStencil, header) == 0, |
849 OffsetOf_ClearStencil_header_not_0); | 856 "offset of ClearStencil header should be 0"); |
850 COMPILE_ASSERT(offsetof(ClearStencil, s) == 4, OffsetOf_ClearStencil_s_not_4); | 857 static_assert(offsetof(ClearStencil, s) == 4, |
| 858 "offset of ClearStencil s should be 4"); |
851 | 859 |
852 struct ColorMask { | 860 struct ColorMask { |
853 typedef ColorMask ValueType; | 861 typedef ColorMask ValueType; |
854 static const CommandId kCmdId = kColorMask; | 862 static const CommandId kCmdId = kColorMask; |
855 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 863 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
856 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 864 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
857 | 865 |
858 static uint32_t ComputeSize() { | 866 static uint32_t ComputeSize() { |
859 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 867 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
860 } | 868 } |
(...skipping 20 matching lines...) Expand all Loading... |
881 return NextCmdAddress<ValueType>(cmd); | 889 return NextCmdAddress<ValueType>(cmd); |
882 } | 890 } |
883 | 891 |
884 gpu::CommandHeader header; | 892 gpu::CommandHeader header; |
885 uint32_t red; | 893 uint32_t red; |
886 uint32_t green; | 894 uint32_t green; |
887 uint32_t blue; | 895 uint32_t blue; |
888 uint32_t alpha; | 896 uint32_t alpha; |
889 }; | 897 }; |
890 | 898 |
891 COMPILE_ASSERT(sizeof(ColorMask) == 20, Sizeof_ColorMask_is_not_20); | 899 static_assert(sizeof(ColorMask) == 20, "size of ColorMask should be 20"); |
892 COMPILE_ASSERT(offsetof(ColorMask, header) == 0, | 900 static_assert(offsetof(ColorMask, header) == 0, |
893 OffsetOf_ColorMask_header_not_0); | 901 "offset of ColorMask header should be 0"); |
894 COMPILE_ASSERT(offsetof(ColorMask, red) == 4, OffsetOf_ColorMask_red_not_4); | 902 static_assert(offsetof(ColorMask, red) == 4, |
895 COMPILE_ASSERT(offsetof(ColorMask, green) == 8, OffsetOf_ColorMask_green_not_8); | 903 "offset of ColorMask red should be 4"); |
896 COMPILE_ASSERT(offsetof(ColorMask, blue) == 12, OffsetOf_ColorMask_blue_not_12); | 904 static_assert(offsetof(ColorMask, green) == 8, |
897 COMPILE_ASSERT(offsetof(ColorMask, alpha) == 16, | 905 "offset of ColorMask green should be 8"); |
898 OffsetOf_ColorMask_alpha_not_16); | 906 static_assert(offsetof(ColorMask, blue) == 12, |
| 907 "offset of ColorMask blue should be 12"); |
| 908 static_assert(offsetof(ColorMask, alpha) == 16, |
| 909 "offset of ColorMask alpha should be 16"); |
899 | 910 |
900 struct CompileShader { | 911 struct CompileShader { |
901 typedef CompileShader ValueType; | 912 typedef CompileShader ValueType; |
902 static const CommandId kCmdId = kCompileShader; | 913 static const CommandId kCmdId = kCompileShader; |
903 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 914 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
904 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 915 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
905 | 916 |
906 static uint32_t ComputeSize() { | 917 static uint32_t ComputeSize() { |
907 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 918 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
908 } | 919 } |
909 | 920 |
910 void SetHeader() { header.SetCmd<ValueType>(); } | 921 void SetHeader() { header.SetCmd<ValueType>(); } |
911 | 922 |
912 void Init(GLuint _shader) { | 923 void Init(GLuint _shader) { |
913 SetHeader(); | 924 SetHeader(); |
914 shader = _shader; | 925 shader = _shader; |
915 } | 926 } |
916 | 927 |
917 void* Set(void* cmd, GLuint _shader) { | 928 void* Set(void* cmd, GLuint _shader) { |
918 static_cast<ValueType*>(cmd)->Init(_shader); | 929 static_cast<ValueType*>(cmd)->Init(_shader); |
919 return NextCmdAddress<ValueType>(cmd); | 930 return NextCmdAddress<ValueType>(cmd); |
920 } | 931 } |
921 | 932 |
922 gpu::CommandHeader header; | 933 gpu::CommandHeader header; |
923 uint32_t shader; | 934 uint32_t shader; |
924 }; | 935 }; |
925 | 936 |
926 COMPILE_ASSERT(sizeof(CompileShader) == 8, Sizeof_CompileShader_is_not_8); | 937 static_assert(sizeof(CompileShader) == 8, "size of CompileShader should be 8"); |
927 COMPILE_ASSERT(offsetof(CompileShader, header) == 0, | 938 static_assert(offsetof(CompileShader, header) == 0, |
928 OffsetOf_CompileShader_header_not_0); | 939 "offset of CompileShader header should be 0"); |
929 COMPILE_ASSERT(offsetof(CompileShader, shader) == 4, | 940 static_assert(offsetof(CompileShader, shader) == 4, |
930 OffsetOf_CompileShader_shader_not_4); | 941 "offset of CompileShader shader should be 4"); |
931 | 942 |
932 struct CompressedTexImage2DBucket { | 943 struct CompressedTexImage2DBucket { |
933 typedef CompressedTexImage2DBucket ValueType; | 944 typedef CompressedTexImage2DBucket ValueType; |
934 static const CommandId kCmdId = kCompressedTexImage2DBucket; | 945 static const CommandId kCmdId = kCompressedTexImage2DBucket; |
935 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 946 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
936 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 947 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
937 | 948 |
938 static uint32_t ComputeSize() { | 949 static uint32_t ComputeSize() { |
939 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 950 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
940 } | 951 } |
(...skipping 30 matching lines...) Expand all Loading... |
971 gpu::CommandHeader header; | 982 gpu::CommandHeader header; |
972 uint32_t target; | 983 uint32_t target; |
973 int32_t level; | 984 int32_t level; |
974 uint32_t internalformat; | 985 uint32_t internalformat; |
975 int32_t width; | 986 int32_t width; |
976 int32_t height; | 987 int32_t height; |
977 uint32_t bucket_id; | 988 uint32_t bucket_id; |
978 static const int32_t border = 0; | 989 static const int32_t border = 0; |
979 }; | 990 }; |
980 | 991 |
981 COMPILE_ASSERT(sizeof(CompressedTexImage2DBucket) == 28, | 992 static_assert(sizeof(CompressedTexImage2DBucket) == 28, |
982 Sizeof_CompressedTexImage2DBucket_is_not_28); | 993 "size of CompressedTexImage2DBucket should be 28"); |
983 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, header) == 0, | 994 static_assert(offsetof(CompressedTexImage2DBucket, header) == 0, |
984 OffsetOf_CompressedTexImage2DBucket_header_not_0); | 995 "offset of CompressedTexImage2DBucket header should be 0"); |
985 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, target) == 4, | 996 static_assert(offsetof(CompressedTexImage2DBucket, target) == 4, |
986 OffsetOf_CompressedTexImage2DBucket_target_not_4); | 997 "offset of CompressedTexImage2DBucket target should be 4"); |
987 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, level) == 8, | 998 static_assert(offsetof(CompressedTexImage2DBucket, level) == 8, |
988 OffsetOf_CompressedTexImage2DBucket_level_not_8); | 999 "offset of CompressedTexImage2DBucket level should be 8"); |
989 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, internalformat) == 12, | 1000 static_assert( |
990 OffsetOf_CompressedTexImage2DBucket_internalformat_not_12); | 1001 offsetof(CompressedTexImage2DBucket, internalformat) == 12, |
991 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, width) == 16, | 1002 "offset of CompressedTexImage2DBucket internalformat should be 12"); |
992 OffsetOf_CompressedTexImage2DBucket_width_not_16); | 1003 static_assert(offsetof(CompressedTexImage2DBucket, width) == 16, |
993 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, height) == 20, | 1004 "offset of CompressedTexImage2DBucket width should be 16"); |
994 OffsetOf_CompressedTexImage2DBucket_height_not_20); | 1005 static_assert(offsetof(CompressedTexImage2DBucket, height) == 20, |
995 COMPILE_ASSERT(offsetof(CompressedTexImage2DBucket, bucket_id) == 24, | 1006 "offset of CompressedTexImage2DBucket height should be 20"); |
996 OffsetOf_CompressedTexImage2DBucket_bucket_id_not_24); | 1007 static_assert(offsetof(CompressedTexImage2DBucket, bucket_id) == 24, |
| 1008 "offset of CompressedTexImage2DBucket bucket_id should be 24"); |
997 | 1009 |
998 struct CompressedTexImage2D { | 1010 struct CompressedTexImage2D { |
999 typedef CompressedTexImage2D ValueType; | 1011 typedef CompressedTexImage2D ValueType; |
1000 static const CommandId kCmdId = kCompressedTexImage2D; | 1012 static const CommandId kCmdId = kCompressedTexImage2D; |
1001 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1013 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1002 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1014 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1003 | 1015 |
1004 static uint32_t ComputeSize() { | 1016 static uint32_t ComputeSize() { |
1005 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1017 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1006 } | 1018 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 int32_t level; | 1058 int32_t level; |
1047 uint32_t internalformat; | 1059 uint32_t internalformat; |
1048 int32_t width; | 1060 int32_t width; |
1049 int32_t height; | 1061 int32_t height; |
1050 int32_t imageSize; | 1062 int32_t imageSize; |
1051 uint32_t data_shm_id; | 1063 uint32_t data_shm_id; |
1052 uint32_t data_shm_offset; | 1064 uint32_t data_shm_offset; |
1053 static const int32_t border = 0; | 1065 static const int32_t border = 0; |
1054 }; | 1066 }; |
1055 | 1067 |
1056 COMPILE_ASSERT(sizeof(CompressedTexImage2D) == 36, | 1068 static_assert(sizeof(CompressedTexImage2D) == 36, |
1057 Sizeof_CompressedTexImage2D_is_not_36); | 1069 "size of CompressedTexImage2D should be 36"); |
1058 COMPILE_ASSERT(offsetof(CompressedTexImage2D, header) == 0, | 1070 static_assert(offsetof(CompressedTexImage2D, header) == 0, |
1059 OffsetOf_CompressedTexImage2D_header_not_0); | 1071 "offset of CompressedTexImage2D header should be 0"); |
1060 COMPILE_ASSERT(offsetof(CompressedTexImage2D, target) == 4, | 1072 static_assert(offsetof(CompressedTexImage2D, target) == 4, |
1061 OffsetOf_CompressedTexImage2D_target_not_4); | 1073 "offset of CompressedTexImage2D target should be 4"); |
1062 COMPILE_ASSERT(offsetof(CompressedTexImage2D, level) == 8, | 1074 static_assert(offsetof(CompressedTexImage2D, level) == 8, |
1063 OffsetOf_CompressedTexImage2D_level_not_8); | 1075 "offset of CompressedTexImage2D level should be 8"); |
1064 COMPILE_ASSERT(offsetof(CompressedTexImage2D, internalformat) == 12, | 1076 static_assert(offsetof(CompressedTexImage2D, internalformat) == 12, |
1065 OffsetOf_CompressedTexImage2D_internalformat_not_12); | 1077 "offset of CompressedTexImage2D internalformat should be 12"); |
1066 COMPILE_ASSERT(offsetof(CompressedTexImage2D, width) == 16, | 1078 static_assert(offsetof(CompressedTexImage2D, width) == 16, |
1067 OffsetOf_CompressedTexImage2D_width_not_16); | 1079 "offset of CompressedTexImage2D width should be 16"); |
1068 COMPILE_ASSERT(offsetof(CompressedTexImage2D, height) == 20, | 1080 static_assert(offsetof(CompressedTexImage2D, height) == 20, |
1069 OffsetOf_CompressedTexImage2D_height_not_20); | 1081 "offset of CompressedTexImage2D height should be 20"); |
1070 COMPILE_ASSERT(offsetof(CompressedTexImage2D, imageSize) == 24, | 1082 static_assert(offsetof(CompressedTexImage2D, imageSize) == 24, |
1071 OffsetOf_CompressedTexImage2D_imageSize_not_24); | 1083 "offset of CompressedTexImage2D imageSize should be 24"); |
1072 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 28, | 1084 static_assert(offsetof(CompressedTexImage2D, data_shm_id) == 28, |
1073 OffsetOf_CompressedTexImage2D_data_shm_id_not_28); | 1085 "offset of CompressedTexImage2D data_shm_id should be 28"); |
1074 COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 32, | 1086 static_assert(offsetof(CompressedTexImage2D, data_shm_offset) == 32, |
1075 OffsetOf_CompressedTexImage2D_data_shm_offset_not_32); | 1087 "offset of CompressedTexImage2D data_shm_offset should be 32"); |
1076 | 1088 |
1077 struct CompressedTexSubImage2DBucket { | 1089 struct CompressedTexSubImage2DBucket { |
1078 typedef CompressedTexSubImage2DBucket ValueType; | 1090 typedef CompressedTexSubImage2DBucket ValueType; |
1079 static const CommandId kCmdId = kCompressedTexSubImage2DBucket; | 1091 static const CommandId kCmdId = kCompressedTexSubImage2DBucket; |
1080 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1092 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1081 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1093 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1082 | 1094 |
1083 static uint32_t ComputeSize() { | 1095 static uint32_t ComputeSize() { |
1084 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1096 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1085 } | 1097 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 uint32_t target; | 1135 uint32_t target; |
1124 int32_t level; | 1136 int32_t level; |
1125 int32_t xoffset; | 1137 int32_t xoffset; |
1126 int32_t yoffset; | 1138 int32_t yoffset; |
1127 int32_t width; | 1139 int32_t width; |
1128 int32_t height; | 1140 int32_t height; |
1129 uint32_t format; | 1141 uint32_t format; |
1130 uint32_t bucket_id; | 1142 uint32_t bucket_id; |
1131 }; | 1143 }; |
1132 | 1144 |
1133 COMPILE_ASSERT(sizeof(CompressedTexSubImage2DBucket) == 36, | 1145 static_assert(sizeof(CompressedTexSubImage2DBucket) == 36, |
1134 Sizeof_CompressedTexSubImage2DBucket_is_not_36); | 1146 "size of CompressedTexSubImage2DBucket should be 36"); |
1135 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, header) == 0, | 1147 static_assert(offsetof(CompressedTexSubImage2DBucket, header) == 0, |
1136 OffsetOf_CompressedTexSubImage2DBucket_header_not_0); | 1148 "offset of CompressedTexSubImage2DBucket header should be 0"); |
1137 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, target) == 4, | 1149 static_assert(offsetof(CompressedTexSubImage2DBucket, target) == 4, |
1138 OffsetOf_CompressedTexSubImage2DBucket_target_not_4); | 1150 "offset of CompressedTexSubImage2DBucket target should be 4"); |
1139 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, level) == 8, | 1151 static_assert(offsetof(CompressedTexSubImage2DBucket, level) == 8, |
1140 OffsetOf_CompressedTexSubImage2DBucket_level_not_8); | 1152 "offset of CompressedTexSubImage2DBucket level should be 8"); |
1141 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12, | 1153 static_assert(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12, |
1142 OffsetOf_CompressedTexSubImage2DBucket_xoffset_not_12); | 1154 "offset of CompressedTexSubImage2DBucket xoffset should be 12"); |
1143 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16, | 1155 static_assert(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16, |
1144 OffsetOf_CompressedTexSubImage2DBucket_yoffset_not_16); | 1156 "offset of CompressedTexSubImage2DBucket yoffset should be 16"); |
1145 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, width) == 20, | 1157 static_assert(offsetof(CompressedTexSubImage2DBucket, width) == 20, |
1146 OffsetOf_CompressedTexSubImage2DBucket_width_not_20); | 1158 "offset of CompressedTexSubImage2DBucket width should be 20"); |
1147 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, height) == 24, | 1159 static_assert(offsetof(CompressedTexSubImage2DBucket, height) == 24, |
1148 OffsetOf_CompressedTexSubImage2DBucket_height_not_24); | 1160 "offset of CompressedTexSubImage2DBucket height should be 24"); |
1149 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, format) == 28, | 1161 static_assert(offsetof(CompressedTexSubImage2DBucket, format) == 28, |
1150 OffsetOf_CompressedTexSubImage2DBucket_format_not_28); | 1162 "offset of CompressedTexSubImage2DBucket format should be 28"); |
1151 COMPILE_ASSERT(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32, | 1163 static_assert(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32, |
1152 OffsetOf_CompressedTexSubImage2DBucket_bucket_id_not_32); | 1164 "offset of CompressedTexSubImage2DBucket bucket_id should be 32"); |
1153 | 1165 |
1154 struct CompressedTexSubImage2D { | 1166 struct CompressedTexSubImage2D { |
1155 typedef CompressedTexSubImage2D ValueType; | 1167 typedef CompressedTexSubImage2D ValueType; |
1156 static const CommandId kCmdId = kCompressedTexSubImage2D; | 1168 static const CommandId kCmdId = kCompressedTexSubImage2D; |
1157 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1169 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1158 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1170 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1159 | 1171 |
1160 static uint32_t ComputeSize() { | 1172 static uint32_t ComputeSize() { |
1161 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1173 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1162 } | 1174 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 int32_t xoffset; | 1221 int32_t xoffset; |
1210 int32_t yoffset; | 1222 int32_t yoffset; |
1211 int32_t width; | 1223 int32_t width; |
1212 int32_t height; | 1224 int32_t height; |
1213 uint32_t format; | 1225 uint32_t format; |
1214 int32_t imageSize; | 1226 int32_t imageSize; |
1215 uint32_t data_shm_id; | 1227 uint32_t data_shm_id; |
1216 uint32_t data_shm_offset; | 1228 uint32_t data_shm_offset; |
1217 }; | 1229 }; |
1218 | 1230 |
1219 COMPILE_ASSERT(sizeof(CompressedTexSubImage2D) == 44, | 1231 static_assert(sizeof(CompressedTexSubImage2D) == 44, |
1220 Sizeof_CompressedTexSubImage2D_is_not_44); | 1232 "size of CompressedTexSubImage2D should be 44"); |
1221 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, header) == 0, | 1233 static_assert(offsetof(CompressedTexSubImage2D, header) == 0, |
1222 OffsetOf_CompressedTexSubImage2D_header_not_0); | 1234 "offset of CompressedTexSubImage2D header should be 0"); |
1223 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, target) == 4, | 1235 static_assert(offsetof(CompressedTexSubImage2D, target) == 4, |
1224 OffsetOf_CompressedTexSubImage2D_target_not_4); | 1236 "offset of CompressedTexSubImage2D target should be 4"); |
1225 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, level) == 8, | 1237 static_assert(offsetof(CompressedTexSubImage2D, level) == 8, |
1226 OffsetOf_CompressedTexSubImage2D_level_not_8); | 1238 "offset of CompressedTexSubImage2D level should be 8"); |
1227 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, xoffset) == 12, | 1239 static_assert(offsetof(CompressedTexSubImage2D, xoffset) == 12, |
1228 OffsetOf_CompressedTexSubImage2D_xoffset_not_12); | 1240 "offset of CompressedTexSubImage2D xoffset should be 12"); |
1229 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, yoffset) == 16, | 1241 static_assert(offsetof(CompressedTexSubImage2D, yoffset) == 16, |
1230 OffsetOf_CompressedTexSubImage2D_yoffset_not_16); | 1242 "offset of CompressedTexSubImage2D yoffset should be 16"); |
1231 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, width) == 20, | 1243 static_assert(offsetof(CompressedTexSubImage2D, width) == 20, |
1232 OffsetOf_CompressedTexSubImage2D_width_not_20); | 1244 "offset of CompressedTexSubImage2D width should be 20"); |
1233 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, height) == 24, | 1245 static_assert(offsetof(CompressedTexSubImage2D, height) == 24, |
1234 OffsetOf_CompressedTexSubImage2D_height_not_24); | 1246 "offset of CompressedTexSubImage2D height should be 24"); |
1235 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, format) == 28, | 1247 static_assert(offsetof(CompressedTexSubImage2D, format) == 28, |
1236 OffsetOf_CompressedTexSubImage2D_format_not_28); | 1248 "offset of CompressedTexSubImage2D format should be 28"); |
1237 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, imageSize) == 32, | 1249 static_assert(offsetof(CompressedTexSubImage2D, imageSize) == 32, |
1238 OffsetOf_CompressedTexSubImage2D_imageSize_not_32); | 1250 "offset of CompressedTexSubImage2D imageSize should be 32"); |
1239 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, | 1251 static_assert(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, |
1240 OffsetOf_CompressedTexSubImage2D_data_shm_id_not_36); | 1252 "offset of CompressedTexSubImage2D data_shm_id should be 36"); |
1241 COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, | 1253 static_assert(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, |
1242 OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40); | 1254 "offset of CompressedTexSubImage2D data_shm_offset should be 40"); |
1243 | 1255 |
1244 struct CopyBufferSubData { | 1256 struct CopyBufferSubData { |
1245 typedef CopyBufferSubData ValueType; | 1257 typedef CopyBufferSubData ValueType; |
1246 static const CommandId kCmdId = kCopyBufferSubData; | 1258 static const CommandId kCmdId = kCopyBufferSubData; |
1247 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1259 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1248 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1260 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1249 | 1261 |
1250 static uint32_t ComputeSize() { | 1262 static uint32_t ComputeSize() { |
1251 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1263 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1252 } | 1264 } |
(...skipping 25 matching lines...) Expand all Loading... |
1278 } | 1290 } |
1279 | 1291 |
1280 gpu::CommandHeader header; | 1292 gpu::CommandHeader header; |
1281 uint32_t readtarget; | 1293 uint32_t readtarget; |
1282 uint32_t writetarget; | 1294 uint32_t writetarget; |
1283 int32_t readoffset; | 1295 int32_t readoffset; |
1284 int32_t writeoffset; | 1296 int32_t writeoffset; |
1285 int32_t size; | 1297 int32_t size; |
1286 }; | 1298 }; |
1287 | 1299 |
1288 COMPILE_ASSERT(sizeof(CopyBufferSubData) == 24, | 1300 static_assert(sizeof(CopyBufferSubData) == 24, |
1289 Sizeof_CopyBufferSubData_is_not_24); | 1301 "size of CopyBufferSubData should be 24"); |
1290 COMPILE_ASSERT(offsetof(CopyBufferSubData, header) == 0, | 1302 static_assert(offsetof(CopyBufferSubData, header) == 0, |
1291 OffsetOf_CopyBufferSubData_header_not_0); | 1303 "offset of CopyBufferSubData header should be 0"); |
1292 COMPILE_ASSERT(offsetof(CopyBufferSubData, readtarget) == 4, | 1304 static_assert(offsetof(CopyBufferSubData, readtarget) == 4, |
1293 OffsetOf_CopyBufferSubData_readtarget_not_4); | 1305 "offset of CopyBufferSubData readtarget should be 4"); |
1294 COMPILE_ASSERT(offsetof(CopyBufferSubData, writetarget) == 8, | 1306 static_assert(offsetof(CopyBufferSubData, writetarget) == 8, |
1295 OffsetOf_CopyBufferSubData_writetarget_not_8); | 1307 "offset of CopyBufferSubData writetarget should be 8"); |
1296 COMPILE_ASSERT(offsetof(CopyBufferSubData, readoffset) == 12, | 1308 static_assert(offsetof(CopyBufferSubData, readoffset) == 12, |
1297 OffsetOf_CopyBufferSubData_readoffset_not_12); | 1309 "offset of CopyBufferSubData readoffset should be 12"); |
1298 COMPILE_ASSERT(offsetof(CopyBufferSubData, writeoffset) == 16, | 1310 static_assert(offsetof(CopyBufferSubData, writeoffset) == 16, |
1299 OffsetOf_CopyBufferSubData_writeoffset_not_16); | 1311 "offset of CopyBufferSubData writeoffset should be 16"); |
1300 COMPILE_ASSERT(offsetof(CopyBufferSubData, size) == 20, | 1312 static_assert(offsetof(CopyBufferSubData, size) == 20, |
1301 OffsetOf_CopyBufferSubData_size_not_20); | 1313 "offset of CopyBufferSubData size should be 20"); |
1302 | 1314 |
1303 struct CopyTexImage2D { | 1315 struct CopyTexImage2D { |
1304 typedef CopyTexImage2D ValueType; | 1316 typedef CopyTexImage2D ValueType; |
1305 static const CommandId kCmdId = kCopyTexImage2D; | 1317 static const CommandId kCmdId = kCopyTexImage2D; |
1306 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1318 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1307 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1319 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1308 | 1320 |
1309 static uint32_t ComputeSize() { | 1321 static uint32_t ComputeSize() { |
1310 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1322 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1311 } | 1323 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 uint32_t target; | 1358 uint32_t target; |
1347 int32_t level; | 1359 int32_t level; |
1348 uint32_t internalformat; | 1360 uint32_t internalformat; |
1349 int32_t x; | 1361 int32_t x; |
1350 int32_t y; | 1362 int32_t y; |
1351 int32_t width; | 1363 int32_t width; |
1352 int32_t height; | 1364 int32_t height; |
1353 static const int32_t border = 0; | 1365 static const int32_t border = 0; |
1354 }; | 1366 }; |
1355 | 1367 |
1356 COMPILE_ASSERT(sizeof(CopyTexImage2D) == 32, Sizeof_CopyTexImage2D_is_not_32); | 1368 static_assert(sizeof(CopyTexImage2D) == 32, |
1357 COMPILE_ASSERT(offsetof(CopyTexImage2D, header) == 0, | 1369 "size of CopyTexImage2D should be 32"); |
1358 OffsetOf_CopyTexImage2D_header_not_0); | 1370 static_assert(offsetof(CopyTexImage2D, header) == 0, |
1359 COMPILE_ASSERT(offsetof(CopyTexImage2D, target) == 4, | 1371 "offset of CopyTexImage2D header should be 0"); |
1360 OffsetOf_CopyTexImage2D_target_not_4); | 1372 static_assert(offsetof(CopyTexImage2D, target) == 4, |
1361 COMPILE_ASSERT(offsetof(CopyTexImage2D, level) == 8, | 1373 "offset of CopyTexImage2D target should be 4"); |
1362 OffsetOf_CopyTexImage2D_level_not_8); | 1374 static_assert(offsetof(CopyTexImage2D, level) == 8, |
1363 COMPILE_ASSERT(offsetof(CopyTexImage2D, internalformat) == 12, | 1375 "offset of CopyTexImage2D level should be 8"); |
1364 OffsetOf_CopyTexImage2D_internalformat_not_12); | 1376 static_assert(offsetof(CopyTexImage2D, internalformat) == 12, |
1365 COMPILE_ASSERT(offsetof(CopyTexImage2D, x) == 16, | 1377 "offset of CopyTexImage2D internalformat should be 12"); |
1366 OffsetOf_CopyTexImage2D_x_not_16); | 1378 static_assert(offsetof(CopyTexImage2D, x) == 16, |
1367 COMPILE_ASSERT(offsetof(CopyTexImage2D, y) == 20, | 1379 "offset of CopyTexImage2D x should be 16"); |
1368 OffsetOf_CopyTexImage2D_y_not_20); | 1380 static_assert(offsetof(CopyTexImage2D, y) == 20, |
1369 COMPILE_ASSERT(offsetof(CopyTexImage2D, width) == 24, | 1381 "offset of CopyTexImage2D y should be 20"); |
1370 OffsetOf_CopyTexImage2D_width_not_24); | 1382 static_assert(offsetof(CopyTexImage2D, width) == 24, |
1371 COMPILE_ASSERT(offsetof(CopyTexImage2D, height) == 28, | 1383 "offset of CopyTexImage2D width should be 24"); |
1372 OffsetOf_CopyTexImage2D_height_not_28); | 1384 static_assert(offsetof(CopyTexImage2D, height) == 28, |
| 1385 "offset of CopyTexImage2D height should be 28"); |
1373 | 1386 |
1374 struct CopyTexSubImage2D { | 1387 struct CopyTexSubImage2D { |
1375 typedef CopyTexSubImage2D ValueType; | 1388 typedef CopyTexSubImage2D ValueType; |
1376 static const CommandId kCmdId = kCopyTexSubImage2D; | 1389 static const CommandId kCmdId = kCopyTexSubImage2D; |
1377 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1390 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1378 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1391 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1379 | 1392 |
1380 static uint32_t ComputeSize() { | 1393 static uint32_t ComputeSize() { |
1381 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1394 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1382 } | 1395 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 uint32_t target; | 1433 uint32_t target; |
1421 int32_t level; | 1434 int32_t level; |
1422 int32_t xoffset; | 1435 int32_t xoffset; |
1423 int32_t yoffset; | 1436 int32_t yoffset; |
1424 int32_t x; | 1437 int32_t x; |
1425 int32_t y; | 1438 int32_t y; |
1426 int32_t width; | 1439 int32_t width; |
1427 int32_t height; | 1440 int32_t height; |
1428 }; | 1441 }; |
1429 | 1442 |
1430 COMPILE_ASSERT(sizeof(CopyTexSubImage2D) == 36, | 1443 static_assert(sizeof(CopyTexSubImage2D) == 36, |
1431 Sizeof_CopyTexSubImage2D_is_not_36); | 1444 "size of CopyTexSubImage2D should be 36"); |
1432 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, header) == 0, | 1445 static_assert(offsetof(CopyTexSubImage2D, header) == 0, |
1433 OffsetOf_CopyTexSubImage2D_header_not_0); | 1446 "offset of CopyTexSubImage2D header should be 0"); |
1434 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, target) == 4, | 1447 static_assert(offsetof(CopyTexSubImage2D, target) == 4, |
1435 OffsetOf_CopyTexSubImage2D_target_not_4); | 1448 "offset of CopyTexSubImage2D target should be 4"); |
1436 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, level) == 8, | 1449 static_assert(offsetof(CopyTexSubImage2D, level) == 8, |
1437 OffsetOf_CopyTexSubImage2D_level_not_8); | 1450 "offset of CopyTexSubImage2D level should be 8"); |
1438 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, xoffset) == 12, | 1451 static_assert(offsetof(CopyTexSubImage2D, xoffset) == 12, |
1439 OffsetOf_CopyTexSubImage2D_xoffset_not_12); | 1452 "offset of CopyTexSubImage2D xoffset should be 12"); |
1440 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, yoffset) == 16, | 1453 static_assert(offsetof(CopyTexSubImage2D, yoffset) == 16, |
1441 OffsetOf_CopyTexSubImage2D_yoffset_not_16); | 1454 "offset of CopyTexSubImage2D yoffset should be 16"); |
1442 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, x) == 20, | 1455 static_assert(offsetof(CopyTexSubImage2D, x) == 20, |
1443 OffsetOf_CopyTexSubImage2D_x_not_20); | 1456 "offset of CopyTexSubImage2D x should be 20"); |
1444 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, y) == 24, | 1457 static_assert(offsetof(CopyTexSubImage2D, y) == 24, |
1445 OffsetOf_CopyTexSubImage2D_y_not_24); | 1458 "offset of CopyTexSubImage2D y should be 24"); |
1446 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, width) == 28, | 1459 static_assert(offsetof(CopyTexSubImage2D, width) == 28, |
1447 OffsetOf_CopyTexSubImage2D_width_not_28); | 1460 "offset of CopyTexSubImage2D width should be 28"); |
1448 COMPILE_ASSERT(offsetof(CopyTexSubImage2D, height) == 32, | 1461 static_assert(offsetof(CopyTexSubImage2D, height) == 32, |
1449 OffsetOf_CopyTexSubImage2D_height_not_32); | 1462 "offset of CopyTexSubImage2D height should be 32"); |
1450 | 1463 |
1451 struct CreateProgram { | 1464 struct CreateProgram { |
1452 typedef CreateProgram ValueType; | 1465 typedef CreateProgram ValueType; |
1453 static const CommandId kCmdId = kCreateProgram; | 1466 static const CommandId kCmdId = kCreateProgram; |
1454 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1467 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1455 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1468 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1456 | 1469 |
1457 static uint32_t ComputeSize() { | 1470 static uint32_t ComputeSize() { |
1458 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1471 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1459 } | 1472 } |
1460 | 1473 |
1461 void SetHeader() { header.SetCmd<ValueType>(); } | 1474 void SetHeader() { header.SetCmd<ValueType>(); } |
1462 | 1475 |
1463 void Init(uint32_t _client_id) { | 1476 void Init(uint32_t _client_id) { |
1464 SetHeader(); | 1477 SetHeader(); |
1465 client_id = _client_id; | 1478 client_id = _client_id; |
1466 } | 1479 } |
1467 | 1480 |
1468 void* Set(void* cmd, uint32_t _client_id) { | 1481 void* Set(void* cmd, uint32_t _client_id) { |
1469 static_cast<ValueType*>(cmd)->Init(_client_id); | 1482 static_cast<ValueType*>(cmd)->Init(_client_id); |
1470 return NextCmdAddress<ValueType>(cmd); | 1483 return NextCmdAddress<ValueType>(cmd); |
1471 } | 1484 } |
1472 | 1485 |
1473 gpu::CommandHeader header; | 1486 gpu::CommandHeader header; |
1474 uint32_t client_id; | 1487 uint32_t client_id; |
1475 }; | 1488 }; |
1476 | 1489 |
1477 COMPILE_ASSERT(sizeof(CreateProgram) == 8, Sizeof_CreateProgram_is_not_8); | 1490 static_assert(sizeof(CreateProgram) == 8, "size of CreateProgram should be 8"); |
1478 COMPILE_ASSERT(offsetof(CreateProgram, header) == 0, | 1491 static_assert(offsetof(CreateProgram, header) == 0, |
1479 OffsetOf_CreateProgram_header_not_0); | 1492 "offset of CreateProgram header should be 0"); |
1480 COMPILE_ASSERT(offsetof(CreateProgram, client_id) == 4, | 1493 static_assert(offsetof(CreateProgram, client_id) == 4, |
1481 OffsetOf_CreateProgram_client_id_not_4); | 1494 "offset of CreateProgram client_id should be 4"); |
1482 | 1495 |
1483 struct CreateShader { | 1496 struct CreateShader { |
1484 typedef CreateShader ValueType; | 1497 typedef CreateShader ValueType; |
1485 static const CommandId kCmdId = kCreateShader; | 1498 static const CommandId kCmdId = kCreateShader; |
1486 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1499 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1487 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1500 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1488 | 1501 |
1489 static uint32_t ComputeSize() { | 1502 static uint32_t ComputeSize() { |
1490 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1503 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1491 } | 1504 } |
1492 | 1505 |
1493 void SetHeader() { header.SetCmd<ValueType>(); } | 1506 void SetHeader() { header.SetCmd<ValueType>(); } |
1494 | 1507 |
1495 void Init(GLenum _type, uint32_t _client_id) { | 1508 void Init(GLenum _type, uint32_t _client_id) { |
1496 SetHeader(); | 1509 SetHeader(); |
1497 type = _type; | 1510 type = _type; |
1498 client_id = _client_id; | 1511 client_id = _client_id; |
1499 } | 1512 } |
1500 | 1513 |
1501 void* Set(void* cmd, GLenum _type, uint32_t _client_id) { | 1514 void* Set(void* cmd, GLenum _type, uint32_t _client_id) { |
1502 static_cast<ValueType*>(cmd)->Init(_type, _client_id); | 1515 static_cast<ValueType*>(cmd)->Init(_type, _client_id); |
1503 return NextCmdAddress<ValueType>(cmd); | 1516 return NextCmdAddress<ValueType>(cmd); |
1504 } | 1517 } |
1505 | 1518 |
1506 gpu::CommandHeader header; | 1519 gpu::CommandHeader header; |
1507 uint32_t type; | 1520 uint32_t type; |
1508 uint32_t client_id; | 1521 uint32_t client_id; |
1509 }; | 1522 }; |
1510 | 1523 |
1511 COMPILE_ASSERT(sizeof(CreateShader) == 12, Sizeof_CreateShader_is_not_12); | 1524 static_assert(sizeof(CreateShader) == 12, "size of CreateShader should be 12"); |
1512 COMPILE_ASSERT(offsetof(CreateShader, header) == 0, | 1525 static_assert(offsetof(CreateShader, header) == 0, |
1513 OffsetOf_CreateShader_header_not_0); | 1526 "offset of CreateShader header should be 0"); |
1514 COMPILE_ASSERT(offsetof(CreateShader, type) == 4, | 1527 static_assert(offsetof(CreateShader, type) == 4, |
1515 OffsetOf_CreateShader_type_not_4); | 1528 "offset of CreateShader type should be 4"); |
1516 COMPILE_ASSERT(offsetof(CreateShader, client_id) == 8, | 1529 static_assert(offsetof(CreateShader, client_id) == 8, |
1517 OffsetOf_CreateShader_client_id_not_8); | 1530 "offset of CreateShader client_id should be 8"); |
1518 | 1531 |
1519 struct CullFace { | 1532 struct CullFace { |
1520 typedef CullFace ValueType; | 1533 typedef CullFace ValueType; |
1521 static const CommandId kCmdId = kCullFace; | 1534 static const CommandId kCmdId = kCullFace; |
1522 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1535 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1523 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1536 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1524 | 1537 |
1525 static uint32_t ComputeSize() { | 1538 static uint32_t ComputeSize() { |
1526 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1539 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1527 } | 1540 } |
1528 | 1541 |
1529 void SetHeader() { header.SetCmd<ValueType>(); } | 1542 void SetHeader() { header.SetCmd<ValueType>(); } |
1530 | 1543 |
1531 void Init(GLenum _mode) { | 1544 void Init(GLenum _mode) { |
1532 SetHeader(); | 1545 SetHeader(); |
1533 mode = _mode; | 1546 mode = _mode; |
1534 } | 1547 } |
1535 | 1548 |
1536 void* Set(void* cmd, GLenum _mode) { | 1549 void* Set(void* cmd, GLenum _mode) { |
1537 static_cast<ValueType*>(cmd)->Init(_mode); | 1550 static_cast<ValueType*>(cmd)->Init(_mode); |
1538 return NextCmdAddress<ValueType>(cmd); | 1551 return NextCmdAddress<ValueType>(cmd); |
1539 } | 1552 } |
1540 | 1553 |
1541 gpu::CommandHeader header; | 1554 gpu::CommandHeader header; |
1542 uint32_t mode; | 1555 uint32_t mode; |
1543 }; | 1556 }; |
1544 | 1557 |
1545 COMPILE_ASSERT(sizeof(CullFace) == 8, Sizeof_CullFace_is_not_8); | 1558 static_assert(sizeof(CullFace) == 8, "size of CullFace should be 8"); |
1546 COMPILE_ASSERT(offsetof(CullFace, header) == 0, OffsetOf_CullFace_header_not_0); | 1559 static_assert(offsetof(CullFace, header) == 0, |
1547 COMPILE_ASSERT(offsetof(CullFace, mode) == 4, OffsetOf_CullFace_mode_not_4); | 1560 "offset of CullFace header should be 0"); |
| 1561 static_assert(offsetof(CullFace, mode) == 4, |
| 1562 "offset of CullFace mode should be 4"); |
1548 | 1563 |
1549 struct DeleteBuffersImmediate { | 1564 struct DeleteBuffersImmediate { |
1550 typedef DeleteBuffersImmediate ValueType; | 1565 typedef DeleteBuffersImmediate ValueType; |
1551 static const CommandId kCmdId = kDeleteBuffersImmediate; | 1566 static const CommandId kCmdId = kDeleteBuffersImmediate; |
1552 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 1567 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
1553 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1568 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1554 | 1569 |
1555 static uint32_t ComputeDataSize(GLsizei n) { | 1570 static uint32_t ComputeDataSize(GLsizei n) { |
1556 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 1571 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
1557 } | 1572 } |
(...skipping 16 matching lines...) Expand all Loading... |
1574 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) { | 1589 void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) { |
1575 static_cast<ValueType*>(cmd)->Init(_n, _buffers); | 1590 static_cast<ValueType*>(cmd)->Init(_n, _buffers); |
1576 const uint32_t size = ComputeSize(_n); | 1591 const uint32_t size = ComputeSize(_n); |
1577 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 1592 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
1578 } | 1593 } |
1579 | 1594 |
1580 gpu::CommandHeader header; | 1595 gpu::CommandHeader header; |
1581 int32_t n; | 1596 int32_t n; |
1582 }; | 1597 }; |
1583 | 1598 |
1584 COMPILE_ASSERT(sizeof(DeleteBuffersImmediate) == 8, | 1599 static_assert(sizeof(DeleteBuffersImmediate) == 8, |
1585 Sizeof_DeleteBuffersImmediate_is_not_8); | 1600 "size of DeleteBuffersImmediate should be 8"); |
1586 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, header) == 0, | 1601 static_assert(offsetof(DeleteBuffersImmediate, header) == 0, |
1587 OffsetOf_DeleteBuffersImmediate_header_not_0); | 1602 "offset of DeleteBuffersImmediate header should be 0"); |
1588 COMPILE_ASSERT(offsetof(DeleteBuffersImmediate, n) == 4, | 1603 static_assert(offsetof(DeleteBuffersImmediate, n) == 4, |
1589 OffsetOf_DeleteBuffersImmediate_n_not_4); | 1604 "offset of DeleteBuffersImmediate n should be 4"); |
1590 | 1605 |
1591 struct DeleteFramebuffersImmediate { | 1606 struct DeleteFramebuffersImmediate { |
1592 typedef DeleteFramebuffersImmediate ValueType; | 1607 typedef DeleteFramebuffersImmediate ValueType; |
1593 static const CommandId kCmdId = kDeleteFramebuffersImmediate; | 1608 static const CommandId kCmdId = kDeleteFramebuffersImmediate; |
1594 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 1609 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
1595 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1610 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1596 | 1611 |
1597 static uint32_t ComputeDataSize(GLsizei n) { | 1612 static uint32_t ComputeDataSize(GLsizei n) { |
1598 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 1613 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
1599 } | 1614 } |
(...skipping 16 matching lines...) Expand all Loading... |
1616 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) { | 1631 void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) { |
1617 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers); | 1632 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers); |
1618 const uint32_t size = ComputeSize(_n); | 1633 const uint32_t size = ComputeSize(_n); |
1619 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 1634 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
1620 } | 1635 } |
1621 | 1636 |
1622 gpu::CommandHeader header; | 1637 gpu::CommandHeader header; |
1623 int32_t n; | 1638 int32_t n; |
1624 }; | 1639 }; |
1625 | 1640 |
1626 COMPILE_ASSERT(sizeof(DeleteFramebuffersImmediate) == 8, | 1641 static_assert(sizeof(DeleteFramebuffersImmediate) == 8, |
1627 Sizeof_DeleteFramebuffersImmediate_is_not_8); | 1642 "size of DeleteFramebuffersImmediate should be 8"); |
1628 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, header) == 0, | 1643 static_assert(offsetof(DeleteFramebuffersImmediate, header) == 0, |
1629 OffsetOf_DeleteFramebuffersImmediate_header_not_0); | 1644 "offset of DeleteFramebuffersImmediate header should be 0"); |
1630 COMPILE_ASSERT(offsetof(DeleteFramebuffersImmediate, n) == 4, | 1645 static_assert(offsetof(DeleteFramebuffersImmediate, n) == 4, |
1631 OffsetOf_DeleteFramebuffersImmediate_n_not_4); | 1646 "offset of DeleteFramebuffersImmediate n should be 4"); |
1632 | 1647 |
1633 struct DeleteProgram { | 1648 struct DeleteProgram { |
1634 typedef DeleteProgram ValueType; | 1649 typedef DeleteProgram ValueType; |
1635 static const CommandId kCmdId = kDeleteProgram; | 1650 static const CommandId kCmdId = kDeleteProgram; |
1636 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1651 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1637 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1652 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1638 | 1653 |
1639 static uint32_t ComputeSize() { | 1654 static uint32_t ComputeSize() { |
1640 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1655 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1641 } | 1656 } |
1642 | 1657 |
1643 void SetHeader() { header.SetCmd<ValueType>(); } | 1658 void SetHeader() { header.SetCmd<ValueType>(); } |
1644 | 1659 |
1645 void Init(GLuint _program) { | 1660 void Init(GLuint _program) { |
1646 SetHeader(); | 1661 SetHeader(); |
1647 program = _program; | 1662 program = _program; |
1648 } | 1663 } |
1649 | 1664 |
1650 void* Set(void* cmd, GLuint _program) { | 1665 void* Set(void* cmd, GLuint _program) { |
1651 static_cast<ValueType*>(cmd)->Init(_program); | 1666 static_cast<ValueType*>(cmd)->Init(_program); |
1652 return NextCmdAddress<ValueType>(cmd); | 1667 return NextCmdAddress<ValueType>(cmd); |
1653 } | 1668 } |
1654 | 1669 |
1655 gpu::CommandHeader header; | 1670 gpu::CommandHeader header; |
1656 uint32_t program; | 1671 uint32_t program; |
1657 }; | 1672 }; |
1658 | 1673 |
1659 COMPILE_ASSERT(sizeof(DeleteProgram) == 8, Sizeof_DeleteProgram_is_not_8); | 1674 static_assert(sizeof(DeleteProgram) == 8, "size of DeleteProgram should be 8"); |
1660 COMPILE_ASSERT(offsetof(DeleteProgram, header) == 0, | 1675 static_assert(offsetof(DeleteProgram, header) == 0, |
1661 OffsetOf_DeleteProgram_header_not_0); | 1676 "offset of DeleteProgram header should be 0"); |
1662 COMPILE_ASSERT(offsetof(DeleteProgram, program) == 4, | 1677 static_assert(offsetof(DeleteProgram, program) == 4, |
1663 OffsetOf_DeleteProgram_program_not_4); | 1678 "offset of DeleteProgram program should be 4"); |
1664 | 1679 |
1665 struct DeleteRenderbuffersImmediate { | 1680 struct DeleteRenderbuffersImmediate { |
1666 typedef DeleteRenderbuffersImmediate ValueType; | 1681 typedef DeleteRenderbuffersImmediate ValueType; |
1667 static const CommandId kCmdId = kDeleteRenderbuffersImmediate; | 1682 static const CommandId kCmdId = kDeleteRenderbuffersImmediate; |
1668 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 1683 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
1669 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1684 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1670 | 1685 |
1671 static uint32_t ComputeDataSize(GLsizei n) { | 1686 static uint32_t ComputeDataSize(GLsizei n) { |
1672 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 1687 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
1673 } | 1688 } |
(...skipping 16 matching lines...) Expand all Loading... |
1690 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) { | 1705 void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) { |
1691 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers); | 1706 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers); |
1692 const uint32_t size = ComputeSize(_n); | 1707 const uint32_t size = ComputeSize(_n); |
1693 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 1708 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
1694 } | 1709 } |
1695 | 1710 |
1696 gpu::CommandHeader header; | 1711 gpu::CommandHeader header; |
1697 int32_t n; | 1712 int32_t n; |
1698 }; | 1713 }; |
1699 | 1714 |
1700 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8, | 1715 static_assert(sizeof(DeleteRenderbuffersImmediate) == 8, |
1701 Sizeof_DeleteRenderbuffersImmediate_is_not_8); | 1716 "size of DeleteRenderbuffersImmediate should be 8"); |
1702 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0, | 1717 static_assert(offsetof(DeleteRenderbuffersImmediate, header) == 0, |
1703 OffsetOf_DeleteRenderbuffersImmediate_header_not_0); | 1718 "offset of DeleteRenderbuffersImmediate header should be 0"); |
1704 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4, | 1719 static_assert(offsetof(DeleteRenderbuffersImmediate, n) == 4, |
1705 OffsetOf_DeleteRenderbuffersImmediate_n_not_4); | 1720 "offset of DeleteRenderbuffersImmediate n should be 4"); |
1706 | 1721 |
1707 struct DeleteSamplersImmediate { | 1722 struct DeleteSamplersImmediate { |
1708 typedef DeleteSamplersImmediate ValueType; | 1723 typedef DeleteSamplersImmediate ValueType; |
1709 static const CommandId kCmdId = kDeleteSamplersImmediate; | 1724 static const CommandId kCmdId = kDeleteSamplersImmediate; |
1710 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 1725 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
1711 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1726 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1712 | 1727 |
1713 static uint32_t ComputeDataSize(GLsizei n) { | 1728 static uint32_t ComputeDataSize(GLsizei n) { |
1714 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 1729 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
1715 } | 1730 } |
(...skipping 16 matching lines...) Expand all Loading... |
1732 void* Set(void* cmd, GLsizei _n, const GLuint* _samplers) { | 1747 void* Set(void* cmd, GLsizei _n, const GLuint* _samplers) { |
1733 static_cast<ValueType*>(cmd)->Init(_n, _samplers); | 1748 static_cast<ValueType*>(cmd)->Init(_n, _samplers); |
1734 const uint32_t size = ComputeSize(_n); | 1749 const uint32_t size = ComputeSize(_n); |
1735 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 1750 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
1736 } | 1751 } |
1737 | 1752 |
1738 gpu::CommandHeader header; | 1753 gpu::CommandHeader header; |
1739 int32_t n; | 1754 int32_t n; |
1740 }; | 1755 }; |
1741 | 1756 |
1742 COMPILE_ASSERT(sizeof(DeleteSamplersImmediate) == 8, | 1757 static_assert(sizeof(DeleteSamplersImmediate) == 8, |
1743 Sizeof_DeleteSamplersImmediate_is_not_8); | 1758 "size of DeleteSamplersImmediate should be 8"); |
1744 COMPILE_ASSERT(offsetof(DeleteSamplersImmediate, header) == 0, | 1759 static_assert(offsetof(DeleteSamplersImmediate, header) == 0, |
1745 OffsetOf_DeleteSamplersImmediate_header_not_0); | 1760 "offset of DeleteSamplersImmediate header should be 0"); |
1746 COMPILE_ASSERT(offsetof(DeleteSamplersImmediate, n) == 4, | 1761 static_assert(offsetof(DeleteSamplersImmediate, n) == 4, |
1747 OffsetOf_DeleteSamplersImmediate_n_not_4); | 1762 "offset of DeleteSamplersImmediate n should be 4"); |
1748 | 1763 |
1749 struct DeleteShader { | 1764 struct DeleteShader { |
1750 typedef DeleteShader ValueType; | 1765 typedef DeleteShader ValueType; |
1751 static const CommandId kCmdId = kDeleteShader; | 1766 static const CommandId kCmdId = kDeleteShader; |
1752 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1767 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1753 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1768 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1754 | 1769 |
1755 static uint32_t ComputeSize() { | 1770 static uint32_t ComputeSize() { |
1756 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1771 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1757 } | 1772 } |
1758 | 1773 |
1759 void SetHeader() { header.SetCmd<ValueType>(); } | 1774 void SetHeader() { header.SetCmd<ValueType>(); } |
1760 | 1775 |
1761 void Init(GLuint _shader) { | 1776 void Init(GLuint _shader) { |
1762 SetHeader(); | 1777 SetHeader(); |
1763 shader = _shader; | 1778 shader = _shader; |
1764 } | 1779 } |
1765 | 1780 |
1766 void* Set(void* cmd, GLuint _shader) { | 1781 void* Set(void* cmd, GLuint _shader) { |
1767 static_cast<ValueType*>(cmd)->Init(_shader); | 1782 static_cast<ValueType*>(cmd)->Init(_shader); |
1768 return NextCmdAddress<ValueType>(cmd); | 1783 return NextCmdAddress<ValueType>(cmd); |
1769 } | 1784 } |
1770 | 1785 |
1771 gpu::CommandHeader header; | 1786 gpu::CommandHeader header; |
1772 uint32_t shader; | 1787 uint32_t shader; |
1773 }; | 1788 }; |
1774 | 1789 |
1775 COMPILE_ASSERT(sizeof(DeleteShader) == 8, Sizeof_DeleteShader_is_not_8); | 1790 static_assert(sizeof(DeleteShader) == 8, "size of DeleteShader should be 8"); |
1776 COMPILE_ASSERT(offsetof(DeleteShader, header) == 0, | 1791 static_assert(offsetof(DeleteShader, header) == 0, |
1777 OffsetOf_DeleteShader_header_not_0); | 1792 "offset of DeleteShader header should be 0"); |
1778 COMPILE_ASSERT(offsetof(DeleteShader, shader) == 4, | 1793 static_assert(offsetof(DeleteShader, shader) == 4, |
1779 OffsetOf_DeleteShader_shader_not_4); | 1794 "offset of DeleteShader shader should be 4"); |
1780 | 1795 |
1781 struct DeleteTexturesImmediate { | 1796 struct DeleteTexturesImmediate { |
1782 typedef DeleteTexturesImmediate ValueType; | 1797 typedef DeleteTexturesImmediate ValueType; |
1783 static const CommandId kCmdId = kDeleteTexturesImmediate; | 1798 static const CommandId kCmdId = kDeleteTexturesImmediate; |
1784 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 1799 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
1785 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1800 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1786 | 1801 |
1787 static uint32_t ComputeDataSize(GLsizei n) { | 1802 static uint32_t ComputeDataSize(GLsizei n) { |
1788 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 1803 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
1789 } | 1804 } |
(...skipping 16 matching lines...) Expand all Loading... |
1806 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) { | 1821 void* Set(void* cmd, GLsizei _n, const GLuint* _textures) { |
1807 static_cast<ValueType*>(cmd)->Init(_n, _textures); | 1822 static_cast<ValueType*>(cmd)->Init(_n, _textures); |
1808 const uint32_t size = ComputeSize(_n); | 1823 const uint32_t size = ComputeSize(_n); |
1809 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 1824 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
1810 } | 1825 } |
1811 | 1826 |
1812 gpu::CommandHeader header; | 1827 gpu::CommandHeader header; |
1813 int32_t n; | 1828 int32_t n; |
1814 }; | 1829 }; |
1815 | 1830 |
1816 COMPILE_ASSERT(sizeof(DeleteTexturesImmediate) == 8, | 1831 static_assert(sizeof(DeleteTexturesImmediate) == 8, |
1817 Sizeof_DeleteTexturesImmediate_is_not_8); | 1832 "size of DeleteTexturesImmediate should be 8"); |
1818 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, header) == 0, | 1833 static_assert(offsetof(DeleteTexturesImmediate, header) == 0, |
1819 OffsetOf_DeleteTexturesImmediate_header_not_0); | 1834 "offset of DeleteTexturesImmediate header should be 0"); |
1820 COMPILE_ASSERT(offsetof(DeleteTexturesImmediate, n) == 4, | 1835 static_assert(offsetof(DeleteTexturesImmediate, n) == 4, |
1821 OffsetOf_DeleteTexturesImmediate_n_not_4); | 1836 "offset of DeleteTexturesImmediate n should be 4"); |
1822 | 1837 |
1823 struct DeleteTransformFeedbacksImmediate { | 1838 struct DeleteTransformFeedbacksImmediate { |
1824 typedef DeleteTransformFeedbacksImmediate ValueType; | 1839 typedef DeleteTransformFeedbacksImmediate ValueType; |
1825 static const CommandId kCmdId = kDeleteTransformFeedbacksImmediate; | 1840 static const CommandId kCmdId = kDeleteTransformFeedbacksImmediate; |
1826 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 1841 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
1827 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1842 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1828 | 1843 |
1829 static uint32_t ComputeDataSize(GLsizei n) { | 1844 static uint32_t ComputeDataSize(GLsizei n) { |
1830 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 1845 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
1831 } | 1846 } |
(...skipping 16 matching lines...) Expand all Loading... |
1848 void* Set(void* cmd, GLsizei _n, const GLuint* _ids) { | 1863 void* Set(void* cmd, GLsizei _n, const GLuint* _ids) { |
1849 static_cast<ValueType*>(cmd)->Init(_n, _ids); | 1864 static_cast<ValueType*>(cmd)->Init(_n, _ids); |
1850 const uint32_t size = ComputeSize(_n); | 1865 const uint32_t size = ComputeSize(_n); |
1851 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 1866 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
1852 } | 1867 } |
1853 | 1868 |
1854 gpu::CommandHeader header; | 1869 gpu::CommandHeader header; |
1855 int32_t n; | 1870 int32_t n; |
1856 }; | 1871 }; |
1857 | 1872 |
1858 COMPILE_ASSERT(sizeof(DeleteTransformFeedbacksImmediate) == 8, | 1873 static_assert(sizeof(DeleteTransformFeedbacksImmediate) == 8, |
1859 Sizeof_DeleteTransformFeedbacksImmediate_is_not_8); | 1874 "size of DeleteTransformFeedbacksImmediate should be 8"); |
1860 COMPILE_ASSERT(offsetof(DeleteTransformFeedbacksImmediate, header) == 0, | 1875 static_assert(offsetof(DeleteTransformFeedbacksImmediate, header) == 0, |
1861 OffsetOf_DeleteTransformFeedbacksImmediate_header_not_0); | 1876 "offset of DeleteTransformFeedbacksImmediate header should be 0"); |
1862 COMPILE_ASSERT(offsetof(DeleteTransformFeedbacksImmediate, n) == 4, | 1877 static_assert(offsetof(DeleteTransformFeedbacksImmediate, n) == 4, |
1863 OffsetOf_DeleteTransformFeedbacksImmediate_n_not_4); | 1878 "offset of DeleteTransformFeedbacksImmediate n should be 4"); |
1864 | 1879 |
1865 struct DepthFunc { | 1880 struct DepthFunc { |
1866 typedef DepthFunc ValueType; | 1881 typedef DepthFunc ValueType; |
1867 static const CommandId kCmdId = kDepthFunc; | 1882 static const CommandId kCmdId = kDepthFunc; |
1868 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1883 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1869 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1884 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1870 | 1885 |
1871 static uint32_t ComputeSize() { | 1886 static uint32_t ComputeSize() { |
1872 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1887 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1873 } | 1888 } |
1874 | 1889 |
1875 void SetHeader() { header.SetCmd<ValueType>(); } | 1890 void SetHeader() { header.SetCmd<ValueType>(); } |
1876 | 1891 |
1877 void Init(GLenum _func) { | 1892 void Init(GLenum _func) { |
1878 SetHeader(); | 1893 SetHeader(); |
1879 func = _func; | 1894 func = _func; |
1880 } | 1895 } |
1881 | 1896 |
1882 void* Set(void* cmd, GLenum _func) { | 1897 void* Set(void* cmd, GLenum _func) { |
1883 static_cast<ValueType*>(cmd)->Init(_func); | 1898 static_cast<ValueType*>(cmd)->Init(_func); |
1884 return NextCmdAddress<ValueType>(cmd); | 1899 return NextCmdAddress<ValueType>(cmd); |
1885 } | 1900 } |
1886 | 1901 |
1887 gpu::CommandHeader header; | 1902 gpu::CommandHeader header; |
1888 uint32_t func; | 1903 uint32_t func; |
1889 }; | 1904 }; |
1890 | 1905 |
1891 COMPILE_ASSERT(sizeof(DepthFunc) == 8, Sizeof_DepthFunc_is_not_8); | 1906 static_assert(sizeof(DepthFunc) == 8, "size of DepthFunc should be 8"); |
1892 COMPILE_ASSERT(offsetof(DepthFunc, header) == 0, | 1907 static_assert(offsetof(DepthFunc, header) == 0, |
1893 OffsetOf_DepthFunc_header_not_0); | 1908 "offset of DepthFunc header should be 0"); |
1894 COMPILE_ASSERT(offsetof(DepthFunc, func) == 4, OffsetOf_DepthFunc_func_not_4); | 1909 static_assert(offsetof(DepthFunc, func) == 4, |
| 1910 "offset of DepthFunc func should be 4"); |
1895 | 1911 |
1896 struct DepthMask { | 1912 struct DepthMask { |
1897 typedef DepthMask ValueType; | 1913 typedef DepthMask ValueType; |
1898 static const CommandId kCmdId = kDepthMask; | 1914 static const CommandId kCmdId = kDepthMask; |
1899 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1915 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1900 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1916 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1901 | 1917 |
1902 static uint32_t ComputeSize() { | 1918 static uint32_t ComputeSize() { |
1903 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1919 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1904 } | 1920 } |
1905 | 1921 |
1906 void SetHeader() { header.SetCmd<ValueType>(); } | 1922 void SetHeader() { header.SetCmd<ValueType>(); } |
1907 | 1923 |
1908 void Init(GLboolean _flag) { | 1924 void Init(GLboolean _flag) { |
1909 SetHeader(); | 1925 SetHeader(); |
1910 flag = _flag; | 1926 flag = _flag; |
1911 } | 1927 } |
1912 | 1928 |
1913 void* Set(void* cmd, GLboolean _flag) { | 1929 void* Set(void* cmd, GLboolean _flag) { |
1914 static_cast<ValueType*>(cmd)->Init(_flag); | 1930 static_cast<ValueType*>(cmd)->Init(_flag); |
1915 return NextCmdAddress<ValueType>(cmd); | 1931 return NextCmdAddress<ValueType>(cmd); |
1916 } | 1932 } |
1917 | 1933 |
1918 gpu::CommandHeader header; | 1934 gpu::CommandHeader header; |
1919 uint32_t flag; | 1935 uint32_t flag; |
1920 }; | 1936 }; |
1921 | 1937 |
1922 COMPILE_ASSERT(sizeof(DepthMask) == 8, Sizeof_DepthMask_is_not_8); | 1938 static_assert(sizeof(DepthMask) == 8, "size of DepthMask should be 8"); |
1923 COMPILE_ASSERT(offsetof(DepthMask, header) == 0, | 1939 static_assert(offsetof(DepthMask, header) == 0, |
1924 OffsetOf_DepthMask_header_not_0); | 1940 "offset of DepthMask header should be 0"); |
1925 COMPILE_ASSERT(offsetof(DepthMask, flag) == 4, OffsetOf_DepthMask_flag_not_4); | 1941 static_assert(offsetof(DepthMask, flag) == 4, |
| 1942 "offset of DepthMask flag should be 4"); |
1926 | 1943 |
1927 struct DepthRangef { | 1944 struct DepthRangef { |
1928 typedef DepthRangef ValueType; | 1945 typedef DepthRangef ValueType; |
1929 static const CommandId kCmdId = kDepthRangef; | 1946 static const CommandId kCmdId = kDepthRangef; |
1930 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1947 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1931 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1948 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1932 | 1949 |
1933 static uint32_t ComputeSize() { | 1950 static uint32_t ComputeSize() { |
1934 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1951 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1935 } | 1952 } |
1936 | 1953 |
1937 void SetHeader() { header.SetCmd<ValueType>(); } | 1954 void SetHeader() { header.SetCmd<ValueType>(); } |
1938 | 1955 |
1939 void Init(GLclampf _zNear, GLclampf _zFar) { | 1956 void Init(GLclampf _zNear, GLclampf _zFar) { |
1940 SetHeader(); | 1957 SetHeader(); |
1941 zNear = _zNear; | 1958 zNear = _zNear; |
1942 zFar = _zFar; | 1959 zFar = _zFar; |
1943 } | 1960 } |
1944 | 1961 |
1945 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) { | 1962 void* Set(void* cmd, GLclampf _zNear, GLclampf _zFar) { |
1946 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar); | 1963 static_cast<ValueType*>(cmd)->Init(_zNear, _zFar); |
1947 return NextCmdAddress<ValueType>(cmd); | 1964 return NextCmdAddress<ValueType>(cmd); |
1948 } | 1965 } |
1949 | 1966 |
1950 gpu::CommandHeader header; | 1967 gpu::CommandHeader header; |
1951 float zNear; | 1968 float zNear; |
1952 float zFar; | 1969 float zFar; |
1953 }; | 1970 }; |
1954 | 1971 |
1955 COMPILE_ASSERT(sizeof(DepthRangef) == 12, Sizeof_DepthRangef_is_not_12); | 1972 static_assert(sizeof(DepthRangef) == 12, "size of DepthRangef should be 12"); |
1956 COMPILE_ASSERT(offsetof(DepthRangef, header) == 0, | 1973 static_assert(offsetof(DepthRangef, header) == 0, |
1957 OffsetOf_DepthRangef_header_not_0); | 1974 "offset of DepthRangef header should be 0"); |
1958 COMPILE_ASSERT(offsetof(DepthRangef, zNear) == 4, | 1975 static_assert(offsetof(DepthRangef, zNear) == 4, |
1959 OffsetOf_DepthRangef_zNear_not_4); | 1976 "offset of DepthRangef zNear should be 4"); |
1960 COMPILE_ASSERT(offsetof(DepthRangef, zFar) == 8, | 1977 static_assert(offsetof(DepthRangef, zFar) == 8, |
1961 OffsetOf_DepthRangef_zFar_not_8); | 1978 "offset of DepthRangef zFar should be 8"); |
1962 | 1979 |
1963 struct DetachShader { | 1980 struct DetachShader { |
1964 typedef DetachShader ValueType; | 1981 typedef DetachShader ValueType; |
1965 static const CommandId kCmdId = kDetachShader; | 1982 static const CommandId kCmdId = kDetachShader; |
1966 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1983 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1967 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1984 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1968 | 1985 |
1969 static uint32_t ComputeSize() { | 1986 static uint32_t ComputeSize() { |
1970 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1987 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1971 } | 1988 } |
1972 | 1989 |
1973 void SetHeader() { header.SetCmd<ValueType>(); } | 1990 void SetHeader() { header.SetCmd<ValueType>(); } |
1974 | 1991 |
1975 void Init(GLuint _program, GLuint _shader) { | 1992 void Init(GLuint _program, GLuint _shader) { |
1976 SetHeader(); | 1993 SetHeader(); |
1977 program = _program; | 1994 program = _program; |
1978 shader = _shader; | 1995 shader = _shader; |
1979 } | 1996 } |
1980 | 1997 |
1981 void* Set(void* cmd, GLuint _program, GLuint _shader) { | 1998 void* Set(void* cmd, GLuint _program, GLuint _shader) { |
1982 static_cast<ValueType*>(cmd)->Init(_program, _shader); | 1999 static_cast<ValueType*>(cmd)->Init(_program, _shader); |
1983 return NextCmdAddress<ValueType>(cmd); | 2000 return NextCmdAddress<ValueType>(cmd); |
1984 } | 2001 } |
1985 | 2002 |
1986 gpu::CommandHeader header; | 2003 gpu::CommandHeader header; |
1987 uint32_t program; | 2004 uint32_t program; |
1988 uint32_t shader; | 2005 uint32_t shader; |
1989 }; | 2006 }; |
1990 | 2007 |
1991 COMPILE_ASSERT(sizeof(DetachShader) == 12, Sizeof_DetachShader_is_not_12); | 2008 static_assert(sizeof(DetachShader) == 12, "size of DetachShader should be 12"); |
1992 COMPILE_ASSERT(offsetof(DetachShader, header) == 0, | 2009 static_assert(offsetof(DetachShader, header) == 0, |
1993 OffsetOf_DetachShader_header_not_0); | 2010 "offset of DetachShader header should be 0"); |
1994 COMPILE_ASSERT(offsetof(DetachShader, program) == 4, | 2011 static_assert(offsetof(DetachShader, program) == 4, |
1995 OffsetOf_DetachShader_program_not_4); | 2012 "offset of DetachShader program should be 4"); |
1996 COMPILE_ASSERT(offsetof(DetachShader, shader) == 8, | 2013 static_assert(offsetof(DetachShader, shader) == 8, |
1997 OffsetOf_DetachShader_shader_not_8); | 2014 "offset of DetachShader shader should be 8"); |
1998 | 2015 |
1999 struct Disable { | 2016 struct Disable { |
2000 typedef Disable ValueType; | 2017 typedef Disable ValueType; |
2001 static const CommandId kCmdId = kDisable; | 2018 static const CommandId kCmdId = kDisable; |
2002 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2019 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2003 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2020 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2004 | 2021 |
2005 static uint32_t ComputeSize() { | 2022 static uint32_t ComputeSize() { |
2006 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2023 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2007 } | 2024 } |
2008 | 2025 |
2009 void SetHeader() { header.SetCmd<ValueType>(); } | 2026 void SetHeader() { header.SetCmd<ValueType>(); } |
2010 | 2027 |
2011 void Init(GLenum _cap) { | 2028 void Init(GLenum _cap) { |
2012 SetHeader(); | 2029 SetHeader(); |
2013 cap = _cap; | 2030 cap = _cap; |
2014 } | 2031 } |
2015 | 2032 |
2016 void* Set(void* cmd, GLenum _cap) { | 2033 void* Set(void* cmd, GLenum _cap) { |
2017 static_cast<ValueType*>(cmd)->Init(_cap); | 2034 static_cast<ValueType*>(cmd)->Init(_cap); |
2018 return NextCmdAddress<ValueType>(cmd); | 2035 return NextCmdAddress<ValueType>(cmd); |
2019 } | 2036 } |
2020 | 2037 |
2021 gpu::CommandHeader header; | 2038 gpu::CommandHeader header; |
2022 uint32_t cap; | 2039 uint32_t cap; |
2023 }; | 2040 }; |
2024 | 2041 |
2025 COMPILE_ASSERT(sizeof(Disable) == 8, Sizeof_Disable_is_not_8); | 2042 static_assert(sizeof(Disable) == 8, "size of Disable should be 8"); |
2026 COMPILE_ASSERT(offsetof(Disable, header) == 0, OffsetOf_Disable_header_not_0); | 2043 static_assert(offsetof(Disable, header) == 0, |
2027 COMPILE_ASSERT(offsetof(Disable, cap) == 4, OffsetOf_Disable_cap_not_4); | 2044 "offset of Disable header should be 0"); |
| 2045 static_assert(offsetof(Disable, cap) == 4, "offset of Disable cap should be 4"); |
2028 | 2046 |
2029 struct DisableVertexAttribArray { | 2047 struct DisableVertexAttribArray { |
2030 typedef DisableVertexAttribArray ValueType; | 2048 typedef DisableVertexAttribArray ValueType; |
2031 static const CommandId kCmdId = kDisableVertexAttribArray; | 2049 static const CommandId kCmdId = kDisableVertexAttribArray; |
2032 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2050 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2033 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2051 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2034 | 2052 |
2035 static uint32_t ComputeSize() { | 2053 static uint32_t ComputeSize() { |
2036 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2054 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2037 } | 2055 } |
2038 | 2056 |
2039 void SetHeader() { header.SetCmd<ValueType>(); } | 2057 void SetHeader() { header.SetCmd<ValueType>(); } |
2040 | 2058 |
2041 void Init(GLuint _index) { | 2059 void Init(GLuint _index) { |
2042 SetHeader(); | 2060 SetHeader(); |
2043 index = _index; | 2061 index = _index; |
2044 } | 2062 } |
2045 | 2063 |
2046 void* Set(void* cmd, GLuint _index) { | 2064 void* Set(void* cmd, GLuint _index) { |
2047 static_cast<ValueType*>(cmd)->Init(_index); | 2065 static_cast<ValueType*>(cmd)->Init(_index); |
2048 return NextCmdAddress<ValueType>(cmd); | 2066 return NextCmdAddress<ValueType>(cmd); |
2049 } | 2067 } |
2050 | 2068 |
2051 gpu::CommandHeader header; | 2069 gpu::CommandHeader header; |
2052 uint32_t index; | 2070 uint32_t index; |
2053 }; | 2071 }; |
2054 | 2072 |
2055 COMPILE_ASSERT(sizeof(DisableVertexAttribArray) == 8, | 2073 static_assert(sizeof(DisableVertexAttribArray) == 8, |
2056 Sizeof_DisableVertexAttribArray_is_not_8); | 2074 "size of DisableVertexAttribArray should be 8"); |
2057 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, header) == 0, | 2075 static_assert(offsetof(DisableVertexAttribArray, header) == 0, |
2058 OffsetOf_DisableVertexAttribArray_header_not_0); | 2076 "offset of DisableVertexAttribArray header should be 0"); |
2059 COMPILE_ASSERT(offsetof(DisableVertexAttribArray, index) == 4, | 2077 static_assert(offsetof(DisableVertexAttribArray, index) == 4, |
2060 OffsetOf_DisableVertexAttribArray_index_not_4); | 2078 "offset of DisableVertexAttribArray index should be 4"); |
2061 | 2079 |
2062 struct DrawArrays { | 2080 struct DrawArrays { |
2063 typedef DrawArrays ValueType; | 2081 typedef DrawArrays ValueType; |
2064 static const CommandId kCmdId = kDrawArrays; | 2082 static const CommandId kCmdId = kDrawArrays; |
2065 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2083 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2066 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 2084 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
2067 | 2085 |
2068 static uint32_t ComputeSize() { | 2086 static uint32_t ComputeSize() { |
2069 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2087 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2070 } | 2088 } |
(...skipping 11 matching lines...) Expand all Loading... |
2082 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count); | 2100 static_cast<ValueType*>(cmd)->Init(_mode, _first, _count); |
2083 return NextCmdAddress<ValueType>(cmd); | 2101 return NextCmdAddress<ValueType>(cmd); |
2084 } | 2102 } |
2085 | 2103 |
2086 gpu::CommandHeader header; | 2104 gpu::CommandHeader header; |
2087 uint32_t mode; | 2105 uint32_t mode; |
2088 int32_t first; | 2106 int32_t first; |
2089 int32_t count; | 2107 int32_t count; |
2090 }; | 2108 }; |
2091 | 2109 |
2092 COMPILE_ASSERT(sizeof(DrawArrays) == 16, Sizeof_DrawArrays_is_not_16); | 2110 static_assert(sizeof(DrawArrays) == 16, "size of DrawArrays should be 16"); |
2093 COMPILE_ASSERT(offsetof(DrawArrays, header) == 0, | 2111 static_assert(offsetof(DrawArrays, header) == 0, |
2094 OffsetOf_DrawArrays_header_not_0); | 2112 "offset of DrawArrays header should be 0"); |
2095 COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4, OffsetOf_DrawArrays_mode_not_4); | 2113 static_assert(offsetof(DrawArrays, mode) == 4, |
2096 COMPILE_ASSERT(offsetof(DrawArrays, first) == 8, | 2114 "offset of DrawArrays mode should be 4"); |
2097 OffsetOf_DrawArrays_first_not_8); | 2115 static_assert(offsetof(DrawArrays, first) == 8, |
2098 COMPILE_ASSERT(offsetof(DrawArrays, count) == 12, | 2116 "offset of DrawArrays first should be 8"); |
2099 OffsetOf_DrawArrays_count_not_12); | 2117 static_assert(offsetof(DrawArrays, count) == 12, |
| 2118 "offset of DrawArrays count should be 12"); |
2100 | 2119 |
2101 struct DrawElements { | 2120 struct DrawElements { |
2102 typedef DrawElements ValueType; | 2121 typedef DrawElements ValueType; |
2103 static const CommandId kCmdId = kDrawElements; | 2122 static const CommandId kCmdId = kDrawElements; |
2104 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2123 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2105 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 2124 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
2106 | 2125 |
2107 static uint32_t ComputeSize() { | 2126 static uint32_t ComputeSize() { |
2108 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2127 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2109 } | 2128 } |
(...skipping 17 matching lines...) Expand all Loading... |
2127 return NextCmdAddress<ValueType>(cmd); | 2146 return NextCmdAddress<ValueType>(cmd); |
2128 } | 2147 } |
2129 | 2148 |
2130 gpu::CommandHeader header; | 2149 gpu::CommandHeader header; |
2131 uint32_t mode; | 2150 uint32_t mode; |
2132 int32_t count; | 2151 int32_t count; |
2133 uint32_t type; | 2152 uint32_t type; |
2134 uint32_t index_offset; | 2153 uint32_t index_offset; |
2135 }; | 2154 }; |
2136 | 2155 |
2137 COMPILE_ASSERT(sizeof(DrawElements) == 20, Sizeof_DrawElements_is_not_20); | 2156 static_assert(sizeof(DrawElements) == 20, "size of DrawElements should be 20"); |
2138 COMPILE_ASSERT(offsetof(DrawElements, header) == 0, | 2157 static_assert(offsetof(DrawElements, header) == 0, |
2139 OffsetOf_DrawElements_header_not_0); | 2158 "offset of DrawElements header should be 0"); |
2140 COMPILE_ASSERT(offsetof(DrawElements, mode) == 4, | 2159 static_assert(offsetof(DrawElements, mode) == 4, |
2141 OffsetOf_DrawElements_mode_not_4); | 2160 "offset of DrawElements mode should be 4"); |
2142 COMPILE_ASSERT(offsetof(DrawElements, count) == 8, | 2161 static_assert(offsetof(DrawElements, count) == 8, |
2143 OffsetOf_DrawElements_count_not_8); | 2162 "offset of DrawElements count should be 8"); |
2144 COMPILE_ASSERT(offsetof(DrawElements, type) == 12, | 2163 static_assert(offsetof(DrawElements, type) == 12, |
2145 OffsetOf_DrawElements_type_not_12); | 2164 "offset of DrawElements type should be 12"); |
2146 COMPILE_ASSERT(offsetof(DrawElements, index_offset) == 16, | 2165 static_assert(offsetof(DrawElements, index_offset) == 16, |
2147 OffsetOf_DrawElements_index_offset_not_16); | 2166 "offset of DrawElements index_offset should be 16"); |
2148 | 2167 |
2149 struct Enable { | 2168 struct Enable { |
2150 typedef Enable ValueType; | 2169 typedef Enable ValueType; |
2151 static const CommandId kCmdId = kEnable; | 2170 static const CommandId kCmdId = kEnable; |
2152 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2171 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2153 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2172 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2154 | 2173 |
2155 static uint32_t ComputeSize() { | 2174 static uint32_t ComputeSize() { |
2156 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2175 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2157 } | 2176 } |
2158 | 2177 |
2159 void SetHeader() { header.SetCmd<ValueType>(); } | 2178 void SetHeader() { header.SetCmd<ValueType>(); } |
2160 | 2179 |
2161 void Init(GLenum _cap) { | 2180 void Init(GLenum _cap) { |
2162 SetHeader(); | 2181 SetHeader(); |
2163 cap = _cap; | 2182 cap = _cap; |
2164 } | 2183 } |
2165 | 2184 |
2166 void* Set(void* cmd, GLenum _cap) { | 2185 void* Set(void* cmd, GLenum _cap) { |
2167 static_cast<ValueType*>(cmd)->Init(_cap); | 2186 static_cast<ValueType*>(cmd)->Init(_cap); |
2168 return NextCmdAddress<ValueType>(cmd); | 2187 return NextCmdAddress<ValueType>(cmd); |
2169 } | 2188 } |
2170 | 2189 |
2171 gpu::CommandHeader header; | 2190 gpu::CommandHeader header; |
2172 uint32_t cap; | 2191 uint32_t cap; |
2173 }; | 2192 }; |
2174 | 2193 |
2175 COMPILE_ASSERT(sizeof(Enable) == 8, Sizeof_Enable_is_not_8); | 2194 static_assert(sizeof(Enable) == 8, "size of Enable should be 8"); |
2176 COMPILE_ASSERT(offsetof(Enable, header) == 0, OffsetOf_Enable_header_not_0); | 2195 static_assert(offsetof(Enable, header) == 0, |
2177 COMPILE_ASSERT(offsetof(Enable, cap) == 4, OffsetOf_Enable_cap_not_4); | 2196 "offset of Enable header should be 0"); |
| 2197 static_assert(offsetof(Enable, cap) == 4, "offset of Enable cap should be 4"); |
2178 | 2198 |
2179 struct EnableVertexAttribArray { | 2199 struct EnableVertexAttribArray { |
2180 typedef EnableVertexAttribArray ValueType; | 2200 typedef EnableVertexAttribArray ValueType; |
2181 static const CommandId kCmdId = kEnableVertexAttribArray; | 2201 static const CommandId kCmdId = kEnableVertexAttribArray; |
2182 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2202 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2183 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2203 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2184 | 2204 |
2185 static uint32_t ComputeSize() { | 2205 static uint32_t ComputeSize() { |
2186 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2206 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2187 } | 2207 } |
2188 | 2208 |
2189 void SetHeader() { header.SetCmd<ValueType>(); } | 2209 void SetHeader() { header.SetCmd<ValueType>(); } |
2190 | 2210 |
2191 void Init(GLuint _index) { | 2211 void Init(GLuint _index) { |
2192 SetHeader(); | 2212 SetHeader(); |
2193 index = _index; | 2213 index = _index; |
2194 } | 2214 } |
2195 | 2215 |
2196 void* Set(void* cmd, GLuint _index) { | 2216 void* Set(void* cmd, GLuint _index) { |
2197 static_cast<ValueType*>(cmd)->Init(_index); | 2217 static_cast<ValueType*>(cmd)->Init(_index); |
2198 return NextCmdAddress<ValueType>(cmd); | 2218 return NextCmdAddress<ValueType>(cmd); |
2199 } | 2219 } |
2200 | 2220 |
2201 gpu::CommandHeader header; | 2221 gpu::CommandHeader header; |
2202 uint32_t index; | 2222 uint32_t index; |
2203 }; | 2223 }; |
2204 | 2224 |
2205 COMPILE_ASSERT(sizeof(EnableVertexAttribArray) == 8, | 2225 static_assert(sizeof(EnableVertexAttribArray) == 8, |
2206 Sizeof_EnableVertexAttribArray_is_not_8); | 2226 "size of EnableVertexAttribArray should be 8"); |
2207 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, header) == 0, | 2227 static_assert(offsetof(EnableVertexAttribArray, header) == 0, |
2208 OffsetOf_EnableVertexAttribArray_header_not_0); | 2228 "offset of EnableVertexAttribArray header should be 0"); |
2209 COMPILE_ASSERT(offsetof(EnableVertexAttribArray, index) == 4, | 2229 static_assert(offsetof(EnableVertexAttribArray, index) == 4, |
2210 OffsetOf_EnableVertexAttribArray_index_not_4); | 2230 "offset of EnableVertexAttribArray index should be 4"); |
2211 | 2231 |
2212 struct Finish { | 2232 struct Finish { |
2213 typedef Finish ValueType; | 2233 typedef Finish ValueType; |
2214 static const CommandId kCmdId = kFinish; | 2234 static const CommandId kCmdId = kFinish; |
2215 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2235 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2216 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2236 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2217 | 2237 |
2218 static uint32_t ComputeSize() { | 2238 static uint32_t ComputeSize() { |
2219 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2239 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2220 } | 2240 } |
2221 | 2241 |
2222 void SetHeader() { header.SetCmd<ValueType>(); } | 2242 void SetHeader() { header.SetCmd<ValueType>(); } |
2223 | 2243 |
2224 void Init() { SetHeader(); } | 2244 void Init() { SetHeader(); } |
2225 | 2245 |
2226 void* Set(void* cmd) { | 2246 void* Set(void* cmd) { |
2227 static_cast<ValueType*>(cmd)->Init(); | 2247 static_cast<ValueType*>(cmd)->Init(); |
2228 return NextCmdAddress<ValueType>(cmd); | 2248 return NextCmdAddress<ValueType>(cmd); |
2229 } | 2249 } |
2230 | 2250 |
2231 gpu::CommandHeader header; | 2251 gpu::CommandHeader header; |
2232 }; | 2252 }; |
2233 | 2253 |
2234 COMPILE_ASSERT(sizeof(Finish) == 4, Sizeof_Finish_is_not_4); | 2254 static_assert(sizeof(Finish) == 4, "size of Finish should be 4"); |
2235 COMPILE_ASSERT(offsetof(Finish, header) == 0, OffsetOf_Finish_header_not_0); | 2255 static_assert(offsetof(Finish, header) == 0, |
| 2256 "offset of Finish header should be 0"); |
2236 | 2257 |
2237 struct Flush { | 2258 struct Flush { |
2238 typedef Flush ValueType; | 2259 typedef Flush ValueType; |
2239 static const CommandId kCmdId = kFlush; | 2260 static const CommandId kCmdId = kFlush; |
2240 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2261 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2241 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2262 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2242 | 2263 |
2243 static uint32_t ComputeSize() { | 2264 static uint32_t ComputeSize() { |
2244 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2265 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2245 } | 2266 } |
2246 | 2267 |
2247 void SetHeader() { header.SetCmd<ValueType>(); } | 2268 void SetHeader() { header.SetCmd<ValueType>(); } |
2248 | 2269 |
2249 void Init() { SetHeader(); } | 2270 void Init() { SetHeader(); } |
2250 | 2271 |
2251 void* Set(void* cmd) { | 2272 void* Set(void* cmd) { |
2252 static_cast<ValueType*>(cmd)->Init(); | 2273 static_cast<ValueType*>(cmd)->Init(); |
2253 return NextCmdAddress<ValueType>(cmd); | 2274 return NextCmdAddress<ValueType>(cmd); |
2254 } | 2275 } |
2255 | 2276 |
2256 gpu::CommandHeader header; | 2277 gpu::CommandHeader header; |
2257 }; | 2278 }; |
2258 | 2279 |
2259 COMPILE_ASSERT(sizeof(Flush) == 4, Sizeof_Flush_is_not_4); | 2280 static_assert(sizeof(Flush) == 4, "size of Flush should be 4"); |
2260 COMPILE_ASSERT(offsetof(Flush, header) == 0, OffsetOf_Flush_header_not_0); | 2281 static_assert(offsetof(Flush, header) == 0, |
| 2282 "offset of Flush header should be 0"); |
2261 | 2283 |
2262 struct FramebufferRenderbuffer { | 2284 struct FramebufferRenderbuffer { |
2263 typedef FramebufferRenderbuffer ValueType; | 2285 typedef FramebufferRenderbuffer ValueType; |
2264 static const CommandId kCmdId = kFramebufferRenderbuffer; | 2286 static const CommandId kCmdId = kFramebufferRenderbuffer; |
2265 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2287 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2266 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2288 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2267 | 2289 |
2268 static uint32_t ComputeSize() { | 2290 static uint32_t ComputeSize() { |
2269 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2291 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2270 } | 2292 } |
(...skipping 21 matching lines...) Expand all Loading... |
2292 return NextCmdAddress<ValueType>(cmd); | 2314 return NextCmdAddress<ValueType>(cmd); |
2293 } | 2315 } |
2294 | 2316 |
2295 gpu::CommandHeader header; | 2317 gpu::CommandHeader header; |
2296 uint32_t target; | 2318 uint32_t target; |
2297 uint32_t attachment; | 2319 uint32_t attachment; |
2298 uint32_t renderbuffertarget; | 2320 uint32_t renderbuffertarget; |
2299 uint32_t renderbuffer; | 2321 uint32_t renderbuffer; |
2300 }; | 2322 }; |
2301 | 2323 |
2302 COMPILE_ASSERT(sizeof(FramebufferRenderbuffer) == 20, | 2324 static_assert(sizeof(FramebufferRenderbuffer) == 20, |
2303 Sizeof_FramebufferRenderbuffer_is_not_20); | 2325 "size of FramebufferRenderbuffer should be 20"); |
2304 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, header) == 0, | 2326 static_assert(offsetof(FramebufferRenderbuffer, header) == 0, |
2305 OffsetOf_FramebufferRenderbuffer_header_not_0); | 2327 "offset of FramebufferRenderbuffer header should be 0"); |
2306 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, target) == 4, | 2328 static_assert(offsetof(FramebufferRenderbuffer, target) == 4, |
2307 OffsetOf_FramebufferRenderbuffer_target_not_4); | 2329 "offset of FramebufferRenderbuffer target should be 4"); |
2308 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, attachment) == 8, | 2330 static_assert(offsetof(FramebufferRenderbuffer, attachment) == 8, |
2309 OffsetOf_FramebufferRenderbuffer_attachment_not_8); | 2331 "offset of FramebufferRenderbuffer attachment should be 8"); |
2310 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12, | 2332 static_assert( |
2311 OffsetOf_FramebufferRenderbuffer_renderbuffertarget_not_12); | 2333 offsetof(FramebufferRenderbuffer, renderbuffertarget) == 12, |
2312 COMPILE_ASSERT(offsetof(FramebufferRenderbuffer, renderbuffer) == 16, | 2334 "offset of FramebufferRenderbuffer renderbuffertarget should be 12"); |
2313 OffsetOf_FramebufferRenderbuffer_renderbuffer_not_16); | 2335 static_assert(offsetof(FramebufferRenderbuffer, renderbuffer) == 16, |
| 2336 "offset of FramebufferRenderbuffer renderbuffer should be 16"); |
2314 | 2337 |
2315 struct FramebufferTexture2D { | 2338 struct FramebufferTexture2D { |
2316 typedef FramebufferTexture2D ValueType; | 2339 typedef FramebufferTexture2D ValueType; |
2317 static const CommandId kCmdId = kFramebufferTexture2D; | 2340 static const CommandId kCmdId = kFramebufferTexture2D; |
2318 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2341 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2319 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 2342 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
2320 | 2343 |
2321 static uint32_t ComputeSize() { | 2344 static uint32_t ComputeSize() { |
2322 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2345 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2323 } | 2346 } |
(...skipping 22 matching lines...) Expand all Loading... |
2346 } | 2369 } |
2347 | 2370 |
2348 gpu::CommandHeader header; | 2371 gpu::CommandHeader header; |
2349 uint32_t target; | 2372 uint32_t target; |
2350 uint32_t attachment; | 2373 uint32_t attachment; |
2351 uint32_t textarget; | 2374 uint32_t textarget; |
2352 uint32_t texture; | 2375 uint32_t texture; |
2353 static const int32_t level = 0; | 2376 static const int32_t level = 0; |
2354 }; | 2377 }; |
2355 | 2378 |
2356 COMPILE_ASSERT(sizeof(FramebufferTexture2D) == 20, | 2379 static_assert(sizeof(FramebufferTexture2D) == 20, |
2357 Sizeof_FramebufferTexture2D_is_not_20); | 2380 "size of FramebufferTexture2D should be 20"); |
2358 COMPILE_ASSERT(offsetof(FramebufferTexture2D, header) == 0, | 2381 static_assert(offsetof(FramebufferTexture2D, header) == 0, |
2359 OffsetOf_FramebufferTexture2D_header_not_0); | 2382 "offset of FramebufferTexture2D header should be 0"); |
2360 COMPILE_ASSERT(offsetof(FramebufferTexture2D, target) == 4, | 2383 static_assert(offsetof(FramebufferTexture2D, target) == 4, |
2361 OffsetOf_FramebufferTexture2D_target_not_4); | 2384 "offset of FramebufferTexture2D target should be 4"); |
2362 COMPILE_ASSERT(offsetof(FramebufferTexture2D, attachment) == 8, | 2385 static_assert(offsetof(FramebufferTexture2D, attachment) == 8, |
2363 OffsetOf_FramebufferTexture2D_attachment_not_8); | 2386 "offset of FramebufferTexture2D attachment should be 8"); |
2364 COMPILE_ASSERT(offsetof(FramebufferTexture2D, textarget) == 12, | 2387 static_assert(offsetof(FramebufferTexture2D, textarget) == 12, |
2365 OffsetOf_FramebufferTexture2D_textarget_not_12); | 2388 "offset of FramebufferTexture2D textarget should be 12"); |
2366 COMPILE_ASSERT(offsetof(FramebufferTexture2D, texture) == 16, | 2389 static_assert(offsetof(FramebufferTexture2D, texture) == 16, |
2367 OffsetOf_FramebufferTexture2D_texture_not_16); | 2390 "offset of FramebufferTexture2D texture should be 16"); |
2368 | 2391 |
2369 struct FramebufferTextureLayer { | 2392 struct FramebufferTextureLayer { |
2370 typedef FramebufferTextureLayer ValueType; | 2393 typedef FramebufferTextureLayer ValueType; |
2371 static const CommandId kCmdId = kFramebufferTextureLayer; | 2394 static const CommandId kCmdId = kFramebufferTextureLayer; |
2372 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2395 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2373 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2396 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2374 | 2397 |
2375 static uint32_t ComputeSize() { | 2398 static uint32_t ComputeSize() { |
2376 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2399 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2377 } | 2400 } |
(...skipping 25 matching lines...) Expand all Loading... |
2403 } | 2426 } |
2404 | 2427 |
2405 gpu::CommandHeader header; | 2428 gpu::CommandHeader header; |
2406 uint32_t target; | 2429 uint32_t target; |
2407 uint32_t attachment; | 2430 uint32_t attachment; |
2408 uint32_t texture; | 2431 uint32_t texture; |
2409 int32_t level; | 2432 int32_t level; |
2410 int32_t layer; | 2433 int32_t layer; |
2411 }; | 2434 }; |
2412 | 2435 |
2413 COMPILE_ASSERT(sizeof(FramebufferTextureLayer) == 24, | 2436 static_assert(sizeof(FramebufferTextureLayer) == 24, |
2414 Sizeof_FramebufferTextureLayer_is_not_24); | 2437 "size of FramebufferTextureLayer should be 24"); |
2415 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, header) == 0, | 2438 static_assert(offsetof(FramebufferTextureLayer, header) == 0, |
2416 OffsetOf_FramebufferTextureLayer_header_not_0); | 2439 "offset of FramebufferTextureLayer header should be 0"); |
2417 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, target) == 4, | 2440 static_assert(offsetof(FramebufferTextureLayer, target) == 4, |
2418 OffsetOf_FramebufferTextureLayer_target_not_4); | 2441 "offset of FramebufferTextureLayer target should be 4"); |
2419 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, attachment) == 8, | 2442 static_assert(offsetof(FramebufferTextureLayer, attachment) == 8, |
2420 OffsetOf_FramebufferTextureLayer_attachment_not_8); | 2443 "offset of FramebufferTextureLayer attachment should be 8"); |
2421 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, texture) == 12, | 2444 static_assert(offsetof(FramebufferTextureLayer, texture) == 12, |
2422 OffsetOf_FramebufferTextureLayer_texture_not_12); | 2445 "offset of FramebufferTextureLayer texture should be 12"); |
2423 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, level) == 16, | 2446 static_assert(offsetof(FramebufferTextureLayer, level) == 16, |
2424 OffsetOf_FramebufferTextureLayer_level_not_16); | 2447 "offset of FramebufferTextureLayer level should be 16"); |
2425 COMPILE_ASSERT(offsetof(FramebufferTextureLayer, layer) == 20, | 2448 static_assert(offsetof(FramebufferTextureLayer, layer) == 20, |
2426 OffsetOf_FramebufferTextureLayer_layer_not_20); | 2449 "offset of FramebufferTextureLayer layer should be 20"); |
2427 | 2450 |
2428 struct FrontFace { | 2451 struct FrontFace { |
2429 typedef FrontFace ValueType; | 2452 typedef FrontFace ValueType; |
2430 static const CommandId kCmdId = kFrontFace; | 2453 static const CommandId kCmdId = kFrontFace; |
2431 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2454 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2432 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2455 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2433 | 2456 |
2434 static uint32_t ComputeSize() { | 2457 static uint32_t ComputeSize() { |
2435 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2458 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2436 } | 2459 } |
2437 | 2460 |
2438 void SetHeader() { header.SetCmd<ValueType>(); } | 2461 void SetHeader() { header.SetCmd<ValueType>(); } |
2439 | 2462 |
2440 void Init(GLenum _mode) { | 2463 void Init(GLenum _mode) { |
2441 SetHeader(); | 2464 SetHeader(); |
2442 mode = _mode; | 2465 mode = _mode; |
2443 } | 2466 } |
2444 | 2467 |
2445 void* Set(void* cmd, GLenum _mode) { | 2468 void* Set(void* cmd, GLenum _mode) { |
2446 static_cast<ValueType*>(cmd)->Init(_mode); | 2469 static_cast<ValueType*>(cmd)->Init(_mode); |
2447 return NextCmdAddress<ValueType>(cmd); | 2470 return NextCmdAddress<ValueType>(cmd); |
2448 } | 2471 } |
2449 | 2472 |
2450 gpu::CommandHeader header; | 2473 gpu::CommandHeader header; |
2451 uint32_t mode; | 2474 uint32_t mode; |
2452 }; | 2475 }; |
2453 | 2476 |
2454 COMPILE_ASSERT(sizeof(FrontFace) == 8, Sizeof_FrontFace_is_not_8); | 2477 static_assert(sizeof(FrontFace) == 8, "size of FrontFace should be 8"); |
2455 COMPILE_ASSERT(offsetof(FrontFace, header) == 0, | 2478 static_assert(offsetof(FrontFace, header) == 0, |
2456 OffsetOf_FrontFace_header_not_0); | 2479 "offset of FrontFace header should be 0"); |
2457 COMPILE_ASSERT(offsetof(FrontFace, mode) == 4, OffsetOf_FrontFace_mode_not_4); | 2480 static_assert(offsetof(FrontFace, mode) == 4, |
| 2481 "offset of FrontFace mode should be 4"); |
2458 | 2482 |
2459 struct GenBuffersImmediate { | 2483 struct GenBuffersImmediate { |
2460 typedef GenBuffersImmediate ValueType; | 2484 typedef GenBuffersImmediate ValueType; |
2461 static const CommandId kCmdId = kGenBuffersImmediate; | 2485 static const CommandId kCmdId = kGenBuffersImmediate; |
2462 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2486 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
2463 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2487 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2464 | 2488 |
2465 static uint32_t ComputeDataSize(GLsizei n) { | 2489 static uint32_t ComputeDataSize(GLsizei n) { |
2466 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2490 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
2467 } | 2491 } |
(...skipping 16 matching lines...) Expand all Loading... |
2484 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { | 2508 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { |
2485 static_cast<ValueType*>(cmd)->Init(_n, _buffers); | 2509 static_cast<ValueType*>(cmd)->Init(_n, _buffers); |
2486 const uint32_t size = ComputeSize(_n); | 2510 const uint32_t size = ComputeSize(_n); |
2487 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 2511 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
2488 } | 2512 } |
2489 | 2513 |
2490 gpu::CommandHeader header; | 2514 gpu::CommandHeader header; |
2491 int32_t n; | 2515 int32_t n; |
2492 }; | 2516 }; |
2493 | 2517 |
2494 COMPILE_ASSERT(sizeof(GenBuffersImmediate) == 8, | 2518 static_assert(sizeof(GenBuffersImmediate) == 8, |
2495 Sizeof_GenBuffersImmediate_is_not_8); | 2519 "size of GenBuffersImmediate should be 8"); |
2496 COMPILE_ASSERT(offsetof(GenBuffersImmediate, header) == 0, | 2520 static_assert(offsetof(GenBuffersImmediate, header) == 0, |
2497 OffsetOf_GenBuffersImmediate_header_not_0); | 2521 "offset of GenBuffersImmediate header should be 0"); |
2498 COMPILE_ASSERT(offsetof(GenBuffersImmediate, n) == 4, | 2522 static_assert(offsetof(GenBuffersImmediate, n) == 4, |
2499 OffsetOf_GenBuffersImmediate_n_not_4); | 2523 "offset of GenBuffersImmediate n should be 4"); |
2500 | 2524 |
2501 struct GenerateMipmap { | 2525 struct GenerateMipmap { |
2502 typedef GenerateMipmap ValueType; | 2526 typedef GenerateMipmap ValueType; |
2503 static const CommandId kCmdId = kGenerateMipmap; | 2527 static const CommandId kCmdId = kGenerateMipmap; |
2504 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2528 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2505 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2529 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2506 | 2530 |
2507 static uint32_t ComputeSize() { | 2531 static uint32_t ComputeSize() { |
2508 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 2532 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
2509 } | 2533 } |
2510 | 2534 |
2511 void SetHeader() { header.SetCmd<ValueType>(); } | 2535 void SetHeader() { header.SetCmd<ValueType>(); } |
2512 | 2536 |
2513 void Init(GLenum _target) { | 2537 void Init(GLenum _target) { |
2514 SetHeader(); | 2538 SetHeader(); |
2515 target = _target; | 2539 target = _target; |
2516 } | 2540 } |
2517 | 2541 |
2518 void* Set(void* cmd, GLenum _target) { | 2542 void* Set(void* cmd, GLenum _target) { |
2519 static_cast<ValueType*>(cmd)->Init(_target); | 2543 static_cast<ValueType*>(cmd)->Init(_target); |
2520 return NextCmdAddress<ValueType>(cmd); | 2544 return NextCmdAddress<ValueType>(cmd); |
2521 } | 2545 } |
2522 | 2546 |
2523 gpu::CommandHeader header; | 2547 gpu::CommandHeader header; |
2524 uint32_t target; | 2548 uint32_t target; |
2525 }; | 2549 }; |
2526 | 2550 |
2527 COMPILE_ASSERT(sizeof(GenerateMipmap) == 8, Sizeof_GenerateMipmap_is_not_8); | 2551 static_assert(sizeof(GenerateMipmap) == 8, |
2528 COMPILE_ASSERT(offsetof(GenerateMipmap, header) == 0, | 2552 "size of GenerateMipmap should be 8"); |
2529 OffsetOf_GenerateMipmap_header_not_0); | 2553 static_assert(offsetof(GenerateMipmap, header) == 0, |
2530 COMPILE_ASSERT(offsetof(GenerateMipmap, target) == 4, | 2554 "offset of GenerateMipmap header should be 0"); |
2531 OffsetOf_GenerateMipmap_target_not_4); | 2555 static_assert(offsetof(GenerateMipmap, target) == 4, |
| 2556 "offset of GenerateMipmap target should be 4"); |
2532 | 2557 |
2533 struct GenFramebuffersImmediate { | 2558 struct GenFramebuffersImmediate { |
2534 typedef GenFramebuffersImmediate ValueType; | 2559 typedef GenFramebuffersImmediate ValueType; |
2535 static const CommandId kCmdId = kGenFramebuffersImmediate; | 2560 static const CommandId kCmdId = kGenFramebuffersImmediate; |
2536 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2561 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
2537 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2562 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2538 | 2563 |
2539 static uint32_t ComputeDataSize(GLsizei n) { | 2564 static uint32_t ComputeDataSize(GLsizei n) { |
2540 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2565 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
2541 } | 2566 } |
(...skipping 16 matching lines...) Expand all Loading... |
2558 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) { | 2583 void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) { |
2559 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers); | 2584 static_cast<ValueType*>(cmd)->Init(_n, _framebuffers); |
2560 const uint32_t size = ComputeSize(_n); | 2585 const uint32_t size = ComputeSize(_n); |
2561 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 2586 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
2562 } | 2587 } |
2563 | 2588 |
2564 gpu::CommandHeader header; | 2589 gpu::CommandHeader header; |
2565 int32_t n; | 2590 int32_t n; |
2566 }; | 2591 }; |
2567 | 2592 |
2568 COMPILE_ASSERT(sizeof(GenFramebuffersImmediate) == 8, | 2593 static_assert(sizeof(GenFramebuffersImmediate) == 8, |
2569 Sizeof_GenFramebuffersImmediate_is_not_8); | 2594 "size of GenFramebuffersImmediate should be 8"); |
2570 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, header) == 0, | 2595 static_assert(offsetof(GenFramebuffersImmediate, header) == 0, |
2571 OffsetOf_GenFramebuffersImmediate_header_not_0); | 2596 "offset of GenFramebuffersImmediate header should be 0"); |
2572 COMPILE_ASSERT(offsetof(GenFramebuffersImmediate, n) == 4, | 2597 static_assert(offsetof(GenFramebuffersImmediate, n) == 4, |
2573 OffsetOf_GenFramebuffersImmediate_n_not_4); | 2598 "offset of GenFramebuffersImmediate n should be 4"); |
2574 | 2599 |
2575 struct GenRenderbuffersImmediate { | 2600 struct GenRenderbuffersImmediate { |
2576 typedef GenRenderbuffersImmediate ValueType; | 2601 typedef GenRenderbuffersImmediate ValueType; |
2577 static const CommandId kCmdId = kGenRenderbuffersImmediate; | 2602 static const CommandId kCmdId = kGenRenderbuffersImmediate; |
2578 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2603 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
2579 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2604 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2580 | 2605 |
2581 static uint32_t ComputeDataSize(GLsizei n) { | 2606 static uint32_t ComputeDataSize(GLsizei n) { |
2582 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2607 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
2583 } | 2608 } |
(...skipping 16 matching lines...) Expand all Loading... |
2600 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) { | 2625 void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) { |
2601 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers); | 2626 static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers); |
2602 const uint32_t size = ComputeSize(_n); | 2627 const uint32_t size = ComputeSize(_n); |
2603 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 2628 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
2604 } | 2629 } |
2605 | 2630 |
2606 gpu::CommandHeader header; | 2631 gpu::CommandHeader header; |
2607 int32_t n; | 2632 int32_t n; |
2608 }; | 2633 }; |
2609 | 2634 |
2610 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8, | 2635 static_assert(sizeof(GenRenderbuffersImmediate) == 8, |
2611 Sizeof_GenRenderbuffersImmediate_is_not_8); | 2636 "size of GenRenderbuffersImmediate should be 8"); |
2612 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0, | 2637 static_assert(offsetof(GenRenderbuffersImmediate, header) == 0, |
2613 OffsetOf_GenRenderbuffersImmediate_header_not_0); | 2638 "offset of GenRenderbuffersImmediate header should be 0"); |
2614 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4, | 2639 static_assert(offsetof(GenRenderbuffersImmediate, n) == 4, |
2615 OffsetOf_GenRenderbuffersImmediate_n_not_4); | 2640 "offset of GenRenderbuffersImmediate n should be 4"); |
2616 | 2641 |
2617 struct GenSamplersImmediate { | 2642 struct GenSamplersImmediate { |
2618 typedef GenSamplersImmediate ValueType; | 2643 typedef GenSamplersImmediate ValueType; |
2619 static const CommandId kCmdId = kGenSamplersImmediate; | 2644 static const CommandId kCmdId = kGenSamplersImmediate; |
2620 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2645 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
2621 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2646 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2622 | 2647 |
2623 static uint32_t ComputeDataSize(GLsizei n) { | 2648 static uint32_t ComputeDataSize(GLsizei n) { |
2624 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2649 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
2625 } | 2650 } |
(...skipping 16 matching lines...) Expand all Loading... |
2642 void* Set(void* cmd, GLsizei _n, GLuint* _samplers) { | 2667 void* Set(void* cmd, GLsizei _n, GLuint* _samplers) { |
2643 static_cast<ValueType*>(cmd)->Init(_n, _samplers); | 2668 static_cast<ValueType*>(cmd)->Init(_n, _samplers); |
2644 const uint32_t size = ComputeSize(_n); | 2669 const uint32_t size = ComputeSize(_n); |
2645 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 2670 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
2646 } | 2671 } |
2647 | 2672 |
2648 gpu::CommandHeader header; | 2673 gpu::CommandHeader header; |
2649 int32_t n; | 2674 int32_t n; |
2650 }; | 2675 }; |
2651 | 2676 |
2652 COMPILE_ASSERT(sizeof(GenSamplersImmediate) == 8, | 2677 static_assert(sizeof(GenSamplersImmediate) == 8, |
2653 Sizeof_GenSamplersImmediate_is_not_8); | 2678 "size of GenSamplersImmediate should be 8"); |
2654 COMPILE_ASSERT(offsetof(GenSamplersImmediate, header) == 0, | 2679 static_assert(offsetof(GenSamplersImmediate, header) == 0, |
2655 OffsetOf_GenSamplersImmediate_header_not_0); | 2680 "offset of GenSamplersImmediate header should be 0"); |
2656 COMPILE_ASSERT(offsetof(GenSamplersImmediate, n) == 4, | 2681 static_assert(offsetof(GenSamplersImmediate, n) == 4, |
2657 OffsetOf_GenSamplersImmediate_n_not_4); | 2682 "offset of GenSamplersImmediate n should be 4"); |
2658 | 2683 |
2659 struct GenTexturesImmediate { | 2684 struct GenTexturesImmediate { |
2660 typedef GenTexturesImmediate ValueType; | 2685 typedef GenTexturesImmediate ValueType; |
2661 static const CommandId kCmdId = kGenTexturesImmediate; | 2686 static const CommandId kCmdId = kGenTexturesImmediate; |
2662 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2687 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
2663 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2688 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2664 | 2689 |
2665 static uint32_t ComputeDataSize(GLsizei n) { | 2690 static uint32_t ComputeDataSize(GLsizei n) { |
2666 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2691 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
2667 } | 2692 } |
(...skipping 16 matching lines...) Expand all Loading... |
2684 void* Set(void* cmd, GLsizei _n, GLuint* _textures) { | 2709 void* Set(void* cmd, GLsizei _n, GLuint* _textures) { |
2685 static_cast<ValueType*>(cmd)->Init(_n, _textures); | 2710 static_cast<ValueType*>(cmd)->Init(_n, _textures); |
2686 const uint32_t size = ComputeSize(_n); | 2711 const uint32_t size = ComputeSize(_n); |
2687 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 2712 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
2688 } | 2713 } |
2689 | 2714 |
2690 gpu::CommandHeader header; | 2715 gpu::CommandHeader header; |
2691 int32_t n; | 2716 int32_t n; |
2692 }; | 2717 }; |
2693 | 2718 |
2694 COMPILE_ASSERT(sizeof(GenTexturesImmediate) == 8, | 2719 static_assert(sizeof(GenTexturesImmediate) == 8, |
2695 Sizeof_GenTexturesImmediate_is_not_8); | 2720 "size of GenTexturesImmediate should be 8"); |
2696 COMPILE_ASSERT(offsetof(GenTexturesImmediate, header) == 0, | 2721 static_assert(offsetof(GenTexturesImmediate, header) == 0, |
2697 OffsetOf_GenTexturesImmediate_header_not_0); | 2722 "offset of GenTexturesImmediate header should be 0"); |
2698 COMPILE_ASSERT(offsetof(GenTexturesImmediate, n) == 4, | 2723 static_assert(offsetof(GenTexturesImmediate, n) == 4, |
2699 OffsetOf_GenTexturesImmediate_n_not_4); | 2724 "offset of GenTexturesImmediate n should be 4"); |
2700 | 2725 |
2701 struct GenTransformFeedbacksImmediate { | 2726 struct GenTransformFeedbacksImmediate { |
2702 typedef GenTransformFeedbacksImmediate ValueType; | 2727 typedef GenTransformFeedbacksImmediate ValueType; |
2703 static const CommandId kCmdId = kGenTransformFeedbacksImmediate; | 2728 static const CommandId kCmdId = kGenTransformFeedbacksImmediate; |
2704 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2729 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
2705 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2730 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2706 | 2731 |
2707 static uint32_t ComputeDataSize(GLsizei n) { | 2732 static uint32_t ComputeDataSize(GLsizei n) { |
2708 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2733 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
2709 } | 2734 } |
(...skipping 16 matching lines...) Expand all Loading... |
2726 void* Set(void* cmd, GLsizei _n, GLuint* _ids) { | 2751 void* Set(void* cmd, GLsizei _n, GLuint* _ids) { |
2727 static_cast<ValueType*>(cmd)->Init(_n, _ids); | 2752 static_cast<ValueType*>(cmd)->Init(_n, _ids); |
2728 const uint32_t size = ComputeSize(_n); | 2753 const uint32_t size = ComputeSize(_n); |
2729 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 2754 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
2730 } | 2755 } |
2731 | 2756 |
2732 gpu::CommandHeader header; | 2757 gpu::CommandHeader header; |
2733 int32_t n; | 2758 int32_t n; |
2734 }; | 2759 }; |
2735 | 2760 |
2736 COMPILE_ASSERT(sizeof(GenTransformFeedbacksImmediate) == 8, | 2761 static_assert(sizeof(GenTransformFeedbacksImmediate) == 8, |
2737 Sizeof_GenTransformFeedbacksImmediate_is_not_8); | 2762 "size of GenTransformFeedbacksImmediate should be 8"); |
2738 COMPILE_ASSERT(offsetof(GenTransformFeedbacksImmediate, header) == 0, | 2763 static_assert(offsetof(GenTransformFeedbacksImmediate, header) == 0, |
2739 OffsetOf_GenTransformFeedbacksImmediate_header_not_0); | 2764 "offset of GenTransformFeedbacksImmediate header should be 0"); |
2740 COMPILE_ASSERT(offsetof(GenTransformFeedbacksImmediate, n) == 4, | 2765 static_assert(offsetof(GenTransformFeedbacksImmediate, n) == 4, |
2741 OffsetOf_GenTransformFeedbacksImmediate_n_not_4); | 2766 "offset of GenTransformFeedbacksImmediate n should be 4"); |
2742 | 2767 |
2743 struct GetActiveAttrib { | 2768 struct GetActiveAttrib { |
2744 typedef GetActiveAttrib ValueType; | 2769 typedef GetActiveAttrib ValueType; |
2745 static const CommandId kCmdId = kGetActiveAttrib; | 2770 static const CommandId kCmdId = kGetActiveAttrib; |
2746 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2771 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2747 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2772 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2748 | 2773 |
2749 struct Result { | 2774 struct Result { |
2750 int32_t success; | 2775 int32_t success; |
2751 int32_t size; | 2776 int32_t size; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 } | 2808 } |
2784 | 2809 |
2785 gpu::CommandHeader header; | 2810 gpu::CommandHeader header; |
2786 uint32_t program; | 2811 uint32_t program; |
2787 uint32_t index; | 2812 uint32_t index; |
2788 uint32_t name_bucket_id; | 2813 uint32_t name_bucket_id; |
2789 uint32_t result_shm_id; | 2814 uint32_t result_shm_id; |
2790 uint32_t result_shm_offset; | 2815 uint32_t result_shm_offset; |
2791 }; | 2816 }; |
2792 | 2817 |
2793 COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24, Sizeof_GetActiveAttrib_is_not_24); | 2818 static_assert(sizeof(GetActiveAttrib) == 24, |
2794 COMPILE_ASSERT(offsetof(GetActiveAttrib, header) == 0, | 2819 "size of GetActiveAttrib should be 24"); |
2795 OffsetOf_GetActiveAttrib_header_not_0); | 2820 static_assert(offsetof(GetActiveAttrib, header) == 0, |
2796 COMPILE_ASSERT(offsetof(GetActiveAttrib, program) == 4, | 2821 "offset of GetActiveAttrib header should be 0"); |
2797 OffsetOf_GetActiveAttrib_program_not_4); | 2822 static_assert(offsetof(GetActiveAttrib, program) == 4, |
2798 COMPILE_ASSERT(offsetof(GetActiveAttrib, index) == 8, | 2823 "offset of GetActiveAttrib program should be 4"); |
2799 OffsetOf_GetActiveAttrib_index_not_8); | 2824 static_assert(offsetof(GetActiveAttrib, index) == 8, |
2800 COMPILE_ASSERT(offsetof(GetActiveAttrib, name_bucket_id) == 12, | 2825 "offset of GetActiveAttrib index should be 8"); |
2801 OffsetOf_GetActiveAttrib_name_bucket_id_not_12); | 2826 static_assert(offsetof(GetActiveAttrib, name_bucket_id) == 12, |
2802 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_id) == 16, | 2827 "offset of GetActiveAttrib name_bucket_id should be 12"); |
2803 OffsetOf_GetActiveAttrib_result_shm_id_not_16); | 2828 static_assert(offsetof(GetActiveAttrib, result_shm_id) == 16, |
2804 COMPILE_ASSERT(offsetof(GetActiveAttrib, result_shm_offset) == 20, | 2829 "offset of GetActiveAttrib result_shm_id should be 16"); |
2805 OffsetOf_GetActiveAttrib_result_shm_offset_not_20); | 2830 static_assert(offsetof(GetActiveAttrib, result_shm_offset) == 20, |
2806 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, success) == 0, | 2831 "offset of GetActiveAttrib result_shm_offset should be 20"); |
2807 OffsetOf_GetActiveAttrib_Result_success_not_0); | 2832 static_assert(offsetof(GetActiveAttrib::Result, success) == 0, |
2808 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, size) == 4, | 2833 "offset of GetActiveAttrib Result success should be 0"); |
2809 OffsetOf_GetActiveAttrib_Result_size_not_4); | 2834 static_assert(offsetof(GetActiveAttrib::Result, size) == 4, |
2810 COMPILE_ASSERT(offsetof(GetActiveAttrib::Result, type) == 8, | 2835 "offset of GetActiveAttrib Result size should be 4"); |
2811 OffsetOf_GetActiveAttrib_Result_type_not_8); | 2836 static_assert(offsetof(GetActiveAttrib::Result, type) == 8, |
| 2837 "offset of GetActiveAttrib Result type should be 8"); |
2812 | 2838 |
2813 struct GetActiveUniform { | 2839 struct GetActiveUniform { |
2814 typedef GetActiveUniform ValueType; | 2840 typedef GetActiveUniform ValueType; |
2815 static const CommandId kCmdId = kGetActiveUniform; | 2841 static const CommandId kCmdId = kGetActiveUniform; |
2816 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2842 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2817 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2843 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2818 | 2844 |
2819 struct Result { | 2845 struct Result { |
2820 int32_t success; | 2846 int32_t success; |
2821 int32_t size; | 2847 int32_t size; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2853 } | 2879 } |
2854 | 2880 |
2855 gpu::CommandHeader header; | 2881 gpu::CommandHeader header; |
2856 uint32_t program; | 2882 uint32_t program; |
2857 uint32_t index; | 2883 uint32_t index; |
2858 uint32_t name_bucket_id; | 2884 uint32_t name_bucket_id; |
2859 uint32_t result_shm_id; | 2885 uint32_t result_shm_id; |
2860 uint32_t result_shm_offset; | 2886 uint32_t result_shm_offset; |
2861 }; | 2887 }; |
2862 | 2888 |
2863 COMPILE_ASSERT(sizeof(GetActiveUniform) == 24, | 2889 static_assert(sizeof(GetActiveUniform) == 24, |
2864 Sizeof_GetActiveUniform_is_not_24); | 2890 "size of GetActiveUniform should be 24"); |
2865 COMPILE_ASSERT(offsetof(GetActiveUniform, header) == 0, | 2891 static_assert(offsetof(GetActiveUniform, header) == 0, |
2866 OffsetOf_GetActiveUniform_header_not_0); | 2892 "offset of GetActiveUniform header should be 0"); |
2867 COMPILE_ASSERT(offsetof(GetActiveUniform, program) == 4, | 2893 static_assert(offsetof(GetActiveUniform, program) == 4, |
2868 OffsetOf_GetActiveUniform_program_not_4); | 2894 "offset of GetActiveUniform program should be 4"); |
2869 COMPILE_ASSERT(offsetof(GetActiveUniform, index) == 8, | 2895 static_assert(offsetof(GetActiveUniform, index) == 8, |
2870 OffsetOf_GetActiveUniform_index_not_8); | 2896 "offset of GetActiveUniform index should be 8"); |
2871 COMPILE_ASSERT(offsetof(GetActiveUniform, name_bucket_id) == 12, | 2897 static_assert(offsetof(GetActiveUniform, name_bucket_id) == 12, |
2872 OffsetOf_GetActiveUniform_name_bucket_id_not_12); | 2898 "offset of GetActiveUniform name_bucket_id should be 12"); |
2873 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_id) == 16, | 2899 static_assert(offsetof(GetActiveUniform, result_shm_id) == 16, |
2874 OffsetOf_GetActiveUniform_result_shm_id_not_16); | 2900 "offset of GetActiveUniform result_shm_id should be 16"); |
2875 COMPILE_ASSERT(offsetof(GetActiveUniform, result_shm_offset) == 20, | 2901 static_assert(offsetof(GetActiveUniform, result_shm_offset) == 20, |
2876 OffsetOf_GetActiveUniform_result_shm_offset_not_20); | 2902 "offset of GetActiveUniform result_shm_offset should be 20"); |
2877 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, success) == 0, | 2903 static_assert(offsetof(GetActiveUniform::Result, success) == 0, |
2878 OffsetOf_GetActiveUniform_Result_success_not_0); | 2904 "offset of GetActiveUniform Result success should be 0"); |
2879 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, size) == 4, | 2905 static_assert(offsetof(GetActiveUniform::Result, size) == 4, |
2880 OffsetOf_GetActiveUniform_Result_size_not_4); | 2906 "offset of GetActiveUniform Result size should be 4"); |
2881 COMPILE_ASSERT(offsetof(GetActiveUniform::Result, type) == 8, | 2907 static_assert(offsetof(GetActiveUniform::Result, type) == 8, |
2882 OffsetOf_GetActiveUniform_Result_type_not_8); | 2908 "offset of GetActiveUniform Result type should be 8"); |
2883 | 2909 |
2884 struct GetAttachedShaders { | 2910 struct GetAttachedShaders { |
2885 typedef GetAttachedShaders ValueType; | 2911 typedef GetAttachedShaders ValueType; |
2886 static const CommandId kCmdId = kGetAttachedShaders; | 2912 static const CommandId kCmdId = kGetAttachedShaders; |
2887 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2913 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2888 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2914 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2889 | 2915 |
2890 typedef SizedResult<GLuint> Result; | 2916 typedef SizedResult<GLuint> Result; |
2891 | 2917 |
2892 static uint32_t ComputeSize() { | 2918 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
2916 return NextCmdAddress<ValueType>(cmd); | 2942 return NextCmdAddress<ValueType>(cmd); |
2917 } | 2943 } |
2918 | 2944 |
2919 gpu::CommandHeader header; | 2945 gpu::CommandHeader header; |
2920 uint32_t program; | 2946 uint32_t program; |
2921 uint32_t result_shm_id; | 2947 uint32_t result_shm_id; |
2922 uint32_t result_shm_offset; | 2948 uint32_t result_shm_offset; |
2923 uint32_t result_size; | 2949 uint32_t result_size; |
2924 }; | 2950 }; |
2925 | 2951 |
2926 COMPILE_ASSERT(sizeof(GetAttachedShaders) == 20, | 2952 static_assert(sizeof(GetAttachedShaders) == 20, |
2927 Sizeof_GetAttachedShaders_is_not_20); | 2953 "size of GetAttachedShaders should be 20"); |
2928 COMPILE_ASSERT(offsetof(GetAttachedShaders, header) == 0, | 2954 static_assert(offsetof(GetAttachedShaders, header) == 0, |
2929 OffsetOf_GetAttachedShaders_header_not_0); | 2955 "offset of GetAttachedShaders header should be 0"); |
2930 COMPILE_ASSERT(offsetof(GetAttachedShaders, program) == 4, | 2956 static_assert(offsetof(GetAttachedShaders, program) == 4, |
2931 OffsetOf_GetAttachedShaders_program_not_4); | 2957 "offset of GetAttachedShaders program should be 4"); |
2932 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_id) == 8, | 2958 static_assert(offsetof(GetAttachedShaders, result_shm_id) == 8, |
2933 OffsetOf_GetAttachedShaders_result_shm_id_not_8); | 2959 "offset of GetAttachedShaders result_shm_id should be 8"); |
2934 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_shm_offset) == 12, | 2960 static_assert(offsetof(GetAttachedShaders, result_shm_offset) == 12, |
2935 OffsetOf_GetAttachedShaders_result_shm_offset_not_12); | 2961 "offset of GetAttachedShaders result_shm_offset should be 12"); |
2936 COMPILE_ASSERT(offsetof(GetAttachedShaders, result_size) == 16, | 2962 static_assert(offsetof(GetAttachedShaders, result_size) == 16, |
2937 OffsetOf_GetAttachedShaders_result_size_not_16); | 2963 "offset of GetAttachedShaders result_size should be 16"); |
2938 | 2964 |
2939 struct GetAttribLocation { | 2965 struct GetAttribLocation { |
2940 typedef GetAttribLocation ValueType; | 2966 typedef GetAttribLocation ValueType; |
2941 static const CommandId kCmdId = kGetAttribLocation; | 2967 static const CommandId kCmdId = kGetAttribLocation; |
2942 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 2968 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2943 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2969 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2944 | 2970 |
2945 typedef GLint Result; | 2971 typedef GLint Result; |
2946 | 2972 |
2947 static uint32_t ComputeSize() { | 2973 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
2971 return NextCmdAddress<ValueType>(cmd); | 2997 return NextCmdAddress<ValueType>(cmd); |
2972 } | 2998 } |
2973 | 2999 |
2974 gpu::CommandHeader header; | 3000 gpu::CommandHeader header; |
2975 uint32_t program; | 3001 uint32_t program; |
2976 uint32_t name_bucket_id; | 3002 uint32_t name_bucket_id; |
2977 uint32_t location_shm_id; | 3003 uint32_t location_shm_id; |
2978 uint32_t location_shm_offset; | 3004 uint32_t location_shm_offset; |
2979 }; | 3005 }; |
2980 | 3006 |
2981 COMPILE_ASSERT(sizeof(GetAttribLocation) == 20, | 3007 static_assert(sizeof(GetAttribLocation) == 20, |
2982 Sizeof_GetAttribLocation_is_not_20); | 3008 "size of GetAttribLocation should be 20"); |
2983 COMPILE_ASSERT(offsetof(GetAttribLocation, header) == 0, | 3009 static_assert(offsetof(GetAttribLocation, header) == 0, |
2984 OffsetOf_GetAttribLocation_header_not_0); | 3010 "offset of GetAttribLocation header should be 0"); |
2985 COMPILE_ASSERT(offsetof(GetAttribLocation, program) == 4, | 3011 static_assert(offsetof(GetAttribLocation, program) == 4, |
2986 OffsetOf_GetAttribLocation_program_not_4); | 3012 "offset of GetAttribLocation program should be 4"); |
2987 COMPILE_ASSERT(offsetof(GetAttribLocation, name_bucket_id) == 8, | 3013 static_assert(offsetof(GetAttribLocation, name_bucket_id) == 8, |
2988 OffsetOf_GetAttribLocation_name_bucket_id_not_8); | 3014 "offset of GetAttribLocation name_bucket_id should be 8"); |
2989 COMPILE_ASSERT(offsetof(GetAttribLocation, location_shm_id) == 12, | 3015 static_assert(offsetof(GetAttribLocation, location_shm_id) == 12, |
2990 OffsetOf_GetAttribLocation_location_shm_id_not_12); | 3016 "offset of GetAttribLocation location_shm_id should be 12"); |
2991 COMPILE_ASSERT(offsetof(GetAttribLocation, location_shm_offset) == 16, | 3017 static_assert(offsetof(GetAttribLocation, location_shm_offset) == 16, |
2992 OffsetOf_GetAttribLocation_location_shm_offset_not_16); | 3018 "offset of GetAttribLocation location_shm_offset should be 16"); |
2993 | 3019 |
2994 struct GetBooleanv { | 3020 struct GetBooleanv { |
2995 typedef GetBooleanv ValueType; | 3021 typedef GetBooleanv ValueType; |
2996 static const CommandId kCmdId = kGetBooleanv; | 3022 static const CommandId kCmdId = kGetBooleanv; |
2997 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3023 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
2998 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3024 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
2999 | 3025 |
3000 typedef SizedResult<GLboolean> Result; | 3026 typedef SizedResult<GLboolean> Result; |
3001 | 3027 |
3002 static uint32_t ComputeSize() { | 3028 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
3022 ->Init(_pname, _params_shm_id, _params_shm_offset); | 3048 ->Init(_pname, _params_shm_id, _params_shm_offset); |
3023 return NextCmdAddress<ValueType>(cmd); | 3049 return NextCmdAddress<ValueType>(cmd); |
3024 } | 3050 } |
3025 | 3051 |
3026 gpu::CommandHeader header; | 3052 gpu::CommandHeader header; |
3027 uint32_t pname; | 3053 uint32_t pname; |
3028 uint32_t params_shm_id; | 3054 uint32_t params_shm_id; |
3029 uint32_t params_shm_offset; | 3055 uint32_t params_shm_offset; |
3030 }; | 3056 }; |
3031 | 3057 |
3032 COMPILE_ASSERT(sizeof(GetBooleanv) == 16, Sizeof_GetBooleanv_is_not_16); | 3058 static_assert(sizeof(GetBooleanv) == 16, "size of GetBooleanv should be 16"); |
3033 COMPILE_ASSERT(offsetof(GetBooleanv, header) == 0, | 3059 static_assert(offsetof(GetBooleanv, header) == 0, |
3034 OffsetOf_GetBooleanv_header_not_0); | 3060 "offset of GetBooleanv header should be 0"); |
3035 COMPILE_ASSERT(offsetof(GetBooleanv, pname) == 4, | 3061 static_assert(offsetof(GetBooleanv, pname) == 4, |
3036 OffsetOf_GetBooleanv_pname_not_4); | 3062 "offset of GetBooleanv pname should be 4"); |
3037 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_id) == 8, | 3063 static_assert(offsetof(GetBooleanv, params_shm_id) == 8, |
3038 OffsetOf_GetBooleanv_params_shm_id_not_8); | 3064 "offset of GetBooleanv params_shm_id should be 8"); |
3039 COMPILE_ASSERT(offsetof(GetBooleanv, params_shm_offset) == 12, | 3065 static_assert(offsetof(GetBooleanv, params_shm_offset) == 12, |
3040 OffsetOf_GetBooleanv_params_shm_offset_not_12); | 3066 "offset of GetBooleanv params_shm_offset should be 12"); |
3041 | 3067 |
3042 struct GetBufferParameteriv { | 3068 struct GetBufferParameteriv { |
3043 typedef GetBufferParameteriv ValueType; | 3069 typedef GetBufferParameteriv ValueType; |
3044 static const CommandId kCmdId = kGetBufferParameteriv; | 3070 static const CommandId kCmdId = kGetBufferParameteriv; |
3045 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3071 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3046 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3072 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3047 | 3073 |
3048 typedef SizedResult<GLint> Result; | 3074 typedef SizedResult<GLint> Result; |
3049 | 3075 |
3050 static uint32_t ComputeSize() { | 3076 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3074 return NextCmdAddress<ValueType>(cmd); | 3100 return NextCmdAddress<ValueType>(cmd); |
3075 } | 3101 } |
3076 | 3102 |
3077 gpu::CommandHeader header; | 3103 gpu::CommandHeader header; |
3078 uint32_t target; | 3104 uint32_t target; |
3079 uint32_t pname; | 3105 uint32_t pname; |
3080 uint32_t params_shm_id; | 3106 uint32_t params_shm_id; |
3081 uint32_t params_shm_offset; | 3107 uint32_t params_shm_offset; |
3082 }; | 3108 }; |
3083 | 3109 |
3084 COMPILE_ASSERT(sizeof(GetBufferParameteriv) == 20, | 3110 static_assert(sizeof(GetBufferParameteriv) == 20, |
3085 Sizeof_GetBufferParameteriv_is_not_20); | 3111 "size of GetBufferParameteriv should be 20"); |
3086 COMPILE_ASSERT(offsetof(GetBufferParameteriv, header) == 0, | 3112 static_assert(offsetof(GetBufferParameteriv, header) == 0, |
3087 OffsetOf_GetBufferParameteriv_header_not_0); | 3113 "offset of GetBufferParameteriv header should be 0"); |
3088 COMPILE_ASSERT(offsetof(GetBufferParameteriv, target) == 4, | 3114 static_assert(offsetof(GetBufferParameteriv, target) == 4, |
3089 OffsetOf_GetBufferParameteriv_target_not_4); | 3115 "offset of GetBufferParameteriv target should be 4"); |
3090 COMPILE_ASSERT(offsetof(GetBufferParameteriv, pname) == 8, | 3116 static_assert(offsetof(GetBufferParameteriv, pname) == 8, |
3091 OffsetOf_GetBufferParameteriv_pname_not_8); | 3117 "offset of GetBufferParameteriv pname should be 8"); |
3092 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_id) == 12, | 3118 static_assert(offsetof(GetBufferParameteriv, params_shm_id) == 12, |
3093 OffsetOf_GetBufferParameteriv_params_shm_id_not_12); | 3119 "offset of GetBufferParameteriv params_shm_id should be 12"); |
3094 COMPILE_ASSERT(offsetof(GetBufferParameteriv, params_shm_offset) == 16, | 3120 static_assert(offsetof(GetBufferParameteriv, params_shm_offset) == 16, |
3095 OffsetOf_GetBufferParameteriv_params_shm_offset_not_16); | 3121 "offset of GetBufferParameteriv params_shm_offset should be 16"); |
3096 | 3122 |
3097 struct GetError { | 3123 struct GetError { |
3098 typedef GetError ValueType; | 3124 typedef GetError ValueType; |
3099 static const CommandId kCmdId = kGetError; | 3125 static const CommandId kCmdId = kGetError; |
3100 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3126 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3101 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3127 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3102 | 3128 |
3103 typedef GLenum Result; | 3129 typedef GLenum Result; |
3104 | 3130 |
3105 static uint32_t ComputeSize() { | 3131 static uint32_t ComputeSize() { |
(...skipping 11 matching lines...) Expand all Loading... |
3117 void* Set(void* cmd, uint32_t _result_shm_id, uint32_t _result_shm_offset) { | 3143 void* Set(void* cmd, uint32_t _result_shm_id, uint32_t _result_shm_offset) { |
3118 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset); | 3144 static_cast<ValueType*>(cmd)->Init(_result_shm_id, _result_shm_offset); |
3119 return NextCmdAddress<ValueType>(cmd); | 3145 return NextCmdAddress<ValueType>(cmd); |
3120 } | 3146 } |
3121 | 3147 |
3122 gpu::CommandHeader header; | 3148 gpu::CommandHeader header; |
3123 uint32_t result_shm_id; | 3149 uint32_t result_shm_id; |
3124 uint32_t result_shm_offset; | 3150 uint32_t result_shm_offset; |
3125 }; | 3151 }; |
3126 | 3152 |
3127 COMPILE_ASSERT(sizeof(GetError) == 12, Sizeof_GetError_is_not_12); | 3153 static_assert(sizeof(GetError) == 12, "size of GetError should be 12"); |
3128 COMPILE_ASSERT(offsetof(GetError, header) == 0, OffsetOf_GetError_header_not_0); | 3154 static_assert(offsetof(GetError, header) == 0, |
3129 COMPILE_ASSERT(offsetof(GetError, result_shm_id) == 4, | 3155 "offset of GetError header should be 0"); |
3130 OffsetOf_GetError_result_shm_id_not_4); | 3156 static_assert(offsetof(GetError, result_shm_id) == 4, |
3131 COMPILE_ASSERT(offsetof(GetError, result_shm_offset) == 8, | 3157 "offset of GetError result_shm_id should be 4"); |
3132 OffsetOf_GetError_result_shm_offset_not_8); | 3158 static_assert(offsetof(GetError, result_shm_offset) == 8, |
| 3159 "offset of GetError result_shm_offset should be 8"); |
3133 | 3160 |
3134 struct GetFloatv { | 3161 struct GetFloatv { |
3135 typedef GetFloatv ValueType; | 3162 typedef GetFloatv ValueType; |
3136 static const CommandId kCmdId = kGetFloatv; | 3163 static const CommandId kCmdId = kGetFloatv; |
3137 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3164 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3138 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3165 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3139 | 3166 |
3140 typedef SizedResult<GLfloat> Result; | 3167 typedef SizedResult<GLfloat> Result; |
3141 | 3168 |
3142 static uint32_t ComputeSize() { | 3169 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
3162 ->Init(_pname, _params_shm_id, _params_shm_offset); | 3189 ->Init(_pname, _params_shm_id, _params_shm_offset); |
3163 return NextCmdAddress<ValueType>(cmd); | 3190 return NextCmdAddress<ValueType>(cmd); |
3164 } | 3191 } |
3165 | 3192 |
3166 gpu::CommandHeader header; | 3193 gpu::CommandHeader header; |
3167 uint32_t pname; | 3194 uint32_t pname; |
3168 uint32_t params_shm_id; | 3195 uint32_t params_shm_id; |
3169 uint32_t params_shm_offset; | 3196 uint32_t params_shm_offset; |
3170 }; | 3197 }; |
3171 | 3198 |
3172 COMPILE_ASSERT(sizeof(GetFloatv) == 16, Sizeof_GetFloatv_is_not_16); | 3199 static_assert(sizeof(GetFloatv) == 16, "size of GetFloatv should be 16"); |
3173 COMPILE_ASSERT(offsetof(GetFloatv, header) == 0, | 3200 static_assert(offsetof(GetFloatv, header) == 0, |
3174 OffsetOf_GetFloatv_header_not_0); | 3201 "offset of GetFloatv header should be 0"); |
3175 COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4, OffsetOf_GetFloatv_pname_not_4); | 3202 static_assert(offsetof(GetFloatv, pname) == 4, |
3176 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_id) == 8, | 3203 "offset of GetFloatv pname should be 4"); |
3177 OffsetOf_GetFloatv_params_shm_id_not_8); | 3204 static_assert(offsetof(GetFloatv, params_shm_id) == 8, |
3178 COMPILE_ASSERT(offsetof(GetFloatv, params_shm_offset) == 12, | 3205 "offset of GetFloatv params_shm_id should be 8"); |
3179 OffsetOf_GetFloatv_params_shm_offset_not_12); | 3206 static_assert(offsetof(GetFloatv, params_shm_offset) == 12, |
| 3207 "offset of GetFloatv params_shm_offset should be 12"); |
3180 | 3208 |
3181 struct GetFramebufferAttachmentParameteriv { | 3209 struct GetFramebufferAttachmentParameteriv { |
3182 typedef GetFramebufferAttachmentParameteriv ValueType; | 3210 typedef GetFramebufferAttachmentParameteriv ValueType; |
3183 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv; | 3211 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv; |
3184 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3212 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3185 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3213 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3186 | 3214 |
3187 typedef SizedResult<GLint> Result; | 3215 typedef SizedResult<GLint> Result; |
3188 | 3216 |
3189 static uint32_t ComputeSize() { | 3217 static uint32_t ComputeSize() { |
(...skipping 27 matching lines...) Expand all Loading... |
3217 } | 3245 } |
3218 | 3246 |
3219 gpu::CommandHeader header; | 3247 gpu::CommandHeader header; |
3220 uint32_t target; | 3248 uint32_t target; |
3221 uint32_t attachment; | 3249 uint32_t attachment; |
3222 uint32_t pname; | 3250 uint32_t pname; |
3223 uint32_t params_shm_id; | 3251 uint32_t params_shm_id; |
3224 uint32_t params_shm_offset; | 3252 uint32_t params_shm_offset; |
3225 }; | 3253 }; |
3226 | 3254 |
3227 COMPILE_ASSERT(sizeof(GetFramebufferAttachmentParameteriv) == 24, | 3255 static_assert(sizeof(GetFramebufferAttachmentParameteriv) == 24, |
3228 Sizeof_GetFramebufferAttachmentParameteriv_is_not_24); | 3256 "size of GetFramebufferAttachmentParameteriv should be 24"); |
3229 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, header) == 0, | 3257 static_assert( |
3230 OffsetOf_GetFramebufferAttachmentParameteriv_header_not_0); | 3258 offsetof(GetFramebufferAttachmentParameteriv, header) == 0, |
3231 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, target) == 4, | 3259 "offset of GetFramebufferAttachmentParameteriv header should be 0"); |
3232 OffsetOf_GetFramebufferAttachmentParameteriv_target_not_4); | 3260 static_assert( |
3233 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8, | 3261 offsetof(GetFramebufferAttachmentParameteriv, target) == 4, |
3234 OffsetOf_GetFramebufferAttachmentParameteriv_attachment_not_8); | 3262 "offset of GetFramebufferAttachmentParameteriv target should be 4"); |
3235 COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, pname) == 12, | 3263 static_assert( |
3236 OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12); | 3264 offsetof(GetFramebufferAttachmentParameteriv, attachment) == 8, |
3237 COMPILE_ASSERT( | 3265 "offset of GetFramebufferAttachmentParameteriv attachment should be 8"); |
| 3266 static_assert( |
| 3267 offsetof(GetFramebufferAttachmentParameteriv, pname) == 12, |
| 3268 "offset of GetFramebufferAttachmentParameteriv pname should be 12"); |
| 3269 static_assert( |
3238 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16, | 3270 offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16, |
3239 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16); | 3271 "offset of GetFramebufferAttachmentParameteriv params_shm_id should be 16"); |
3240 COMPILE_ASSERT( | 3272 static_assert(offsetof(GetFramebufferAttachmentParameteriv, |
3241 offsetof(GetFramebufferAttachmentParameteriv, params_shm_offset) == 20, | 3273 params_shm_offset) == 20, |
3242 OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20); | 3274 "offset of GetFramebufferAttachmentParameteriv params_shm_offset " |
| 3275 "should be 20"); |
3243 | 3276 |
3244 struct GetIntegerv { | 3277 struct GetIntegerv { |
3245 typedef GetIntegerv ValueType; | 3278 typedef GetIntegerv ValueType; |
3246 static const CommandId kCmdId = kGetIntegerv; | 3279 static const CommandId kCmdId = kGetIntegerv; |
3247 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3280 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3248 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3281 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3249 | 3282 |
3250 typedef SizedResult<GLint> Result; | 3283 typedef SizedResult<GLint> Result; |
3251 | 3284 |
3252 static uint32_t ComputeSize() { | 3285 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
3272 ->Init(_pname, _params_shm_id, _params_shm_offset); | 3305 ->Init(_pname, _params_shm_id, _params_shm_offset); |
3273 return NextCmdAddress<ValueType>(cmd); | 3306 return NextCmdAddress<ValueType>(cmd); |
3274 } | 3307 } |
3275 | 3308 |
3276 gpu::CommandHeader header; | 3309 gpu::CommandHeader header; |
3277 uint32_t pname; | 3310 uint32_t pname; |
3278 uint32_t params_shm_id; | 3311 uint32_t params_shm_id; |
3279 uint32_t params_shm_offset; | 3312 uint32_t params_shm_offset; |
3280 }; | 3313 }; |
3281 | 3314 |
3282 COMPILE_ASSERT(sizeof(GetIntegerv) == 16, Sizeof_GetIntegerv_is_not_16); | 3315 static_assert(sizeof(GetIntegerv) == 16, "size of GetIntegerv should be 16"); |
3283 COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0, | 3316 static_assert(offsetof(GetIntegerv, header) == 0, |
3284 OffsetOf_GetIntegerv_header_not_0); | 3317 "offset of GetIntegerv header should be 0"); |
3285 COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4, | 3318 static_assert(offsetof(GetIntegerv, pname) == 4, |
3286 OffsetOf_GetIntegerv_pname_not_4); | 3319 "offset of GetIntegerv pname should be 4"); |
3287 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_id) == 8, | 3320 static_assert(offsetof(GetIntegerv, params_shm_id) == 8, |
3288 OffsetOf_GetIntegerv_params_shm_id_not_8); | 3321 "offset of GetIntegerv params_shm_id should be 8"); |
3289 COMPILE_ASSERT(offsetof(GetIntegerv, params_shm_offset) == 12, | 3322 static_assert(offsetof(GetIntegerv, params_shm_offset) == 12, |
3290 OffsetOf_GetIntegerv_params_shm_offset_not_12); | 3323 "offset of GetIntegerv params_shm_offset should be 12"); |
3291 | 3324 |
3292 struct GetInternalformativ { | 3325 struct GetInternalformativ { |
3293 typedef GetInternalformativ ValueType; | 3326 typedef GetInternalformativ ValueType; |
3294 static const CommandId kCmdId = kGetInternalformativ; | 3327 static const CommandId kCmdId = kGetInternalformativ; |
3295 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3328 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3296 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3329 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3297 | 3330 |
3298 typedef SizedResult<GLint> Result; | 3331 typedef SizedResult<GLint> Result; |
3299 | 3332 |
3300 static uint32_t ComputeSize() { | 3333 static uint32_t ComputeSize() { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3332 | 3365 |
3333 gpu::CommandHeader header; | 3366 gpu::CommandHeader header; |
3334 uint32_t target; | 3367 uint32_t target; |
3335 uint32_t format; | 3368 uint32_t format; |
3336 uint32_t pname; | 3369 uint32_t pname; |
3337 int32_t bufSize; | 3370 int32_t bufSize; |
3338 uint32_t params_shm_id; | 3371 uint32_t params_shm_id; |
3339 uint32_t params_shm_offset; | 3372 uint32_t params_shm_offset; |
3340 }; | 3373 }; |
3341 | 3374 |
3342 COMPILE_ASSERT(sizeof(GetInternalformativ) == 28, | 3375 static_assert(sizeof(GetInternalformativ) == 28, |
3343 Sizeof_GetInternalformativ_is_not_28); | 3376 "size of GetInternalformativ should be 28"); |
3344 COMPILE_ASSERT(offsetof(GetInternalformativ, header) == 0, | 3377 static_assert(offsetof(GetInternalformativ, header) == 0, |
3345 OffsetOf_GetInternalformativ_header_not_0); | 3378 "offset of GetInternalformativ header should be 0"); |
3346 COMPILE_ASSERT(offsetof(GetInternalformativ, target) == 4, | 3379 static_assert(offsetof(GetInternalformativ, target) == 4, |
3347 OffsetOf_GetInternalformativ_target_not_4); | 3380 "offset of GetInternalformativ target should be 4"); |
3348 COMPILE_ASSERT(offsetof(GetInternalformativ, format) == 8, | 3381 static_assert(offsetof(GetInternalformativ, format) == 8, |
3349 OffsetOf_GetInternalformativ_format_not_8); | 3382 "offset of GetInternalformativ format should be 8"); |
3350 COMPILE_ASSERT(offsetof(GetInternalformativ, pname) == 12, | 3383 static_assert(offsetof(GetInternalformativ, pname) == 12, |
3351 OffsetOf_GetInternalformativ_pname_not_12); | 3384 "offset of GetInternalformativ pname should be 12"); |
3352 COMPILE_ASSERT(offsetof(GetInternalformativ, bufSize) == 16, | 3385 static_assert(offsetof(GetInternalformativ, bufSize) == 16, |
3353 OffsetOf_GetInternalformativ_bufSize_not_16); | 3386 "offset of GetInternalformativ bufSize should be 16"); |
3354 COMPILE_ASSERT(offsetof(GetInternalformativ, params_shm_id) == 20, | 3387 static_assert(offsetof(GetInternalformativ, params_shm_id) == 20, |
3355 OffsetOf_GetInternalformativ_params_shm_id_not_20); | 3388 "offset of GetInternalformativ params_shm_id should be 20"); |
3356 COMPILE_ASSERT(offsetof(GetInternalformativ, params_shm_offset) == 24, | 3389 static_assert(offsetof(GetInternalformativ, params_shm_offset) == 24, |
3357 OffsetOf_GetInternalformativ_params_shm_offset_not_24); | 3390 "offset of GetInternalformativ params_shm_offset should be 24"); |
3358 | 3391 |
3359 struct GetProgramiv { | 3392 struct GetProgramiv { |
3360 typedef GetProgramiv ValueType; | 3393 typedef GetProgramiv ValueType; |
3361 static const CommandId kCmdId = kGetProgramiv; | 3394 static const CommandId kCmdId = kGetProgramiv; |
3362 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3395 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3363 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3396 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3364 | 3397 |
3365 typedef SizedResult<GLint> Result; | 3398 typedef SizedResult<GLint> Result; |
3366 | 3399 |
3367 static uint32_t ComputeSize() { | 3400 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3391 return NextCmdAddress<ValueType>(cmd); | 3424 return NextCmdAddress<ValueType>(cmd); |
3392 } | 3425 } |
3393 | 3426 |
3394 gpu::CommandHeader header; | 3427 gpu::CommandHeader header; |
3395 uint32_t program; | 3428 uint32_t program; |
3396 uint32_t pname; | 3429 uint32_t pname; |
3397 uint32_t params_shm_id; | 3430 uint32_t params_shm_id; |
3398 uint32_t params_shm_offset; | 3431 uint32_t params_shm_offset; |
3399 }; | 3432 }; |
3400 | 3433 |
3401 COMPILE_ASSERT(sizeof(GetProgramiv) == 20, Sizeof_GetProgramiv_is_not_20); | 3434 static_assert(sizeof(GetProgramiv) == 20, "size of GetProgramiv should be 20"); |
3402 COMPILE_ASSERT(offsetof(GetProgramiv, header) == 0, | 3435 static_assert(offsetof(GetProgramiv, header) == 0, |
3403 OffsetOf_GetProgramiv_header_not_0); | 3436 "offset of GetProgramiv header should be 0"); |
3404 COMPILE_ASSERT(offsetof(GetProgramiv, program) == 4, | 3437 static_assert(offsetof(GetProgramiv, program) == 4, |
3405 OffsetOf_GetProgramiv_program_not_4); | 3438 "offset of GetProgramiv program should be 4"); |
3406 COMPILE_ASSERT(offsetof(GetProgramiv, pname) == 8, | 3439 static_assert(offsetof(GetProgramiv, pname) == 8, |
3407 OffsetOf_GetProgramiv_pname_not_8); | 3440 "offset of GetProgramiv pname should be 8"); |
3408 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_id) == 12, | 3441 static_assert(offsetof(GetProgramiv, params_shm_id) == 12, |
3409 OffsetOf_GetProgramiv_params_shm_id_not_12); | 3442 "offset of GetProgramiv params_shm_id should be 12"); |
3410 COMPILE_ASSERT(offsetof(GetProgramiv, params_shm_offset) == 16, | 3443 static_assert(offsetof(GetProgramiv, params_shm_offset) == 16, |
3411 OffsetOf_GetProgramiv_params_shm_offset_not_16); | 3444 "offset of GetProgramiv params_shm_offset should be 16"); |
3412 | 3445 |
3413 struct GetProgramInfoLog { | 3446 struct GetProgramInfoLog { |
3414 typedef GetProgramInfoLog ValueType; | 3447 typedef GetProgramInfoLog ValueType; |
3415 static const CommandId kCmdId = kGetProgramInfoLog; | 3448 static const CommandId kCmdId = kGetProgramInfoLog; |
3416 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3449 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3417 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3450 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3418 | 3451 |
3419 static uint32_t ComputeSize() { | 3452 static uint32_t ComputeSize() { |
3420 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3453 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
3421 } | 3454 } |
3422 | 3455 |
3423 void SetHeader() { header.SetCmd<ValueType>(); } | 3456 void SetHeader() { header.SetCmd<ValueType>(); } |
3424 | 3457 |
3425 void Init(GLuint _program, uint32_t _bucket_id) { | 3458 void Init(GLuint _program, uint32_t _bucket_id) { |
3426 SetHeader(); | 3459 SetHeader(); |
3427 program = _program; | 3460 program = _program; |
3428 bucket_id = _bucket_id; | 3461 bucket_id = _bucket_id; |
3429 } | 3462 } |
3430 | 3463 |
3431 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) { | 3464 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) { |
3432 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id); | 3465 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id); |
3433 return NextCmdAddress<ValueType>(cmd); | 3466 return NextCmdAddress<ValueType>(cmd); |
3434 } | 3467 } |
3435 | 3468 |
3436 gpu::CommandHeader header; | 3469 gpu::CommandHeader header; |
3437 uint32_t program; | 3470 uint32_t program; |
3438 uint32_t bucket_id; | 3471 uint32_t bucket_id; |
3439 }; | 3472 }; |
3440 | 3473 |
3441 COMPILE_ASSERT(sizeof(GetProgramInfoLog) == 12, | 3474 static_assert(sizeof(GetProgramInfoLog) == 12, |
3442 Sizeof_GetProgramInfoLog_is_not_12); | 3475 "size of GetProgramInfoLog should be 12"); |
3443 COMPILE_ASSERT(offsetof(GetProgramInfoLog, header) == 0, | 3476 static_assert(offsetof(GetProgramInfoLog, header) == 0, |
3444 OffsetOf_GetProgramInfoLog_header_not_0); | 3477 "offset of GetProgramInfoLog header should be 0"); |
3445 COMPILE_ASSERT(offsetof(GetProgramInfoLog, program) == 4, | 3478 static_assert(offsetof(GetProgramInfoLog, program) == 4, |
3446 OffsetOf_GetProgramInfoLog_program_not_4); | 3479 "offset of GetProgramInfoLog program should be 4"); |
3447 COMPILE_ASSERT(offsetof(GetProgramInfoLog, bucket_id) == 8, | 3480 static_assert(offsetof(GetProgramInfoLog, bucket_id) == 8, |
3448 OffsetOf_GetProgramInfoLog_bucket_id_not_8); | 3481 "offset of GetProgramInfoLog bucket_id should be 8"); |
3449 | 3482 |
3450 struct GetRenderbufferParameteriv { | 3483 struct GetRenderbufferParameteriv { |
3451 typedef GetRenderbufferParameteriv ValueType; | 3484 typedef GetRenderbufferParameteriv ValueType; |
3452 static const CommandId kCmdId = kGetRenderbufferParameteriv; | 3485 static const CommandId kCmdId = kGetRenderbufferParameteriv; |
3453 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3486 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3454 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3487 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3455 | 3488 |
3456 typedef SizedResult<GLint> Result; | 3489 typedef SizedResult<GLint> Result; |
3457 | 3490 |
3458 static uint32_t ComputeSize() { | 3491 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3482 return NextCmdAddress<ValueType>(cmd); | 3515 return NextCmdAddress<ValueType>(cmd); |
3483 } | 3516 } |
3484 | 3517 |
3485 gpu::CommandHeader header; | 3518 gpu::CommandHeader header; |
3486 uint32_t target; | 3519 uint32_t target; |
3487 uint32_t pname; | 3520 uint32_t pname; |
3488 uint32_t params_shm_id; | 3521 uint32_t params_shm_id; |
3489 uint32_t params_shm_offset; | 3522 uint32_t params_shm_offset; |
3490 }; | 3523 }; |
3491 | 3524 |
3492 COMPILE_ASSERT(sizeof(GetRenderbufferParameteriv) == 20, | 3525 static_assert(sizeof(GetRenderbufferParameteriv) == 20, |
3493 Sizeof_GetRenderbufferParameteriv_is_not_20); | 3526 "size of GetRenderbufferParameteriv should be 20"); |
3494 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, header) == 0, | 3527 static_assert(offsetof(GetRenderbufferParameteriv, header) == 0, |
3495 OffsetOf_GetRenderbufferParameteriv_header_not_0); | 3528 "offset of GetRenderbufferParameteriv header should be 0"); |
3496 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4, | 3529 static_assert(offsetof(GetRenderbufferParameteriv, target) == 4, |
3497 OffsetOf_GetRenderbufferParameteriv_target_not_4); | 3530 "offset of GetRenderbufferParameteriv target should be 4"); |
3498 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8, | 3531 static_assert(offsetof(GetRenderbufferParameteriv, pname) == 8, |
3499 OffsetOf_GetRenderbufferParameteriv_pname_not_8); | 3532 "offset of GetRenderbufferParameteriv pname should be 8"); |
3500 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12, | 3533 static_assert( |
3501 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12); | 3534 offsetof(GetRenderbufferParameteriv, params_shm_id) == 12, |
3502 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16, | 3535 "offset of GetRenderbufferParameteriv params_shm_id should be 12"); |
3503 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16); | 3536 static_assert( |
| 3537 offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16, |
| 3538 "offset of GetRenderbufferParameteriv params_shm_offset should be 16"); |
3504 | 3539 |
3505 struct GetSamplerParameterfv { | 3540 struct GetSamplerParameterfv { |
3506 typedef GetSamplerParameterfv ValueType; | 3541 typedef GetSamplerParameterfv ValueType; |
3507 static const CommandId kCmdId = kGetSamplerParameterfv; | 3542 static const CommandId kCmdId = kGetSamplerParameterfv; |
3508 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3543 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3509 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3544 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3510 | 3545 |
3511 typedef SizedResult<GLfloat> Result; | 3546 typedef SizedResult<GLfloat> Result; |
3512 | 3547 |
3513 static uint32_t ComputeSize() { | 3548 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3537 return NextCmdAddress<ValueType>(cmd); | 3572 return NextCmdAddress<ValueType>(cmd); |
3538 } | 3573 } |
3539 | 3574 |
3540 gpu::CommandHeader header; | 3575 gpu::CommandHeader header; |
3541 uint32_t sampler; | 3576 uint32_t sampler; |
3542 uint32_t pname; | 3577 uint32_t pname; |
3543 uint32_t params_shm_id; | 3578 uint32_t params_shm_id; |
3544 uint32_t params_shm_offset; | 3579 uint32_t params_shm_offset; |
3545 }; | 3580 }; |
3546 | 3581 |
3547 COMPILE_ASSERT(sizeof(GetSamplerParameterfv) == 20, | 3582 static_assert(sizeof(GetSamplerParameterfv) == 20, |
3548 Sizeof_GetSamplerParameterfv_is_not_20); | 3583 "size of GetSamplerParameterfv should be 20"); |
3549 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, header) == 0, | 3584 static_assert(offsetof(GetSamplerParameterfv, header) == 0, |
3550 OffsetOf_GetSamplerParameterfv_header_not_0); | 3585 "offset of GetSamplerParameterfv header should be 0"); |
3551 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, sampler) == 4, | 3586 static_assert(offsetof(GetSamplerParameterfv, sampler) == 4, |
3552 OffsetOf_GetSamplerParameterfv_sampler_not_4); | 3587 "offset of GetSamplerParameterfv sampler should be 4"); |
3553 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, pname) == 8, | 3588 static_assert(offsetof(GetSamplerParameterfv, pname) == 8, |
3554 OffsetOf_GetSamplerParameterfv_pname_not_8); | 3589 "offset of GetSamplerParameterfv pname should be 8"); |
3555 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, params_shm_id) == 12, | 3590 static_assert(offsetof(GetSamplerParameterfv, params_shm_id) == 12, |
3556 OffsetOf_GetSamplerParameterfv_params_shm_id_not_12); | 3591 "offset of GetSamplerParameterfv params_shm_id should be 12"); |
3557 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, params_shm_offset) == 16, | 3592 static_assert(offsetof(GetSamplerParameterfv, params_shm_offset) == 16, |
3558 OffsetOf_GetSamplerParameterfv_params_shm_offset_not_16); | 3593 "offset of GetSamplerParameterfv params_shm_offset should be 16"); |
3559 | 3594 |
3560 struct GetSamplerParameteriv { | 3595 struct GetSamplerParameteriv { |
3561 typedef GetSamplerParameteriv ValueType; | 3596 typedef GetSamplerParameteriv ValueType; |
3562 static const CommandId kCmdId = kGetSamplerParameteriv; | 3597 static const CommandId kCmdId = kGetSamplerParameteriv; |
3563 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3598 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3564 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3599 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3565 | 3600 |
3566 typedef SizedResult<GLint> Result; | 3601 typedef SizedResult<GLint> Result; |
3567 | 3602 |
3568 static uint32_t ComputeSize() { | 3603 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3592 return NextCmdAddress<ValueType>(cmd); | 3627 return NextCmdAddress<ValueType>(cmd); |
3593 } | 3628 } |
3594 | 3629 |
3595 gpu::CommandHeader header; | 3630 gpu::CommandHeader header; |
3596 uint32_t sampler; | 3631 uint32_t sampler; |
3597 uint32_t pname; | 3632 uint32_t pname; |
3598 uint32_t params_shm_id; | 3633 uint32_t params_shm_id; |
3599 uint32_t params_shm_offset; | 3634 uint32_t params_shm_offset; |
3600 }; | 3635 }; |
3601 | 3636 |
3602 COMPILE_ASSERT(sizeof(GetSamplerParameteriv) == 20, | 3637 static_assert(sizeof(GetSamplerParameteriv) == 20, |
3603 Sizeof_GetSamplerParameteriv_is_not_20); | 3638 "size of GetSamplerParameteriv should be 20"); |
3604 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, header) == 0, | 3639 static_assert(offsetof(GetSamplerParameteriv, header) == 0, |
3605 OffsetOf_GetSamplerParameteriv_header_not_0); | 3640 "offset of GetSamplerParameteriv header should be 0"); |
3606 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, sampler) == 4, | 3641 static_assert(offsetof(GetSamplerParameteriv, sampler) == 4, |
3607 OffsetOf_GetSamplerParameteriv_sampler_not_4); | 3642 "offset of GetSamplerParameteriv sampler should be 4"); |
3608 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, pname) == 8, | 3643 static_assert(offsetof(GetSamplerParameteriv, pname) == 8, |
3609 OffsetOf_GetSamplerParameteriv_pname_not_8); | 3644 "offset of GetSamplerParameteriv pname should be 8"); |
3610 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, params_shm_id) == 12, | 3645 static_assert(offsetof(GetSamplerParameteriv, params_shm_id) == 12, |
3611 OffsetOf_GetSamplerParameteriv_params_shm_id_not_12); | 3646 "offset of GetSamplerParameteriv params_shm_id should be 12"); |
3612 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, params_shm_offset) == 16, | 3647 static_assert(offsetof(GetSamplerParameteriv, params_shm_offset) == 16, |
3613 OffsetOf_GetSamplerParameteriv_params_shm_offset_not_16); | 3648 "offset of GetSamplerParameteriv params_shm_offset should be 16"); |
3614 | 3649 |
3615 struct GetShaderiv { | 3650 struct GetShaderiv { |
3616 typedef GetShaderiv ValueType; | 3651 typedef GetShaderiv ValueType; |
3617 static const CommandId kCmdId = kGetShaderiv; | 3652 static const CommandId kCmdId = kGetShaderiv; |
3618 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3653 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3619 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3654 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3620 | 3655 |
3621 typedef SizedResult<GLint> Result; | 3656 typedef SizedResult<GLint> Result; |
3622 | 3657 |
3623 static uint32_t ComputeSize() { | 3658 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3647 return NextCmdAddress<ValueType>(cmd); | 3682 return NextCmdAddress<ValueType>(cmd); |
3648 } | 3683 } |
3649 | 3684 |
3650 gpu::CommandHeader header; | 3685 gpu::CommandHeader header; |
3651 uint32_t shader; | 3686 uint32_t shader; |
3652 uint32_t pname; | 3687 uint32_t pname; |
3653 uint32_t params_shm_id; | 3688 uint32_t params_shm_id; |
3654 uint32_t params_shm_offset; | 3689 uint32_t params_shm_offset; |
3655 }; | 3690 }; |
3656 | 3691 |
3657 COMPILE_ASSERT(sizeof(GetShaderiv) == 20, Sizeof_GetShaderiv_is_not_20); | 3692 static_assert(sizeof(GetShaderiv) == 20, "size of GetShaderiv should be 20"); |
3658 COMPILE_ASSERT(offsetof(GetShaderiv, header) == 0, | 3693 static_assert(offsetof(GetShaderiv, header) == 0, |
3659 OffsetOf_GetShaderiv_header_not_0); | 3694 "offset of GetShaderiv header should be 0"); |
3660 COMPILE_ASSERT(offsetof(GetShaderiv, shader) == 4, | 3695 static_assert(offsetof(GetShaderiv, shader) == 4, |
3661 OffsetOf_GetShaderiv_shader_not_4); | 3696 "offset of GetShaderiv shader should be 4"); |
3662 COMPILE_ASSERT(offsetof(GetShaderiv, pname) == 8, | 3697 static_assert(offsetof(GetShaderiv, pname) == 8, |
3663 OffsetOf_GetShaderiv_pname_not_8); | 3698 "offset of GetShaderiv pname should be 8"); |
3664 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_id) == 12, | 3699 static_assert(offsetof(GetShaderiv, params_shm_id) == 12, |
3665 OffsetOf_GetShaderiv_params_shm_id_not_12); | 3700 "offset of GetShaderiv params_shm_id should be 12"); |
3666 COMPILE_ASSERT(offsetof(GetShaderiv, params_shm_offset) == 16, | 3701 static_assert(offsetof(GetShaderiv, params_shm_offset) == 16, |
3667 OffsetOf_GetShaderiv_params_shm_offset_not_16); | 3702 "offset of GetShaderiv params_shm_offset should be 16"); |
3668 | 3703 |
3669 struct GetShaderInfoLog { | 3704 struct GetShaderInfoLog { |
3670 typedef GetShaderInfoLog ValueType; | 3705 typedef GetShaderInfoLog ValueType; |
3671 static const CommandId kCmdId = kGetShaderInfoLog; | 3706 static const CommandId kCmdId = kGetShaderInfoLog; |
3672 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3707 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3673 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3708 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3674 | 3709 |
3675 static uint32_t ComputeSize() { | 3710 static uint32_t ComputeSize() { |
3676 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3711 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
3677 } | 3712 } |
3678 | 3713 |
3679 void SetHeader() { header.SetCmd<ValueType>(); } | 3714 void SetHeader() { header.SetCmd<ValueType>(); } |
3680 | 3715 |
3681 void Init(GLuint _shader, uint32_t _bucket_id) { | 3716 void Init(GLuint _shader, uint32_t _bucket_id) { |
3682 SetHeader(); | 3717 SetHeader(); |
3683 shader = _shader; | 3718 shader = _shader; |
3684 bucket_id = _bucket_id; | 3719 bucket_id = _bucket_id; |
3685 } | 3720 } |
3686 | 3721 |
3687 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) { | 3722 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) { |
3688 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id); | 3723 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id); |
3689 return NextCmdAddress<ValueType>(cmd); | 3724 return NextCmdAddress<ValueType>(cmd); |
3690 } | 3725 } |
3691 | 3726 |
3692 gpu::CommandHeader header; | 3727 gpu::CommandHeader header; |
3693 uint32_t shader; | 3728 uint32_t shader; |
3694 uint32_t bucket_id; | 3729 uint32_t bucket_id; |
3695 }; | 3730 }; |
3696 | 3731 |
3697 COMPILE_ASSERT(sizeof(GetShaderInfoLog) == 12, | 3732 static_assert(sizeof(GetShaderInfoLog) == 12, |
3698 Sizeof_GetShaderInfoLog_is_not_12); | 3733 "size of GetShaderInfoLog should be 12"); |
3699 COMPILE_ASSERT(offsetof(GetShaderInfoLog, header) == 0, | 3734 static_assert(offsetof(GetShaderInfoLog, header) == 0, |
3700 OffsetOf_GetShaderInfoLog_header_not_0); | 3735 "offset of GetShaderInfoLog header should be 0"); |
3701 COMPILE_ASSERT(offsetof(GetShaderInfoLog, shader) == 4, | 3736 static_assert(offsetof(GetShaderInfoLog, shader) == 4, |
3702 OffsetOf_GetShaderInfoLog_shader_not_4); | 3737 "offset of GetShaderInfoLog shader should be 4"); |
3703 COMPILE_ASSERT(offsetof(GetShaderInfoLog, bucket_id) == 8, | 3738 static_assert(offsetof(GetShaderInfoLog, bucket_id) == 8, |
3704 OffsetOf_GetShaderInfoLog_bucket_id_not_8); | 3739 "offset of GetShaderInfoLog bucket_id should be 8"); |
3705 | 3740 |
3706 struct GetShaderPrecisionFormat { | 3741 struct GetShaderPrecisionFormat { |
3707 typedef GetShaderPrecisionFormat ValueType; | 3742 typedef GetShaderPrecisionFormat ValueType; |
3708 static const CommandId kCmdId = kGetShaderPrecisionFormat; | 3743 static const CommandId kCmdId = kGetShaderPrecisionFormat; |
3709 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3744 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3710 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3745 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3711 | 3746 |
3712 struct Result { | 3747 struct Result { |
3713 int32_t success; | 3748 int32_t success; |
3714 int32_t min_range; | 3749 int32_t min_range; |
(...skipping 28 matching lines...) Expand all Loading... |
3743 return NextCmdAddress<ValueType>(cmd); | 3778 return NextCmdAddress<ValueType>(cmd); |
3744 } | 3779 } |
3745 | 3780 |
3746 gpu::CommandHeader header; | 3781 gpu::CommandHeader header; |
3747 uint32_t shadertype; | 3782 uint32_t shadertype; |
3748 uint32_t precisiontype; | 3783 uint32_t precisiontype; |
3749 uint32_t result_shm_id; | 3784 uint32_t result_shm_id; |
3750 uint32_t result_shm_offset; | 3785 uint32_t result_shm_offset; |
3751 }; | 3786 }; |
3752 | 3787 |
3753 COMPILE_ASSERT(sizeof(GetShaderPrecisionFormat) == 20, | 3788 static_assert(sizeof(GetShaderPrecisionFormat) == 20, |
3754 Sizeof_GetShaderPrecisionFormat_is_not_20); | 3789 "size of GetShaderPrecisionFormat should be 20"); |
3755 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, header) == 0, | 3790 static_assert(offsetof(GetShaderPrecisionFormat, header) == 0, |
3756 OffsetOf_GetShaderPrecisionFormat_header_not_0); | 3791 "offset of GetShaderPrecisionFormat header should be 0"); |
3757 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, shadertype) == 4, | 3792 static_assert(offsetof(GetShaderPrecisionFormat, shadertype) == 4, |
3758 OffsetOf_GetShaderPrecisionFormat_shadertype_not_4); | 3793 "offset of GetShaderPrecisionFormat shadertype should be 4"); |
3759 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, precisiontype) == 8, | 3794 static_assert(offsetof(GetShaderPrecisionFormat, precisiontype) == 8, |
3760 OffsetOf_GetShaderPrecisionFormat_precisiontype_not_8); | 3795 "offset of GetShaderPrecisionFormat precisiontype should be 8"); |
3761 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12, | 3796 static_assert(offsetof(GetShaderPrecisionFormat, result_shm_id) == 12, |
3762 OffsetOf_GetShaderPrecisionFormat_result_shm_id_not_12); | 3797 "offset of GetShaderPrecisionFormat result_shm_id should be 12"); |
3763 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16, | 3798 static_assert( |
3764 OffsetOf_GetShaderPrecisionFormat_result_shm_offset_not_16); | 3799 offsetof(GetShaderPrecisionFormat, result_shm_offset) == 16, |
3765 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, success) == 0, | 3800 "offset of GetShaderPrecisionFormat result_shm_offset should be 16"); |
3766 OffsetOf_GetShaderPrecisionFormat_Result_success_not_0); | 3801 static_assert(offsetof(GetShaderPrecisionFormat::Result, success) == 0, |
3767 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, min_range) == 4, | 3802 "offset of GetShaderPrecisionFormat Result success should be 0"); |
3768 OffsetOf_GetShaderPrecisionFormat_Result_min_range_not_4); | 3803 static_assert( |
3769 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, max_range) == 8, | 3804 offsetof(GetShaderPrecisionFormat::Result, min_range) == 4, |
3770 OffsetOf_GetShaderPrecisionFormat_Result_max_range_not_8); | 3805 "offset of GetShaderPrecisionFormat Result min_range should be 4"); |
3771 COMPILE_ASSERT(offsetof(GetShaderPrecisionFormat::Result, precision) == 12, | 3806 static_assert( |
3772 OffsetOf_GetShaderPrecisionFormat_Result_precision_not_12); | 3807 offsetof(GetShaderPrecisionFormat::Result, max_range) == 8, |
| 3808 "offset of GetShaderPrecisionFormat Result max_range should be 8"); |
| 3809 static_assert( |
| 3810 offsetof(GetShaderPrecisionFormat::Result, precision) == 12, |
| 3811 "offset of GetShaderPrecisionFormat Result precision should be 12"); |
3773 | 3812 |
3774 struct GetShaderSource { | 3813 struct GetShaderSource { |
3775 typedef GetShaderSource ValueType; | 3814 typedef GetShaderSource ValueType; |
3776 static const CommandId kCmdId = kGetShaderSource; | 3815 static const CommandId kCmdId = kGetShaderSource; |
3777 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3816 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3778 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3817 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3779 | 3818 |
3780 static uint32_t ComputeSize() { | 3819 static uint32_t ComputeSize() { |
3781 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3820 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
3782 } | 3821 } |
3783 | 3822 |
3784 void SetHeader() { header.SetCmd<ValueType>(); } | 3823 void SetHeader() { header.SetCmd<ValueType>(); } |
3785 | 3824 |
3786 void Init(GLuint _shader, uint32_t _bucket_id) { | 3825 void Init(GLuint _shader, uint32_t _bucket_id) { |
3787 SetHeader(); | 3826 SetHeader(); |
3788 shader = _shader; | 3827 shader = _shader; |
3789 bucket_id = _bucket_id; | 3828 bucket_id = _bucket_id; |
3790 } | 3829 } |
3791 | 3830 |
3792 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) { | 3831 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) { |
3793 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id); | 3832 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id); |
3794 return NextCmdAddress<ValueType>(cmd); | 3833 return NextCmdAddress<ValueType>(cmd); |
3795 } | 3834 } |
3796 | 3835 |
3797 gpu::CommandHeader header; | 3836 gpu::CommandHeader header; |
3798 uint32_t shader; | 3837 uint32_t shader; |
3799 uint32_t bucket_id; | 3838 uint32_t bucket_id; |
3800 }; | 3839 }; |
3801 | 3840 |
3802 COMPILE_ASSERT(sizeof(GetShaderSource) == 12, Sizeof_GetShaderSource_is_not_12); | 3841 static_assert(sizeof(GetShaderSource) == 12, |
3803 COMPILE_ASSERT(offsetof(GetShaderSource, header) == 0, | 3842 "size of GetShaderSource should be 12"); |
3804 OffsetOf_GetShaderSource_header_not_0); | 3843 static_assert(offsetof(GetShaderSource, header) == 0, |
3805 COMPILE_ASSERT(offsetof(GetShaderSource, shader) == 4, | 3844 "offset of GetShaderSource header should be 0"); |
3806 OffsetOf_GetShaderSource_shader_not_4); | 3845 static_assert(offsetof(GetShaderSource, shader) == 4, |
3807 COMPILE_ASSERT(offsetof(GetShaderSource, bucket_id) == 8, | 3846 "offset of GetShaderSource shader should be 4"); |
3808 OffsetOf_GetShaderSource_bucket_id_not_8); | 3847 static_assert(offsetof(GetShaderSource, bucket_id) == 8, |
| 3848 "offset of GetShaderSource bucket_id should be 8"); |
3809 | 3849 |
3810 struct GetString { | 3850 struct GetString { |
3811 typedef GetString ValueType; | 3851 typedef GetString ValueType; |
3812 static const CommandId kCmdId = kGetString; | 3852 static const CommandId kCmdId = kGetString; |
3813 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3853 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3814 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3854 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3815 | 3855 |
3816 static uint32_t ComputeSize() { | 3856 static uint32_t ComputeSize() { |
3817 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3857 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
3818 } | 3858 } |
3819 | 3859 |
3820 void SetHeader() { header.SetCmd<ValueType>(); } | 3860 void SetHeader() { header.SetCmd<ValueType>(); } |
3821 | 3861 |
3822 void Init(GLenum _name, uint32_t _bucket_id) { | 3862 void Init(GLenum _name, uint32_t _bucket_id) { |
3823 SetHeader(); | 3863 SetHeader(); |
3824 name = _name; | 3864 name = _name; |
3825 bucket_id = _bucket_id; | 3865 bucket_id = _bucket_id; |
3826 } | 3866 } |
3827 | 3867 |
3828 void* Set(void* cmd, GLenum _name, uint32_t _bucket_id) { | 3868 void* Set(void* cmd, GLenum _name, uint32_t _bucket_id) { |
3829 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id); | 3869 static_cast<ValueType*>(cmd)->Init(_name, _bucket_id); |
3830 return NextCmdAddress<ValueType>(cmd); | 3870 return NextCmdAddress<ValueType>(cmd); |
3831 } | 3871 } |
3832 | 3872 |
3833 gpu::CommandHeader header; | 3873 gpu::CommandHeader header; |
3834 uint32_t name; | 3874 uint32_t name; |
3835 uint32_t bucket_id; | 3875 uint32_t bucket_id; |
3836 }; | 3876 }; |
3837 | 3877 |
3838 COMPILE_ASSERT(sizeof(GetString) == 12, Sizeof_GetString_is_not_12); | 3878 static_assert(sizeof(GetString) == 12, "size of GetString should be 12"); |
3839 COMPILE_ASSERT(offsetof(GetString, header) == 0, | 3879 static_assert(offsetof(GetString, header) == 0, |
3840 OffsetOf_GetString_header_not_0); | 3880 "offset of GetString header should be 0"); |
3841 COMPILE_ASSERT(offsetof(GetString, name) == 4, OffsetOf_GetString_name_not_4); | 3881 static_assert(offsetof(GetString, name) == 4, |
3842 COMPILE_ASSERT(offsetof(GetString, bucket_id) == 8, | 3882 "offset of GetString name should be 4"); |
3843 OffsetOf_GetString_bucket_id_not_8); | 3883 static_assert(offsetof(GetString, bucket_id) == 8, |
| 3884 "offset of GetString bucket_id should be 8"); |
3844 | 3885 |
3845 struct GetTexParameterfv { | 3886 struct GetTexParameterfv { |
3846 typedef GetTexParameterfv ValueType; | 3887 typedef GetTexParameterfv ValueType; |
3847 static const CommandId kCmdId = kGetTexParameterfv; | 3888 static const CommandId kCmdId = kGetTexParameterfv; |
3848 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3889 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3849 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3890 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3850 | 3891 |
3851 typedef SizedResult<GLfloat> Result; | 3892 typedef SizedResult<GLfloat> Result; |
3852 | 3893 |
3853 static uint32_t ComputeSize() { | 3894 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3877 return NextCmdAddress<ValueType>(cmd); | 3918 return NextCmdAddress<ValueType>(cmd); |
3878 } | 3919 } |
3879 | 3920 |
3880 gpu::CommandHeader header; | 3921 gpu::CommandHeader header; |
3881 uint32_t target; | 3922 uint32_t target; |
3882 uint32_t pname; | 3923 uint32_t pname; |
3883 uint32_t params_shm_id; | 3924 uint32_t params_shm_id; |
3884 uint32_t params_shm_offset; | 3925 uint32_t params_shm_offset; |
3885 }; | 3926 }; |
3886 | 3927 |
3887 COMPILE_ASSERT(sizeof(GetTexParameterfv) == 20, | 3928 static_assert(sizeof(GetTexParameterfv) == 20, |
3888 Sizeof_GetTexParameterfv_is_not_20); | 3929 "size of GetTexParameterfv should be 20"); |
3889 COMPILE_ASSERT(offsetof(GetTexParameterfv, header) == 0, | 3930 static_assert(offsetof(GetTexParameterfv, header) == 0, |
3890 OffsetOf_GetTexParameterfv_header_not_0); | 3931 "offset of GetTexParameterfv header should be 0"); |
3891 COMPILE_ASSERT(offsetof(GetTexParameterfv, target) == 4, | 3932 static_assert(offsetof(GetTexParameterfv, target) == 4, |
3892 OffsetOf_GetTexParameterfv_target_not_4); | 3933 "offset of GetTexParameterfv target should be 4"); |
3893 COMPILE_ASSERT(offsetof(GetTexParameterfv, pname) == 8, | 3934 static_assert(offsetof(GetTexParameterfv, pname) == 8, |
3894 OffsetOf_GetTexParameterfv_pname_not_8); | 3935 "offset of GetTexParameterfv pname should be 8"); |
3895 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_id) == 12, | 3936 static_assert(offsetof(GetTexParameterfv, params_shm_id) == 12, |
3896 OffsetOf_GetTexParameterfv_params_shm_id_not_12); | 3937 "offset of GetTexParameterfv params_shm_id should be 12"); |
3897 COMPILE_ASSERT(offsetof(GetTexParameterfv, params_shm_offset) == 16, | 3938 static_assert(offsetof(GetTexParameterfv, params_shm_offset) == 16, |
3898 OffsetOf_GetTexParameterfv_params_shm_offset_not_16); | 3939 "offset of GetTexParameterfv params_shm_offset should be 16"); |
3899 | 3940 |
3900 struct GetTexParameteriv { | 3941 struct GetTexParameteriv { |
3901 typedef GetTexParameteriv ValueType; | 3942 typedef GetTexParameteriv ValueType; |
3902 static const CommandId kCmdId = kGetTexParameteriv; | 3943 static const CommandId kCmdId = kGetTexParameteriv; |
3903 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3944 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3904 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3945 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3905 | 3946 |
3906 typedef SizedResult<GLint> Result; | 3947 typedef SizedResult<GLint> Result; |
3907 | 3948 |
3908 static uint32_t ComputeSize() { | 3949 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3932 return NextCmdAddress<ValueType>(cmd); | 3973 return NextCmdAddress<ValueType>(cmd); |
3933 } | 3974 } |
3934 | 3975 |
3935 gpu::CommandHeader header; | 3976 gpu::CommandHeader header; |
3936 uint32_t target; | 3977 uint32_t target; |
3937 uint32_t pname; | 3978 uint32_t pname; |
3938 uint32_t params_shm_id; | 3979 uint32_t params_shm_id; |
3939 uint32_t params_shm_offset; | 3980 uint32_t params_shm_offset; |
3940 }; | 3981 }; |
3941 | 3982 |
3942 COMPILE_ASSERT(sizeof(GetTexParameteriv) == 20, | 3983 static_assert(sizeof(GetTexParameteriv) == 20, |
3943 Sizeof_GetTexParameteriv_is_not_20); | 3984 "size of GetTexParameteriv should be 20"); |
3944 COMPILE_ASSERT(offsetof(GetTexParameteriv, header) == 0, | 3985 static_assert(offsetof(GetTexParameteriv, header) == 0, |
3945 OffsetOf_GetTexParameteriv_header_not_0); | 3986 "offset of GetTexParameteriv header should be 0"); |
3946 COMPILE_ASSERT(offsetof(GetTexParameteriv, target) == 4, | 3987 static_assert(offsetof(GetTexParameteriv, target) == 4, |
3947 OffsetOf_GetTexParameteriv_target_not_4); | 3988 "offset of GetTexParameteriv target should be 4"); |
3948 COMPILE_ASSERT(offsetof(GetTexParameteriv, pname) == 8, | 3989 static_assert(offsetof(GetTexParameteriv, pname) == 8, |
3949 OffsetOf_GetTexParameteriv_pname_not_8); | 3990 "offset of GetTexParameteriv pname should be 8"); |
3950 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_id) == 12, | 3991 static_assert(offsetof(GetTexParameteriv, params_shm_id) == 12, |
3951 OffsetOf_GetTexParameteriv_params_shm_id_not_12); | 3992 "offset of GetTexParameteriv params_shm_id should be 12"); |
3952 COMPILE_ASSERT(offsetof(GetTexParameteriv, params_shm_offset) == 16, | 3993 static_assert(offsetof(GetTexParameteriv, params_shm_offset) == 16, |
3953 OffsetOf_GetTexParameteriv_params_shm_offset_not_16); | 3994 "offset of GetTexParameteriv params_shm_offset should be 16"); |
3954 | 3995 |
3955 struct GetUniformfv { | 3996 struct GetUniformfv { |
3956 typedef GetUniformfv ValueType; | 3997 typedef GetUniformfv ValueType; |
3957 static const CommandId kCmdId = kGetUniformfv; | 3998 static const CommandId kCmdId = kGetUniformfv; |
3958 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3999 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3959 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4000 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
3960 | 4001 |
3961 typedef SizedResult<GLfloat> Result; | 4002 typedef SizedResult<GLfloat> Result; |
3962 | 4003 |
3963 static uint32_t ComputeSize() { | 4004 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
3987 return NextCmdAddress<ValueType>(cmd); | 4028 return NextCmdAddress<ValueType>(cmd); |
3988 } | 4029 } |
3989 | 4030 |
3990 gpu::CommandHeader header; | 4031 gpu::CommandHeader header; |
3991 uint32_t program; | 4032 uint32_t program; |
3992 int32_t location; | 4033 int32_t location; |
3993 uint32_t params_shm_id; | 4034 uint32_t params_shm_id; |
3994 uint32_t params_shm_offset; | 4035 uint32_t params_shm_offset; |
3995 }; | 4036 }; |
3996 | 4037 |
3997 COMPILE_ASSERT(sizeof(GetUniformfv) == 20, Sizeof_GetUniformfv_is_not_20); | 4038 static_assert(sizeof(GetUniformfv) == 20, "size of GetUniformfv should be 20"); |
3998 COMPILE_ASSERT(offsetof(GetUniformfv, header) == 0, | 4039 static_assert(offsetof(GetUniformfv, header) == 0, |
3999 OffsetOf_GetUniformfv_header_not_0); | 4040 "offset of GetUniformfv header should be 0"); |
4000 COMPILE_ASSERT(offsetof(GetUniformfv, program) == 4, | 4041 static_assert(offsetof(GetUniformfv, program) == 4, |
4001 OffsetOf_GetUniformfv_program_not_4); | 4042 "offset of GetUniformfv program should be 4"); |
4002 COMPILE_ASSERT(offsetof(GetUniformfv, location) == 8, | 4043 static_assert(offsetof(GetUniformfv, location) == 8, |
4003 OffsetOf_GetUniformfv_location_not_8); | 4044 "offset of GetUniformfv location should be 8"); |
4004 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_id) == 12, | 4045 static_assert(offsetof(GetUniformfv, params_shm_id) == 12, |
4005 OffsetOf_GetUniformfv_params_shm_id_not_12); | 4046 "offset of GetUniformfv params_shm_id should be 12"); |
4006 COMPILE_ASSERT(offsetof(GetUniformfv, params_shm_offset) == 16, | 4047 static_assert(offsetof(GetUniformfv, params_shm_offset) == 16, |
4007 OffsetOf_GetUniformfv_params_shm_offset_not_16); | 4048 "offset of GetUniformfv params_shm_offset should be 16"); |
4008 | 4049 |
4009 struct GetUniformiv { | 4050 struct GetUniformiv { |
4010 typedef GetUniformiv ValueType; | 4051 typedef GetUniformiv ValueType; |
4011 static const CommandId kCmdId = kGetUniformiv; | 4052 static const CommandId kCmdId = kGetUniformiv; |
4012 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4053 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4013 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4054 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4014 | 4055 |
4015 typedef SizedResult<GLint> Result; | 4056 typedef SizedResult<GLint> Result; |
4016 | 4057 |
4017 static uint32_t ComputeSize() { | 4058 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
4041 return NextCmdAddress<ValueType>(cmd); | 4082 return NextCmdAddress<ValueType>(cmd); |
4042 } | 4083 } |
4043 | 4084 |
4044 gpu::CommandHeader header; | 4085 gpu::CommandHeader header; |
4045 uint32_t program; | 4086 uint32_t program; |
4046 int32_t location; | 4087 int32_t location; |
4047 uint32_t params_shm_id; | 4088 uint32_t params_shm_id; |
4048 uint32_t params_shm_offset; | 4089 uint32_t params_shm_offset; |
4049 }; | 4090 }; |
4050 | 4091 |
4051 COMPILE_ASSERT(sizeof(GetUniformiv) == 20, Sizeof_GetUniformiv_is_not_20); | 4092 static_assert(sizeof(GetUniformiv) == 20, "size of GetUniformiv should be 20"); |
4052 COMPILE_ASSERT(offsetof(GetUniformiv, header) == 0, | 4093 static_assert(offsetof(GetUniformiv, header) == 0, |
4053 OffsetOf_GetUniformiv_header_not_0); | 4094 "offset of GetUniformiv header should be 0"); |
4054 COMPILE_ASSERT(offsetof(GetUniformiv, program) == 4, | 4095 static_assert(offsetof(GetUniformiv, program) == 4, |
4055 OffsetOf_GetUniformiv_program_not_4); | 4096 "offset of GetUniformiv program should be 4"); |
4056 COMPILE_ASSERT(offsetof(GetUniformiv, location) == 8, | 4097 static_assert(offsetof(GetUniformiv, location) == 8, |
4057 OffsetOf_GetUniformiv_location_not_8); | 4098 "offset of GetUniformiv location should be 8"); |
4058 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_id) == 12, | 4099 static_assert(offsetof(GetUniformiv, params_shm_id) == 12, |
4059 OffsetOf_GetUniformiv_params_shm_id_not_12); | 4100 "offset of GetUniformiv params_shm_id should be 12"); |
4060 COMPILE_ASSERT(offsetof(GetUniformiv, params_shm_offset) == 16, | 4101 static_assert(offsetof(GetUniformiv, params_shm_offset) == 16, |
4061 OffsetOf_GetUniformiv_params_shm_offset_not_16); | 4102 "offset of GetUniformiv params_shm_offset should be 16"); |
4062 | 4103 |
4063 struct GetUniformLocation { | 4104 struct GetUniformLocation { |
4064 typedef GetUniformLocation ValueType; | 4105 typedef GetUniformLocation ValueType; |
4065 static const CommandId kCmdId = kGetUniformLocation; | 4106 static const CommandId kCmdId = kGetUniformLocation; |
4066 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4107 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4067 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4108 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4068 | 4109 |
4069 typedef GLint Result; | 4110 typedef GLint Result; |
4070 | 4111 |
4071 static uint32_t ComputeSize() { | 4112 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
4095 return NextCmdAddress<ValueType>(cmd); | 4136 return NextCmdAddress<ValueType>(cmd); |
4096 } | 4137 } |
4097 | 4138 |
4098 gpu::CommandHeader header; | 4139 gpu::CommandHeader header; |
4099 uint32_t program; | 4140 uint32_t program; |
4100 uint32_t name_bucket_id; | 4141 uint32_t name_bucket_id; |
4101 uint32_t location_shm_id; | 4142 uint32_t location_shm_id; |
4102 uint32_t location_shm_offset; | 4143 uint32_t location_shm_offset; |
4103 }; | 4144 }; |
4104 | 4145 |
4105 COMPILE_ASSERT(sizeof(GetUniformLocation) == 20, | 4146 static_assert(sizeof(GetUniformLocation) == 20, |
4106 Sizeof_GetUniformLocation_is_not_20); | 4147 "size of GetUniformLocation should be 20"); |
4107 COMPILE_ASSERT(offsetof(GetUniformLocation, header) == 0, | 4148 static_assert(offsetof(GetUniformLocation, header) == 0, |
4108 OffsetOf_GetUniformLocation_header_not_0); | 4149 "offset of GetUniformLocation header should be 0"); |
4109 COMPILE_ASSERT(offsetof(GetUniformLocation, program) == 4, | 4150 static_assert(offsetof(GetUniformLocation, program) == 4, |
4110 OffsetOf_GetUniformLocation_program_not_4); | 4151 "offset of GetUniformLocation program should be 4"); |
4111 COMPILE_ASSERT(offsetof(GetUniformLocation, name_bucket_id) == 8, | 4152 static_assert(offsetof(GetUniformLocation, name_bucket_id) == 8, |
4112 OffsetOf_GetUniformLocation_name_bucket_id_not_8); | 4153 "offset of GetUniformLocation name_bucket_id should be 8"); |
4113 COMPILE_ASSERT(offsetof(GetUniformLocation, location_shm_id) == 12, | 4154 static_assert(offsetof(GetUniformLocation, location_shm_id) == 12, |
4114 OffsetOf_GetUniformLocation_location_shm_id_not_12); | 4155 "offset of GetUniformLocation location_shm_id should be 12"); |
4115 COMPILE_ASSERT(offsetof(GetUniformLocation, location_shm_offset) == 16, | 4156 static_assert(offsetof(GetUniformLocation, location_shm_offset) == 16, |
4116 OffsetOf_GetUniformLocation_location_shm_offset_not_16); | 4157 "offset of GetUniformLocation location_shm_offset should be 16"); |
4117 | 4158 |
4118 struct GetVertexAttribfv { | 4159 struct GetVertexAttribfv { |
4119 typedef GetVertexAttribfv ValueType; | 4160 typedef GetVertexAttribfv ValueType; |
4120 static const CommandId kCmdId = kGetVertexAttribfv; | 4161 static const CommandId kCmdId = kGetVertexAttribfv; |
4121 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4162 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4122 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4163 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4123 | 4164 |
4124 typedef SizedResult<GLfloat> Result; | 4165 typedef SizedResult<GLfloat> Result; |
4125 | 4166 |
4126 static uint32_t ComputeSize() { | 4167 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
4150 return NextCmdAddress<ValueType>(cmd); | 4191 return NextCmdAddress<ValueType>(cmd); |
4151 } | 4192 } |
4152 | 4193 |
4153 gpu::CommandHeader header; | 4194 gpu::CommandHeader header; |
4154 uint32_t index; | 4195 uint32_t index; |
4155 uint32_t pname; | 4196 uint32_t pname; |
4156 uint32_t params_shm_id; | 4197 uint32_t params_shm_id; |
4157 uint32_t params_shm_offset; | 4198 uint32_t params_shm_offset; |
4158 }; | 4199 }; |
4159 | 4200 |
4160 COMPILE_ASSERT(sizeof(GetVertexAttribfv) == 20, | 4201 static_assert(sizeof(GetVertexAttribfv) == 20, |
4161 Sizeof_GetVertexAttribfv_is_not_20); | 4202 "size of GetVertexAttribfv should be 20"); |
4162 COMPILE_ASSERT(offsetof(GetVertexAttribfv, header) == 0, | 4203 static_assert(offsetof(GetVertexAttribfv, header) == 0, |
4163 OffsetOf_GetVertexAttribfv_header_not_0); | 4204 "offset of GetVertexAttribfv header should be 0"); |
4164 COMPILE_ASSERT(offsetof(GetVertexAttribfv, index) == 4, | 4205 static_assert(offsetof(GetVertexAttribfv, index) == 4, |
4165 OffsetOf_GetVertexAttribfv_index_not_4); | 4206 "offset of GetVertexAttribfv index should be 4"); |
4166 COMPILE_ASSERT(offsetof(GetVertexAttribfv, pname) == 8, | 4207 static_assert(offsetof(GetVertexAttribfv, pname) == 8, |
4167 OffsetOf_GetVertexAttribfv_pname_not_8); | 4208 "offset of GetVertexAttribfv pname should be 8"); |
4168 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_id) == 12, | 4209 static_assert(offsetof(GetVertexAttribfv, params_shm_id) == 12, |
4169 OffsetOf_GetVertexAttribfv_params_shm_id_not_12); | 4210 "offset of GetVertexAttribfv params_shm_id should be 12"); |
4170 COMPILE_ASSERT(offsetof(GetVertexAttribfv, params_shm_offset) == 16, | 4211 static_assert(offsetof(GetVertexAttribfv, params_shm_offset) == 16, |
4171 OffsetOf_GetVertexAttribfv_params_shm_offset_not_16); | 4212 "offset of GetVertexAttribfv params_shm_offset should be 16"); |
4172 | 4213 |
4173 struct GetVertexAttribiv { | 4214 struct GetVertexAttribiv { |
4174 typedef GetVertexAttribiv ValueType; | 4215 typedef GetVertexAttribiv ValueType; |
4175 static const CommandId kCmdId = kGetVertexAttribiv; | 4216 static const CommandId kCmdId = kGetVertexAttribiv; |
4176 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4217 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4177 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4218 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4178 | 4219 |
4179 typedef SizedResult<GLint> Result; | 4220 typedef SizedResult<GLint> Result; |
4180 | 4221 |
4181 static uint32_t ComputeSize() { | 4222 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
4205 return NextCmdAddress<ValueType>(cmd); | 4246 return NextCmdAddress<ValueType>(cmd); |
4206 } | 4247 } |
4207 | 4248 |
4208 gpu::CommandHeader header; | 4249 gpu::CommandHeader header; |
4209 uint32_t index; | 4250 uint32_t index; |
4210 uint32_t pname; | 4251 uint32_t pname; |
4211 uint32_t params_shm_id; | 4252 uint32_t params_shm_id; |
4212 uint32_t params_shm_offset; | 4253 uint32_t params_shm_offset; |
4213 }; | 4254 }; |
4214 | 4255 |
4215 COMPILE_ASSERT(sizeof(GetVertexAttribiv) == 20, | 4256 static_assert(sizeof(GetVertexAttribiv) == 20, |
4216 Sizeof_GetVertexAttribiv_is_not_20); | 4257 "size of GetVertexAttribiv should be 20"); |
4217 COMPILE_ASSERT(offsetof(GetVertexAttribiv, header) == 0, | 4258 static_assert(offsetof(GetVertexAttribiv, header) == 0, |
4218 OffsetOf_GetVertexAttribiv_header_not_0); | 4259 "offset of GetVertexAttribiv header should be 0"); |
4219 COMPILE_ASSERT(offsetof(GetVertexAttribiv, index) == 4, | 4260 static_assert(offsetof(GetVertexAttribiv, index) == 4, |
4220 OffsetOf_GetVertexAttribiv_index_not_4); | 4261 "offset of GetVertexAttribiv index should be 4"); |
4221 COMPILE_ASSERT(offsetof(GetVertexAttribiv, pname) == 8, | 4262 static_assert(offsetof(GetVertexAttribiv, pname) == 8, |
4222 OffsetOf_GetVertexAttribiv_pname_not_8); | 4263 "offset of GetVertexAttribiv pname should be 8"); |
4223 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_id) == 12, | 4264 static_assert(offsetof(GetVertexAttribiv, params_shm_id) == 12, |
4224 OffsetOf_GetVertexAttribiv_params_shm_id_not_12); | 4265 "offset of GetVertexAttribiv params_shm_id should be 12"); |
4225 COMPILE_ASSERT(offsetof(GetVertexAttribiv, params_shm_offset) == 16, | 4266 static_assert(offsetof(GetVertexAttribiv, params_shm_offset) == 16, |
4226 OffsetOf_GetVertexAttribiv_params_shm_offset_not_16); | 4267 "offset of GetVertexAttribiv params_shm_offset should be 16"); |
4227 | 4268 |
4228 struct GetVertexAttribPointerv { | 4269 struct GetVertexAttribPointerv { |
4229 typedef GetVertexAttribPointerv ValueType; | 4270 typedef GetVertexAttribPointerv ValueType; |
4230 static const CommandId kCmdId = kGetVertexAttribPointerv; | 4271 static const CommandId kCmdId = kGetVertexAttribPointerv; |
4231 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4272 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4232 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4273 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4233 | 4274 |
4234 typedef SizedResult<GLuint> Result; | 4275 typedef SizedResult<GLuint> Result; |
4235 | 4276 |
4236 static uint32_t ComputeSize() { | 4277 static uint32_t ComputeSize() { |
(...skipping 23 matching lines...) Expand all Loading... |
4260 return NextCmdAddress<ValueType>(cmd); | 4301 return NextCmdAddress<ValueType>(cmd); |
4261 } | 4302 } |
4262 | 4303 |
4263 gpu::CommandHeader header; | 4304 gpu::CommandHeader header; |
4264 uint32_t index; | 4305 uint32_t index; |
4265 uint32_t pname; | 4306 uint32_t pname; |
4266 uint32_t pointer_shm_id; | 4307 uint32_t pointer_shm_id; |
4267 uint32_t pointer_shm_offset; | 4308 uint32_t pointer_shm_offset; |
4268 }; | 4309 }; |
4269 | 4310 |
4270 COMPILE_ASSERT(sizeof(GetVertexAttribPointerv) == 20, | 4311 static_assert(sizeof(GetVertexAttribPointerv) == 20, |
4271 Sizeof_GetVertexAttribPointerv_is_not_20); | 4312 "size of GetVertexAttribPointerv should be 20"); |
4272 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, header) == 0, | 4313 static_assert(offsetof(GetVertexAttribPointerv, header) == 0, |
4273 OffsetOf_GetVertexAttribPointerv_header_not_0); | 4314 "offset of GetVertexAttribPointerv header should be 0"); |
4274 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, index) == 4, | 4315 static_assert(offsetof(GetVertexAttribPointerv, index) == 4, |
4275 OffsetOf_GetVertexAttribPointerv_index_not_4); | 4316 "offset of GetVertexAttribPointerv index should be 4"); |
4276 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pname) == 8, | 4317 static_assert(offsetof(GetVertexAttribPointerv, pname) == 8, |
4277 OffsetOf_GetVertexAttribPointerv_pname_not_8); | 4318 "offset of GetVertexAttribPointerv pname should be 8"); |
4278 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12, | 4319 static_assert(offsetof(GetVertexAttribPointerv, pointer_shm_id) == 12, |
4279 OffsetOf_GetVertexAttribPointerv_pointer_shm_id_not_12); | 4320 "offset of GetVertexAttribPointerv pointer_shm_id should be 12"); |
4280 COMPILE_ASSERT(offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16, | 4321 static_assert( |
4281 OffsetOf_GetVertexAttribPointerv_pointer_shm_offset_not_16); | 4322 offsetof(GetVertexAttribPointerv, pointer_shm_offset) == 16, |
| 4323 "offset of GetVertexAttribPointerv pointer_shm_offset should be 16"); |
4282 | 4324 |
4283 struct Hint { | 4325 struct Hint { |
4284 typedef Hint ValueType; | 4326 typedef Hint ValueType; |
4285 static const CommandId kCmdId = kHint; | 4327 static const CommandId kCmdId = kHint; |
4286 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4328 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4287 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4329 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4288 | 4330 |
4289 static uint32_t ComputeSize() { | 4331 static uint32_t ComputeSize() { |
4290 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 4332 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
4291 } | 4333 } |
4292 | 4334 |
4293 void SetHeader() { header.SetCmd<ValueType>(); } | 4335 void SetHeader() { header.SetCmd<ValueType>(); } |
4294 | 4336 |
4295 void Init(GLenum _target, GLenum _mode) { | 4337 void Init(GLenum _target, GLenum _mode) { |
4296 SetHeader(); | 4338 SetHeader(); |
4297 target = _target; | 4339 target = _target; |
4298 mode = _mode; | 4340 mode = _mode; |
4299 } | 4341 } |
4300 | 4342 |
4301 void* Set(void* cmd, GLenum _target, GLenum _mode) { | 4343 void* Set(void* cmd, GLenum _target, GLenum _mode) { |
4302 static_cast<ValueType*>(cmd)->Init(_target, _mode); | 4344 static_cast<ValueType*>(cmd)->Init(_target, _mode); |
4303 return NextCmdAddress<ValueType>(cmd); | 4345 return NextCmdAddress<ValueType>(cmd); |
4304 } | 4346 } |
4305 | 4347 |
4306 gpu::CommandHeader header; | 4348 gpu::CommandHeader header; |
4307 uint32_t target; | 4349 uint32_t target; |
4308 uint32_t mode; | 4350 uint32_t mode; |
4309 }; | 4351 }; |
4310 | 4352 |
4311 COMPILE_ASSERT(sizeof(Hint) == 12, Sizeof_Hint_is_not_12); | 4353 static_assert(sizeof(Hint) == 12, "size of Hint should be 12"); |
4312 COMPILE_ASSERT(offsetof(Hint, header) == 0, OffsetOf_Hint_header_not_0); | 4354 static_assert(offsetof(Hint, header) == 0, "offset of Hint header should be 0"); |
4313 COMPILE_ASSERT(offsetof(Hint, target) == 4, OffsetOf_Hint_target_not_4); | 4355 static_assert(offsetof(Hint, target) == 4, "offset of Hint target should be 4"); |
4314 COMPILE_ASSERT(offsetof(Hint, mode) == 8, OffsetOf_Hint_mode_not_8); | 4356 static_assert(offsetof(Hint, mode) == 8, "offset of Hint mode should be 8"); |
4315 | 4357 |
4316 struct InvalidateFramebufferImmediate { | 4358 struct InvalidateFramebufferImmediate { |
4317 typedef InvalidateFramebufferImmediate ValueType; | 4359 typedef InvalidateFramebufferImmediate ValueType; |
4318 static const CommandId kCmdId = kInvalidateFramebufferImmediate; | 4360 static const CommandId kCmdId = kInvalidateFramebufferImmediate; |
4319 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 4361 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
4320 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4362 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4321 | 4363 |
4322 static uint32_t ComputeDataSize(GLsizei count) { | 4364 static uint32_t ComputeDataSize(GLsizei count) { |
4323 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT | 4365 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT |
4324 } | 4366 } |
(...skipping 21 matching lines...) Expand all Loading... |
4346 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments); | 4388 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments); |
4347 const uint32_t size = ComputeSize(_count); | 4389 const uint32_t size = ComputeSize(_count); |
4348 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 4390 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
4349 } | 4391 } |
4350 | 4392 |
4351 gpu::CommandHeader header; | 4393 gpu::CommandHeader header; |
4352 uint32_t target; | 4394 uint32_t target; |
4353 int32_t count; | 4395 int32_t count; |
4354 }; | 4396 }; |
4355 | 4397 |
4356 COMPILE_ASSERT(sizeof(InvalidateFramebufferImmediate) == 12, | 4398 static_assert(sizeof(InvalidateFramebufferImmediate) == 12, |
4357 Sizeof_InvalidateFramebufferImmediate_is_not_12); | 4399 "size of InvalidateFramebufferImmediate should be 12"); |
4358 COMPILE_ASSERT(offsetof(InvalidateFramebufferImmediate, header) == 0, | 4400 static_assert(offsetof(InvalidateFramebufferImmediate, header) == 0, |
4359 OffsetOf_InvalidateFramebufferImmediate_header_not_0); | 4401 "offset of InvalidateFramebufferImmediate header should be 0"); |
4360 COMPILE_ASSERT(offsetof(InvalidateFramebufferImmediate, target) == 4, | 4402 static_assert(offsetof(InvalidateFramebufferImmediate, target) == 4, |
4361 OffsetOf_InvalidateFramebufferImmediate_target_not_4); | 4403 "offset of InvalidateFramebufferImmediate target should be 4"); |
4362 COMPILE_ASSERT(offsetof(InvalidateFramebufferImmediate, count) == 8, | 4404 static_assert(offsetof(InvalidateFramebufferImmediate, count) == 8, |
4363 OffsetOf_InvalidateFramebufferImmediate_count_not_8); | 4405 "offset of InvalidateFramebufferImmediate count should be 8"); |
4364 | 4406 |
4365 struct InvalidateSubFramebufferImmediate { | 4407 struct InvalidateSubFramebufferImmediate { |
4366 typedef InvalidateSubFramebufferImmediate ValueType; | 4408 typedef InvalidateSubFramebufferImmediate ValueType; |
4367 static const CommandId kCmdId = kInvalidateSubFramebufferImmediate; | 4409 static const CommandId kCmdId = kInvalidateSubFramebufferImmediate; |
4368 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 4410 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
4369 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4411 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4370 | 4412 |
4371 static uint32_t ComputeDataSize(GLsizei count) { | 4413 static uint32_t ComputeDataSize(GLsizei count) { |
4372 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT | 4414 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT |
4373 } | 4415 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4414 | 4456 |
4415 gpu::CommandHeader header; | 4457 gpu::CommandHeader header; |
4416 uint32_t target; | 4458 uint32_t target; |
4417 int32_t count; | 4459 int32_t count; |
4418 int32_t x; | 4460 int32_t x; |
4419 int32_t y; | 4461 int32_t y; |
4420 int32_t width; | 4462 int32_t width; |
4421 int32_t height; | 4463 int32_t height; |
4422 }; | 4464 }; |
4423 | 4465 |
4424 COMPILE_ASSERT(sizeof(InvalidateSubFramebufferImmediate) == 28, | 4466 static_assert(sizeof(InvalidateSubFramebufferImmediate) == 28, |
4425 Sizeof_InvalidateSubFramebufferImmediate_is_not_28); | 4467 "size of InvalidateSubFramebufferImmediate should be 28"); |
4426 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, header) == 0, | 4468 static_assert(offsetof(InvalidateSubFramebufferImmediate, header) == 0, |
4427 OffsetOf_InvalidateSubFramebufferImmediate_header_not_0); | 4469 "offset of InvalidateSubFramebufferImmediate header should be 0"); |
4428 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, target) == 4, | 4470 static_assert(offsetof(InvalidateSubFramebufferImmediate, target) == 4, |
4429 OffsetOf_InvalidateSubFramebufferImmediate_target_not_4); | 4471 "offset of InvalidateSubFramebufferImmediate target should be 4"); |
4430 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, count) == 8, | 4472 static_assert(offsetof(InvalidateSubFramebufferImmediate, count) == 8, |
4431 OffsetOf_InvalidateSubFramebufferImmediate_count_not_8); | 4473 "offset of InvalidateSubFramebufferImmediate count should be 8"); |
4432 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, x) == 12, | 4474 static_assert(offsetof(InvalidateSubFramebufferImmediate, x) == 12, |
4433 OffsetOf_InvalidateSubFramebufferImmediate_x_not_12); | 4475 "offset of InvalidateSubFramebufferImmediate x should be 12"); |
4434 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, y) == 16, | 4476 static_assert(offsetof(InvalidateSubFramebufferImmediate, y) == 16, |
4435 OffsetOf_InvalidateSubFramebufferImmediate_y_not_16); | 4477 "offset of InvalidateSubFramebufferImmediate y should be 16"); |
4436 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, width) == 20, | 4478 static_assert(offsetof(InvalidateSubFramebufferImmediate, width) == 20, |
4437 OffsetOf_InvalidateSubFramebufferImmediate_width_not_20); | 4479 "offset of InvalidateSubFramebufferImmediate width should be 20"); |
4438 COMPILE_ASSERT(offsetof(InvalidateSubFramebufferImmediate, height) == 24, | 4480 static_assert( |
4439 OffsetOf_InvalidateSubFramebufferImmediate_height_not_24); | 4481 offsetof(InvalidateSubFramebufferImmediate, height) == 24, |
| 4482 "offset of InvalidateSubFramebufferImmediate height should be 24"); |
4440 | 4483 |
4441 struct IsBuffer { | 4484 struct IsBuffer { |
4442 typedef IsBuffer ValueType; | 4485 typedef IsBuffer ValueType; |
4443 static const CommandId kCmdId = kIsBuffer; | 4486 static const CommandId kCmdId = kIsBuffer; |
4444 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4487 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4445 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4488 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4446 | 4489 |
4447 typedef uint32_t Result; | 4490 typedef uint32_t Result; |
4448 | 4491 |
4449 static uint32_t ComputeSize() { | 4492 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4469 ->Init(_buffer, _result_shm_id, _result_shm_offset); | 4512 ->Init(_buffer, _result_shm_id, _result_shm_offset); |
4470 return NextCmdAddress<ValueType>(cmd); | 4513 return NextCmdAddress<ValueType>(cmd); |
4471 } | 4514 } |
4472 | 4515 |
4473 gpu::CommandHeader header; | 4516 gpu::CommandHeader header; |
4474 uint32_t buffer; | 4517 uint32_t buffer; |
4475 uint32_t result_shm_id; | 4518 uint32_t result_shm_id; |
4476 uint32_t result_shm_offset; | 4519 uint32_t result_shm_offset; |
4477 }; | 4520 }; |
4478 | 4521 |
4479 COMPILE_ASSERT(sizeof(IsBuffer) == 16, Sizeof_IsBuffer_is_not_16); | 4522 static_assert(sizeof(IsBuffer) == 16, "size of IsBuffer should be 16"); |
4480 COMPILE_ASSERT(offsetof(IsBuffer, header) == 0, OffsetOf_IsBuffer_header_not_0); | 4523 static_assert(offsetof(IsBuffer, header) == 0, |
4481 COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4, OffsetOf_IsBuffer_buffer_not_4); | 4524 "offset of IsBuffer header should be 0"); |
4482 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_id) == 8, | 4525 static_assert(offsetof(IsBuffer, buffer) == 4, |
4483 OffsetOf_IsBuffer_result_shm_id_not_8); | 4526 "offset of IsBuffer buffer should be 4"); |
4484 COMPILE_ASSERT(offsetof(IsBuffer, result_shm_offset) == 12, | 4527 static_assert(offsetof(IsBuffer, result_shm_id) == 8, |
4485 OffsetOf_IsBuffer_result_shm_offset_not_12); | 4528 "offset of IsBuffer result_shm_id should be 8"); |
| 4529 static_assert(offsetof(IsBuffer, result_shm_offset) == 12, |
| 4530 "offset of IsBuffer result_shm_offset should be 12"); |
4486 | 4531 |
4487 struct IsEnabled { | 4532 struct IsEnabled { |
4488 typedef IsEnabled ValueType; | 4533 typedef IsEnabled ValueType; |
4489 static const CommandId kCmdId = kIsEnabled; | 4534 static const CommandId kCmdId = kIsEnabled; |
4490 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4535 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4491 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4536 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4492 | 4537 |
4493 typedef uint32_t Result; | 4538 typedef uint32_t Result; |
4494 | 4539 |
4495 static uint32_t ComputeSize() { | 4540 static uint32_t ComputeSize() { |
(...skipping 17 matching lines...) Expand all Loading... |
4513 ->Init(_cap, _result_shm_id, _result_shm_offset); | 4558 ->Init(_cap, _result_shm_id, _result_shm_offset); |
4514 return NextCmdAddress<ValueType>(cmd); | 4559 return NextCmdAddress<ValueType>(cmd); |
4515 } | 4560 } |
4516 | 4561 |
4517 gpu::CommandHeader header; | 4562 gpu::CommandHeader header; |
4518 uint32_t cap; | 4563 uint32_t cap; |
4519 uint32_t result_shm_id; | 4564 uint32_t result_shm_id; |
4520 uint32_t result_shm_offset; | 4565 uint32_t result_shm_offset; |
4521 }; | 4566 }; |
4522 | 4567 |
4523 COMPILE_ASSERT(sizeof(IsEnabled) == 16, Sizeof_IsEnabled_is_not_16); | 4568 static_assert(sizeof(IsEnabled) == 16, "size of IsEnabled should be 16"); |
4524 COMPILE_ASSERT(offsetof(IsEnabled, header) == 0, | 4569 static_assert(offsetof(IsEnabled, header) == 0, |
4525 OffsetOf_IsEnabled_header_not_0); | 4570 "offset of IsEnabled header should be 0"); |
4526 COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4, OffsetOf_IsEnabled_cap_not_4); | 4571 static_assert(offsetof(IsEnabled, cap) == 4, |
4527 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_id) == 8, | 4572 "offset of IsEnabled cap should be 4"); |
4528 OffsetOf_IsEnabled_result_shm_id_not_8); | 4573 static_assert(offsetof(IsEnabled, result_shm_id) == 8, |
4529 COMPILE_ASSERT(offsetof(IsEnabled, result_shm_offset) == 12, | 4574 "offset of IsEnabled result_shm_id should be 8"); |
4530 OffsetOf_IsEnabled_result_shm_offset_not_12); | 4575 static_assert(offsetof(IsEnabled, result_shm_offset) == 12, |
| 4576 "offset of IsEnabled result_shm_offset should be 12"); |
4531 | 4577 |
4532 struct IsFramebuffer { | 4578 struct IsFramebuffer { |
4533 typedef IsFramebuffer ValueType; | 4579 typedef IsFramebuffer ValueType; |
4534 static const CommandId kCmdId = kIsFramebuffer; | 4580 static const CommandId kCmdId = kIsFramebuffer; |
4535 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4581 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4536 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4582 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4537 | 4583 |
4538 typedef uint32_t Result; | 4584 typedef uint32_t Result; |
4539 | 4585 |
4540 static uint32_t ComputeSize() { | 4586 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4560 ->Init(_framebuffer, _result_shm_id, _result_shm_offset); | 4606 ->Init(_framebuffer, _result_shm_id, _result_shm_offset); |
4561 return NextCmdAddress<ValueType>(cmd); | 4607 return NextCmdAddress<ValueType>(cmd); |
4562 } | 4608 } |
4563 | 4609 |
4564 gpu::CommandHeader header; | 4610 gpu::CommandHeader header; |
4565 uint32_t framebuffer; | 4611 uint32_t framebuffer; |
4566 uint32_t result_shm_id; | 4612 uint32_t result_shm_id; |
4567 uint32_t result_shm_offset; | 4613 uint32_t result_shm_offset; |
4568 }; | 4614 }; |
4569 | 4615 |
4570 COMPILE_ASSERT(sizeof(IsFramebuffer) == 16, Sizeof_IsFramebuffer_is_not_16); | 4616 static_assert(sizeof(IsFramebuffer) == 16, |
4571 COMPILE_ASSERT(offsetof(IsFramebuffer, header) == 0, | 4617 "size of IsFramebuffer should be 16"); |
4572 OffsetOf_IsFramebuffer_header_not_0); | 4618 static_assert(offsetof(IsFramebuffer, header) == 0, |
4573 COMPILE_ASSERT(offsetof(IsFramebuffer, framebuffer) == 4, | 4619 "offset of IsFramebuffer header should be 0"); |
4574 OffsetOf_IsFramebuffer_framebuffer_not_4); | 4620 static_assert(offsetof(IsFramebuffer, framebuffer) == 4, |
4575 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_id) == 8, | 4621 "offset of IsFramebuffer framebuffer should be 4"); |
4576 OffsetOf_IsFramebuffer_result_shm_id_not_8); | 4622 static_assert(offsetof(IsFramebuffer, result_shm_id) == 8, |
4577 COMPILE_ASSERT(offsetof(IsFramebuffer, result_shm_offset) == 12, | 4623 "offset of IsFramebuffer result_shm_id should be 8"); |
4578 OffsetOf_IsFramebuffer_result_shm_offset_not_12); | 4624 static_assert(offsetof(IsFramebuffer, result_shm_offset) == 12, |
| 4625 "offset of IsFramebuffer result_shm_offset should be 12"); |
4579 | 4626 |
4580 struct IsProgram { | 4627 struct IsProgram { |
4581 typedef IsProgram ValueType; | 4628 typedef IsProgram ValueType; |
4582 static const CommandId kCmdId = kIsProgram; | 4629 static const CommandId kCmdId = kIsProgram; |
4583 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4630 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4584 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4631 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4585 | 4632 |
4586 typedef uint32_t Result; | 4633 typedef uint32_t Result; |
4587 | 4634 |
4588 static uint32_t ComputeSize() { | 4635 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4608 ->Init(_program, _result_shm_id, _result_shm_offset); | 4655 ->Init(_program, _result_shm_id, _result_shm_offset); |
4609 return NextCmdAddress<ValueType>(cmd); | 4656 return NextCmdAddress<ValueType>(cmd); |
4610 } | 4657 } |
4611 | 4658 |
4612 gpu::CommandHeader header; | 4659 gpu::CommandHeader header; |
4613 uint32_t program; | 4660 uint32_t program; |
4614 uint32_t result_shm_id; | 4661 uint32_t result_shm_id; |
4615 uint32_t result_shm_offset; | 4662 uint32_t result_shm_offset; |
4616 }; | 4663 }; |
4617 | 4664 |
4618 COMPILE_ASSERT(sizeof(IsProgram) == 16, Sizeof_IsProgram_is_not_16); | 4665 static_assert(sizeof(IsProgram) == 16, "size of IsProgram should be 16"); |
4619 COMPILE_ASSERT(offsetof(IsProgram, header) == 0, | 4666 static_assert(offsetof(IsProgram, header) == 0, |
4620 OffsetOf_IsProgram_header_not_0); | 4667 "offset of IsProgram header should be 0"); |
4621 COMPILE_ASSERT(offsetof(IsProgram, program) == 4, | 4668 static_assert(offsetof(IsProgram, program) == 4, |
4622 OffsetOf_IsProgram_program_not_4); | 4669 "offset of IsProgram program should be 4"); |
4623 COMPILE_ASSERT(offsetof(IsProgram, result_shm_id) == 8, | 4670 static_assert(offsetof(IsProgram, result_shm_id) == 8, |
4624 OffsetOf_IsProgram_result_shm_id_not_8); | 4671 "offset of IsProgram result_shm_id should be 8"); |
4625 COMPILE_ASSERT(offsetof(IsProgram, result_shm_offset) == 12, | 4672 static_assert(offsetof(IsProgram, result_shm_offset) == 12, |
4626 OffsetOf_IsProgram_result_shm_offset_not_12); | 4673 "offset of IsProgram result_shm_offset should be 12"); |
4627 | 4674 |
4628 struct IsRenderbuffer { | 4675 struct IsRenderbuffer { |
4629 typedef IsRenderbuffer ValueType; | 4676 typedef IsRenderbuffer ValueType; |
4630 static const CommandId kCmdId = kIsRenderbuffer; | 4677 static const CommandId kCmdId = kIsRenderbuffer; |
4631 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4678 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4632 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4679 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4633 | 4680 |
4634 typedef uint32_t Result; | 4681 typedef uint32_t Result; |
4635 | 4682 |
4636 static uint32_t ComputeSize() { | 4683 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4656 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset); | 4703 ->Init(_renderbuffer, _result_shm_id, _result_shm_offset); |
4657 return NextCmdAddress<ValueType>(cmd); | 4704 return NextCmdAddress<ValueType>(cmd); |
4658 } | 4705 } |
4659 | 4706 |
4660 gpu::CommandHeader header; | 4707 gpu::CommandHeader header; |
4661 uint32_t renderbuffer; | 4708 uint32_t renderbuffer; |
4662 uint32_t result_shm_id; | 4709 uint32_t result_shm_id; |
4663 uint32_t result_shm_offset; | 4710 uint32_t result_shm_offset; |
4664 }; | 4711 }; |
4665 | 4712 |
4666 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, Sizeof_IsRenderbuffer_is_not_16); | 4713 static_assert(sizeof(IsRenderbuffer) == 16, |
4667 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0, | 4714 "size of IsRenderbuffer should be 16"); |
4668 OffsetOf_IsRenderbuffer_header_not_0); | 4715 static_assert(offsetof(IsRenderbuffer, header) == 0, |
4669 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4, | 4716 "offset of IsRenderbuffer header should be 0"); |
4670 OffsetOf_IsRenderbuffer_renderbuffer_not_4); | 4717 static_assert(offsetof(IsRenderbuffer, renderbuffer) == 4, |
4671 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8, | 4718 "offset of IsRenderbuffer renderbuffer should be 4"); |
4672 OffsetOf_IsRenderbuffer_result_shm_id_not_8); | 4719 static_assert(offsetof(IsRenderbuffer, result_shm_id) == 8, |
4673 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12, | 4720 "offset of IsRenderbuffer result_shm_id should be 8"); |
4674 OffsetOf_IsRenderbuffer_result_shm_offset_not_12); | 4721 static_assert(offsetof(IsRenderbuffer, result_shm_offset) == 12, |
| 4722 "offset of IsRenderbuffer result_shm_offset should be 12"); |
4675 | 4723 |
4676 struct IsSampler { | 4724 struct IsSampler { |
4677 typedef IsSampler ValueType; | 4725 typedef IsSampler ValueType; |
4678 static const CommandId kCmdId = kIsSampler; | 4726 static const CommandId kCmdId = kIsSampler; |
4679 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4727 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4680 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4728 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4681 | 4729 |
4682 typedef uint32_t Result; | 4730 typedef uint32_t Result; |
4683 | 4731 |
4684 static uint32_t ComputeSize() { | 4732 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4704 ->Init(_sampler, _result_shm_id, _result_shm_offset); | 4752 ->Init(_sampler, _result_shm_id, _result_shm_offset); |
4705 return NextCmdAddress<ValueType>(cmd); | 4753 return NextCmdAddress<ValueType>(cmd); |
4706 } | 4754 } |
4707 | 4755 |
4708 gpu::CommandHeader header; | 4756 gpu::CommandHeader header; |
4709 uint32_t sampler; | 4757 uint32_t sampler; |
4710 uint32_t result_shm_id; | 4758 uint32_t result_shm_id; |
4711 uint32_t result_shm_offset; | 4759 uint32_t result_shm_offset; |
4712 }; | 4760 }; |
4713 | 4761 |
4714 COMPILE_ASSERT(sizeof(IsSampler) == 16, Sizeof_IsSampler_is_not_16); | 4762 static_assert(sizeof(IsSampler) == 16, "size of IsSampler should be 16"); |
4715 COMPILE_ASSERT(offsetof(IsSampler, header) == 0, | 4763 static_assert(offsetof(IsSampler, header) == 0, |
4716 OffsetOf_IsSampler_header_not_0); | 4764 "offset of IsSampler header should be 0"); |
4717 COMPILE_ASSERT(offsetof(IsSampler, sampler) == 4, | 4765 static_assert(offsetof(IsSampler, sampler) == 4, |
4718 OffsetOf_IsSampler_sampler_not_4); | 4766 "offset of IsSampler sampler should be 4"); |
4719 COMPILE_ASSERT(offsetof(IsSampler, result_shm_id) == 8, | 4767 static_assert(offsetof(IsSampler, result_shm_id) == 8, |
4720 OffsetOf_IsSampler_result_shm_id_not_8); | 4768 "offset of IsSampler result_shm_id should be 8"); |
4721 COMPILE_ASSERT(offsetof(IsSampler, result_shm_offset) == 12, | 4769 static_assert(offsetof(IsSampler, result_shm_offset) == 12, |
4722 OffsetOf_IsSampler_result_shm_offset_not_12); | 4770 "offset of IsSampler result_shm_offset should be 12"); |
4723 | 4771 |
4724 struct IsShader { | 4772 struct IsShader { |
4725 typedef IsShader ValueType; | 4773 typedef IsShader ValueType; |
4726 static const CommandId kCmdId = kIsShader; | 4774 static const CommandId kCmdId = kIsShader; |
4727 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4775 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4728 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4776 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4729 | 4777 |
4730 typedef uint32_t Result; | 4778 typedef uint32_t Result; |
4731 | 4779 |
4732 static uint32_t ComputeSize() { | 4780 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4752 ->Init(_shader, _result_shm_id, _result_shm_offset); | 4800 ->Init(_shader, _result_shm_id, _result_shm_offset); |
4753 return NextCmdAddress<ValueType>(cmd); | 4801 return NextCmdAddress<ValueType>(cmd); |
4754 } | 4802 } |
4755 | 4803 |
4756 gpu::CommandHeader header; | 4804 gpu::CommandHeader header; |
4757 uint32_t shader; | 4805 uint32_t shader; |
4758 uint32_t result_shm_id; | 4806 uint32_t result_shm_id; |
4759 uint32_t result_shm_offset; | 4807 uint32_t result_shm_offset; |
4760 }; | 4808 }; |
4761 | 4809 |
4762 COMPILE_ASSERT(sizeof(IsShader) == 16, Sizeof_IsShader_is_not_16); | 4810 static_assert(sizeof(IsShader) == 16, "size of IsShader should be 16"); |
4763 COMPILE_ASSERT(offsetof(IsShader, header) == 0, OffsetOf_IsShader_header_not_0); | 4811 static_assert(offsetof(IsShader, header) == 0, |
4764 COMPILE_ASSERT(offsetof(IsShader, shader) == 4, OffsetOf_IsShader_shader_not_4); | 4812 "offset of IsShader header should be 0"); |
4765 COMPILE_ASSERT(offsetof(IsShader, result_shm_id) == 8, | 4813 static_assert(offsetof(IsShader, shader) == 4, |
4766 OffsetOf_IsShader_result_shm_id_not_8); | 4814 "offset of IsShader shader should be 4"); |
4767 COMPILE_ASSERT(offsetof(IsShader, result_shm_offset) == 12, | 4815 static_assert(offsetof(IsShader, result_shm_id) == 8, |
4768 OffsetOf_IsShader_result_shm_offset_not_12); | 4816 "offset of IsShader result_shm_id should be 8"); |
| 4817 static_assert(offsetof(IsShader, result_shm_offset) == 12, |
| 4818 "offset of IsShader result_shm_offset should be 12"); |
4769 | 4819 |
4770 struct IsTexture { | 4820 struct IsTexture { |
4771 typedef IsTexture ValueType; | 4821 typedef IsTexture ValueType; |
4772 static const CommandId kCmdId = kIsTexture; | 4822 static const CommandId kCmdId = kIsTexture; |
4773 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4823 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4774 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4824 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4775 | 4825 |
4776 typedef uint32_t Result; | 4826 typedef uint32_t Result; |
4777 | 4827 |
4778 static uint32_t ComputeSize() { | 4828 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4798 ->Init(_texture, _result_shm_id, _result_shm_offset); | 4848 ->Init(_texture, _result_shm_id, _result_shm_offset); |
4799 return NextCmdAddress<ValueType>(cmd); | 4849 return NextCmdAddress<ValueType>(cmd); |
4800 } | 4850 } |
4801 | 4851 |
4802 gpu::CommandHeader header; | 4852 gpu::CommandHeader header; |
4803 uint32_t texture; | 4853 uint32_t texture; |
4804 uint32_t result_shm_id; | 4854 uint32_t result_shm_id; |
4805 uint32_t result_shm_offset; | 4855 uint32_t result_shm_offset; |
4806 }; | 4856 }; |
4807 | 4857 |
4808 COMPILE_ASSERT(sizeof(IsTexture) == 16, Sizeof_IsTexture_is_not_16); | 4858 static_assert(sizeof(IsTexture) == 16, "size of IsTexture should be 16"); |
4809 COMPILE_ASSERT(offsetof(IsTexture, header) == 0, | 4859 static_assert(offsetof(IsTexture, header) == 0, |
4810 OffsetOf_IsTexture_header_not_0); | 4860 "offset of IsTexture header should be 0"); |
4811 COMPILE_ASSERT(offsetof(IsTexture, texture) == 4, | 4861 static_assert(offsetof(IsTexture, texture) == 4, |
4812 OffsetOf_IsTexture_texture_not_4); | 4862 "offset of IsTexture texture should be 4"); |
4813 COMPILE_ASSERT(offsetof(IsTexture, result_shm_id) == 8, | 4863 static_assert(offsetof(IsTexture, result_shm_id) == 8, |
4814 OffsetOf_IsTexture_result_shm_id_not_8); | 4864 "offset of IsTexture result_shm_id should be 8"); |
4815 COMPILE_ASSERT(offsetof(IsTexture, result_shm_offset) == 12, | 4865 static_assert(offsetof(IsTexture, result_shm_offset) == 12, |
4816 OffsetOf_IsTexture_result_shm_offset_not_12); | 4866 "offset of IsTexture result_shm_offset should be 12"); |
4817 | 4867 |
4818 struct IsTransformFeedback { | 4868 struct IsTransformFeedback { |
4819 typedef IsTransformFeedback ValueType; | 4869 typedef IsTransformFeedback ValueType; |
4820 static const CommandId kCmdId = kIsTransformFeedback; | 4870 static const CommandId kCmdId = kIsTransformFeedback; |
4821 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4871 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4822 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4872 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4823 | 4873 |
4824 typedef uint32_t Result; | 4874 typedef uint32_t Result; |
4825 | 4875 |
4826 static uint32_t ComputeSize() { | 4876 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
4846 ->Init(_transformfeedback, _result_shm_id, _result_shm_offset); | 4896 ->Init(_transformfeedback, _result_shm_id, _result_shm_offset); |
4847 return NextCmdAddress<ValueType>(cmd); | 4897 return NextCmdAddress<ValueType>(cmd); |
4848 } | 4898 } |
4849 | 4899 |
4850 gpu::CommandHeader header; | 4900 gpu::CommandHeader header; |
4851 uint32_t transformfeedback; | 4901 uint32_t transformfeedback; |
4852 uint32_t result_shm_id; | 4902 uint32_t result_shm_id; |
4853 uint32_t result_shm_offset; | 4903 uint32_t result_shm_offset; |
4854 }; | 4904 }; |
4855 | 4905 |
4856 COMPILE_ASSERT(sizeof(IsTransformFeedback) == 16, | 4906 static_assert(sizeof(IsTransformFeedback) == 16, |
4857 Sizeof_IsTransformFeedback_is_not_16); | 4907 "size of IsTransformFeedback should be 16"); |
4858 COMPILE_ASSERT(offsetof(IsTransformFeedback, header) == 0, | 4908 static_assert(offsetof(IsTransformFeedback, header) == 0, |
4859 OffsetOf_IsTransformFeedback_header_not_0); | 4909 "offset of IsTransformFeedback header should be 0"); |
4860 COMPILE_ASSERT(offsetof(IsTransformFeedback, transformfeedback) == 4, | 4910 static_assert(offsetof(IsTransformFeedback, transformfeedback) == 4, |
4861 OffsetOf_IsTransformFeedback_transformfeedback_not_4); | 4911 "offset of IsTransformFeedback transformfeedback should be 4"); |
4862 COMPILE_ASSERT(offsetof(IsTransformFeedback, result_shm_id) == 8, | 4912 static_assert(offsetof(IsTransformFeedback, result_shm_id) == 8, |
4863 OffsetOf_IsTransformFeedback_result_shm_id_not_8); | 4913 "offset of IsTransformFeedback result_shm_id should be 8"); |
4864 COMPILE_ASSERT(offsetof(IsTransformFeedback, result_shm_offset) == 12, | 4914 static_assert(offsetof(IsTransformFeedback, result_shm_offset) == 12, |
4865 OffsetOf_IsTransformFeedback_result_shm_offset_not_12); | 4915 "offset of IsTransformFeedback result_shm_offset should be 12"); |
4866 | 4916 |
4867 struct LineWidth { | 4917 struct LineWidth { |
4868 typedef LineWidth ValueType; | 4918 typedef LineWidth ValueType; |
4869 static const CommandId kCmdId = kLineWidth; | 4919 static const CommandId kCmdId = kLineWidth; |
4870 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4920 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4871 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4921 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4872 | 4922 |
4873 static uint32_t ComputeSize() { | 4923 static uint32_t ComputeSize() { |
4874 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 4924 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
4875 } | 4925 } |
4876 | 4926 |
4877 void SetHeader() { header.SetCmd<ValueType>(); } | 4927 void SetHeader() { header.SetCmd<ValueType>(); } |
4878 | 4928 |
4879 void Init(GLfloat _width) { | 4929 void Init(GLfloat _width) { |
4880 SetHeader(); | 4930 SetHeader(); |
4881 width = _width; | 4931 width = _width; |
4882 } | 4932 } |
4883 | 4933 |
4884 void* Set(void* cmd, GLfloat _width) { | 4934 void* Set(void* cmd, GLfloat _width) { |
4885 static_cast<ValueType*>(cmd)->Init(_width); | 4935 static_cast<ValueType*>(cmd)->Init(_width); |
4886 return NextCmdAddress<ValueType>(cmd); | 4936 return NextCmdAddress<ValueType>(cmd); |
4887 } | 4937 } |
4888 | 4938 |
4889 gpu::CommandHeader header; | 4939 gpu::CommandHeader header; |
4890 float width; | 4940 float width; |
4891 }; | 4941 }; |
4892 | 4942 |
4893 COMPILE_ASSERT(sizeof(LineWidth) == 8, Sizeof_LineWidth_is_not_8); | 4943 static_assert(sizeof(LineWidth) == 8, "size of LineWidth should be 8"); |
4894 COMPILE_ASSERT(offsetof(LineWidth, header) == 0, | 4944 static_assert(offsetof(LineWidth, header) == 0, |
4895 OffsetOf_LineWidth_header_not_0); | 4945 "offset of LineWidth header should be 0"); |
4896 COMPILE_ASSERT(offsetof(LineWidth, width) == 4, OffsetOf_LineWidth_width_not_4); | 4946 static_assert(offsetof(LineWidth, width) == 4, |
| 4947 "offset of LineWidth width should be 4"); |
4897 | 4948 |
4898 struct LinkProgram { | 4949 struct LinkProgram { |
4899 typedef LinkProgram ValueType; | 4950 typedef LinkProgram ValueType; |
4900 static const CommandId kCmdId = kLinkProgram; | 4951 static const CommandId kCmdId = kLinkProgram; |
4901 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4952 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4902 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4953 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4903 | 4954 |
4904 static uint32_t ComputeSize() { | 4955 static uint32_t ComputeSize() { |
4905 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 4956 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
4906 } | 4957 } |
4907 | 4958 |
4908 void SetHeader() { header.SetCmd<ValueType>(); } | 4959 void SetHeader() { header.SetCmd<ValueType>(); } |
4909 | 4960 |
4910 void Init(GLuint _program) { | 4961 void Init(GLuint _program) { |
4911 SetHeader(); | 4962 SetHeader(); |
4912 program = _program; | 4963 program = _program; |
4913 } | 4964 } |
4914 | 4965 |
4915 void* Set(void* cmd, GLuint _program) { | 4966 void* Set(void* cmd, GLuint _program) { |
4916 static_cast<ValueType*>(cmd)->Init(_program); | 4967 static_cast<ValueType*>(cmd)->Init(_program); |
4917 return NextCmdAddress<ValueType>(cmd); | 4968 return NextCmdAddress<ValueType>(cmd); |
4918 } | 4969 } |
4919 | 4970 |
4920 gpu::CommandHeader header; | 4971 gpu::CommandHeader header; |
4921 uint32_t program; | 4972 uint32_t program; |
4922 }; | 4973 }; |
4923 | 4974 |
4924 COMPILE_ASSERT(sizeof(LinkProgram) == 8, Sizeof_LinkProgram_is_not_8); | 4975 static_assert(sizeof(LinkProgram) == 8, "size of LinkProgram should be 8"); |
4925 COMPILE_ASSERT(offsetof(LinkProgram, header) == 0, | 4976 static_assert(offsetof(LinkProgram, header) == 0, |
4926 OffsetOf_LinkProgram_header_not_0); | 4977 "offset of LinkProgram header should be 0"); |
4927 COMPILE_ASSERT(offsetof(LinkProgram, program) == 4, | 4978 static_assert(offsetof(LinkProgram, program) == 4, |
4928 OffsetOf_LinkProgram_program_not_4); | 4979 "offset of LinkProgram program should be 4"); |
4929 | 4980 |
4930 struct PauseTransformFeedback { | 4981 struct PauseTransformFeedback { |
4931 typedef PauseTransformFeedback ValueType; | 4982 typedef PauseTransformFeedback ValueType; |
4932 static const CommandId kCmdId = kPauseTransformFeedback; | 4983 static const CommandId kCmdId = kPauseTransformFeedback; |
4933 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4984 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4934 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4985 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4935 | 4986 |
4936 static uint32_t ComputeSize() { | 4987 static uint32_t ComputeSize() { |
4937 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 4988 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
4938 } | 4989 } |
4939 | 4990 |
4940 void SetHeader() { header.SetCmd<ValueType>(); } | 4991 void SetHeader() { header.SetCmd<ValueType>(); } |
4941 | 4992 |
4942 void Init() { SetHeader(); } | 4993 void Init() { SetHeader(); } |
4943 | 4994 |
4944 void* Set(void* cmd) { | 4995 void* Set(void* cmd) { |
4945 static_cast<ValueType*>(cmd)->Init(); | 4996 static_cast<ValueType*>(cmd)->Init(); |
4946 return NextCmdAddress<ValueType>(cmd); | 4997 return NextCmdAddress<ValueType>(cmd); |
4947 } | 4998 } |
4948 | 4999 |
4949 gpu::CommandHeader header; | 5000 gpu::CommandHeader header; |
4950 }; | 5001 }; |
4951 | 5002 |
4952 COMPILE_ASSERT(sizeof(PauseTransformFeedback) == 4, | 5003 static_assert(sizeof(PauseTransformFeedback) == 4, |
4953 Sizeof_PauseTransformFeedback_is_not_4); | 5004 "size of PauseTransformFeedback should be 4"); |
4954 COMPILE_ASSERT(offsetof(PauseTransformFeedback, header) == 0, | 5005 static_assert(offsetof(PauseTransformFeedback, header) == 0, |
4955 OffsetOf_PauseTransformFeedback_header_not_0); | 5006 "offset of PauseTransformFeedback header should be 0"); |
4956 | 5007 |
4957 struct PixelStorei { | 5008 struct PixelStorei { |
4958 typedef PixelStorei ValueType; | 5009 typedef PixelStorei ValueType; |
4959 static const CommandId kCmdId = kPixelStorei; | 5010 static const CommandId kCmdId = kPixelStorei; |
4960 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5011 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4961 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5012 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4962 | 5013 |
4963 static uint32_t ComputeSize() { | 5014 static uint32_t ComputeSize() { |
4964 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5015 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
4965 } | 5016 } |
4966 | 5017 |
4967 void SetHeader() { header.SetCmd<ValueType>(); } | 5018 void SetHeader() { header.SetCmd<ValueType>(); } |
4968 | 5019 |
4969 void Init(GLenum _pname, GLint _param) { | 5020 void Init(GLenum _pname, GLint _param) { |
4970 SetHeader(); | 5021 SetHeader(); |
4971 pname = _pname; | 5022 pname = _pname; |
4972 param = _param; | 5023 param = _param; |
4973 } | 5024 } |
4974 | 5025 |
4975 void* Set(void* cmd, GLenum _pname, GLint _param) { | 5026 void* Set(void* cmd, GLenum _pname, GLint _param) { |
4976 static_cast<ValueType*>(cmd)->Init(_pname, _param); | 5027 static_cast<ValueType*>(cmd)->Init(_pname, _param); |
4977 return NextCmdAddress<ValueType>(cmd); | 5028 return NextCmdAddress<ValueType>(cmd); |
4978 } | 5029 } |
4979 | 5030 |
4980 gpu::CommandHeader header; | 5031 gpu::CommandHeader header; |
4981 uint32_t pname; | 5032 uint32_t pname; |
4982 int32_t param; | 5033 int32_t param; |
4983 }; | 5034 }; |
4984 | 5035 |
4985 COMPILE_ASSERT(sizeof(PixelStorei) == 12, Sizeof_PixelStorei_is_not_12); | 5036 static_assert(sizeof(PixelStorei) == 12, "size of PixelStorei should be 12"); |
4986 COMPILE_ASSERT(offsetof(PixelStorei, header) == 0, | 5037 static_assert(offsetof(PixelStorei, header) == 0, |
4987 OffsetOf_PixelStorei_header_not_0); | 5038 "offset of PixelStorei header should be 0"); |
4988 COMPILE_ASSERT(offsetof(PixelStorei, pname) == 4, | 5039 static_assert(offsetof(PixelStorei, pname) == 4, |
4989 OffsetOf_PixelStorei_pname_not_4); | 5040 "offset of PixelStorei pname should be 4"); |
4990 COMPILE_ASSERT(offsetof(PixelStorei, param) == 8, | 5041 static_assert(offsetof(PixelStorei, param) == 8, |
4991 OffsetOf_PixelStorei_param_not_8); | 5042 "offset of PixelStorei param should be 8"); |
4992 | 5043 |
4993 struct PolygonOffset { | 5044 struct PolygonOffset { |
4994 typedef PolygonOffset ValueType; | 5045 typedef PolygonOffset ValueType; |
4995 static const CommandId kCmdId = kPolygonOffset; | 5046 static const CommandId kCmdId = kPolygonOffset; |
4996 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5047 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
4997 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5048 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
4998 | 5049 |
4999 static uint32_t ComputeSize() { | 5050 static uint32_t ComputeSize() { |
5000 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5051 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5001 } | 5052 } |
5002 | 5053 |
5003 void SetHeader() { header.SetCmd<ValueType>(); } | 5054 void SetHeader() { header.SetCmd<ValueType>(); } |
5004 | 5055 |
5005 void Init(GLfloat _factor, GLfloat _units) { | 5056 void Init(GLfloat _factor, GLfloat _units) { |
5006 SetHeader(); | 5057 SetHeader(); |
5007 factor = _factor; | 5058 factor = _factor; |
5008 units = _units; | 5059 units = _units; |
5009 } | 5060 } |
5010 | 5061 |
5011 void* Set(void* cmd, GLfloat _factor, GLfloat _units) { | 5062 void* Set(void* cmd, GLfloat _factor, GLfloat _units) { |
5012 static_cast<ValueType*>(cmd)->Init(_factor, _units); | 5063 static_cast<ValueType*>(cmd)->Init(_factor, _units); |
5013 return NextCmdAddress<ValueType>(cmd); | 5064 return NextCmdAddress<ValueType>(cmd); |
5014 } | 5065 } |
5015 | 5066 |
5016 gpu::CommandHeader header; | 5067 gpu::CommandHeader header; |
5017 float factor; | 5068 float factor; |
5018 float units; | 5069 float units; |
5019 }; | 5070 }; |
5020 | 5071 |
5021 COMPILE_ASSERT(sizeof(PolygonOffset) == 12, Sizeof_PolygonOffset_is_not_12); | 5072 static_assert(sizeof(PolygonOffset) == 12, |
5022 COMPILE_ASSERT(offsetof(PolygonOffset, header) == 0, | 5073 "size of PolygonOffset should be 12"); |
5023 OffsetOf_PolygonOffset_header_not_0); | 5074 static_assert(offsetof(PolygonOffset, header) == 0, |
5024 COMPILE_ASSERT(offsetof(PolygonOffset, factor) == 4, | 5075 "offset of PolygonOffset header should be 0"); |
5025 OffsetOf_PolygonOffset_factor_not_4); | 5076 static_assert(offsetof(PolygonOffset, factor) == 4, |
5026 COMPILE_ASSERT(offsetof(PolygonOffset, units) == 8, | 5077 "offset of PolygonOffset factor should be 4"); |
5027 OffsetOf_PolygonOffset_units_not_8); | 5078 static_assert(offsetof(PolygonOffset, units) == 8, |
| 5079 "offset of PolygonOffset units should be 8"); |
5028 | 5080 |
5029 struct ReadBuffer { | 5081 struct ReadBuffer { |
5030 typedef ReadBuffer ValueType; | 5082 typedef ReadBuffer ValueType; |
5031 static const CommandId kCmdId = kReadBuffer; | 5083 static const CommandId kCmdId = kReadBuffer; |
5032 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5084 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5033 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5085 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5034 | 5086 |
5035 static uint32_t ComputeSize() { | 5087 static uint32_t ComputeSize() { |
5036 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5088 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5037 } | 5089 } |
5038 | 5090 |
5039 void SetHeader() { header.SetCmd<ValueType>(); } | 5091 void SetHeader() { header.SetCmd<ValueType>(); } |
5040 | 5092 |
5041 void Init(GLenum _src) { | 5093 void Init(GLenum _src) { |
5042 SetHeader(); | 5094 SetHeader(); |
5043 src = _src; | 5095 src = _src; |
5044 } | 5096 } |
5045 | 5097 |
5046 void* Set(void* cmd, GLenum _src) { | 5098 void* Set(void* cmd, GLenum _src) { |
5047 static_cast<ValueType*>(cmd)->Init(_src); | 5099 static_cast<ValueType*>(cmd)->Init(_src); |
5048 return NextCmdAddress<ValueType>(cmd); | 5100 return NextCmdAddress<ValueType>(cmd); |
5049 } | 5101 } |
5050 | 5102 |
5051 gpu::CommandHeader header; | 5103 gpu::CommandHeader header; |
5052 uint32_t src; | 5104 uint32_t src; |
5053 }; | 5105 }; |
5054 | 5106 |
5055 COMPILE_ASSERT(sizeof(ReadBuffer) == 8, Sizeof_ReadBuffer_is_not_8); | 5107 static_assert(sizeof(ReadBuffer) == 8, "size of ReadBuffer should be 8"); |
5056 COMPILE_ASSERT(offsetof(ReadBuffer, header) == 0, | 5108 static_assert(offsetof(ReadBuffer, header) == 0, |
5057 OffsetOf_ReadBuffer_header_not_0); | 5109 "offset of ReadBuffer header should be 0"); |
5058 COMPILE_ASSERT(offsetof(ReadBuffer, src) == 4, OffsetOf_ReadBuffer_src_not_4); | 5110 static_assert(offsetof(ReadBuffer, src) == 4, |
| 5111 "offset of ReadBuffer src should be 4"); |
5059 | 5112 |
5060 // ReadPixels has the result separated from the pixel buffer so that | 5113 // ReadPixels has the result separated from the pixel buffer so that |
5061 // it is easier to specify the result going to some specific place | 5114 // it is easier to specify the result going to some specific place |
5062 // that exactly fits the rectangle of pixels. | 5115 // that exactly fits the rectangle of pixels. |
5063 struct ReadPixels { | 5116 struct ReadPixels { |
5064 typedef ReadPixels ValueType; | 5117 typedef ReadPixels ValueType; |
5065 static const CommandId kCmdId = kReadPixels; | 5118 static const CommandId kCmdId = kReadPixels; |
5066 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5119 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5067 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5120 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5068 | 5121 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5124 int32_t height; | 5177 int32_t height; |
5125 uint32_t format; | 5178 uint32_t format; |
5126 uint32_t type; | 5179 uint32_t type; |
5127 uint32_t pixels_shm_id; | 5180 uint32_t pixels_shm_id; |
5128 uint32_t pixels_shm_offset; | 5181 uint32_t pixels_shm_offset; |
5129 uint32_t result_shm_id; | 5182 uint32_t result_shm_id; |
5130 uint32_t result_shm_offset; | 5183 uint32_t result_shm_offset; |
5131 uint32_t async; | 5184 uint32_t async; |
5132 }; | 5185 }; |
5133 | 5186 |
5134 COMPILE_ASSERT(sizeof(ReadPixels) == 48, Sizeof_ReadPixels_is_not_48); | 5187 static_assert(sizeof(ReadPixels) == 48, "size of ReadPixels should be 48"); |
5135 COMPILE_ASSERT(offsetof(ReadPixels, header) == 0, | 5188 static_assert(offsetof(ReadPixels, header) == 0, |
5136 OffsetOf_ReadPixels_header_not_0); | 5189 "offset of ReadPixels header should be 0"); |
5137 COMPILE_ASSERT(offsetof(ReadPixels, x) == 4, OffsetOf_ReadPixels_x_not_4); | 5190 static_assert(offsetof(ReadPixels, x) == 4, |
5138 COMPILE_ASSERT(offsetof(ReadPixels, y) == 8, OffsetOf_ReadPixels_y_not_8); | 5191 "offset of ReadPixels x should be 4"); |
5139 COMPILE_ASSERT(offsetof(ReadPixels, width) == 12, | 5192 static_assert(offsetof(ReadPixels, y) == 8, |
5140 OffsetOf_ReadPixels_width_not_12); | 5193 "offset of ReadPixels y should be 8"); |
5141 COMPILE_ASSERT(offsetof(ReadPixels, height) == 16, | 5194 static_assert(offsetof(ReadPixels, width) == 12, |
5142 OffsetOf_ReadPixels_height_not_16); | 5195 "offset of ReadPixels width should be 12"); |
5143 COMPILE_ASSERT(offsetof(ReadPixels, format) == 20, | 5196 static_assert(offsetof(ReadPixels, height) == 16, |
5144 OffsetOf_ReadPixels_format_not_20); | 5197 "offset of ReadPixels height should be 16"); |
5145 COMPILE_ASSERT(offsetof(ReadPixels, type) == 24, | 5198 static_assert(offsetof(ReadPixels, format) == 20, |
5146 OffsetOf_ReadPixels_type_not_24); | 5199 "offset of ReadPixels format should be 20"); |
5147 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_id) == 28, | 5200 static_assert(offsetof(ReadPixels, type) == 24, |
5148 OffsetOf_ReadPixels_pixels_shm_id_not_28); | 5201 "offset of ReadPixels type should be 24"); |
5149 COMPILE_ASSERT(offsetof(ReadPixels, pixels_shm_offset) == 32, | 5202 static_assert(offsetof(ReadPixels, pixels_shm_id) == 28, |
5150 OffsetOf_ReadPixels_pixels_shm_offset_not_32); | 5203 "offset of ReadPixels pixels_shm_id should be 28"); |
5151 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_id) == 36, | 5204 static_assert(offsetof(ReadPixels, pixels_shm_offset) == 32, |
5152 OffsetOf_ReadPixels_result_shm_id_not_36); | 5205 "offset of ReadPixels pixels_shm_offset should be 32"); |
5153 COMPILE_ASSERT(offsetof(ReadPixels, result_shm_offset) == 40, | 5206 static_assert(offsetof(ReadPixels, result_shm_id) == 36, |
5154 OffsetOf_ReadPixels_result_shm_offset_not_40); | 5207 "offset of ReadPixels result_shm_id should be 36"); |
5155 COMPILE_ASSERT(offsetof(ReadPixels, async) == 44, | 5208 static_assert(offsetof(ReadPixels, result_shm_offset) == 40, |
5156 OffsetOf_ReadPixels_async_not_44); | 5209 "offset of ReadPixels result_shm_offset should be 40"); |
| 5210 static_assert(offsetof(ReadPixels, async) == 44, |
| 5211 "offset of ReadPixels async should be 44"); |
5157 | 5212 |
5158 struct ReleaseShaderCompiler { | 5213 struct ReleaseShaderCompiler { |
5159 typedef ReleaseShaderCompiler ValueType; | 5214 typedef ReleaseShaderCompiler ValueType; |
5160 static const CommandId kCmdId = kReleaseShaderCompiler; | 5215 static const CommandId kCmdId = kReleaseShaderCompiler; |
5161 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5216 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5162 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5217 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5163 | 5218 |
5164 static uint32_t ComputeSize() { | 5219 static uint32_t ComputeSize() { |
5165 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5220 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5166 } | 5221 } |
5167 | 5222 |
5168 void SetHeader() { header.SetCmd<ValueType>(); } | 5223 void SetHeader() { header.SetCmd<ValueType>(); } |
5169 | 5224 |
5170 void Init() { SetHeader(); } | 5225 void Init() { SetHeader(); } |
5171 | 5226 |
5172 void* Set(void* cmd) { | 5227 void* Set(void* cmd) { |
5173 static_cast<ValueType*>(cmd)->Init(); | 5228 static_cast<ValueType*>(cmd)->Init(); |
5174 return NextCmdAddress<ValueType>(cmd); | 5229 return NextCmdAddress<ValueType>(cmd); |
5175 } | 5230 } |
5176 | 5231 |
5177 gpu::CommandHeader header; | 5232 gpu::CommandHeader header; |
5178 }; | 5233 }; |
5179 | 5234 |
5180 COMPILE_ASSERT(sizeof(ReleaseShaderCompiler) == 4, | 5235 static_assert(sizeof(ReleaseShaderCompiler) == 4, |
5181 Sizeof_ReleaseShaderCompiler_is_not_4); | 5236 "size of ReleaseShaderCompiler should be 4"); |
5182 COMPILE_ASSERT(offsetof(ReleaseShaderCompiler, header) == 0, | 5237 static_assert(offsetof(ReleaseShaderCompiler, header) == 0, |
5183 OffsetOf_ReleaseShaderCompiler_header_not_0); | 5238 "offset of ReleaseShaderCompiler header should be 0"); |
5184 | 5239 |
5185 struct RenderbufferStorage { | 5240 struct RenderbufferStorage { |
5186 typedef RenderbufferStorage ValueType; | 5241 typedef RenderbufferStorage ValueType; |
5187 static const CommandId kCmdId = kRenderbufferStorage; | 5242 static const CommandId kCmdId = kRenderbufferStorage; |
5188 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5243 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5189 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5244 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5190 | 5245 |
5191 static uint32_t ComputeSize() { | 5246 static uint32_t ComputeSize() { |
5192 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5247 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5193 } | 5248 } |
(...skipping 21 matching lines...) Expand all Loading... |
5215 return NextCmdAddress<ValueType>(cmd); | 5270 return NextCmdAddress<ValueType>(cmd); |
5216 } | 5271 } |
5217 | 5272 |
5218 gpu::CommandHeader header; | 5273 gpu::CommandHeader header; |
5219 uint32_t target; | 5274 uint32_t target; |
5220 uint32_t internalformat; | 5275 uint32_t internalformat; |
5221 int32_t width; | 5276 int32_t width; |
5222 int32_t height; | 5277 int32_t height; |
5223 }; | 5278 }; |
5224 | 5279 |
5225 COMPILE_ASSERT(sizeof(RenderbufferStorage) == 20, | 5280 static_assert(sizeof(RenderbufferStorage) == 20, |
5226 Sizeof_RenderbufferStorage_is_not_20); | 5281 "size of RenderbufferStorage should be 20"); |
5227 COMPILE_ASSERT(offsetof(RenderbufferStorage, header) == 0, | 5282 static_assert(offsetof(RenderbufferStorage, header) == 0, |
5228 OffsetOf_RenderbufferStorage_header_not_0); | 5283 "offset of RenderbufferStorage header should be 0"); |
5229 COMPILE_ASSERT(offsetof(RenderbufferStorage, target) == 4, | 5284 static_assert(offsetof(RenderbufferStorage, target) == 4, |
5230 OffsetOf_RenderbufferStorage_target_not_4); | 5285 "offset of RenderbufferStorage target should be 4"); |
5231 COMPILE_ASSERT(offsetof(RenderbufferStorage, internalformat) == 8, | 5286 static_assert(offsetof(RenderbufferStorage, internalformat) == 8, |
5232 OffsetOf_RenderbufferStorage_internalformat_not_8); | 5287 "offset of RenderbufferStorage internalformat should be 8"); |
5233 COMPILE_ASSERT(offsetof(RenderbufferStorage, width) == 12, | 5288 static_assert(offsetof(RenderbufferStorage, width) == 12, |
5234 OffsetOf_RenderbufferStorage_width_not_12); | 5289 "offset of RenderbufferStorage width should be 12"); |
5235 COMPILE_ASSERT(offsetof(RenderbufferStorage, height) == 16, | 5290 static_assert(offsetof(RenderbufferStorage, height) == 16, |
5236 OffsetOf_RenderbufferStorage_height_not_16); | 5291 "offset of RenderbufferStorage height should be 16"); |
5237 | 5292 |
5238 struct ResumeTransformFeedback { | 5293 struct ResumeTransformFeedback { |
5239 typedef ResumeTransformFeedback ValueType; | 5294 typedef ResumeTransformFeedback ValueType; |
5240 static const CommandId kCmdId = kResumeTransformFeedback; | 5295 static const CommandId kCmdId = kResumeTransformFeedback; |
5241 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5296 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5242 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5297 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5243 | 5298 |
5244 static uint32_t ComputeSize() { | 5299 static uint32_t ComputeSize() { |
5245 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5300 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5246 } | 5301 } |
5247 | 5302 |
5248 void SetHeader() { header.SetCmd<ValueType>(); } | 5303 void SetHeader() { header.SetCmd<ValueType>(); } |
5249 | 5304 |
5250 void Init() { SetHeader(); } | 5305 void Init() { SetHeader(); } |
5251 | 5306 |
5252 void* Set(void* cmd) { | 5307 void* Set(void* cmd) { |
5253 static_cast<ValueType*>(cmd)->Init(); | 5308 static_cast<ValueType*>(cmd)->Init(); |
5254 return NextCmdAddress<ValueType>(cmd); | 5309 return NextCmdAddress<ValueType>(cmd); |
5255 } | 5310 } |
5256 | 5311 |
5257 gpu::CommandHeader header; | 5312 gpu::CommandHeader header; |
5258 }; | 5313 }; |
5259 | 5314 |
5260 COMPILE_ASSERT(sizeof(ResumeTransformFeedback) == 4, | 5315 static_assert(sizeof(ResumeTransformFeedback) == 4, |
5261 Sizeof_ResumeTransformFeedback_is_not_4); | 5316 "size of ResumeTransformFeedback should be 4"); |
5262 COMPILE_ASSERT(offsetof(ResumeTransformFeedback, header) == 0, | 5317 static_assert(offsetof(ResumeTransformFeedback, header) == 0, |
5263 OffsetOf_ResumeTransformFeedback_header_not_0); | 5318 "offset of ResumeTransformFeedback header should be 0"); |
5264 | 5319 |
5265 struct SampleCoverage { | 5320 struct SampleCoverage { |
5266 typedef SampleCoverage ValueType; | 5321 typedef SampleCoverage ValueType; |
5267 static const CommandId kCmdId = kSampleCoverage; | 5322 static const CommandId kCmdId = kSampleCoverage; |
5268 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5323 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5269 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5324 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5270 | 5325 |
5271 static uint32_t ComputeSize() { | 5326 static uint32_t ComputeSize() { |
5272 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5327 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5273 } | 5328 } |
5274 | 5329 |
5275 void SetHeader() { header.SetCmd<ValueType>(); } | 5330 void SetHeader() { header.SetCmd<ValueType>(); } |
5276 | 5331 |
5277 void Init(GLclampf _value, GLboolean _invert) { | 5332 void Init(GLclampf _value, GLboolean _invert) { |
5278 SetHeader(); | 5333 SetHeader(); |
5279 value = _value; | 5334 value = _value; |
5280 invert = _invert; | 5335 invert = _invert; |
5281 } | 5336 } |
5282 | 5337 |
5283 void* Set(void* cmd, GLclampf _value, GLboolean _invert) { | 5338 void* Set(void* cmd, GLclampf _value, GLboolean _invert) { |
5284 static_cast<ValueType*>(cmd)->Init(_value, _invert); | 5339 static_cast<ValueType*>(cmd)->Init(_value, _invert); |
5285 return NextCmdAddress<ValueType>(cmd); | 5340 return NextCmdAddress<ValueType>(cmd); |
5286 } | 5341 } |
5287 | 5342 |
5288 gpu::CommandHeader header; | 5343 gpu::CommandHeader header; |
5289 float value; | 5344 float value; |
5290 uint32_t invert; | 5345 uint32_t invert; |
5291 }; | 5346 }; |
5292 | 5347 |
5293 COMPILE_ASSERT(sizeof(SampleCoverage) == 12, Sizeof_SampleCoverage_is_not_12); | 5348 static_assert(sizeof(SampleCoverage) == 12, |
5294 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0, | 5349 "size of SampleCoverage should be 12"); |
5295 OffsetOf_SampleCoverage_header_not_0); | 5350 static_assert(offsetof(SampleCoverage, header) == 0, |
5296 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4, | 5351 "offset of SampleCoverage header should be 0"); |
5297 OffsetOf_SampleCoverage_value_not_4); | 5352 static_assert(offsetof(SampleCoverage, value) == 4, |
5298 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8, | 5353 "offset of SampleCoverage value should be 4"); |
5299 OffsetOf_SampleCoverage_invert_not_8); | 5354 static_assert(offsetof(SampleCoverage, invert) == 8, |
| 5355 "offset of SampleCoverage invert should be 8"); |
5300 | 5356 |
5301 struct SamplerParameterf { | 5357 struct SamplerParameterf { |
5302 typedef SamplerParameterf ValueType; | 5358 typedef SamplerParameterf ValueType; |
5303 static const CommandId kCmdId = kSamplerParameterf; | 5359 static const CommandId kCmdId = kSamplerParameterf; |
5304 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5360 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5305 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5361 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5306 | 5362 |
5307 static uint32_t ComputeSize() { | 5363 static uint32_t ComputeSize() { |
5308 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5364 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5309 } | 5365 } |
(...skipping 11 matching lines...) Expand all Loading... |
5321 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param); | 5377 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param); |
5322 return NextCmdAddress<ValueType>(cmd); | 5378 return NextCmdAddress<ValueType>(cmd); |
5323 } | 5379 } |
5324 | 5380 |
5325 gpu::CommandHeader header; | 5381 gpu::CommandHeader header; |
5326 uint32_t sampler; | 5382 uint32_t sampler; |
5327 uint32_t pname; | 5383 uint32_t pname; |
5328 float param; | 5384 float param; |
5329 }; | 5385 }; |
5330 | 5386 |
5331 COMPILE_ASSERT(sizeof(SamplerParameterf) == 16, | 5387 static_assert(sizeof(SamplerParameterf) == 16, |
5332 Sizeof_SamplerParameterf_is_not_16); | 5388 "size of SamplerParameterf should be 16"); |
5333 COMPILE_ASSERT(offsetof(SamplerParameterf, header) == 0, | 5389 static_assert(offsetof(SamplerParameterf, header) == 0, |
5334 OffsetOf_SamplerParameterf_header_not_0); | 5390 "offset of SamplerParameterf header should be 0"); |
5335 COMPILE_ASSERT(offsetof(SamplerParameterf, sampler) == 4, | 5391 static_assert(offsetof(SamplerParameterf, sampler) == 4, |
5336 OffsetOf_SamplerParameterf_sampler_not_4); | 5392 "offset of SamplerParameterf sampler should be 4"); |
5337 COMPILE_ASSERT(offsetof(SamplerParameterf, pname) == 8, | 5393 static_assert(offsetof(SamplerParameterf, pname) == 8, |
5338 OffsetOf_SamplerParameterf_pname_not_8); | 5394 "offset of SamplerParameterf pname should be 8"); |
5339 COMPILE_ASSERT(offsetof(SamplerParameterf, param) == 12, | 5395 static_assert(offsetof(SamplerParameterf, param) == 12, |
5340 OffsetOf_SamplerParameterf_param_not_12); | 5396 "offset of SamplerParameterf param should be 12"); |
5341 | 5397 |
5342 struct SamplerParameterfvImmediate { | 5398 struct SamplerParameterfvImmediate { |
5343 typedef SamplerParameterfvImmediate ValueType; | 5399 typedef SamplerParameterfvImmediate ValueType; |
5344 static const CommandId kCmdId = kSamplerParameterfvImmediate; | 5400 static const CommandId kCmdId = kSamplerParameterfvImmediate; |
5345 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 5401 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
5346 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5402 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5347 | 5403 |
5348 static uint32_t ComputeDataSize() { | 5404 static uint32_t ComputeDataSize() { |
5349 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT | 5405 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT |
5350 } | 5406 } |
(...skipping 16 matching lines...) Expand all Loading... |
5367 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params); | 5423 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params); |
5368 const uint32_t size = ComputeSize(); | 5424 const uint32_t size = ComputeSize(); |
5369 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 5425 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
5370 } | 5426 } |
5371 | 5427 |
5372 gpu::CommandHeader header; | 5428 gpu::CommandHeader header; |
5373 uint32_t sampler; | 5429 uint32_t sampler; |
5374 uint32_t pname; | 5430 uint32_t pname; |
5375 }; | 5431 }; |
5376 | 5432 |
5377 COMPILE_ASSERT(sizeof(SamplerParameterfvImmediate) == 12, | 5433 static_assert(sizeof(SamplerParameterfvImmediate) == 12, |
5378 Sizeof_SamplerParameterfvImmediate_is_not_12); | 5434 "size of SamplerParameterfvImmediate should be 12"); |
5379 COMPILE_ASSERT(offsetof(SamplerParameterfvImmediate, header) == 0, | 5435 static_assert(offsetof(SamplerParameterfvImmediate, header) == 0, |
5380 OffsetOf_SamplerParameterfvImmediate_header_not_0); | 5436 "offset of SamplerParameterfvImmediate header should be 0"); |
5381 COMPILE_ASSERT(offsetof(SamplerParameterfvImmediate, sampler) == 4, | 5437 static_assert(offsetof(SamplerParameterfvImmediate, sampler) == 4, |
5382 OffsetOf_SamplerParameterfvImmediate_sampler_not_4); | 5438 "offset of SamplerParameterfvImmediate sampler should be 4"); |
5383 COMPILE_ASSERT(offsetof(SamplerParameterfvImmediate, pname) == 8, | 5439 static_assert(offsetof(SamplerParameterfvImmediate, pname) == 8, |
5384 OffsetOf_SamplerParameterfvImmediate_pname_not_8); | 5440 "offset of SamplerParameterfvImmediate pname should be 8"); |
5385 | 5441 |
5386 struct SamplerParameteri { | 5442 struct SamplerParameteri { |
5387 typedef SamplerParameteri ValueType; | 5443 typedef SamplerParameteri ValueType; |
5388 static const CommandId kCmdId = kSamplerParameteri; | 5444 static const CommandId kCmdId = kSamplerParameteri; |
5389 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5445 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5390 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5446 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5391 | 5447 |
5392 static uint32_t ComputeSize() { | 5448 static uint32_t ComputeSize() { |
5393 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5449 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5394 } | 5450 } |
(...skipping 11 matching lines...) Expand all Loading... |
5406 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param); | 5462 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param); |
5407 return NextCmdAddress<ValueType>(cmd); | 5463 return NextCmdAddress<ValueType>(cmd); |
5408 } | 5464 } |
5409 | 5465 |
5410 gpu::CommandHeader header; | 5466 gpu::CommandHeader header; |
5411 uint32_t sampler; | 5467 uint32_t sampler; |
5412 uint32_t pname; | 5468 uint32_t pname; |
5413 int32_t param; | 5469 int32_t param; |
5414 }; | 5470 }; |
5415 | 5471 |
5416 COMPILE_ASSERT(sizeof(SamplerParameteri) == 16, | 5472 static_assert(sizeof(SamplerParameteri) == 16, |
5417 Sizeof_SamplerParameteri_is_not_16); | 5473 "size of SamplerParameteri should be 16"); |
5418 COMPILE_ASSERT(offsetof(SamplerParameteri, header) == 0, | 5474 static_assert(offsetof(SamplerParameteri, header) == 0, |
5419 OffsetOf_SamplerParameteri_header_not_0); | 5475 "offset of SamplerParameteri header should be 0"); |
5420 COMPILE_ASSERT(offsetof(SamplerParameteri, sampler) == 4, | 5476 static_assert(offsetof(SamplerParameteri, sampler) == 4, |
5421 OffsetOf_SamplerParameteri_sampler_not_4); | 5477 "offset of SamplerParameteri sampler should be 4"); |
5422 COMPILE_ASSERT(offsetof(SamplerParameteri, pname) == 8, | 5478 static_assert(offsetof(SamplerParameteri, pname) == 8, |
5423 OffsetOf_SamplerParameteri_pname_not_8); | 5479 "offset of SamplerParameteri pname should be 8"); |
5424 COMPILE_ASSERT(offsetof(SamplerParameteri, param) == 12, | 5480 static_assert(offsetof(SamplerParameteri, param) == 12, |
5425 OffsetOf_SamplerParameteri_param_not_12); | 5481 "offset of SamplerParameteri param should be 12"); |
5426 | 5482 |
5427 struct SamplerParameterivImmediate { | 5483 struct SamplerParameterivImmediate { |
5428 typedef SamplerParameterivImmediate ValueType; | 5484 typedef SamplerParameterivImmediate ValueType; |
5429 static const CommandId kCmdId = kSamplerParameterivImmediate; | 5485 static const CommandId kCmdId = kSamplerParameterivImmediate; |
5430 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 5486 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
5431 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5487 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5432 | 5488 |
5433 static uint32_t ComputeDataSize() { | 5489 static uint32_t ComputeDataSize() { |
5434 return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT | 5490 return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT |
5435 } | 5491 } |
(...skipping 16 matching lines...) Expand all Loading... |
5452 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params); | 5508 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params); |
5453 const uint32_t size = ComputeSize(); | 5509 const uint32_t size = ComputeSize(); |
5454 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 5510 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
5455 } | 5511 } |
5456 | 5512 |
5457 gpu::CommandHeader header; | 5513 gpu::CommandHeader header; |
5458 uint32_t sampler; | 5514 uint32_t sampler; |
5459 uint32_t pname; | 5515 uint32_t pname; |
5460 }; | 5516 }; |
5461 | 5517 |
5462 COMPILE_ASSERT(sizeof(SamplerParameterivImmediate) == 12, | 5518 static_assert(sizeof(SamplerParameterivImmediate) == 12, |
5463 Sizeof_SamplerParameterivImmediate_is_not_12); | 5519 "size of SamplerParameterivImmediate should be 12"); |
5464 COMPILE_ASSERT(offsetof(SamplerParameterivImmediate, header) == 0, | 5520 static_assert(offsetof(SamplerParameterivImmediate, header) == 0, |
5465 OffsetOf_SamplerParameterivImmediate_header_not_0); | 5521 "offset of SamplerParameterivImmediate header should be 0"); |
5466 COMPILE_ASSERT(offsetof(SamplerParameterivImmediate, sampler) == 4, | 5522 static_assert(offsetof(SamplerParameterivImmediate, sampler) == 4, |
5467 OffsetOf_SamplerParameterivImmediate_sampler_not_4); | 5523 "offset of SamplerParameterivImmediate sampler should be 4"); |
5468 COMPILE_ASSERT(offsetof(SamplerParameterivImmediate, pname) == 8, | 5524 static_assert(offsetof(SamplerParameterivImmediate, pname) == 8, |
5469 OffsetOf_SamplerParameterivImmediate_pname_not_8); | 5525 "offset of SamplerParameterivImmediate pname should be 8"); |
5470 | 5526 |
5471 struct Scissor { | 5527 struct Scissor { |
5472 typedef Scissor ValueType; | 5528 typedef Scissor ValueType; |
5473 static const CommandId kCmdId = kScissor; | 5529 static const CommandId kCmdId = kScissor; |
5474 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5530 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5475 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5531 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5476 | 5532 |
5477 static uint32_t ComputeSize() { | 5533 static uint32_t ComputeSize() { |
5478 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5534 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5479 } | 5535 } |
(...skipping 13 matching lines...) Expand all Loading... |
5493 return NextCmdAddress<ValueType>(cmd); | 5549 return NextCmdAddress<ValueType>(cmd); |
5494 } | 5550 } |
5495 | 5551 |
5496 gpu::CommandHeader header; | 5552 gpu::CommandHeader header; |
5497 int32_t x; | 5553 int32_t x; |
5498 int32_t y; | 5554 int32_t y; |
5499 int32_t width; | 5555 int32_t width; |
5500 int32_t height; | 5556 int32_t height; |
5501 }; | 5557 }; |
5502 | 5558 |
5503 COMPILE_ASSERT(sizeof(Scissor) == 20, Sizeof_Scissor_is_not_20); | 5559 static_assert(sizeof(Scissor) == 20, "size of Scissor should be 20"); |
5504 COMPILE_ASSERT(offsetof(Scissor, header) == 0, OffsetOf_Scissor_header_not_0); | 5560 static_assert(offsetof(Scissor, header) == 0, |
5505 COMPILE_ASSERT(offsetof(Scissor, x) == 4, OffsetOf_Scissor_x_not_4); | 5561 "offset of Scissor header should be 0"); |
5506 COMPILE_ASSERT(offsetof(Scissor, y) == 8, OffsetOf_Scissor_y_not_8); | 5562 static_assert(offsetof(Scissor, x) == 4, "offset of Scissor x should be 4"); |
5507 COMPILE_ASSERT(offsetof(Scissor, width) == 12, OffsetOf_Scissor_width_not_12); | 5563 static_assert(offsetof(Scissor, y) == 8, "offset of Scissor y should be 8"); |
5508 COMPILE_ASSERT(offsetof(Scissor, height) == 16, OffsetOf_Scissor_height_not_16); | 5564 static_assert(offsetof(Scissor, width) == 12, |
| 5565 "offset of Scissor width should be 12"); |
| 5566 static_assert(offsetof(Scissor, height) == 16, |
| 5567 "offset of Scissor height should be 16"); |
5509 | 5568 |
5510 struct ShaderBinary { | 5569 struct ShaderBinary { |
5511 typedef ShaderBinary ValueType; | 5570 typedef ShaderBinary ValueType; |
5512 static const CommandId kCmdId = kShaderBinary; | 5571 static const CommandId kCmdId = kShaderBinary; |
5513 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5572 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5514 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5573 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5515 | 5574 |
5516 static uint32_t ComputeSize() { | 5575 static uint32_t ComputeSize() { |
5517 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5576 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5518 } | 5577 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5553 gpu::CommandHeader header; | 5612 gpu::CommandHeader header; |
5554 int32_t n; | 5613 int32_t n; |
5555 uint32_t shaders_shm_id; | 5614 uint32_t shaders_shm_id; |
5556 uint32_t shaders_shm_offset; | 5615 uint32_t shaders_shm_offset; |
5557 uint32_t binaryformat; | 5616 uint32_t binaryformat; |
5558 uint32_t binary_shm_id; | 5617 uint32_t binary_shm_id; |
5559 uint32_t binary_shm_offset; | 5618 uint32_t binary_shm_offset; |
5560 int32_t length; | 5619 int32_t length; |
5561 }; | 5620 }; |
5562 | 5621 |
5563 COMPILE_ASSERT(sizeof(ShaderBinary) == 32, Sizeof_ShaderBinary_is_not_32); | 5622 static_assert(sizeof(ShaderBinary) == 32, "size of ShaderBinary should be 32"); |
5564 COMPILE_ASSERT(offsetof(ShaderBinary, header) == 0, | 5623 static_assert(offsetof(ShaderBinary, header) == 0, |
5565 OffsetOf_ShaderBinary_header_not_0); | 5624 "offset of ShaderBinary header should be 0"); |
5566 COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4, OffsetOf_ShaderBinary_n_not_4); | 5625 static_assert(offsetof(ShaderBinary, n) == 4, |
5567 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_id) == 8, | 5626 "offset of ShaderBinary n should be 4"); |
5568 OffsetOf_ShaderBinary_shaders_shm_id_not_8); | 5627 static_assert(offsetof(ShaderBinary, shaders_shm_id) == 8, |
5569 COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_offset) == 12, | 5628 "offset of ShaderBinary shaders_shm_id should be 8"); |
5570 OffsetOf_ShaderBinary_shaders_shm_offset_not_12); | 5629 static_assert(offsetof(ShaderBinary, shaders_shm_offset) == 12, |
5571 COMPILE_ASSERT(offsetof(ShaderBinary, binaryformat) == 16, | 5630 "offset of ShaderBinary shaders_shm_offset should be 12"); |
5572 OffsetOf_ShaderBinary_binaryformat_not_16); | 5631 static_assert(offsetof(ShaderBinary, binaryformat) == 16, |
5573 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_id) == 20, | 5632 "offset of ShaderBinary binaryformat should be 16"); |
5574 OffsetOf_ShaderBinary_binary_shm_id_not_20); | 5633 static_assert(offsetof(ShaderBinary, binary_shm_id) == 20, |
5575 COMPILE_ASSERT(offsetof(ShaderBinary, binary_shm_offset) == 24, | 5634 "offset of ShaderBinary binary_shm_id should be 20"); |
5576 OffsetOf_ShaderBinary_binary_shm_offset_not_24); | 5635 static_assert(offsetof(ShaderBinary, binary_shm_offset) == 24, |
5577 COMPILE_ASSERT(offsetof(ShaderBinary, length) == 28, | 5636 "offset of ShaderBinary binary_shm_offset should be 24"); |
5578 OffsetOf_ShaderBinary_length_not_28); | 5637 static_assert(offsetof(ShaderBinary, length) == 28, |
| 5638 "offset of ShaderBinary length should be 28"); |
5579 | 5639 |
5580 struct ShaderSourceBucket { | 5640 struct ShaderSourceBucket { |
5581 typedef ShaderSourceBucket ValueType; | 5641 typedef ShaderSourceBucket ValueType; |
5582 static const CommandId kCmdId = kShaderSourceBucket; | 5642 static const CommandId kCmdId = kShaderSourceBucket; |
5583 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5643 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5584 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5644 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5585 | 5645 |
5586 static uint32_t ComputeSize() { | 5646 static uint32_t ComputeSize() { |
5587 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5647 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5588 } | 5648 } |
5589 | 5649 |
5590 void SetHeader() { header.SetCmd<ValueType>(); } | 5650 void SetHeader() { header.SetCmd<ValueType>(); } |
5591 | 5651 |
5592 void Init(GLuint _shader, uint32_t _data_bucket_id) { | 5652 void Init(GLuint _shader, uint32_t _data_bucket_id) { |
5593 SetHeader(); | 5653 SetHeader(); |
5594 shader = _shader; | 5654 shader = _shader; |
5595 data_bucket_id = _data_bucket_id; | 5655 data_bucket_id = _data_bucket_id; |
5596 } | 5656 } |
5597 | 5657 |
5598 void* Set(void* cmd, GLuint _shader, uint32_t _data_bucket_id) { | 5658 void* Set(void* cmd, GLuint _shader, uint32_t _data_bucket_id) { |
5599 static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id); | 5659 static_cast<ValueType*>(cmd)->Init(_shader, _data_bucket_id); |
5600 return NextCmdAddress<ValueType>(cmd); | 5660 return NextCmdAddress<ValueType>(cmd); |
5601 } | 5661 } |
5602 | 5662 |
5603 gpu::CommandHeader header; | 5663 gpu::CommandHeader header; |
5604 uint32_t shader; | 5664 uint32_t shader; |
5605 uint32_t data_bucket_id; | 5665 uint32_t data_bucket_id; |
5606 }; | 5666 }; |
5607 | 5667 |
5608 COMPILE_ASSERT(sizeof(ShaderSourceBucket) == 12, | 5668 static_assert(sizeof(ShaderSourceBucket) == 12, |
5609 Sizeof_ShaderSourceBucket_is_not_12); | 5669 "size of ShaderSourceBucket should be 12"); |
5610 COMPILE_ASSERT(offsetof(ShaderSourceBucket, header) == 0, | 5670 static_assert(offsetof(ShaderSourceBucket, header) == 0, |
5611 OffsetOf_ShaderSourceBucket_header_not_0); | 5671 "offset of ShaderSourceBucket header should be 0"); |
5612 COMPILE_ASSERT(offsetof(ShaderSourceBucket, shader) == 4, | 5672 static_assert(offsetof(ShaderSourceBucket, shader) == 4, |
5613 OffsetOf_ShaderSourceBucket_shader_not_4); | 5673 "offset of ShaderSourceBucket shader should be 4"); |
5614 COMPILE_ASSERT(offsetof(ShaderSourceBucket, data_bucket_id) == 8, | 5674 static_assert(offsetof(ShaderSourceBucket, data_bucket_id) == 8, |
5615 OffsetOf_ShaderSourceBucket_data_bucket_id_not_8); | 5675 "offset of ShaderSourceBucket data_bucket_id should be 8"); |
5616 | 5676 |
5617 struct StencilFunc { | 5677 struct StencilFunc { |
5618 typedef StencilFunc ValueType; | 5678 typedef StencilFunc ValueType; |
5619 static const CommandId kCmdId = kStencilFunc; | 5679 static const CommandId kCmdId = kStencilFunc; |
5620 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5680 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5621 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5681 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5622 | 5682 |
5623 static uint32_t ComputeSize() { | 5683 static uint32_t ComputeSize() { |
5624 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5684 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5625 } | 5685 } |
(...skipping 11 matching lines...) Expand all Loading... |
5637 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask); | 5697 static_cast<ValueType*>(cmd)->Init(_func, _ref, _mask); |
5638 return NextCmdAddress<ValueType>(cmd); | 5698 return NextCmdAddress<ValueType>(cmd); |
5639 } | 5699 } |
5640 | 5700 |
5641 gpu::CommandHeader header; | 5701 gpu::CommandHeader header; |
5642 uint32_t func; | 5702 uint32_t func; |
5643 int32_t ref; | 5703 int32_t ref; |
5644 uint32_t mask; | 5704 uint32_t mask; |
5645 }; | 5705 }; |
5646 | 5706 |
5647 COMPILE_ASSERT(sizeof(StencilFunc) == 16, Sizeof_StencilFunc_is_not_16); | 5707 static_assert(sizeof(StencilFunc) == 16, "size of StencilFunc should be 16"); |
5648 COMPILE_ASSERT(offsetof(StencilFunc, header) == 0, | 5708 static_assert(offsetof(StencilFunc, header) == 0, |
5649 OffsetOf_StencilFunc_header_not_0); | 5709 "offset of StencilFunc header should be 0"); |
5650 COMPILE_ASSERT(offsetof(StencilFunc, func) == 4, | 5710 static_assert(offsetof(StencilFunc, func) == 4, |
5651 OffsetOf_StencilFunc_func_not_4); | 5711 "offset of StencilFunc func should be 4"); |
5652 COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8, OffsetOf_StencilFunc_ref_not_8); | 5712 static_assert(offsetof(StencilFunc, ref) == 8, |
5653 COMPILE_ASSERT(offsetof(StencilFunc, mask) == 12, | 5713 "offset of StencilFunc ref should be 8"); |
5654 OffsetOf_StencilFunc_mask_not_12); | 5714 static_assert(offsetof(StencilFunc, mask) == 12, |
| 5715 "offset of StencilFunc mask should be 12"); |
5655 | 5716 |
5656 struct StencilFuncSeparate { | 5717 struct StencilFuncSeparate { |
5657 typedef StencilFuncSeparate ValueType; | 5718 typedef StencilFuncSeparate ValueType; |
5658 static const CommandId kCmdId = kStencilFuncSeparate; | 5719 static const CommandId kCmdId = kStencilFuncSeparate; |
5659 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5720 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5660 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5721 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5661 | 5722 |
5662 static uint32_t ComputeSize() { | 5723 static uint32_t ComputeSize() { |
5663 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5724 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5664 } | 5725 } |
(...skipping 13 matching lines...) Expand all Loading... |
5678 return NextCmdAddress<ValueType>(cmd); | 5739 return NextCmdAddress<ValueType>(cmd); |
5679 } | 5740 } |
5680 | 5741 |
5681 gpu::CommandHeader header; | 5742 gpu::CommandHeader header; |
5682 uint32_t face; | 5743 uint32_t face; |
5683 uint32_t func; | 5744 uint32_t func; |
5684 int32_t ref; | 5745 int32_t ref; |
5685 uint32_t mask; | 5746 uint32_t mask; |
5686 }; | 5747 }; |
5687 | 5748 |
5688 COMPILE_ASSERT(sizeof(StencilFuncSeparate) == 20, | 5749 static_assert(sizeof(StencilFuncSeparate) == 20, |
5689 Sizeof_StencilFuncSeparate_is_not_20); | 5750 "size of StencilFuncSeparate should be 20"); |
5690 COMPILE_ASSERT(offsetof(StencilFuncSeparate, header) == 0, | 5751 static_assert(offsetof(StencilFuncSeparate, header) == 0, |
5691 OffsetOf_StencilFuncSeparate_header_not_0); | 5752 "offset of StencilFuncSeparate header should be 0"); |
5692 COMPILE_ASSERT(offsetof(StencilFuncSeparate, face) == 4, | 5753 static_assert(offsetof(StencilFuncSeparate, face) == 4, |
5693 OffsetOf_StencilFuncSeparate_face_not_4); | 5754 "offset of StencilFuncSeparate face should be 4"); |
5694 COMPILE_ASSERT(offsetof(StencilFuncSeparate, func) == 8, | 5755 static_assert(offsetof(StencilFuncSeparate, func) == 8, |
5695 OffsetOf_StencilFuncSeparate_func_not_8); | 5756 "offset of StencilFuncSeparate func should be 8"); |
5696 COMPILE_ASSERT(offsetof(StencilFuncSeparate, ref) == 12, | 5757 static_assert(offsetof(StencilFuncSeparate, ref) == 12, |
5697 OffsetOf_StencilFuncSeparate_ref_not_12); | 5758 "offset of StencilFuncSeparate ref should be 12"); |
5698 COMPILE_ASSERT(offsetof(StencilFuncSeparate, mask) == 16, | 5759 static_assert(offsetof(StencilFuncSeparate, mask) == 16, |
5699 OffsetOf_StencilFuncSeparate_mask_not_16); | 5760 "offset of StencilFuncSeparate mask should be 16"); |
5700 | 5761 |
5701 struct StencilMask { | 5762 struct StencilMask { |
5702 typedef StencilMask ValueType; | 5763 typedef StencilMask ValueType; |
5703 static const CommandId kCmdId = kStencilMask; | 5764 static const CommandId kCmdId = kStencilMask; |
5704 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5765 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5705 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5766 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5706 | 5767 |
5707 static uint32_t ComputeSize() { | 5768 static uint32_t ComputeSize() { |
5708 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5769 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5709 } | 5770 } |
5710 | 5771 |
5711 void SetHeader() { header.SetCmd<ValueType>(); } | 5772 void SetHeader() { header.SetCmd<ValueType>(); } |
5712 | 5773 |
5713 void Init(GLuint _mask) { | 5774 void Init(GLuint _mask) { |
5714 SetHeader(); | 5775 SetHeader(); |
5715 mask = _mask; | 5776 mask = _mask; |
5716 } | 5777 } |
5717 | 5778 |
5718 void* Set(void* cmd, GLuint _mask) { | 5779 void* Set(void* cmd, GLuint _mask) { |
5719 static_cast<ValueType*>(cmd)->Init(_mask); | 5780 static_cast<ValueType*>(cmd)->Init(_mask); |
5720 return NextCmdAddress<ValueType>(cmd); | 5781 return NextCmdAddress<ValueType>(cmd); |
5721 } | 5782 } |
5722 | 5783 |
5723 gpu::CommandHeader header; | 5784 gpu::CommandHeader header; |
5724 uint32_t mask; | 5785 uint32_t mask; |
5725 }; | 5786 }; |
5726 | 5787 |
5727 COMPILE_ASSERT(sizeof(StencilMask) == 8, Sizeof_StencilMask_is_not_8); | 5788 static_assert(sizeof(StencilMask) == 8, "size of StencilMask should be 8"); |
5728 COMPILE_ASSERT(offsetof(StencilMask, header) == 0, | 5789 static_assert(offsetof(StencilMask, header) == 0, |
5729 OffsetOf_StencilMask_header_not_0); | 5790 "offset of StencilMask header should be 0"); |
5730 COMPILE_ASSERT(offsetof(StencilMask, mask) == 4, | 5791 static_assert(offsetof(StencilMask, mask) == 4, |
5731 OffsetOf_StencilMask_mask_not_4); | 5792 "offset of StencilMask mask should be 4"); |
5732 | 5793 |
5733 struct StencilMaskSeparate { | 5794 struct StencilMaskSeparate { |
5734 typedef StencilMaskSeparate ValueType; | 5795 typedef StencilMaskSeparate ValueType; |
5735 static const CommandId kCmdId = kStencilMaskSeparate; | 5796 static const CommandId kCmdId = kStencilMaskSeparate; |
5736 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5797 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5737 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5798 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5738 | 5799 |
5739 static uint32_t ComputeSize() { | 5800 static uint32_t ComputeSize() { |
5740 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5801 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5741 } | 5802 } |
5742 | 5803 |
5743 void SetHeader() { header.SetCmd<ValueType>(); } | 5804 void SetHeader() { header.SetCmd<ValueType>(); } |
5744 | 5805 |
5745 void Init(GLenum _face, GLuint _mask) { | 5806 void Init(GLenum _face, GLuint _mask) { |
5746 SetHeader(); | 5807 SetHeader(); |
5747 face = _face; | 5808 face = _face; |
5748 mask = _mask; | 5809 mask = _mask; |
5749 } | 5810 } |
5750 | 5811 |
5751 void* Set(void* cmd, GLenum _face, GLuint _mask) { | 5812 void* Set(void* cmd, GLenum _face, GLuint _mask) { |
5752 static_cast<ValueType*>(cmd)->Init(_face, _mask); | 5813 static_cast<ValueType*>(cmd)->Init(_face, _mask); |
5753 return NextCmdAddress<ValueType>(cmd); | 5814 return NextCmdAddress<ValueType>(cmd); |
5754 } | 5815 } |
5755 | 5816 |
5756 gpu::CommandHeader header; | 5817 gpu::CommandHeader header; |
5757 uint32_t face; | 5818 uint32_t face; |
5758 uint32_t mask; | 5819 uint32_t mask; |
5759 }; | 5820 }; |
5760 | 5821 |
5761 COMPILE_ASSERT(sizeof(StencilMaskSeparate) == 12, | 5822 static_assert(sizeof(StencilMaskSeparate) == 12, |
5762 Sizeof_StencilMaskSeparate_is_not_12); | 5823 "size of StencilMaskSeparate should be 12"); |
5763 COMPILE_ASSERT(offsetof(StencilMaskSeparate, header) == 0, | 5824 static_assert(offsetof(StencilMaskSeparate, header) == 0, |
5764 OffsetOf_StencilMaskSeparate_header_not_0); | 5825 "offset of StencilMaskSeparate header should be 0"); |
5765 COMPILE_ASSERT(offsetof(StencilMaskSeparate, face) == 4, | 5826 static_assert(offsetof(StencilMaskSeparate, face) == 4, |
5766 OffsetOf_StencilMaskSeparate_face_not_4); | 5827 "offset of StencilMaskSeparate face should be 4"); |
5767 COMPILE_ASSERT(offsetof(StencilMaskSeparate, mask) == 8, | 5828 static_assert(offsetof(StencilMaskSeparate, mask) == 8, |
5768 OffsetOf_StencilMaskSeparate_mask_not_8); | 5829 "offset of StencilMaskSeparate mask should be 8"); |
5769 | 5830 |
5770 struct StencilOp { | 5831 struct StencilOp { |
5771 typedef StencilOp ValueType; | 5832 typedef StencilOp ValueType; |
5772 static const CommandId kCmdId = kStencilOp; | 5833 static const CommandId kCmdId = kStencilOp; |
5773 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5834 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5774 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5835 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5775 | 5836 |
5776 static uint32_t ComputeSize() { | 5837 static uint32_t ComputeSize() { |
5777 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5838 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5778 } | 5839 } |
(...skipping 11 matching lines...) Expand all Loading... |
5790 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass); | 5851 static_cast<ValueType*>(cmd)->Init(_fail, _zfail, _zpass); |
5791 return NextCmdAddress<ValueType>(cmd); | 5852 return NextCmdAddress<ValueType>(cmd); |
5792 } | 5853 } |
5793 | 5854 |
5794 gpu::CommandHeader header; | 5855 gpu::CommandHeader header; |
5795 uint32_t fail; | 5856 uint32_t fail; |
5796 uint32_t zfail; | 5857 uint32_t zfail; |
5797 uint32_t zpass; | 5858 uint32_t zpass; |
5798 }; | 5859 }; |
5799 | 5860 |
5800 COMPILE_ASSERT(sizeof(StencilOp) == 16, Sizeof_StencilOp_is_not_16); | 5861 static_assert(sizeof(StencilOp) == 16, "size of StencilOp should be 16"); |
5801 COMPILE_ASSERT(offsetof(StencilOp, header) == 0, | 5862 static_assert(offsetof(StencilOp, header) == 0, |
5802 OffsetOf_StencilOp_header_not_0); | 5863 "offset of StencilOp header should be 0"); |
5803 COMPILE_ASSERT(offsetof(StencilOp, fail) == 4, OffsetOf_StencilOp_fail_not_4); | 5864 static_assert(offsetof(StencilOp, fail) == 4, |
5804 COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8, OffsetOf_StencilOp_zfail_not_8); | 5865 "offset of StencilOp fail should be 4"); |
5805 COMPILE_ASSERT(offsetof(StencilOp, zpass) == 12, | 5866 static_assert(offsetof(StencilOp, zfail) == 8, |
5806 OffsetOf_StencilOp_zpass_not_12); | 5867 "offset of StencilOp zfail should be 8"); |
| 5868 static_assert(offsetof(StencilOp, zpass) == 12, |
| 5869 "offset of StencilOp zpass should be 12"); |
5807 | 5870 |
5808 struct StencilOpSeparate { | 5871 struct StencilOpSeparate { |
5809 typedef StencilOpSeparate ValueType; | 5872 typedef StencilOpSeparate ValueType; |
5810 static const CommandId kCmdId = kStencilOpSeparate; | 5873 static const CommandId kCmdId = kStencilOpSeparate; |
5811 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5874 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5812 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5875 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5813 | 5876 |
5814 static uint32_t ComputeSize() { | 5877 static uint32_t ComputeSize() { |
5815 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5878 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5816 } | 5879 } |
(...skipping 17 matching lines...) Expand all Loading... |
5834 return NextCmdAddress<ValueType>(cmd); | 5897 return NextCmdAddress<ValueType>(cmd); |
5835 } | 5898 } |
5836 | 5899 |
5837 gpu::CommandHeader header; | 5900 gpu::CommandHeader header; |
5838 uint32_t face; | 5901 uint32_t face; |
5839 uint32_t fail; | 5902 uint32_t fail; |
5840 uint32_t zfail; | 5903 uint32_t zfail; |
5841 uint32_t zpass; | 5904 uint32_t zpass; |
5842 }; | 5905 }; |
5843 | 5906 |
5844 COMPILE_ASSERT(sizeof(StencilOpSeparate) == 20, | 5907 static_assert(sizeof(StencilOpSeparate) == 20, |
5845 Sizeof_StencilOpSeparate_is_not_20); | 5908 "size of StencilOpSeparate should be 20"); |
5846 COMPILE_ASSERT(offsetof(StencilOpSeparate, header) == 0, | 5909 static_assert(offsetof(StencilOpSeparate, header) == 0, |
5847 OffsetOf_StencilOpSeparate_header_not_0); | 5910 "offset of StencilOpSeparate header should be 0"); |
5848 COMPILE_ASSERT(offsetof(StencilOpSeparate, face) == 4, | 5911 static_assert(offsetof(StencilOpSeparate, face) == 4, |
5849 OffsetOf_StencilOpSeparate_face_not_4); | 5912 "offset of StencilOpSeparate face should be 4"); |
5850 COMPILE_ASSERT(offsetof(StencilOpSeparate, fail) == 8, | 5913 static_assert(offsetof(StencilOpSeparate, fail) == 8, |
5851 OffsetOf_StencilOpSeparate_fail_not_8); | 5914 "offset of StencilOpSeparate fail should be 8"); |
5852 COMPILE_ASSERT(offsetof(StencilOpSeparate, zfail) == 12, | 5915 static_assert(offsetof(StencilOpSeparate, zfail) == 12, |
5853 OffsetOf_StencilOpSeparate_zfail_not_12); | 5916 "offset of StencilOpSeparate zfail should be 12"); |
5854 COMPILE_ASSERT(offsetof(StencilOpSeparate, zpass) == 16, | 5917 static_assert(offsetof(StencilOpSeparate, zpass) == 16, |
5855 OffsetOf_StencilOpSeparate_zpass_not_16); | 5918 "offset of StencilOpSeparate zpass should be 16"); |
5856 | 5919 |
5857 struct TexImage2D { | 5920 struct TexImage2D { |
5858 typedef TexImage2D ValueType; | 5921 typedef TexImage2D ValueType; |
5859 static const CommandId kCmdId = kTexImage2D; | 5922 static const CommandId kCmdId = kTexImage2D; |
5860 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5923 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5861 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5924 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5862 | 5925 |
5863 static uint32_t ComputeSize() { | 5926 static uint32_t ComputeSize() { |
5864 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5927 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5865 } | 5928 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5909 int32_t internalformat; | 5972 int32_t internalformat; |
5910 int32_t width; | 5973 int32_t width; |
5911 int32_t height; | 5974 int32_t height; |
5912 uint32_t format; | 5975 uint32_t format; |
5913 uint32_t type; | 5976 uint32_t type; |
5914 uint32_t pixels_shm_id; | 5977 uint32_t pixels_shm_id; |
5915 uint32_t pixels_shm_offset; | 5978 uint32_t pixels_shm_offset; |
5916 static const int32_t border = 0; | 5979 static const int32_t border = 0; |
5917 }; | 5980 }; |
5918 | 5981 |
5919 COMPILE_ASSERT(sizeof(TexImage2D) == 40, Sizeof_TexImage2D_is_not_40); | 5982 static_assert(sizeof(TexImage2D) == 40, "size of TexImage2D should be 40"); |
5920 COMPILE_ASSERT(offsetof(TexImage2D, header) == 0, | 5983 static_assert(offsetof(TexImage2D, header) == 0, |
5921 OffsetOf_TexImage2D_header_not_0); | 5984 "offset of TexImage2D header should be 0"); |
5922 COMPILE_ASSERT(offsetof(TexImage2D, target) == 4, | 5985 static_assert(offsetof(TexImage2D, target) == 4, |
5923 OffsetOf_TexImage2D_target_not_4); | 5986 "offset of TexImage2D target should be 4"); |
5924 COMPILE_ASSERT(offsetof(TexImage2D, level) == 8, | 5987 static_assert(offsetof(TexImage2D, level) == 8, |
5925 OffsetOf_TexImage2D_level_not_8); | 5988 "offset of TexImage2D level should be 8"); |
5926 COMPILE_ASSERT(offsetof(TexImage2D, internalformat) == 12, | 5989 static_assert(offsetof(TexImage2D, internalformat) == 12, |
5927 OffsetOf_TexImage2D_internalformat_not_12); | 5990 "offset of TexImage2D internalformat should be 12"); |
5928 COMPILE_ASSERT(offsetof(TexImage2D, width) == 16, | 5991 static_assert(offsetof(TexImage2D, width) == 16, |
5929 OffsetOf_TexImage2D_width_not_16); | 5992 "offset of TexImage2D width should be 16"); |
5930 COMPILE_ASSERT(offsetof(TexImage2D, height) == 20, | 5993 static_assert(offsetof(TexImage2D, height) == 20, |
5931 OffsetOf_TexImage2D_height_not_20); | 5994 "offset of TexImage2D height should be 20"); |
5932 COMPILE_ASSERT(offsetof(TexImage2D, format) == 24, | 5995 static_assert(offsetof(TexImage2D, format) == 24, |
5933 OffsetOf_TexImage2D_format_not_24); | 5996 "offset of TexImage2D format should be 24"); |
5934 COMPILE_ASSERT(offsetof(TexImage2D, type) == 28, | 5997 static_assert(offsetof(TexImage2D, type) == 28, |
5935 OffsetOf_TexImage2D_type_not_28); | 5998 "offset of TexImage2D type should be 28"); |
5936 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_id) == 32, | 5999 static_assert(offsetof(TexImage2D, pixels_shm_id) == 32, |
5937 OffsetOf_TexImage2D_pixels_shm_id_not_32); | 6000 "offset of TexImage2D pixels_shm_id should be 32"); |
5938 COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_offset) == 36, | 6001 static_assert(offsetof(TexImage2D, pixels_shm_offset) == 36, |
5939 OffsetOf_TexImage2D_pixels_shm_offset_not_36); | 6002 "offset of TexImage2D pixels_shm_offset should be 36"); |
5940 | 6003 |
5941 struct TexParameterf { | 6004 struct TexParameterf { |
5942 typedef TexParameterf ValueType; | 6005 typedef TexParameterf ValueType; |
5943 static const CommandId kCmdId = kTexParameterf; | 6006 static const CommandId kCmdId = kTexParameterf; |
5944 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6007 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
5945 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6008 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5946 | 6009 |
5947 static uint32_t ComputeSize() { | 6010 static uint32_t ComputeSize() { |
5948 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6011 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
5949 } | 6012 } |
(...skipping 11 matching lines...) Expand all Loading... |
5961 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param); | 6024 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param); |
5962 return NextCmdAddress<ValueType>(cmd); | 6025 return NextCmdAddress<ValueType>(cmd); |
5963 } | 6026 } |
5964 | 6027 |
5965 gpu::CommandHeader header; | 6028 gpu::CommandHeader header; |
5966 uint32_t target; | 6029 uint32_t target; |
5967 uint32_t pname; | 6030 uint32_t pname; |
5968 float param; | 6031 float param; |
5969 }; | 6032 }; |
5970 | 6033 |
5971 COMPILE_ASSERT(sizeof(TexParameterf) == 16, Sizeof_TexParameterf_is_not_16); | 6034 static_assert(sizeof(TexParameterf) == 16, |
5972 COMPILE_ASSERT(offsetof(TexParameterf, header) == 0, | 6035 "size of TexParameterf should be 16"); |
5973 OffsetOf_TexParameterf_header_not_0); | 6036 static_assert(offsetof(TexParameterf, header) == 0, |
5974 COMPILE_ASSERT(offsetof(TexParameterf, target) == 4, | 6037 "offset of TexParameterf header should be 0"); |
5975 OffsetOf_TexParameterf_target_not_4); | 6038 static_assert(offsetof(TexParameterf, target) == 4, |
5976 COMPILE_ASSERT(offsetof(TexParameterf, pname) == 8, | 6039 "offset of TexParameterf target should be 4"); |
5977 OffsetOf_TexParameterf_pname_not_8); | 6040 static_assert(offsetof(TexParameterf, pname) == 8, |
5978 COMPILE_ASSERT(offsetof(TexParameterf, param) == 12, | 6041 "offset of TexParameterf pname should be 8"); |
5979 OffsetOf_TexParameterf_param_not_12); | 6042 static_assert(offsetof(TexParameterf, param) == 12, |
| 6043 "offset of TexParameterf param should be 12"); |
5980 | 6044 |
5981 struct TexParameterfvImmediate { | 6045 struct TexParameterfvImmediate { |
5982 typedef TexParameterfvImmediate ValueType; | 6046 typedef TexParameterfvImmediate ValueType; |
5983 static const CommandId kCmdId = kTexParameterfvImmediate; | 6047 static const CommandId kCmdId = kTexParameterfvImmediate; |
5984 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6048 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
5985 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6049 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
5986 | 6050 |
5987 static uint32_t ComputeDataSize() { | 6051 static uint32_t ComputeDataSize() { |
5988 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT | 6052 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT |
5989 } | 6053 } |
(...skipping 16 matching lines...) Expand all Loading... |
6006 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params); | 6070 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params); |
6007 const uint32_t size = ComputeSize(); | 6071 const uint32_t size = ComputeSize(); |
6008 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6072 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6009 } | 6073 } |
6010 | 6074 |
6011 gpu::CommandHeader header; | 6075 gpu::CommandHeader header; |
6012 uint32_t target; | 6076 uint32_t target; |
6013 uint32_t pname; | 6077 uint32_t pname; |
6014 }; | 6078 }; |
6015 | 6079 |
6016 COMPILE_ASSERT(sizeof(TexParameterfvImmediate) == 12, | 6080 static_assert(sizeof(TexParameterfvImmediate) == 12, |
6017 Sizeof_TexParameterfvImmediate_is_not_12); | 6081 "size of TexParameterfvImmediate should be 12"); |
6018 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, header) == 0, | 6082 static_assert(offsetof(TexParameterfvImmediate, header) == 0, |
6019 OffsetOf_TexParameterfvImmediate_header_not_0); | 6083 "offset of TexParameterfvImmediate header should be 0"); |
6020 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, target) == 4, | 6084 static_assert(offsetof(TexParameterfvImmediate, target) == 4, |
6021 OffsetOf_TexParameterfvImmediate_target_not_4); | 6085 "offset of TexParameterfvImmediate target should be 4"); |
6022 COMPILE_ASSERT(offsetof(TexParameterfvImmediate, pname) == 8, | 6086 static_assert(offsetof(TexParameterfvImmediate, pname) == 8, |
6023 OffsetOf_TexParameterfvImmediate_pname_not_8); | 6087 "offset of TexParameterfvImmediate pname should be 8"); |
6024 | 6088 |
6025 struct TexParameteri { | 6089 struct TexParameteri { |
6026 typedef TexParameteri ValueType; | 6090 typedef TexParameteri ValueType; |
6027 static const CommandId kCmdId = kTexParameteri; | 6091 static const CommandId kCmdId = kTexParameteri; |
6028 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6092 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6029 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6093 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6030 | 6094 |
6031 static uint32_t ComputeSize() { | 6095 static uint32_t ComputeSize() { |
6032 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6096 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6033 } | 6097 } |
(...skipping 11 matching lines...) Expand all Loading... |
6045 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param); | 6109 static_cast<ValueType*>(cmd)->Init(_target, _pname, _param); |
6046 return NextCmdAddress<ValueType>(cmd); | 6110 return NextCmdAddress<ValueType>(cmd); |
6047 } | 6111 } |
6048 | 6112 |
6049 gpu::CommandHeader header; | 6113 gpu::CommandHeader header; |
6050 uint32_t target; | 6114 uint32_t target; |
6051 uint32_t pname; | 6115 uint32_t pname; |
6052 int32_t param; | 6116 int32_t param; |
6053 }; | 6117 }; |
6054 | 6118 |
6055 COMPILE_ASSERT(sizeof(TexParameteri) == 16, Sizeof_TexParameteri_is_not_16); | 6119 static_assert(sizeof(TexParameteri) == 16, |
6056 COMPILE_ASSERT(offsetof(TexParameteri, header) == 0, | 6120 "size of TexParameteri should be 16"); |
6057 OffsetOf_TexParameteri_header_not_0); | 6121 static_assert(offsetof(TexParameteri, header) == 0, |
6058 COMPILE_ASSERT(offsetof(TexParameteri, target) == 4, | 6122 "offset of TexParameteri header should be 0"); |
6059 OffsetOf_TexParameteri_target_not_4); | 6123 static_assert(offsetof(TexParameteri, target) == 4, |
6060 COMPILE_ASSERT(offsetof(TexParameteri, pname) == 8, | 6124 "offset of TexParameteri target should be 4"); |
6061 OffsetOf_TexParameteri_pname_not_8); | 6125 static_assert(offsetof(TexParameteri, pname) == 8, |
6062 COMPILE_ASSERT(offsetof(TexParameteri, param) == 12, | 6126 "offset of TexParameteri pname should be 8"); |
6063 OffsetOf_TexParameteri_param_not_12); | 6127 static_assert(offsetof(TexParameteri, param) == 12, |
| 6128 "offset of TexParameteri param should be 12"); |
6064 | 6129 |
6065 struct TexParameterivImmediate { | 6130 struct TexParameterivImmediate { |
6066 typedef TexParameterivImmediate ValueType; | 6131 typedef TexParameterivImmediate ValueType; |
6067 static const CommandId kCmdId = kTexParameterivImmediate; | 6132 static const CommandId kCmdId = kTexParameterivImmediate; |
6068 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6133 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6069 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6134 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6070 | 6135 |
6071 static uint32_t ComputeDataSize() { | 6136 static uint32_t ComputeDataSize() { |
6072 return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT | 6137 return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT |
6073 } | 6138 } |
(...skipping 16 matching lines...) Expand all Loading... |
6090 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params); | 6155 static_cast<ValueType*>(cmd)->Init(_target, _pname, _params); |
6091 const uint32_t size = ComputeSize(); | 6156 const uint32_t size = ComputeSize(); |
6092 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6157 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6093 } | 6158 } |
6094 | 6159 |
6095 gpu::CommandHeader header; | 6160 gpu::CommandHeader header; |
6096 uint32_t target; | 6161 uint32_t target; |
6097 uint32_t pname; | 6162 uint32_t pname; |
6098 }; | 6163 }; |
6099 | 6164 |
6100 COMPILE_ASSERT(sizeof(TexParameterivImmediate) == 12, | 6165 static_assert(sizeof(TexParameterivImmediate) == 12, |
6101 Sizeof_TexParameterivImmediate_is_not_12); | 6166 "size of TexParameterivImmediate should be 12"); |
6102 COMPILE_ASSERT(offsetof(TexParameterivImmediate, header) == 0, | 6167 static_assert(offsetof(TexParameterivImmediate, header) == 0, |
6103 OffsetOf_TexParameterivImmediate_header_not_0); | 6168 "offset of TexParameterivImmediate header should be 0"); |
6104 COMPILE_ASSERT(offsetof(TexParameterivImmediate, target) == 4, | 6169 static_assert(offsetof(TexParameterivImmediate, target) == 4, |
6105 OffsetOf_TexParameterivImmediate_target_not_4); | 6170 "offset of TexParameterivImmediate target should be 4"); |
6106 COMPILE_ASSERT(offsetof(TexParameterivImmediate, pname) == 8, | 6171 static_assert(offsetof(TexParameterivImmediate, pname) == 8, |
6107 OffsetOf_TexParameterivImmediate_pname_not_8); | 6172 "offset of TexParameterivImmediate pname should be 8"); |
6108 | 6173 |
6109 struct TexStorage3D { | 6174 struct TexStorage3D { |
6110 typedef TexStorage3D ValueType; | 6175 typedef TexStorage3D ValueType; |
6111 static const CommandId kCmdId = kTexStorage3D; | 6176 static const CommandId kCmdId = kTexStorage3D; |
6112 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6177 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6178 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6114 | 6179 |
6115 static uint32_t ComputeSize() { | 6180 static uint32_t ComputeSize() { |
6116 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6181 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6117 } | 6182 } |
(...skipping 29 matching lines...) Expand all Loading... |
6147 | 6212 |
6148 gpu::CommandHeader header; | 6213 gpu::CommandHeader header; |
6149 uint32_t target; | 6214 uint32_t target; |
6150 int32_t levels; | 6215 int32_t levels; |
6151 uint32_t internalFormat; | 6216 uint32_t internalFormat; |
6152 int32_t width; | 6217 int32_t width; |
6153 int32_t height; | 6218 int32_t height; |
6154 int32_t depth; | 6219 int32_t depth; |
6155 }; | 6220 }; |
6156 | 6221 |
6157 COMPILE_ASSERT(sizeof(TexStorage3D) == 28, Sizeof_TexStorage3D_is_not_28); | 6222 static_assert(sizeof(TexStorage3D) == 28, "size of TexStorage3D should be 28"); |
6158 COMPILE_ASSERT(offsetof(TexStorage3D, header) == 0, | 6223 static_assert(offsetof(TexStorage3D, header) == 0, |
6159 OffsetOf_TexStorage3D_header_not_0); | 6224 "offset of TexStorage3D header should be 0"); |
6160 COMPILE_ASSERT(offsetof(TexStorage3D, target) == 4, | 6225 static_assert(offsetof(TexStorage3D, target) == 4, |
6161 OffsetOf_TexStorage3D_target_not_4); | 6226 "offset of TexStorage3D target should be 4"); |
6162 COMPILE_ASSERT(offsetof(TexStorage3D, levels) == 8, | 6227 static_assert(offsetof(TexStorage3D, levels) == 8, |
6163 OffsetOf_TexStorage3D_levels_not_8); | 6228 "offset of TexStorage3D levels should be 8"); |
6164 COMPILE_ASSERT(offsetof(TexStorage3D, internalFormat) == 12, | 6229 static_assert(offsetof(TexStorage3D, internalFormat) == 12, |
6165 OffsetOf_TexStorage3D_internalFormat_not_12); | 6230 "offset of TexStorage3D internalFormat should be 12"); |
6166 COMPILE_ASSERT(offsetof(TexStorage3D, width) == 16, | 6231 static_assert(offsetof(TexStorage3D, width) == 16, |
6167 OffsetOf_TexStorage3D_width_not_16); | 6232 "offset of TexStorage3D width should be 16"); |
6168 COMPILE_ASSERT(offsetof(TexStorage3D, height) == 20, | 6233 static_assert(offsetof(TexStorage3D, height) == 20, |
6169 OffsetOf_TexStorage3D_height_not_20); | 6234 "offset of TexStorage3D height should be 20"); |
6170 COMPILE_ASSERT(offsetof(TexStorage3D, depth) == 24, | 6235 static_assert(offsetof(TexStorage3D, depth) == 24, |
6171 OffsetOf_TexStorage3D_depth_not_24); | 6236 "offset of TexStorage3D depth should be 24"); |
6172 | 6237 |
6173 struct TexSubImage2D { | 6238 struct TexSubImage2D { |
6174 typedef TexSubImage2D ValueType; | 6239 typedef TexSubImage2D ValueType; |
6175 static const CommandId kCmdId = kTexSubImage2D; | 6240 static const CommandId kCmdId = kTexSubImage2D; |
6176 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6241 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6177 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6242 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6178 | 6243 |
6179 static uint32_t ComputeSize() { | 6244 static uint32_t ComputeSize() { |
6180 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6245 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6181 } | 6246 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6232 int32_t yoffset; | 6297 int32_t yoffset; |
6233 int32_t width; | 6298 int32_t width; |
6234 int32_t height; | 6299 int32_t height; |
6235 uint32_t format; | 6300 uint32_t format; |
6236 uint32_t type; | 6301 uint32_t type; |
6237 uint32_t pixels_shm_id; | 6302 uint32_t pixels_shm_id; |
6238 uint32_t pixels_shm_offset; | 6303 uint32_t pixels_shm_offset; |
6239 uint32_t internal; | 6304 uint32_t internal; |
6240 }; | 6305 }; |
6241 | 6306 |
6242 COMPILE_ASSERT(sizeof(TexSubImage2D) == 48, Sizeof_TexSubImage2D_is_not_48); | 6307 static_assert(sizeof(TexSubImage2D) == 48, |
6243 COMPILE_ASSERT(offsetof(TexSubImage2D, header) == 0, | 6308 "size of TexSubImage2D should be 48"); |
6244 OffsetOf_TexSubImage2D_header_not_0); | 6309 static_assert(offsetof(TexSubImage2D, header) == 0, |
6245 COMPILE_ASSERT(offsetof(TexSubImage2D, target) == 4, | 6310 "offset of TexSubImage2D header should be 0"); |
6246 OffsetOf_TexSubImage2D_target_not_4); | 6311 static_assert(offsetof(TexSubImage2D, target) == 4, |
6247 COMPILE_ASSERT(offsetof(TexSubImage2D, level) == 8, | 6312 "offset of TexSubImage2D target should be 4"); |
6248 OffsetOf_TexSubImage2D_level_not_8); | 6313 static_assert(offsetof(TexSubImage2D, level) == 8, |
6249 COMPILE_ASSERT(offsetof(TexSubImage2D, xoffset) == 12, | 6314 "offset of TexSubImage2D level should be 8"); |
6250 OffsetOf_TexSubImage2D_xoffset_not_12); | 6315 static_assert(offsetof(TexSubImage2D, xoffset) == 12, |
6251 COMPILE_ASSERT(offsetof(TexSubImage2D, yoffset) == 16, | 6316 "offset of TexSubImage2D xoffset should be 12"); |
6252 OffsetOf_TexSubImage2D_yoffset_not_16); | 6317 static_assert(offsetof(TexSubImage2D, yoffset) == 16, |
6253 COMPILE_ASSERT(offsetof(TexSubImage2D, width) == 20, | 6318 "offset of TexSubImage2D yoffset should be 16"); |
6254 OffsetOf_TexSubImage2D_width_not_20); | 6319 static_assert(offsetof(TexSubImage2D, width) == 20, |
6255 COMPILE_ASSERT(offsetof(TexSubImage2D, height) == 24, | 6320 "offset of TexSubImage2D width should be 20"); |
6256 OffsetOf_TexSubImage2D_height_not_24); | 6321 static_assert(offsetof(TexSubImage2D, height) == 24, |
6257 COMPILE_ASSERT(offsetof(TexSubImage2D, format) == 28, | 6322 "offset of TexSubImage2D height should be 24"); |
6258 OffsetOf_TexSubImage2D_format_not_28); | 6323 static_assert(offsetof(TexSubImage2D, format) == 28, |
6259 COMPILE_ASSERT(offsetof(TexSubImage2D, type) == 32, | 6324 "offset of TexSubImage2D format should be 28"); |
6260 OffsetOf_TexSubImage2D_type_not_32); | 6325 static_assert(offsetof(TexSubImage2D, type) == 32, |
6261 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_id) == 36, | 6326 "offset of TexSubImage2D type should be 32"); |
6262 OffsetOf_TexSubImage2D_pixels_shm_id_not_36); | 6327 static_assert(offsetof(TexSubImage2D, pixels_shm_id) == 36, |
6263 COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40, | 6328 "offset of TexSubImage2D pixels_shm_id should be 36"); |
6264 OffsetOf_TexSubImage2D_pixels_shm_offset_not_40); | 6329 static_assert(offsetof(TexSubImage2D, pixels_shm_offset) == 40, |
6265 COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44, | 6330 "offset of TexSubImage2D pixels_shm_offset should be 40"); |
6266 OffsetOf_TexSubImage2D_internal_not_44); | 6331 static_assert(offsetof(TexSubImage2D, internal) == 44, |
| 6332 "offset of TexSubImage2D internal should be 44"); |
6267 | 6333 |
6268 struct Uniform1f { | 6334 struct Uniform1f { |
6269 typedef Uniform1f ValueType; | 6335 typedef Uniform1f ValueType; |
6270 static const CommandId kCmdId = kUniform1f; | 6336 static const CommandId kCmdId = kUniform1f; |
6271 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6337 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6272 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6338 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6273 | 6339 |
6274 static uint32_t ComputeSize() { | 6340 static uint32_t ComputeSize() { |
6275 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6341 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6276 } | 6342 } |
6277 | 6343 |
6278 void SetHeader() { header.SetCmd<ValueType>(); } | 6344 void SetHeader() { header.SetCmd<ValueType>(); } |
6279 | 6345 |
6280 void Init(GLint _location, GLfloat _x) { | 6346 void Init(GLint _location, GLfloat _x) { |
6281 SetHeader(); | 6347 SetHeader(); |
6282 location = _location; | 6348 location = _location; |
6283 x = _x; | 6349 x = _x; |
6284 } | 6350 } |
6285 | 6351 |
6286 void* Set(void* cmd, GLint _location, GLfloat _x) { | 6352 void* Set(void* cmd, GLint _location, GLfloat _x) { |
6287 static_cast<ValueType*>(cmd)->Init(_location, _x); | 6353 static_cast<ValueType*>(cmd)->Init(_location, _x); |
6288 return NextCmdAddress<ValueType>(cmd); | 6354 return NextCmdAddress<ValueType>(cmd); |
6289 } | 6355 } |
6290 | 6356 |
6291 gpu::CommandHeader header; | 6357 gpu::CommandHeader header; |
6292 int32_t location; | 6358 int32_t location; |
6293 float x; | 6359 float x; |
6294 }; | 6360 }; |
6295 | 6361 |
6296 COMPILE_ASSERT(sizeof(Uniform1f) == 12, Sizeof_Uniform1f_is_not_12); | 6362 static_assert(sizeof(Uniform1f) == 12, "size of Uniform1f should be 12"); |
6297 COMPILE_ASSERT(offsetof(Uniform1f, header) == 0, | 6363 static_assert(offsetof(Uniform1f, header) == 0, |
6298 OffsetOf_Uniform1f_header_not_0); | 6364 "offset of Uniform1f header should be 0"); |
6299 COMPILE_ASSERT(offsetof(Uniform1f, location) == 4, | 6365 static_assert(offsetof(Uniform1f, location) == 4, |
6300 OffsetOf_Uniform1f_location_not_4); | 6366 "offset of Uniform1f location should be 4"); |
6301 COMPILE_ASSERT(offsetof(Uniform1f, x) == 8, OffsetOf_Uniform1f_x_not_8); | 6367 static_assert(offsetof(Uniform1f, x) == 8, "offset of Uniform1f x should be 8"); |
6302 | 6368 |
6303 struct Uniform1fvImmediate { | 6369 struct Uniform1fvImmediate { |
6304 typedef Uniform1fvImmediate ValueType; | 6370 typedef Uniform1fvImmediate ValueType; |
6305 static const CommandId kCmdId = kUniform1fvImmediate; | 6371 static const CommandId kCmdId = kUniform1fvImmediate; |
6306 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6372 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6307 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6373 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6308 | 6374 |
6309 static uint32_t ComputeDataSize(GLsizei count) { | 6375 static uint32_t ComputeDataSize(GLsizei count) { |
6310 return static_cast<uint32_t>(sizeof(GLfloat) * 1 * count); // NOLINT | 6376 return static_cast<uint32_t>(sizeof(GLfloat) * 1 * count); // NOLINT |
6311 } | 6377 } |
(...skipping 18 matching lines...) Expand all Loading... |
6330 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6396 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6331 const uint32_t size = ComputeSize(_count); | 6397 const uint32_t size = ComputeSize(_count); |
6332 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6398 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6333 } | 6399 } |
6334 | 6400 |
6335 gpu::CommandHeader header; | 6401 gpu::CommandHeader header; |
6336 int32_t location; | 6402 int32_t location; |
6337 int32_t count; | 6403 int32_t count; |
6338 }; | 6404 }; |
6339 | 6405 |
6340 COMPILE_ASSERT(sizeof(Uniform1fvImmediate) == 12, | 6406 static_assert(sizeof(Uniform1fvImmediate) == 12, |
6341 Sizeof_Uniform1fvImmediate_is_not_12); | 6407 "size of Uniform1fvImmediate should be 12"); |
6342 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, header) == 0, | 6408 static_assert(offsetof(Uniform1fvImmediate, header) == 0, |
6343 OffsetOf_Uniform1fvImmediate_header_not_0); | 6409 "offset of Uniform1fvImmediate header should be 0"); |
6344 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, location) == 4, | 6410 static_assert(offsetof(Uniform1fvImmediate, location) == 4, |
6345 OffsetOf_Uniform1fvImmediate_location_not_4); | 6411 "offset of Uniform1fvImmediate location should be 4"); |
6346 COMPILE_ASSERT(offsetof(Uniform1fvImmediate, count) == 8, | 6412 static_assert(offsetof(Uniform1fvImmediate, count) == 8, |
6347 OffsetOf_Uniform1fvImmediate_count_not_8); | 6413 "offset of Uniform1fvImmediate count should be 8"); |
6348 | 6414 |
6349 struct Uniform1i { | 6415 struct Uniform1i { |
6350 typedef Uniform1i ValueType; | 6416 typedef Uniform1i ValueType; |
6351 static const CommandId kCmdId = kUniform1i; | 6417 static const CommandId kCmdId = kUniform1i; |
6352 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6418 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6353 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6419 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6354 | 6420 |
6355 static uint32_t ComputeSize() { | 6421 static uint32_t ComputeSize() { |
6356 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6422 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6357 } | 6423 } |
6358 | 6424 |
6359 void SetHeader() { header.SetCmd<ValueType>(); } | 6425 void SetHeader() { header.SetCmd<ValueType>(); } |
6360 | 6426 |
6361 void Init(GLint _location, GLint _x) { | 6427 void Init(GLint _location, GLint _x) { |
6362 SetHeader(); | 6428 SetHeader(); |
6363 location = _location; | 6429 location = _location; |
6364 x = _x; | 6430 x = _x; |
6365 } | 6431 } |
6366 | 6432 |
6367 void* Set(void* cmd, GLint _location, GLint _x) { | 6433 void* Set(void* cmd, GLint _location, GLint _x) { |
6368 static_cast<ValueType*>(cmd)->Init(_location, _x); | 6434 static_cast<ValueType*>(cmd)->Init(_location, _x); |
6369 return NextCmdAddress<ValueType>(cmd); | 6435 return NextCmdAddress<ValueType>(cmd); |
6370 } | 6436 } |
6371 | 6437 |
6372 gpu::CommandHeader header; | 6438 gpu::CommandHeader header; |
6373 int32_t location; | 6439 int32_t location; |
6374 int32_t x; | 6440 int32_t x; |
6375 }; | 6441 }; |
6376 | 6442 |
6377 COMPILE_ASSERT(sizeof(Uniform1i) == 12, Sizeof_Uniform1i_is_not_12); | 6443 static_assert(sizeof(Uniform1i) == 12, "size of Uniform1i should be 12"); |
6378 COMPILE_ASSERT(offsetof(Uniform1i, header) == 0, | 6444 static_assert(offsetof(Uniform1i, header) == 0, |
6379 OffsetOf_Uniform1i_header_not_0); | 6445 "offset of Uniform1i header should be 0"); |
6380 COMPILE_ASSERT(offsetof(Uniform1i, location) == 4, | 6446 static_assert(offsetof(Uniform1i, location) == 4, |
6381 OffsetOf_Uniform1i_location_not_4); | 6447 "offset of Uniform1i location should be 4"); |
6382 COMPILE_ASSERT(offsetof(Uniform1i, x) == 8, OffsetOf_Uniform1i_x_not_8); | 6448 static_assert(offsetof(Uniform1i, x) == 8, "offset of Uniform1i x should be 8"); |
6383 | 6449 |
6384 struct Uniform1ivImmediate { | 6450 struct Uniform1ivImmediate { |
6385 typedef Uniform1ivImmediate ValueType; | 6451 typedef Uniform1ivImmediate ValueType; |
6386 static const CommandId kCmdId = kUniform1ivImmediate; | 6452 static const CommandId kCmdId = kUniform1ivImmediate; |
6387 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6453 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6388 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6454 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6389 | 6455 |
6390 static uint32_t ComputeDataSize(GLsizei count) { | 6456 static uint32_t ComputeDataSize(GLsizei count) { |
6391 return static_cast<uint32_t>(sizeof(GLint) * 1 * count); // NOLINT | 6457 return static_cast<uint32_t>(sizeof(GLint) * 1 * count); // NOLINT |
6392 } | 6458 } |
(...skipping 18 matching lines...) Expand all Loading... |
6411 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6477 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6412 const uint32_t size = ComputeSize(_count); | 6478 const uint32_t size = ComputeSize(_count); |
6413 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6479 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6414 } | 6480 } |
6415 | 6481 |
6416 gpu::CommandHeader header; | 6482 gpu::CommandHeader header; |
6417 int32_t location; | 6483 int32_t location; |
6418 int32_t count; | 6484 int32_t count; |
6419 }; | 6485 }; |
6420 | 6486 |
6421 COMPILE_ASSERT(sizeof(Uniform1ivImmediate) == 12, | 6487 static_assert(sizeof(Uniform1ivImmediate) == 12, |
6422 Sizeof_Uniform1ivImmediate_is_not_12); | 6488 "size of Uniform1ivImmediate should be 12"); |
6423 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, header) == 0, | 6489 static_assert(offsetof(Uniform1ivImmediate, header) == 0, |
6424 OffsetOf_Uniform1ivImmediate_header_not_0); | 6490 "offset of Uniform1ivImmediate header should be 0"); |
6425 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, location) == 4, | 6491 static_assert(offsetof(Uniform1ivImmediate, location) == 4, |
6426 OffsetOf_Uniform1ivImmediate_location_not_4); | 6492 "offset of Uniform1ivImmediate location should be 4"); |
6427 COMPILE_ASSERT(offsetof(Uniform1ivImmediate, count) == 8, | 6493 static_assert(offsetof(Uniform1ivImmediate, count) == 8, |
6428 OffsetOf_Uniform1ivImmediate_count_not_8); | 6494 "offset of Uniform1ivImmediate count should be 8"); |
6429 | 6495 |
6430 struct Uniform1ui { | 6496 struct Uniform1ui { |
6431 typedef Uniform1ui ValueType; | 6497 typedef Uniform1ui ValueType; |
6432 static const CommandId kCmdId = kUniform1ui; | 6498 static const CommandId kCmdId = kUniform1ui; |
6433 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6499 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6434 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6500 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6435 | 6501 |
6436 static uint32_t ComputeSize() { | 6502 static uint32_t ComputeSize() { |
6437 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6503 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6438 } | 6504 } |
6439 | 6505 |
6440 void SetHeader() { header.SetCmd<ValueType>(); } | 6506 void SetHeader() { header.SetCmd<ValueType>(); } |
6441 | 6507 |
6442 void Init(GLint _location, GLuint _x) { | 6508 void Init(GLint _location, GLuint _x) { |
6443 SetHeader(); | 6509 SetHeader(); |
6444 location = _location; | 6510 location = _location; |
6445 x = _x; | 6511 x = _x; |
6446 } | 6512 } |
6447 | 6513 |
6448 void* Set(void* cmd, GLint _location, GLuint _x) { | 6514 void* Set(void* cmd, GLint _location, GLuint _x) { |
6449 static_cast<ValueType*>(cmd)->Init(_location, _x); | 6515 static_cast<ValueType*>(cmd)->Init(_location, _x); |
6450 return NextCmdAddress<ValueType>(cmd); | 6516 return NextCmdAddress<ValueType>(cmd); |
6451 } | 6517 } |
6452 | 6518 |
6453 gpu::CommandHeader header; | 6519 gpu::CommandHeader header; |
6454 int32_t location; | 6520 int32_t location; |
6455 uint32_t x; | 6521 uint32_t x; |
6456 }; | 6522 }; |
6457 | 6523 |
6458 COMPILE_ASSERT(sizeof(Uniform1ui) == 12, Sizeof_Uniform1ui_is_not_12); | 6524 static_assert(sizeof(Uniform1ui) == 12, "size of Uniform1ui should be 12"); |
6459 COMPILE_ASSERT(offsetof(Uniform1ui, header) == 0, | 6525 static_assert(offsetof(Uniform1ui, header) == 0, |
6460 OffsetOf_Uniform1ui_header_not_0); | 6526 "offset of Uniform1ui header should be 0"); |
6461 COMPILE_ASSERT(offsetof(Uniform1ui, location) == 4, | 6527 static_assert(offsetof(Uniform1ui, location) == 4, |
6462 OffsetOf_Uniform1ui_location_not_4); | 6528 "offset of Uniform1ui location should be 4"); |
6463 COMPILE_ASSERT(offsetof(Uniform1ui, x) == 8, OffsetOf_Uniform1ui_x_not_8); | 6529 static_assert(offsetof(Uniform1ui, x) == 8, |
| 6530 "offset of Uniform1ui x should be 8"); |
6464 | 6531 |
6465 struct Uniform1uivImmediate { | 6532 struct Uniform1uivImmediate { |
6466 typedef Uniform1uivImmediate ValueType; | 6533 typedef Uniform1uivImmediate ValueType; |
6467 static const CommandId kCmdId = kUniform1uivImmediate; | 6534 static const CommandId kCmdId = kUniform1uivImmediate; |
6468 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6535 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6469 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6536 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6470 | 6537 |
6471 static uint32_t ComputeDataSize(GLsizei count) { | 6538 static uint32_t ComputeDataSize(GLsizei count) { |
6472 return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT | 6539 return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT |
6473 } | 6540 } |
(...skipping 18 matching lines...) Expand all Loading... |
6492 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6559 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6493 const uint32_t size = ComputeSize(_count); | 6560 const uint32_t size = ComputeSize(_count); |
6494 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6561 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6495 } | 6562 } |
6496 | 6563 |
6497 gpu::CommandHeader header; | 6564 gpu::CommandHeader header; |
6498 int32_t location; | 6565 int32_t location; |
6499 int32_t count; | 6566 int32_t count; |
6500 }; | 6567 }; |
6501 | 6568 |
6502 COMPILE_ASSERT(sizeof(Uniform1uivImmediate) == 12, | 6569 static_assert(sizeof(Uniform1uivImmediate) == 12, |
6503 Sizeof_Uniform1uivImmediate_is_not_12); | 6570 "size of Uniform1uivImmediate should be 12"); |
6504 COMPILE_ASSERT(offsetof(Uniform1uivImmediate, header) == 0, | 6571 static_assert(offsetof(Uniform1uivImmediate, header) == 0, |
6505 OffsetOf_Uniform1uivImmediate_header_not_0); | 6572 "offset of Uniform1uivImmediate header should be 0"); |
6506 COMPILE_ASSERT(offsetof(Uniform1uivImmediate, location) == 4, | 6573 static_assert(offsetof(Uniform1uivImmediate, location) == 4, |
6507 OffsetOf_Uniform1uivImmediate_location_not_4); | 6574 "offset of Uniform1uivImmediate location should be 4"); |
6508 COMPILE_ASSERT(offsetof(Uniform1uivImmediate, count) == 8, | 6575 static_assert(offsetof(Uniform1uivImmediate, count) == 8, |
6509 OffsetOf_Uniform1uivImmediate_count_not_8); | 6576 "offset of Uniform1uivImmediate count should be 8"); |
6510 | 6577 |
6511 struct Uniform2f { | 6578 struct Uniform2f { |
6512 typedef Uniform2f ValueType; | 6579 typedef Uniform2f ValueType; |
6513 static const CommandId kCmdId = kUniform2f; | 6580 static const CommandId kCmdId = kUniform2f; |
6514 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6581 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6515 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6582 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6516 | 6583 |
6517 static uint32_t ComputeSize() { | 6584 static uint32_t ComputeSize() { |
6518 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6585 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6519 } | 6586 } |
(...skipping 11 matching lines...) Expand all Loading... |
6531 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); | 6598 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); |
6532 return NextCmdAddress<ValueType>(cmd); | 6599 return NextCmdAddress<ValueType>(cmd); |
6533 } | 6600 } |
6534 | 6601 |
6535 gpu::CommandHeader header; | 6602 gpu::CommandHeader header; |
6536 int32_t location; | 6603 int32_t location; |
6537 float x; | 6604 float x; |
6538 float y; | 6605 float y; |
6539 }; | 6606 }; |
6540 | 6607 |
6541 COMPILE_ASSERT(sizeof(Uniform2f) == 16, Sizeof_Uniform2f_is_not_16); | 6608 static_assert(sizeof(Uniform2f) == 16, "size of Uniform2f should be 16"); |
6542 COMPILE_ASSERT(offsetof(Uniform2f, header) == 0, | 6609 static_assert(offsetof(Uniform2f, header) == 0, |
6543 OffsetOf_Uniform2f_header_not_0); | 6610 "offset of Uniform2f header should be 0"); |
6544 COMPILE_ASSERT(offsetof(Uniform2f, location) == 4, | 6611 static_assert(offsetof(Uniform2f, location) == 4, |
6545 OffsetOf_Uniform2f_location_not_4); | 6612 "offset of Uniform2f location should be 4"); |
6546 COMPILE_ASSERT(offsetof(Uniform2f, x) == 8, OffsetOf_Uniform2f_x_not_8); | 6613 static_assert(offsetof(Uniform2f, x) == 8, "offset of Uniform2f x should be 8"); |
6547 COMPILE_ASSERT(offsetof(Uniform2f, y) == 12, OffsetOf_Uniform2f_y_not_12); | 6614 static_assert(offsetof(Uniform2f, y) == 12, |
| 6615 "offset of Uniform2f y should be 12"); |
6548 | 6616 |
6549 struct Uniform2fvImmediate { | 6617 struct Uniform2fvImmediate { |
6550 typedef Uniform2fvImmediate ValueType; | 6618 typedef Uniform2fvImmediate ValueType; |
6551 static const CommandId kCmdId = kUniform2fvImmediate; | 6619 static const CommandId kCmdId = kUniform2fvImmediate; |
6552 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6620 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6553 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6621 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6554 | 6622 |
6555 static uint32_t ComputeDataSize(GLsizei count) { | 6623 static uint32_t ComputeDataSize(GLsizei count) { |
6556 return static_cast<uint32_t>(sizeof(GLfloat) * 2 * count); // NOLINT | 6624 return static_cast<uint32_t>(sizeof(GLfloat) * 2 * count); // NOLINT |
6557 } | 6625 } |
(...skipping 18 matching lines...) Expand all Loading... |
6576 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6644 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6577 const uint32_t size = ComputeSize(_count); | 6645 const uint32_t size = ComputeSize(_count); |
6578 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6646 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6579 } | 6647 } |
6580 | 6648 |
6581 gpu::CommandHeader header; | 6649 gpu::CommandHeader header; |
6582 int32_t location; | 6650 int32_t location; |
6583 int32_t count; | 6651 int32_t count; |
6584 }; | 6652 }; |
6585 | 6653 |
6586 COMPILE_ASSERT(sizeof(Uniform2fvImmediate) == 12, | 6654 static_assert(sizeof(Uniform2fvImmediate) == 12, |
6587 Sizeof_Uniform2fvImmediate_is_not_12); | 6655 "size of Uniform2fvImmediate should be 12"); |
6588 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, header) == 0, | 6656 static_assert(offsetof(Uniform2fvImmediate, header) == 0, |
6589 OffsetOf_Uniform2fvImmediate_header_not_0); | 6657 "offset of Uniform2fvImmediate header should be 0"); |
6590 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, location) == 4, | 6658 static_assert(offsetof(Uniform2fvImmediate, location) == 4, |
6591 OffsetOf_Uniform2fvImmediate_location_not_4); | 6659 "offset of Uniform2fvImmediate location should be 4"); |
6592 COMPILE_ASSERT(offsetof(Uniform2fvImmediate, count) == 8, | 6660 static_assert(offsetof(Uniform2fvImmediate, count) == 8, |
6593 OffsetOf_Uniform2fvImmediate_count_not_8); | 6661 "offset of Uniform2fvImmediate count should be 8"); |
6594 | 6662 |
6595 struct Uniform2i { | 6663 struct Uniform2i { |
6596 typedef Uniform2i ValueType; | 6664 typedef Uniform2i ValueType; |
6597 static const CommandId kCmdId = kUniform2i; | 6665 static const CommandId kCmdId = kUniform2i; |
6598 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6666 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6599 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6667 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6600 | 6668 |
6601 static uint32_t ComputeSize() { | 6669 static uint32_t ComputeSize() { |
6602 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6670 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6603 } | 6671 } |
(...skipping 11 matching lines...) Expand all Loading... |
6615 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); | 6683 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); |
6616 return NextCmdAddress<ValueType>(cmd); | 6684 return NextCmdAddress<ValueType>(cmd); |
6617 } | 6685 } |
6618 | 6686 |
6619 gpu::CommandHeader header; | 6687 gpu::CommandHeader header; |
6620 int32_t location; | 6688 int32_t location; |
6621 int32_t x; | 6689 int32_t x; |
6622 int32_t y; | 6690 int32_t y; |
6623 }; | 6691 }; |
6624 | 6692 |
6625 COMPILE_ASSERT(sizeof(Uniform2i) == 16, Sizeof_Uniform2i_is_not_16); | 6693 static_assert(sizeof(Uniform2i) == 16, "size of Uniform2i should be 16"); |
6626 COMPILE_ASSERT(offsetof(Uniform2i, header) == 0, | 6694 static_assert(offsetof(Uniform2i, header) == 0, |
6627 OffsetOf_Uniform2i_header_not_0); | 6695 "offset of Uniform2i header should be 0"); |
6628 COMPILE_ASSERT(offsetof(Uniform2i, location) == 4, | 6696 static_assert(offsetof(Uniform2i, location) == 4, |
6629 OffsetOf_Uniform2i_location_not_4); | 6697 "offset of Uniform2i location should be 4"); |
6630 COMPILE_ASSERT(offsetof(Uniform2i, x) == 8, OffsetOf_Uniform2i_x_not_8); | 6698 static_assert(offsetof(Uniform2i, x) == 8, "offset of Uniform2i x should be 8"); |
6631 COMPILE_ASSERT(offsetof(Uniform2i, y) == 12, OffsetOf_Uniform2i_y_not_12); | 6699 static_assert(offsetof(Uniform2i, y) == 12, |
| 6700 "offset of Uniform2i y should be 12"); |
6632 | 6701 |
6633 struct Uniform2ivImmediate { | 6702 struct Uniform2ivImmediate { |
6634 typedef Uniform2ivImmediate ValueType; | 6703 typedef Uniform2ivImmediate ValueType; |
6635 static const CommandId kCmdId = kUniform2ivImmediate; | 6704 static const CommandId kCmdId = kUniform2ivImmediate; |
6636 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6705 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6637 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6706 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6638 | 6707 |
6639 static uint32_t ComputeDataSize(GLsizei count) { | 6708 static uint32_t ComputeDataSize(GLsizei count) { |
6640 return static_cast<uint32_t>(sizeof(GLint) * 2 * count); // NOLINT | 6709 return static_cast<uint32_t>(sizeof(GLint) * 2 * count); // NOLINT |
6641 } | 6710 } |
(...skipping 18 matching lines...) Expand all Loading... |
6660 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6729 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6661 const uint32_t size = ComputeSize(_count); | 6730 const uint32_t size = ComputeSize(_count); |
6662 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6731 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6663 } | 6732 } |
6664 | 6733 |
6665 gpu::CommandHeader header; | 6734 gpu::CommandHeader header; |
6666 int32_t location; | 6735 int32_t location; |
6667 int32_t count; | 6736 int32_t count; |
6668 }; | 6737 }; |
6669 | 6738 |
6670 COMPILE_ASSERT(sizeof(Uniform2ivImmediate) == 12, | 6739 static_assert(sizeof(Uniform2ivImmediate) == 12, |
6671 Sizeof_Uniform2ivImmediate_is_not_12); | 6740 "size of Uniform2ivImmediate should be 12"); |
6672 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, header) == 0, | 6741 static_assert(offsetof(Uniform2ivImmediate, header) == 0, |
6673 OffsetOf_Uniform2ivImmediate_header_not_0); | 6742 "offset of Uniform2ivImmediate header should be 0"); |
6674 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, location) == 4, | 6743 static_assert(offsetof(Uniform2ivImmediate, location) == 4, |
6675 OffsetOf_Uniform2ivImmediate_location_not_4); | 6744 "offset of Uniform2ivImmediate location should be 4"); |
6676 COMPILE_ASSERT(offsetof(Uniform2ivImmediate, count) == 8, | 6745 static_assert(offsetof(Uniform2ivImmediate, count) == 8, |
6677 OffsetOf_Uniform2ivImmediate_count_not_8); | 6746 "offset of Uniform2ivImmediate count should be 8"); |
6678 | 6747 |
6679 struct Uniform2ui { | 6748 struct Uniform2ui { |
6680 typedef Uniform2ui ValueType; | 6749 typedef Uniform2ui ValueType; |
6681 static const CommandId kCmdId = kUniform2ui; | 6750 static const CommandId kCmdId = kUniform2ui; |
6682 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6751 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6683 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6752 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6684 | 6753 |
6685 static uint32_t ComputeSize() { | 6754 static uint32_t ComputeSize() { |
6686 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6755 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6687 } | 6756 } |
(...skipping 11 matching lines...) Expand all Loading... |
6699 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); | 6768 static_cast<ValueType*>(cmd)->Init(_location, _x, _y); |
6700 return NextCmdAddress<ValueType>(cmd); | 6769 return NextCmdAddress<ValueType>(cmd); |
6701 } | 6770 } |
6702 | 6771 |
6703 gpu::CommandHeader header; | 6772 gpu::CommandHeader header; |
6704 int32_t location; | 6773 int32_t location; |
6705 uint32_t x; | 6774 uint32_t x; |
6706 uint32_t y; | 6775 uint32_t y; |
6707 }; | 6776 }; |
6708 | 6777 |
6709 COMPILE_ASSERT(sizeof(Uniform2ui) == 16, Sizeof_Uniform2ui_is_not_16); | 6778 static_assert(sizeof(Uniform2ui) == 16, "size of Uniform2ui should be 16"); |
6710 COMPILE_ASSERT(offsetof(Uniform2ui, header) == 0, | 6779 static_assert(offsetof(Uniform2ui, header) == 0, |
6711 OffsetOf_Uniform2ui_header_not_0); | 6780 "offset of Uniform2ui header should be 0"); |
6712 COMPILE_ASSERT(offsetof(Uniform2ui, location) == 4, | 6781 static_assert(offsetof(Uniform2ui, location) == 4, |
6713 OffsetOf_Uniform2ui_location_not_4); | 6782 "offset of Uniform2ui location should be 4"); |
6714 COMPILE_ASSERT(offsetof(Uniform2ui, x) == 8, OffsetOf_Uniform2ui_x_not_8); | 6783 static_assert(offsetof(Uniform2ui, x) == 8, |
6715 COMPILE_ASSERT(offsetof(Uniform2ui, y) == 12, OffsetOf_Uniform2ui_y_not_12); | 6784 "offset of Uniform2ui x should be 8"); |
| 6785 static_assert(offsetof(Uniform2ui, y) == 12, |
| 6786 "offset of Uniform2ui y should be 12"); |
6716 | 6787 |
6717 struct Uniform2uivImmediate { | 6788 struct Uniform2uivImmediate { |
6718 typedef Uniform2uivImmediate ValueType; | 6789 typedef Uniform2uivImmediate ValueType; |
6719 static const CommandId kCmdId = kUniform2uivImmediate; | 6790 static const CommandId kCmdId = kUniform2uivImmediate; |
6720 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6791 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6721 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6792 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6722 | 6793 |
6723 static uint32_t ComputeDataSize(GLsizei count) { | 6794 static uint32_t ComputeDataSize(GLsizei count) { |
6724 return static_cast<uint32_t>(sizeof(GLuint) * 2 * count); // NOLINT | 6795 return static_cast<uint32_t>(sizeof(GLuint) * 2 * count); // NOLINT |
6725 } | 6796 } |
(...skipping 18 matching lines...) Expand all Loading... |
6744 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6815 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6745 const uint32_t size = ComputeSize(_count); | 6816 const uint32_t size = ComputeSize(_count); |
6746 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6817 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6747 } | 6818 } |
6748 | 6819 |
6749 gpu::CommandHeader header; | 6820 gpu::CommandHeader header; |
6750 int32_t location; | 6821 int32_t location; |
6751 int32_t count; | 6822 int32_t count; |
6752 }; | 6823 }; |
6753 | 6824 |
6754 COMPILE_ASSERT(sizeof(Uniform2uivImmediate) == 12, | 6825 static_assert(sizeof(Uniform2uivImmediate) == 12, |
6755 Sizeof_Uniform2uivImmediate_is_not_12); | 6826 "size of Uniform2uivImmediate should be 12"); |
6756 COMPILE_ASSERT(offsetof(Uniform2uivImmediate, header) == 0, | 6827 static_assert(offsetof(Uniform2uivImmediate, header) == 0, |
6757 OffsetOf_Uniform2uivImmediate_header_not_0); | 6828 "offset of Uniform2uivImmediate header should be 0"); |
6758 COMPILE_ASSERT(offsetof(Uniform2uivImmediate, location) == 4, | 6829 static_assert(offsetof(Uniform2uivImmediate, location) == 4, |
6759 OffsetOf_Uniform2uivImmediate_location_not_4); | 6830 "offset of Uniform2uivImmediate location should be 4"); |
6760 COMPILE_ASSERT(offsetof(Uniform2uivImmediate, count) == 8, | 6831 static_assert(offsetof(Uniform2uivImmediate, count) == 8, |
6761 OffsetOf_Uniform2uivImmediate_count_not_8); | 6832 "offset of Uniform2uivImmediate count should be 8"); |
6762 | 6833 |
6763 struct Uniform3f { | 6834 struct Uniform3f { |
6764 typedef Uniform3f ValueType; | 6835 typedef Uniform3f ValueType; |
6765 static const CommandId kCmdId = kUniform3f; | 6836 static const CommandId kCmdId = kUniform3f; |
6766 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6837 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6767 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6838 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6768 | 6839 |
6769 static uint32_t ComputeSize() { | 6840 static uint32_t ComputeSize() { |
6770 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6841 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6771 } | 6842 } |
(...skipping 13 matching lines...) Expand all Loading... |
6785 return NextCmdAddress<ValueType>(cmd); | 6856 return NextCmdAddress<ValueType>(cmd); |
6786 } | 6857 } |
6787 | 6858 |
6788 gpu::CommandHeader header; | 6859 gpu::CommandHeader header; |
6789 int32_t location; | 6860 int32_t location; |
6790 float x; | 6861 float x; |
6791 float y; | 6862 float y; |
6792 float z; | 6863 float z; |
6793 }; | 6864 }; |
6794 | 6865 |
6795 COMPILE_ASSERT(sizeof(Uniform3f) == 20, Sizeof_Uniform3f_is_not_20); | 6866 static_assert(sizeof(Uniform3f) == 20, "size of Uniform3f should be 20"); |
6796 COMPILE_ASSERT(offsetof(Uniform3f, header) == 0, | 6867 static_assert(offsetof(Uniform3f, header) == 0, |
6797 OffsetOf_Uniform3f_header_not_0); | 6868 "offset of Uniform3f header should be 0"); |
6798 COMPILE_ASSERT(offsetof(Uniform3f, location) == 4, | 6869 static_assert(offsetof(Uniform3f, location) == 4, |
6799 OffsetOf_Uniform3f_location_not_4); | 6870 "offset of Uniform3f location should be 4"); |
6800 COMPILE_ASSERT(offsetof(Uniform3f, x) == 8, OffsetOf_Uniform3f_x_not_8); | 6871 static_assert(offsetof(Uniform3f, x) == 8, "offset of Uniform3f x should be 8"); |
6801 COMPILE_ASSERT(offsetof(Uniform3f, y) == 12, OffsetOf_Uniform3f_y_not_12); | 6872 static_assert(offsetof(Uniform3f, y) == 12, |
6802 COMPILE_ASSERT(offsetof(Uniform3f, z) == 16, OffsetOf_Uniform3f_z_not_16); | 6873 "offset of Uniform3f y should be 12"); |
| 6874 static_assert(offsetof(Uniform3f, z) == 16, |
| 6875 "offset of Uniform3f z should be 16"); |
6803 | 6876 |
6804 struct Uniform3fvImmediate { | 6877 struct Uniform3fvImmediate { |
6805 typedef Uniform3fvImmediate ValueType; | 6878 typedef Uniform3fvImmediate ValueType; |
6806 static const CommandId kCmdId = kUniform3fvImmediate; | 6879 static const CommandId kCmdId = kUniform3fvImmediate; |
6807 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6880 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6808 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6881 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6809 | 6882 |
6810 static uint32_t ComputeDataSize(GLsizei count) { | 6883 static uint32_t ComputeDataSize(GLsizei count) { |
6811 return static_cast<uint32_t>(sizeof(GLfloat) * 3 * count); // NOLINT | 6884 return static_cast<uint32_t>(sizeof(GLfloat) * 3 * count); // NOLINT |
6812 } | 6885 } |
(...skipping 18 matching lines...) Expand all Loading... |
6831 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6904 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6832 const uint32_t size = ComputeSize(_count); | 6905 const uint32_t size = ComputeSize(_count); |
6833 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6906 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6834 } | 6907 } |
6835 | 6908 |
6836 gpu::CommandHeader header; | 6909 gpu::CommandHeader header; |
6837 int32_t location; | 6910 int32_t location; |
6838 int32_t count; | 6911 int32_t count; |
6839 }; | 6912 }; |
6840 | 6913 |
6841 COMPILE_ASSERT(sizeof(Uniform3fvImmediate) == 12, | 6914 static_assert(sizeof(Uniform3fvImmediate) == 12, |
6842 Sizeof_Uniform3fvImmediate_is_not_12); | 6915 "size of Uniform3fvImmediate should be 12"); |
6843 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, header) == 0, | 6916 static_assert(offsetof(Uniform3fvImmediate, header) == 0, |
6844 OffsetOf_Uniform3fvImmediate_header_not_0); | 6917 "offset of Uniform3fvImmediate header should be 0"); |
6845 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, location) == 4, | 6918 static_assert(offsetof(Uniform3fvImmediate, location) == 4, |
6846 OffsetOf_Uniform3fvImmediate_location_not_4); | 6919 "offset of Uniform3fvImmediate location should be 4"); |
6847 COMPILE_ASSERT(offsetof(Uniform3fvImmediate, count) == 8, | 6920 static_assert(offsetof(Uniform3fvImmediate, count) == 8, |
6848 OffsetOf_Uniform3fvImmediate_count_not_8); | 6921 "offset of Uniform3fvImmediate count should be 8"); |
6849 | 6922 |
6850 struct Uniform3i { | 6923 struct Uniform3i { |
6851 typedef Uniform3i ValueType; | 6924 typedef Uniform3i ValueType; |
6852 static const CommandId kCmdId = kUniform3i; | 6925 static const CommandId kCmdId = kUniform3i; |
6853 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 6926 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6854 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6927 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6855 | 6928 |
6856 static uint32_t ComputeSize() { | 6929 static uint32_t ComputeSize() { |
6857 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 6930 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6858 } | 6931 } |
(...skipping 13 matching lines...) Expand all Loading... |
6872 return NextCmdAddress<ValueType>(cmd); | 6945 return NextCmdAddress<ValueType>(cmd); |
6873 } | 6946 } |
6874 | 6947 |
6875 gpu::CommandHeader header; | 6948 gpu::CommandHeader header; |
6876 int32_t location; | 6949 int32_t location; |
6877 int32_t x; | 6950 int32_t x; |
6878 int32_t y; | 6951 int32_t y; |
6879 int32_t z; | 6952 int32_t z; |
6880 }; | 6953 }; |
6881 | 6954 |
6882 COMPILE_ASSERT(sizeof(Uniform3i) == 20, Sizeof_Uniform3i_is_not_20); | 6955 static_assert(sizeof(Uniform3i) == 20, "size of Uniform3i should be 20"); |
6883 COMPILE_ASSERT(offsetof(Uniform3i, header) == 0, | 6956 static_assert(offsetof(Uniform3i, header) == 0, |
6884 OffsetOf_Uniform3i_header_not_0); | 6957 "offset of Uniform3i header should be 0"); |
6885 COMPILE_ASSERT(offsetof(Uniform3i, location) == 4, | 6958 static_assert(offsetof(Uniform3i, location) == 4, |
6886 OffsetOf_Uniform3i_location_not_4); | 6959 "offset of Uniform3i location should be 4"); |
6887 COMPILE_ASSERT(offsetof(Uniform3i, x) == 8, OffsetOf_Uniform3i_x_not_8); | 6960 static_assert(offsetof(Uniform3i, x) == 8, "offset of Uniform3i x should be 8"); |
6888 COMPILE_ASSERT(offsetof(Uniform3i, y) == 12, OffsetOf_Uniform3i_y_not_12); | 6961 static_assert(offsetof(Uniform3i, y) == 12, |
6889 COMPILE_ASSERT(offsetof(Uniform3i, z) == 16, OffsetOf_Uniform3i_z_not_16); | 6962 "offset of Uniform3i y should be 12"); |
| 6963 static_assert(offsetof(Uniform3i, z) == 16, |
| 6964 "offset of Uniform3i z should be 16"); |
6890 | 6965 |
6891 struct Uniform3ivImmediate { | 6966 struct Uniform3ivImmediate { |
6892 typedef Uniform3ivImmediate ValueType; | 6967 typedef Uniform3ivImmediate ValueType; |
6893 static const CommandId kCmdId = kUniform3ivImmediate; | 6968 static const CommandId kCmdId = kUniform3ivImmediate; |
6894 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 6969 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6895 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 6970 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6896 | 6971 |
6897 static uint32_t ComputeDataSize(GLsizei count) { | 6972 static uint32_t ComputeDataSize(GLsizei count) { |
6898 return static_cast<uint32_t>(sizeof(GLint) * 3 * count); // NOLINT | 6973 return static_cast<uint32_t>(sizeof(GLint) * 3 * count); // NOLINT |
6899 } | 6974 } |
(...skipping 18 matching lines...) Expand all Loading... |
6918 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 6993 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
6919 const uint32_t size = ComputeSize(_count); | 6994 const uint32_t size = ComputeSize(_count); |
6920 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 6995 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
6921 } | 6996 } |
6922 | 6997 |
6923 gpu::CommandHeader header; | 6998 gpu::CommandHeader header; |
6924 int32_t location; | 6999 int32_t location; |
6925 int32_t count; | 7000 int32_t count; |
6926 }; | 7001 }; |
6927 | 7002 |
6928 COMPILE_ASSERT(sizeof(Uniform3ivImmediate) == 12, | 7003 static_assert(sizeof(Uniform3ivImmediate) == 12, |
6929 Sizeof_Uniform3ivImmediate_is_not_12); | 7004 "size of Uniform3ivImmediate should be 12"); |
6930 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, header) == 0, | 7005 static_assert(offsetof(Uniform3ivImmediate, header) == 0, |
6931 OffsetOf_Uniform3ivImmediate_header_not_0); | 7006 "offset of Uniform3ivImmediate header should be 0"); |
6932 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, location) == 4, | 7007 static_assert(offsetof(Uniform3ivImmediate, location) == 4, |
6933 OffsetOf_Uniform3ivImmediate_location_not_4); | 7008 "offset of Uniform3ivImmediate location should be 4"); |
6934 COMPILE_ASSERT(offsetof(Uniform3ivImmediate, count) == 8, | 7009 static_assert(offsetof(Uniform3ivImmediate, count) == 8, |
6935 OffsetOf_Uniform3ivImmediate_count_not_8); | 7010 "offset of Uniform3ivImmediate count should be 8"); |
6936 | 7011 |
6937 struct Uniform3ui { | 7012 struct Uniform3ui { |
6938 typedef Uniform3ui ValueType; | 7013 typedef Uniform3ui ValueType; |
6939 static const CommandId kCmdId = kUniform3ui; | 7014 static const CommandId kCmdId = kUniform3ui; |
6940 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7015 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
6941 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7016 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6942 | 7017 |
6943 static uint32_t ComputeSize() { | 7018 static uint32_t ComputeSize() { |
6944 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7019 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
6945 } | 7020 } |
(...skipping 13 matching lines...) Expand all Loading... |
6959 return NextCmdAddress<ValueType>(cmd); | 7034 return NextCmdAddress<ValueType>(cmd); |
6960 } | 7035 } |
6961 | 7036 |
6962 gpu::CommandHeader header; | 7037 gpu::CommandHeader header; |
6963 int32_t location; | 7038 int32_t location; |
6964 uint32_t x; | 7039 uint32_t x; |
6965 uint32_t y; | 7040 uint32_t y; |
6966 uint32_t z; | 7041 uint32_t z; |
6967 }; | 7042 }; |
6968 | 7043 |
6969 COMPILE_ASSERT(sizeof(Uniform3ui) == 20, Sizeof_Uniform3ui_is_not_20); | 7044 static_assert(sizeof(Uniform3ui) == 20, "size of Uniform3ui should be 20"); |
6970 COMPILE_ASSERT(offsetof(Uniform3ui, header) == 0, | 7045 static_assert(offsetof(Uniform3ui, header) == 0, |
6971 OffsetOf_Uniform3ui_header_not_0); | 7046 "offset of Uniform3ui header should be 0"); |
6972 COMPILE_ASSERT(offsetof(Uniform3ui, location) == 4, | 7047 static_assert(offsetof(Uniform3ui, location) == 4, |
6973 OffsetOf_Uniform3ui_location_not_4); | 7048 "offset of Uniform3ui location should be 4"); |
6974 COMPILE_ASSERT(offsetof(Uniform3ui, x) == 8, OffsetOf_Uniform3ui_x_not_8); | 7049 static_assert(offsetof(Uniform3ui, x) == 8, |
6975 COMPILE_ASSERT(offsetof(Uniform3ui, y) == 12, OffsetOf_Uniform3ui_y_not_12); | 7050 "offset of Uniform3ui x should be 8"); |
6976 COMPILE_ASSERT(offsetof(Uniform3ui, z) == 16, OffsetOf_Uniform3ui_z_not_16); | 7051 static_assert(offsetof(Uniform3ui, y) == 12, |
| 7052 "offset of Uniform3ui y should be 12"); |
| 7053 static_assert(offsetof(Uniform3ui, z) == 16, |
| 7054 "offset of Uniform3ui z should be 16"); |
6977 | 7055 |
6978 struct Uniform3uivImmediate { | 7056 struct Uniform3uivImmediate { |
6979 typedef Uniform3uivImmediate ValueType; | 7057 typedef Uniform3uivImmediate ValueType; |
6980 static const CommandId kCmdId = kUniform3uivImmediate; | 7058 static const CommandId kCmdId = kUniform3uivImmediate; |
6981 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7059 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
6982 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7060 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
6983 | 7061 |
6984 static uint32_t ComputeDataSize(GLsizei count) { | 7062 static uint32_t ComputeDataSize(GLsizei count) { |
6985 return static_cast<uint32_t>(sizeof(GLuint) * 3 * count); // NOLINT | 7063 return static_cast<uint32_t>(sizeof(GLuint) * 3 * count); // NOLINT |
6986 } | 7064 } |
(...skipping 18 matching lines...) Expand all Loading... |
7005 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 7083 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
7006 const uint32_t size = ComputeSize(_count); | 7084 const uint32_t size = ComputeSize(_count); |
7007 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7085 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7008 } | 7086 } |
7009 | 7087 |
7010 gpu::CommandHeader header; | 7088 gpu::CommandHeader header; |
7011 int32_t location; | 7089 int32_t location; |
7012 int32_t count; | 7090 int32_t count; |
7013 }; | 7091 }; |
7014 | 7092 |
7015 COMPILE_ASSERT(sizeof(Uniform3uivImmediate) == 12, | 7093 static_assert(sizeof(Uniform3uivImmediate) == 12, |
7016 Sizeof_Uniform3uivImmediate_is_not_12); | 7094 "size of Uniform3uivImmediate should be 12"); |
7017 COMPILE_ASSERT(offsetof(Uniform3uivImmediate, header) == 0, | 7095 static_assert(offsetof(Uniform3uivImmediate, header) == 0, |
7018 OffsetOf_Uniform3uivImmediate_header_not_0); | 7096 "offset of Uniform3uivImmediate header should be 0"); |
7019 COMPILE_ASSERT(offsetof(Uniform3uivImmediate, location) == 4, | 7097 static_assert(offsetof(Uniform3uivImmediate, location) == 4, |
7020 OffsetOf_Uniform3uivImmediate_location_not_4); | 7098 "offset of Uniform3uivImmediate location should be 4"); |
7021 COMPILE_ASSERT(offsetof(Uniform3uivImmediate, count) == 8, | 7099 static_assert(offsetof(Uniform3uivImmediate, count) == 8, |
7022 OffsetOf_Uniform3uivImmediate_count_not_8); | 7100 "offset of Uniform3uivImmediate count should be 8"); |
7023 | 7101 |
7024 struct Uniform4f { | 7102 struct Uniform4f { |
7025 typedef Uniform4f ValueType; | 7103 typedef Uniform4f ValueType; |
7026 static const CommandId kCmdId = kUniform4f; | 7104 static const CommandId kCmdId = kUniform4f; |
7027 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7105 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7028 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7106 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7029 | 7107 |
7030 static uint32_t ComputeSize() { | 7108 static uint32_t ComputeSize() { |
7031 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7109 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7032 } | 7110 } |
(...skipping 20 matching lines...) Expand all Loading... |
7053 } | 7131 } |
7054 | 7132 |
7055 gpu::CommandHeader header; | 7133 gpu::CommandHeader header; |
7056 int32_t location; | 7134 int32_t location; |
7057 float x; | 7135 float x; |
7058 float y; | 7136 float y; |
7059 float z; | 7137 float z; |
7060 float w; | 7138 float w; |
7061 }; | 7139 }; |
7062 | 7140 |
7063 COMPILE_ASSERT(sizeof(Uniform4f) == 24, Sizeof_Uniform4f_is_not_24); | 7141 static_assert(sizeof(Uniform4f) == 24, "size of Uniform4f should be 24"); |
7064 COMPILE_ASSERT(offsetof(Uniform4f, header) == 0, | 7142 static_assert(offsetof(Uniform4f, header) == 0, |
7065 OffsetOf_Uniform4f_header_not_0); | 7143 "offset of Uniform4f header should be 0"); |
7066 COMPILE_ASSERT(offsetof(Uniform4f, location) == 4, | 7144 static_assert(offsetof(Uniform4f, location) == 4, |
7067 OffsetOf_Uniform4f_location_not_4); | 7145 "offset of Uniform4f location should be 4"); |
7068 COMPILE_ASSERT(offsetof(Uniform4f, x) == 8, OffsetOf_Uniform4f_x_not_8); | 7146 static_assert(offsetof(Uniform4f, x) == 8, "offset of Uniform4f x should be 8"); |
7069 COMPILE_ASSERT(offsetof(Uniform4f, y) == 12, OffsetOf_Uniform4f_y_not_12); | 7147 static_assert(offsetof(Uniform4f, y) == 12, |
7070 COMPILE_ASSERT(offsetof(Uniform4f, z) == 16, OffsetOf_Uniform4f_z_not_16); | 7148 "offset of Uniform4f y should be 12"); |
7071 COMPILE_ASSERT(offsetof(Uniform4f, w) == 20, OffsetOf_Uniform4f_w_not_20); | 7149 static_assert(offsetof(Uniform4f, z) == 16, |
| 7150 "offset of Uniform4f z should be 16"); |
| 7151 static_assert(offsetof(Uniform4f, w) == 20, |
| 7152 "offset of Uniform4f w should be 20"); |
7072 | 7153 |
7073 struct Uniform4fvImmediate { | 7154 struct Uniform4fvImmediate { |
7074 typedef Uniform4fvImmediate ValueType; | 7155 typedef Uniform4fvImmediate ValueType; |
7075 static const CommandId kCmdId = kUniform4fvImmediate; | 7156 static const CommandId kCmdId = kUniform4fvImmediate; |
7076 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7157 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7077 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7158 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7078 | 7159 |
7079 static uint32_t ComputeDataSize(GLsizei count) { | 7160 static uint32_t ComputeDataSize(GLsizei count) { |
7080 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT | 7161 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT |
7081 } | 7162 } |
(...skipping 18 matching lines...) Expand all Loading... |
7100 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 7181 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
7101 const uint32_t size = ComputeSize(_count); | 7182 const uint32_t size = ComputeSize(_count); |
7102 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7183 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7103 } | 7184 } |
7104 | 7185 |
7105 gpu::CommandHeader header; | 7186 gpu::CommandHeader header; |
7106 int32_t location; | 7187 int32_t location; |
7107 int32_t count; | 7188 int32_t count; |
7108 }; | 7189 }; |
7109 | 7190 |
7110 COMPILE_ASSERT(sizeof(Uniform4fvImmediate) == 12, | 7191 static_assert(sizeof(Uniform4fvImmediate) == 12, |
7111 Sizeof_Uniform4fvImmediate_is_not_12); | 7192 "size of Uniform4fvImmediate should be 12"); |
7112 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, header) == 0, | 7193 static_assert(offsetof(Uniform4fvImmediate, header) == 0, |
7113 OffsetOf_Uniform4fvImmediate_header_not_0); | 7194 "offset of Uniform4fvImmediate header should be 0"); |
7114 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, location) == 4, | 7195 static_assert(offsetof(Uniform4fvImmediate, location) == 4, |
7115 OffsetOf_Uniform4fvImmediate_location_not_4); | 7196 "offset of Uniform4fvImmediate location should be 4"); |
7116 COMPILE_ASSERT(offsetof(Uniform4fvImmediate, count) == 8, | 7197 static_assert(offsetof(Uniform4fvImmediate, count) == 8, |
7117 OffsetOf_Uniform4fvImmediate_count_not_8); | 7198 "offset of Uniform4fvImmediate count should be 8"); |
7118 | 7199 |
7119 struct Uniform4i { | 7200 struct Uniform4i { |
7120 typedef Uniform4i ValueType; | 7201 typedef Uniform4i ValueType; |
7121 static const CommandId kCmdId = kUniform4i; | 7202 static const CommandId kCmdId = kUniform4i; |
7122 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7203 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7123 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7204 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7124 | 7205 |
7125 static uint32_t ComputeSize() { | 7206 static uint32_t ComputeSize() { |
7126 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7207 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7127 } | 7208 } |
(...skipping 20 matching lines...) Expand all Loading... |
7148 } | 7229 } |
7149 | 7230 |
7150 gpu::CommandHeader header; | 7231 gpu::CommandHeader header; |
7151 int32_t location; | 7232 int32_t location; |
7152 int32_t x; | 7233 int32_t x; |
7153 int32_t y; | 7234 int32_t y; |
7154 int32_t z; | 7235 int32_t z; |
7155 int32_t w; | 7236 int32_t w; |
7156 }; | 7237 }; |
7157 | 7238 |
7158 COMPILE_ASSERT(sizeof(Uniform4i) == 24, Sizeof_Uniform4i_is_not_24); | 7239 static_assert(sizeof(Uniform4i) == 24, "size of Uniform4i should be 24"); |
7159 COMPILE_ASSERT(offsetof(Uniform4i, header) == 0, | 7240 static_assert(offsetof(Uniform4i, header) == 0, |
7160 OffsetOf_Uniform4i_header_not_0); | 7241 "offset of Uniform4i header should be 0"); |
7161 COMPILE_ASSERT(offsetof(Uniform4i, location) == 4, | 7242 static_assert(offsetof(Uniform4i, location) == 4, |
7162 OffsetOf_Uniform4i_location_not_4); | 7243 "offset of Uniform4i location should be 4"); |
7163 COMPILE_ASSERT(offsetof(Uniform4i, x) == 8, OffsetOf_Uniform4i_x_not_8); | 7244 static_assert(offsetof(Uniform4i, x) == 8, "offset of Uniform4i x should be 8"); |
7164 COMPILE_ASSERT(offsetof(Uniform4i, y) == 12, OffsetOf_Uniform4i_y_not_12); | 7245 static_assert(offsetof(Uniform4i, y) == 12, |
7165 COMPILE_ASSERT(offsetof(Uniform4i, z) == 16, OffsetOf_Uniform4i_z_not_16); | 7246 "offset of Uniform4i y should be 12"); |
7166 COMPILE_ASSERT(offsetof(Uniform4i, w) == 20, OffsetOf_Uniform4i_w_not_20); | 7247 static_assert(offsetof(Uniform4i, z) == 16, |
| 7248 "offset of Uniform4i z should be 16"); |
| 7249 static_assert(offsetof(Uniform4i, w) == 20, |
| 7250 "offset of Uniform4i w should be 20"); |
7167 | 7251 |
7168 struct Uniform4ivImmediate { | 7252 struct Uniform4ivImmediate { |
7169 typedef Uniform4ivImmediate ValueType; | 7253 typedef Uniform4ivImmediate ValueType; |
7170 static const CommandId kCmdId = kUniform4ivImmediate; | 7254 static const CommandId kCmdId = kUniform4ivImmediate; |
7171 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7255 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7172 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7256 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7173 | 7257 |
7174 static uint32_t ComputeDataSize(GLsizei count) { | 7258 static uint32_t ComputeDataSize(GLsizei count) { |
7175 return static_cast<uint32_t>(sizeof(GLint) * 4 * count); // NOLINT | 7259 return static_cast<uint32_t>(sizeof(GLint) * 4 * count); // NOLINT |
7176 } | 7260 } |
(...skipping 18 matching lines...) Expand all Loading... |
7195 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 7279 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
7196 const uint32_t size = ComputeSize(_count); | 7280 const uint32_t size = ComputeSize(_count); |
7197 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7281 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7198 } | 7282 } |
7199 | 7283 |
7200 gpu::CommandHeader header; | 7284 gpu::CommandHeader header; |
7201 int32_t location; | 7285 int32_t location; |
7202 int32_t count; | 7286 int32_t count; |
7203 }; | 7287 }; |
7204 | 7288 |
7205 COMPILE_ASSERT(sizeof(Uniform4ivImmediate) == 12, | 7289 static_assert(sizeof(Uniform4ivImmediate) == 12, |
7206 Sizeof_Uniform4ivImmediate_is_not_12); | 7290 "size of Uniform4ivImmediate should be 12"); |
7207 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, header) == 0, | 7291 static_assert(offsetof(Uniform4ivImmediate, header) == 0, |
7208 OffsetOf_Uniform4ivImmediate_header_not_0); | 7292 "offset of Uniform4ivImmediate header should be 0"); |
7209 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, location) == 4, | 7293 static_assert(offsetof(Uniform4ivImmediate, location) == 4, |
7210 OffsetOf_Uniform4ivImmediate_location_not_4); | 7294 "offset of Uniform4ivImmediate location should be 4"); |
7211 COMPILE_ASSERT(offsetof(Uniform4ivImmediate, count) == 8, | 7295 static_assert(offsetof(Uniform4ivImmediate, count) == 8, |
7212 OffsetOf_Uniform4ivImmediate_count_not_8); | 7296 "offset of Uniform4ivImmediate count should be 8"); |
7213 | 7297 |
7214 struct Uniform4ui { | 7298 struct Uniform4ui { |
7215 typedef Uniform4ui ValueType; | 7299 typedef Uniform4ui ValueType; |
7216 static const CommandId kCmdId = kUniform4ui; | 7300 static const CommandId kCmdId = kUniform4ui; |
7217 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7301 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7218 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7302 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7219 | 7303 |
7220 static uint32_t ComputeSize() { | 7304 static uint32_t ComputeSize() { |
7221 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7305 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7222 } | 7306 } |
(...skipping 20 matching lines...) Expand all Loading... |
7243 } | 7327 } |
7244 | 7328 |
7245 gpu::CommandHeader header; | 7329 gpu::CommandHeader header; |
7246 int32_t location; | 7330 int32_t location; |
7247 uint32_t x; | 7331 uint32_t x; |
7248 uint32_t y; | 7332 uint32_t y; |
7249 uint32_t z; | 7333 uint32_t z; |
7250 uint32_t w; | 7334 uint32_t w; |
7251 }; | 7335 }; |
7252 | 7336 |
7253 COMPILE_ASSERT(sizeof(Uniform4ui) == 24, Sizeof_Uniform4ui_is_not_24); | 7337 static_assert(sizeof(Uniform4ui) == 24, "size of Uniform4ui should be 24"); |
7254 COMPILE_ASSERT(offsetof(Uniform4ui, header) == 0, | 7338 static_assert(offsetof(Uniform4ui, header) == 0, |
7255 OffsetOf_Uniform4ui_header_not_0); | 7339 "offset of Uniform4ui header should be 0"); |
7256 COMPILE_ASSERT(offsetof(Uniform4ui, location) == 4, | 7340 static_assert(offsetof(Uniform4ui, location) == 4, |
7257 OffsetOf_Uniform4ui_location_not_4); | 7341 "offset of Uniform4ui location should be 4"); |
7258 COMPILE_ASSERT(offsetof(Uniform4ui, x) == 8, OffsetOf_Uniform4ui_x_not_8); | 7342 static_assert(offsetof(Uniform4ui, x) == 8, |
7259 COMPILE_ASSERT(offsetof(Uniform4ui, y) == 12, OffsetOf_Uniform4ui_y_not_12); | 7343 "offset of Uniform4ui x should be 8"); |
7260 COMPILE_ASSERT(offsetof(Uniform4ui, z) == 16, OffsetOf_Uniform4ui_z_not_16); | 7344 static_assert(offsetof(Uniform4ui, y) == 12, |
7261 COMPILE_ASSERT(offsetof(Uniform4ui, w) == 20, OffsetOf_Uniform4ui_w_not_20); | 7345 "offset of Uniform4ui y should be 12"); |
| 7346 static_assert(offsetof(Uniform4ui, z) == 16, |
| 7347 "offset of Uniform4ui z should be 16"); |
| 7348 static_assert(offsetof(Uniform4ui, w) == 20, |
| 7349 "offset of Uniform4ui w should be 20"); |
7262 | 7350 |
7263 struct Uniform4uivImmediate { | 7351 struct Uniform4uivImmediate { |
7264 typedef Uniform4uivImmediate ValueType; | 7352 typedef Uniform4uivImmediate ValueType; |
7265 static const CommandId kCmdId = kUniform4uivImmediate; | 7353 static const CommandId kCmdId = kUniform4uivImmediate; |
7266 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7354 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7267 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7355 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7268 | 7356 |
7269 static uint32_t ComputeDataSize(GLsizei count) { | 7357 static uint32_t ComputeDataSize(GLsizei count) { |
7270 return static_cast<uint32_t>(sizeof(GLuint) * 4 * count); // NOLINT | 7358 return static_cast<uint32_t>(sizeof(GLuint) * 4 * count); // NOLINT |
7271 } | 7359 } |
(...skipping 18 matching lines...) Expand all Loading... |
7290 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); | 7378 static_cast<ValueType*>(cmd)->Init(_location, _count, _v); |
7291 const uint32_t size = ComputeSize(_count); | 7379 const uint32_t size = ComputeSize(_count); |
7292 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7380 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7293 } | 7381 } |
7294 | 7382 |
7295 gpu::CommandHeader header; | 7383 gpu::CommandHeader header; |
7296 int32_t location; | 7384 int32_t location; |
7297 int32_t count; | 7385 int32_t count; |
7298 }; | 7386 }; |
7299 | 7387 |
7300 COMPILE_ASSERT(sizeof(Uniform4uivImmediate) == 12, | 7388 static_assert(sizeof(Uniform4uivImmediate) == 12, |
7301 Sizeof_Uniform4uivImmediate_is_not_12); | 7389 "size of Uniform4uivImmediate should be 12"); |
7302 COMPILE_ASSERT(offsetof(Uniform4uivImmediate, header) == 0, | 7390 static_assert(offsetof(Uniform4uivImmediate, header) == 0, |
7303 OffsetOf_Uniform4uivImmediate_header_not_0); | 7391 "offset of Uniform4uivImmediate header should be 0"); |
7304 COMPILE_ASSERT(offsetof(Uniform4uivImmediate, location) == 4, | 7392 static_assert(offsetof(Uniform4uivImmediate, location) == 4, |
7305 OffsetOf_Uniform4uivImmediate_location_not_4); | 7393 "offset of Uniform4uivImmediate location should be 4"); |
7306 COMPILE_ASSERT(offsetof(Uniform4uivImmediate, count) == 8, | 7394 static_assert(offsetof(Uniform4uivImmediate, count) == 8, |
7307 OffsetOf_Uniform4uivImmediate_count_not_8); | 7395 "offset of Uniform4uivImmediate count should be 8"); |
7308 | 7396 |
7309 struct UniformMatrix2fvImmediate { | 7397 struct UniformMatrix2fvImmediate { |
7310 typedef UniformMatrix2fvImmediate ValueType; | 7398 typedef UniformMatrix2fvImmediate ValueType; |
7311 static const CommandId kCmdId = kUniformMatrix2fvImmediate; | 7399 static const CommandId kCmdId = kUniformMatrix2fvImmediate; |
7312 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7400 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7313 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7401 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7314 | 7402 |
7315 static uint32_t ComputeDataSize(GLsizei count) { | 7403 static uint32_t ComputeDataSize(GLsizei count) { |
7316 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT | 7404 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT |
7317 } | 7405 } |
(...skipping 19 matching lines...) Expand all Loading... |
7337 const uint32_t size = ComputeSize(_count); | 7425 const uint32_t size = ComputeSize(_count); |
7338 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7426 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7339 } | 7427 } |
7340 | 7428 |
7341 gpu::CommandHeader header; | 7429 gpu::CommandHeader header; |
7342 int32_t location; | 7430 int32_t location; |
7343 int32_t count; | 7431 int32_t count; |
7344 static const uint32_t transpose = false; | 7432 static const uint32_t transpose = false; |
7345 }; | 7433 }; |
7346 | 7434 |
7347 COMPILE_ASSERT(sizeof(UniformMatrix2fvImmediate) == 12, | 7435 static_assert(sizeof(UniformMatrix2fvImmediate) == 12, |
7348 Sizeof_UniformMatrix2fvImmediate_is_not_12); | 7436 "size of UniformMatrix2fvImmediate should be 12"); |
7349 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, header) == 0, | 7437 static_assert(offsetof(UniformMatrix2fvImmediate, header) == 0, |
7350 OffsetOf_UniformMatrix2fvImmediate_header_not_0); | 7438 "offset of UniformMatrix2fvImmediate header should be 0"); |
7351 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, location) == 4, | 7439 static_assert(offsetof(UniformMatrix2fvImmediate, location) == 4, |
7352 OffsetOf_UniformMatrix2fvImmediate_location_not_4); | 7440 "offset of UniformMatrix2fvImmediate location should be 4"); |
7353 COMPILE_ASSERT(offsetof(UniformMatrix2fvImmediate, count) == 8, | 7441 static_assert(offsetof(UniformMatrix2fvImmediate, count) == 8, |
7354 OffsetOf_UniformMatrix2fvImmediate_count_not_8); | 7442 "offset of UniformMatrix2fvImmediate count should be 8"); |
7355 | 7443 |
7356 struct UniformMatrix2x3fvImmediate { | 7444 struct UniformMatrix2x3fvImmediate { |
7357 typedef UniformMatrix2x3fvImmediate ValueType; | 7445 typedef UniformMatrix2x3fvImmediate ValueType; |
7358 static const CommandId kCmdId = kUniformMatrix2x3fvImmediate; | 7446 static const CommandId kCmdId = kUniformMatrix2x3fvImmediate; |
7359 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7447 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7360 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7448 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7361 | 7449 |
7362 static uint32_t ComputeDataSize(GLsizei count) { | 7450 static uint32_t ComputeDataSize(GLsizei count) { |
7363 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT | 7451 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT |
7364 } | 7452 } |
(...skipping 19 matching lines...) Expand all Loading... |
7384 const uint32_t size = ComputeSize(_count); | 7472 const uint32_t size = ComputeSize(_count); |
7385 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7473 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7386 } | 7474 } |
7387 | 7475 |
7388 gpu::CommandHeader header; | 7476 gpu::CommandHeader header; |
7389 int32_t location; | 7477 int32_t location; |
7390 int32_t count; | 7478 int32_t count; |
7391 static const uint32_t transpose = false; | 7479 static const uint32_t transpose = false; |
7392 }; | 7480 }; |
7393 | 7481 |
7394 COMPILE_ASSERT(sizeof(UniformMatrix2x3fvImmediate) == 12, | 7482 static_assert(sizeof(UniformMatrix2x3fvImmediate) == 12, |
7395 Sizeof_UniformMatrix2x3fvImmediate_is_not_12); | 7483 "size of UniformMatrix2x3fvImmediate should be 12"); |
7396 COMPILE_ASSERT(offsetof(UniformMatrix2x3fvImmediate, header) == 0, | 7484 static_assert(offsetof(UniformMatrix2x3fvImmediate, header) == 0, |
7397 OffsetOf_UniformMatrix2x3fvImmediate_header_not_0); | 7485 "offset of UniformMatrix2x3fvImmediate header should be 0"); |
7398 COMPILE_ASSERT(offsetof(UniformMatrix2x3fvImmediate, location) == 4, | 7486 static_assert(offsetof(UniformMatrix2x3fvImmediate, location) == 4, |
7399 OffsetOf_UniformMatrix2x3fvImmediate_location_not_4); | 7487 "offset of UniformMatrix2x3fvImmediate location should be 4"); |
7400 COMPILE_ASSERT(offsetof(UniformMatrix2x3fvImmediate, count) == 8, | 7488 static_assert(offsetof(UniformMatrix2x3fvImmediate, count) == 8, |
7401 OffsetOf_UniformMatrix2x3fvImmediate_count_not_8); | 7489 "offset of UniformMatrix2x3fvImmediate count should be 8"); |
7402 | 7490 |
7403 struct UniformMatrix2x4fvImmediate { | 7491 struct UniformMatrix2x4fvImmediate { |
7404 typedef UniformMatrix2x4fvImmediate ValueType; | 7492 typedef UniformMatrix2x4fvImmediate ValueType; |
7405 static const CommandId kCmdId = kUniformMatrix2x4fvImmediate; | 7493 static const CommandId kCmdId = kUniformMatrix2x4fvImmediate; |
7406 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7494 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7407 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7495 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7408 | 7496 |
7409 static uint32_t ComputeDataSize(GLsizei count) { | 7497 static uint32_t ComputeDataSize(GLsizei count) { |
7410 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT | 7498 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT |
7411 } | 7499 } |
(...skipping 19 matching lines...) Expand all Loading... |
7431 const uint32_t size = ComputeSize(_count); | 7519 const uint32_t size = ComputeSize(_count); |
7432 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7520 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7433 } | 7521 } |
7434 | 7522 |
7435 gpu::CommandHeader header; | 7523 gpu::CommandHeader header; |
7436 int32_t location; | 7524 int32_t location; |
7437 int32_t count; | 7525 int32_t count; |
7438 static const uint32_t transpose = false; | 7526 static const uint32_t transpose = false; |
7439 }; | 7527 }; |
7440 | 7528 |
7441 COMPILE_ASSERT(sizeof(UniformMatrix2x4fvImmediate) == 12, | 7529 static_assert(sizeof(UniformMatrix2x4fvImmediate) == 12, |
7442 Sizeof_UniformMatrix2x4fvImmediate_is_not_12); | 7530 "size of UniformMatrix2x4fvImmediate should be 12"); |
7443 COMPILE_ASSERT(offsetof(UniformMatrix2x4fvImmediate, header) == 0, | 7531 static_assert(offsetof(UniformMatrix2x4fvImmediate, header) == 0, |
7444 OffsetOf_UniformMatrix2x4fvImmediate_header_not_0); | 7532 "offset of UniformMatrix2x4fvImmediate header should be 0"); |
7445 COMPILE_ASSERT(offsetof(UniformMatrix2x4fvImmediate, location) == 4, | 7533 static_assert(offsetof(UniformMatrix2x4fvImmediate, location) == 4, |
7446 OffsetOf_UniformMatrix2x4fvImmediate_location_not_4); | 7534 "offset of UniformMatrix2x4fvImmediate location should be 4"); |
7447 COMPILE_ASSERT(offsetof(UniformMatrix2x4fvImmediate, count) == 8, | 7535 static_assert(offsetof(UniformMatrix2x4fvImmediate, count) == 8, |
7448 OffsetOf_UniformMatrix2x4fvImmediate_count_not_8); | 7536 "offset of UniformMatrix2x4fvImmediate count should be 8"); |
7449 | 7537 |
7450 struct UniformMatrix3fvImmediate { | 7538 struct UniformMatrix3fvImmediate { |
7451 typedef UniformMatrix3fvImmediate ValueType; | 7539 typedef UniformMatrix3fvImmediate ValueType; |
7452 static const CommandId kCmdId = kUniformMatrix3fvImmediate; | 7540 static const CommandId kCmdId = kUniformMatrix3fvImmediate; |
7453 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7541 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7454 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7542 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7455 | 7543 |
7456 static uint32_t ComputeDataSize(GLsizei count) { | 7544 static uint32_t ComputeDataSize(GLsizei count) { |
7457 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT | 7545 return static_cast<uint32_t>(sizeof(GLfloat) * 9 * count); // NOLINT |
7458 } | 7546 } |
(...skipping 19 matching lines...) Expand all Loading... |
7478 const uint32_t size = ComputeSize(_count); | 7566 const uint32_t size = ComputeSize(_count); |
7479 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7567 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7480 } | 7568 } |
7481 | 7569 |
7482 gpu::CommandHeader header; | 7570 gpu::CommandHeader header; |
7483 int32_t location; | 7571 int32_t location; |
7484 int32_t count; | 7572 int32_t count; |
7485 static const uint32_t transpose = false; | 7573 static const uint32_t transpose = false; |
7486 }; | 7574 }; |
7487 | 7575 |
7488 COMPILE_ASSERT(sizeof(UniformMatrix3fvImmediate) == 12, | 7576 static_assert(sizeof(UniformMatrix3fvImmediate) == 12, |
7489 Sizeof_UniformMatrix3fvImmediate_is_not_12); | 7577 "size of UniformMatrix3fvImmediate should be 12"); |
7490 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, header) == 0, | 7578 static_assert(offsetof(UniformMatrix3fvImmediate, header) == 0, |
7491 OffsetOf_UniformMatrix3fvImmediate_header_not_0); | 7579 "offset of UniformMatrix3fvImmediate header should be 0"); |
7492 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, location) == 4, | 7580 static_assert(offsetof(UniformMatrix3fvImmediate, location) == 4, |
7493 OffsetOf_UniformMatrix3fvImmediate_location_not_4); | 7581 "offset of UniformMatrix3fvImmediate location should be 4"); |
7494 COMPILE_ASSERT(offsetof(UniformMatrix3fvImmediate, count) == 8, | 7582 static_assert(offsetof(UniformMatrix3fvImmediate, count) == 8, |
7495 OffsetOf_UniformMatrix3fvImmediate_count_not_8); | 7583 "offset of UniformMatrix3fvImmediate count should be 8"); |
7496 | 7584 |
7497 struct UniformMatrix3x2fvImmediate { | 7585 struct UniformMatrix3x2fvImmediate { |
7498 typedef UniformMatrix3x2fvImmediate ValueType; | 7586 typedef UniformMatrix3x2fvImmediate ValueType; |
7499 static const CommandId kCmdId = kUniformMatrix3x2fvImmediate; | 7587 static const CommandId kCmdId = kUniformMatrix3x2fvImmediate; |
7500 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7588 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7501 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7589 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7502 | 7590 |
7503 static uint32_t ComputeDataSize(GLsizei count) { | 7591 static uint32_t ComputeDataSize(GLsizei count) { |
7504 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT | 7592 return static_cast<uint32_t>(sizeof(GLfloat) * 6 * count); // NOLINT |
7505 } | 7593 } |
(...skipping 19 matching lines...) Expand all Loading... |
7525 const uint32_t size = ComputeSize(_count); | 7613 const uint32_t size = ComputeSize(_count); |
7526 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7614 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7527 } | 7615 } |
7528 | 7616 |
7529 gpu::CommandHeader header; | 7617 gpu::CommandHeader header; |
7530 int32_t location; | 7618 int32_t location; |
7531 int32_t count; | 7619 int32_t count; |
7532 static const uint32_t transpose = false; | 7620 static const uint32_t transpose = false; |
7533 }; | 7621 }; |
7534 | 7622 |
7535 COMPILE_ASSERT(sizeof(UniformMatrix3x2fvImmediate) == 12, | 7623 static_assert(sizeof(UniformMatrix3x2fvImmediate) == 12, |
7536 Sizeof_UniformMatrix3x2fvImmediate_is_not_12); | 7624 "size of UniformMatrix3x2fvImmediate should be 12"); |
7537 COMPILE_ASSERT(offsetof(UniformMatrix3x2fvImmediate, header) == 0, | 7625 static_assert(offsetof(UniformMatrix3x2fvImmediate, header) == 0, |
7538 OffsetOf_UniformMatrix3x2fvImmediate_header_not_0); | 7626 "offset of UniformMatrix3x2fvImmediate header should be 0"); |
7539 COMPILE_ASSERT(offsetof(UniformMatrix3x2fvImmediate, location) == 4, | 7627 static_assert(offsetof(UniformMatrix3x2fvImmediate, location) == 4, |
7540 OffsetOf_UniformMatrix3x2fvImmediate_location_not_4); | 7628 "offset of UniformMatrix3x2fvImmediate location should be 4"); |
7541 COMPILE_ASSERT(offsetof(UniformMatrix3x2fvImmediate, count) == 8, | 7629 static_assert(offsetof(UniformMatrix3x2fvImmediate, count) == 8, |
7542 OffsetOf_UniformMatrix3x2fvImmediate_count_not_8); | 7630 "offset of UniformMatrix3x2fvImmediate count should be 8"); |
7543 | 7631 |
7544 struct UniformMatrix3x4fvImmediate { | 7632 struct UniformMatrix3x4fvImmediate { |
7545 typedef UniformMatrix3x4fvImmediate ValueType; | 7633 typedef UniformMatrix3x4fvImmediate ValueType; |
7546 static const CommandId kCmdId = kUniformMatrix3x4fvImmediate; | 7634 static const CommandId kCmdId = kUniformMatrix3x4fvImmediate; |
7547 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7635 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7548 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7636 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7549 | 7637 |
7550 static uint32_t ComputeDataSize(GLsizei count) { | 7638 static uint32_t ComputeDataSize(GLsizei count) { |
7551 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT | 7639 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT |
7552 } | 7640 } |
(...skipping 19 matching lines...) Expand all Loading... |
7572 const uint32_t size = ComputeSize(_count); | 7660 const uint32_t size = ComputeSize(_count); |
7573 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7661 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7574 } | 7662 } |
7575 | 7663 |
7576 gpu::CommandHeader header; | 7664 gpu::CommandHeader header; |
7577 int32_t location; | 7665 int32_t location; |
7578 int32_t count; | 7666 int32_t count; |
7579 static const uint32_t transpose = false; | 7667 static const uint32_t transpose = false; |
7580 }; | 7668 }; |
7581 | 7669 |
7582 COMPILE_ASSERT(sizeof(UniformMatrix3x4fvImmediate) == 12, | 7670 static_assert(sizeof(UniformMatrix3x4fvImmediate) == 12, |
7583 Sizeof_UniformMatrix3x4fvImmediate_is_not_12); | 7671 "size of UniformMatrix3x4fvImmediate should be 12"); |
7584 COMPILE_ASSERT(offsetof(UniformMatrix3x4fvImmediate, header) == 0, | 7672 static_assert(offsetof(UniformMatrix3x4fvImmediate, header) == 0, |
7585 OffsetOf_UniformMatrix3x4fvImmediate_header_not_0); | 7673 "offset of UniformMatrix3x4fvImmediate header should be 0"); |
7586 COMPILE_ASSERT(offsetof(UniformMatrix3x4fvImmediate, location) == 4, | 7674 static_assert(offsetof(UniformMatrix3x4fvImmediate, location) == 4, |
7587 OffsetOf_UniformMatrix3x4fvImmediate_location_not_4); | 7675 "offset of UniformMatrix3x4fvImmediate location should be 4"); |
7588 COMPILE_ASSERT(offsetof(UniformMatrix3x4fvImmediate, count) == 8, | 7676 static_assert(offsetof(UniformMatrix3x4fvImmediate, count) == 8, |
7589 OffsetOf_UniformMatrix3x4fvImmediate_count_not_8); | 7677 "offset of UniformMatrix3x4fvImmediate count should be 8"); |
7590 | 7678 |
7591 struct UniformMatrix4fvImmediate { | 7679 struct UniformMatrix4fvImmediate { |
7592 typedef UniformMatrix4fvImmediate ValueType; | 7680 typedef UniformMatrix4fvImmediate ValueType; |
7593 static const CommandId kCmdId = kUniformMatrix4fvImmediate; | 7681 static const CommandId kCmdId = kUniformMatrix4fvImmediate; |
7594 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7682 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7595 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7683 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7596 | 7684 |
7597 static uint32_t ComputeDataSize(GLsizei count) { | 7685 static uint32_t ComputeDataSize(GLsizei count) { |
7598 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT | 7686 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT |
7599 } | 7687 } |
(...skipping 19 matching lines...) Expand all Loading... |
7619 const uint32_t size = ComputeSize(_count); | 7707 const uint32_t size = ComputeSize(_count); |
7620 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7708 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7621 } | 7709 } |
7622 | 7710 |
7623 gpu::CommandHeader header; | 7711 gpu::CommandHeader header; |
7624 int32_t location; | 7712 int32_t location; |
7625 int32_t count; | 7713 int32_t count; |
7626 static const uint32_t transpose = false; | 7714 static const uint32_t transpose = false; |
7627 }; | 7715 }; |
7628 | 7716 |
7629 COMPILE_ASSERT(sizeof(UniformMatrix4fvImmediate) == 12, | 7717 static_assert(sizeof(UniformMatrix4fvImmediate) == 12, |
7630 Sizeof_UniformMatrix4fvImmediate_is_not_12); | 7718 "size of UniformMatrix4fvImmediate should be 12"); |
7631 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, header) == 0, | 7719 static_assert(offsetof(UniformMatrix4fvImmediate, header) == 0, |
7632 OffsetOf_UniformMatrix4fvImmediate_header_not_0); | 7720 "offset of UniformMatrix4fvImmediate header should be 0"); |
7633 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, location) == 4, | 7721 static_assert(offsetof(UniformMatrix4fvImmediate, location) == 4, |
7634 OffsetOf_UniformMatrix4fvImmediate_location_not_4); | 7722 "offset of UniformMatrix4fvImmediate location should be 4"); |
7635 COMPILE_ASSERT(offsetof(UniformMatrix4fvImmediate, count) == 8, | 7723 static_assert(offsetof(UniformMatrix4fvImmediate, count) == 8, |
7636 OffsetOf_UniformMatrix4fvImmediate_count_not_8); | 7724 "offset of UniformMatrix4fvImmediate count should be 8"); |
7637 | 7725 |
7638 struct UniformMatrix4x2fvImmediate { | 7726 struct UniformMatrix4x2fvImmediate { |
7639 typedef UniformMatrix4x2fvImmediate ValueType; | 7727 typedef UniformMatrix4x2fvImmediate ValueType; |
7640 static const CommandId kCmdId = kUniformMatrix4x2fvImmediate; | 7728 static const CommandId kCmdId = kUniformMatrix4x2fvImmediate; |
7641 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7729 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7642 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7730 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7643 | 7731 |
7644 static uint32_t ComputeDataSize(GLsizei count) { | 7732 static uint32_t ComputeDataSize(GLsizei count) { |
7645 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT | 7733 return static_cast<uint32_t>(sizeof(GLfloat) * 8 * count); // NOLINT |
7646 } | 7734 } |
(...skipping 19 matching lines...) Expand all Loading... |
7666 const uint32_t size = ComputeSize(_count); | 7754 const uint32_t size = ComputeSize(_count); |
7667 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7755 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7668 } | 7756 } |
7669 | 7757 |
7670 gpu::CommandHeader header; | 7758 gpu::CommandHeader header; |
7671 int32_t location; | 7759 int32_t location; |
7672 int32_t count; | 7760 int32_t count; |
7673 static const uint32_t transpose = false; | 7761 static const uint32_t transpose = false; |
7674 }; | 7762 }; |
7675 | 7763 |
7676 COMPILE_ASSERT(sizeof(UniformMatrix4x2fvImmediate) == 12, | 7764 static_assert(sizeof(UniformMatrix4x2fvImmediate) == 12, |
7677 Sizeof_UniformMatrix4x2fvImmediate_is_not_12); | 7765 "size of UniformMatrix4x2fvImmediate should be 12"); |
7678 COMPILE_ASSERT(offsetof(UniformMatrix4x2fvImmediate, header) == 0, | 7766 static_assert(offsetof(UniformMatrix4x2fvImmediate, header) == 0, |
7679 OffsetOf_UniformMatrix4x2fvImmediate_header_not_0); | 7767 "offset of UniformMatrix4x2fvImmediate header should be 0"); |
7680 COMPILE_ASSERT(offsetof(UniformMatrix4x2fvImmediate, location) == 4, | 7768 static_assert(offsetof(UniformMatrix4x2fvImmediate, location) == 4, |
7681 OffsetOf_UniformMatrix4x2fvImmediate_location_not_4); | 7769 "offset of UniformMatrix4x2fvImmediate location should be 4"); |
7682 COMPILE_ASSERT(offsetof(UniformMatrix4x2fvImmediate, count) == 8, | 7770 static_assert(offsetof(UniformMatrix4x2fvImmediate, count) == 8, |
7683 OffsetOf_UniformMatrix4x2fvImmediate_count_not_8); | 7771 "offset of UniformMatrix4x2fvImmediate count should be 8"); |
7684 | 7772 |
7685 struct UniformMatrix4x3fvImmediate { | 7773 struct UniformMatrix4x3fvImmediate { |
7686 typedef UniformMatrix4x3fvImmediate ValueType; | 7774 typedef UniformMatrix4x3fvImmediate ValueType; |
7687 static const CommandId kCmdId = kUniformMatrix4x3fvImmediate; | 7775 static const CommandId kCmdId = kUniformMatrix4x3fvImmediate; |
7688 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7776 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7689 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7777 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7690 | 7778 |
7691 static uint32_t ComputeDataSize(GLsizei count) { | 7779 static uint32_t ComputeDataSize(GLsizei count) { |
7692 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT | 7780 return static_cast<uint32_t>(sizeof(GLfloat) * 12 * count); // NOLINT |
7693 } | 7781 } |
(...skipping 19 matching lines...) Expand all Loading... |
7713 const uint32_t size = ComputeSize(_count); | 7801 const uint32_t size = ComputeSize(_count); |
7714 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7802 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7715 } | 7803 } |
7716 | 7804 |
7717 gpu::CommandHeader header; | 7805 gpu::CommandHeader header; |
7718 int32_t location; | 7806 int32_t location; |
7719 int32_t count; | 7807 int32_t count; |
7720 static const uint32_t transpose = false; | 7808 static const uint32_t transpose = false; |
7721 }; | 7809 }; |
7722 | 7810 |
7723 COMPILE_ASSERT(sizeof(UniformMatrix4x3fvImmediate) == 12, | 7811 static_assert(sizeof(UniformMatrix4x3fvImmediate) == 12, |
7724 Sizeof_UniformMatrix4x3fvImmediate_is_not_12); | 7812 "size of UniformMatrix4x3fvImmediate should be 12"); |
7725 COMPILE_ASSERT(offsetof(UniformMatrix4x3fvImmediate, header) == 0, | 7813 static_assert(offsetof(UniformMatrix4x3fvImmediate, header) == 0, |
7726 OffsetOf_UniformMatrix4x3fvImmediate_header_not_0); | 7814 "offset of UniformMatrix4x3fvImmediate header should be 0"); |
7727 COMPILE_ASSERT(offsetof(UniformMatrix4x3fvImmediate, location) == 4, | 7815 static_assert(offsetof(UniformMatrix4x3fvImmediate, location) == 4, |
7728 OffsetOf_UniformMatrix4x3fvImmediate_location_not_4); | 7816 "offset of UniformMatrix4x3fvImmediate location should be 4"); |
7729 COMPILE_ASSERT(offsetof(UniformMatrix4x3fvImmediate, count) == 8, | 7817 static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8, |
7730 OffsetOf_UniformMatrix4x3fvImmediate_count_not_8); | 7818 "offset of UniformMatrix4x3fvImmediate count should be 8"); |
7731 | 7819 |
7732 struct UseProgram { | 7820 struct UseProgram { |
7733 typedef UseProgram ValueType; | 7821 typedef UseProgram ValueType; |
7734 static const CommandId kCmdId = kUseProgram; | 7822 static const CommandId kCmdId = kUseProgram; |
7735 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7823 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7736 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7824 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7737 | 7825 |
7738 static uint32_t ComputeSize() { | 7826 static uint32_t ComputeSize() { |
7739 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7827 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7740 } | 7828 } |
7741 | 7829 |
7742 void SetHeader() { header.SetCmd<ValueType>(); } | 7830 void SetHeader() { header.SetCmd<ValueType>(); } |
7743 | 7831 |
7744 void Init(GLuint _program) { | 7832 void Init(GLuint _program) { |
7745 SetHeader(); | 7833 SetHeader(); |
7746 program = _program; | 7834 program = _program; |
7747 } | 7835 } |
7748 | 7836 |
7749 void* Set(void* cmd, GLuint _program) { | 7837 void* Set(void* cmd, GLuint _program) { |
7750 static_cast<ValueType*>(cmd)->Init(_program); | 7838 static_cast<ValueType*>(cmd)->Init(_program); |
7751 return NextCmdAddress<ValueType>(cmd); | 7839 return NextCmdAddress<ValueType>(cmd); |
7752 } | 7840 } |
7753 | 7841 |
7754 gpu::CommandHeader header; | 7842 gpu::CommandHeader header; |
7755 uint32_t program; | 7843 uint32_t program; |
7756 }; | 7844 }; |
7757 | 7845 |
7758 COMPILE_ASSERT(sizeof(UseProgram) == 8, Sizeof_UseProgram_is_not_8); | 7846 static_assert(sizeof(UseProgram) == 8, "size of UseProgram should be 8"); |
7759 COMPILE_ASSERT(offsetof(UseProgram, header) == 0, | 7847 static_assert(offsetof(UseProgram, header) == 0, |
7760 OffsetOf_UseProgram_header_not_0); | 7848 "offset of UseProgram header should be 0"); |
7761 COMPILE_ASSERT(offsetof(UseProgram, program) == 4, | 7849 static_assert(offsetof(UseProgram, program) == 4, |
7762 OffsetOf_UseProgram_program_not_4); | 7850 "offset of UseProgram program should be 4"); |
7763 | 7851 |
7764 struct ValidateProgram { | 7852 struct ValidateProgram { |
7765 typedef ValidateProgram ValueType; | 7853 typedef ValidateProgram ValueType; |
7766 static const CommandId kCmdId = kValidateProgram; | 7854 static const CommandId kCmdId = kValidateProgram; |
7767 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7855 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7768 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7856 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7769 | 7857 |
7770 static uint32_t ComputeSize() { | 7858 static uint32_t ComputeSize() { |
7771 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7859 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7772 } | 7860 } |
7773 | 7861 |
7774 void SetHeader() { header.SetCmd<ValueType>(); } | 7862 void SetHeader() { header.SetCmd<ValueType>(); } |
7775 | 7863 |
7776 void Init(GLuint _program) { | 7864 void Init(GLuint _program) { |
7777 SetHeader(); | 7865 SetHeader(); |
7778 program = _program; | 7866 program = _program; |
7779 } | 7867 } |
7780 | 7868 |
7781 void* Set(void* cmd, GLuint _program) { | 7869 void* Set(void* cmd, GLuint _program) { |
7782 static_cast<ValueType*>(cmd)->Init(_program); | 7870 static_cast<ValueType*>(cmd)->Init(_program); |
7783 return NextCmdAddress<ValueType>(cmd); | 7871 return NextCmdAddress<ValueType>(cmd); |
7784 } | 7872 } |
7785 | 7873 |
7786 gpu::CommandHeader header; | 7874 gpu::CommandHeader header; |
7787 uint32_t program; | 7875 uint32_t program; |
7788 }; | 7876 }; |
7789 | 7877 |
7790 COMPILE_ASSERT(sizeof(ValidateProgram) == 8, Sizeof_ValidateProgram_is_not_8); | 7878 static_assert(sizeof(ValidateProgram) == 8, |
7791 COMPILE_ASSERT(offsetof(ValidateProgram, header) == 0, | 7879 "size of ValidateProgram should be 8"); |
7792 OffsetOf_ValidateProgram_header_not_0); | 7880 static_assert(offsetof(ValidateProgram, header) == 0, |
7793 COMPILE_ASSERT(offsetof(ValidateProgram, program) == 4, | 7881 "offset of ValidateProgram header should be 0"); |
7794 OffsetOf_ValidateProgram_program_not_4); | 7882 static_assert(offsetof(ValidateProgram, program) == 4, |
| 7883 "offset of ValidateProgram program should be 4"); |
7795 | 7884 |
7796 struct VertexAttrib1f { | 7885 struct VertexAttrib1f { |
7797 typedef VertexAttrib1f ValueType; | 7886 typedef VertexAttrib1f ValueType; |
7798 static const CommandId kCmdId = kVertexAttrib1f; | 7887 static const CommandId kCmdId = kVertexAttrib1f; |
7799 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7888 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7800 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7889 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7801 | 7890 |
7802 static uint32_t ComputeSize() { | 7891 static uint32_t ComputeSize() { |
7803 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7892 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7804 } | 7893 } |
7805 | 7894 |
7806 void SetHeader() { header.SetCmd<ValueType>(); } | 7895 void SetHeader() { header.SetCmd<ValueType>(); } |
7807 | 7896 |
7808 void Init(GLuint _indx, GLfloat _x) { | 7897 void Init(GLuint _indx, GLfloat _x) { |
7809 SetHeader(); | 7898 SetHeader(); |
7810 indx = _indx; | 7899 indx = _indx; |
7811 x = _x; | 7900 x = _x; |
7812 } | 7901 } |
7813 | 7902 |
7814 void* Set(void* cmd, GLuint _indx, GLfloat _x) { | 7903 void* Set(void* cmd, GLuint _indx, GLfloat _x) { |
7815 static_cast<ValueType*>(cmd)->Init(_indx, _x); | 7904 static_cast<ValueType*>(cmd)->Init(_indx, _x); |
7816 return NextCmdAddress<ValueType>(cmd); | 7905 return NextCmdAddress<ValueType>(cmd); |
7817 } | 7906 } |
7818 | 7907 |
7819 gpu::CommandHeader header; | 7908 gpu::CommandHeader header; |
7820 uint32_t indx; | 7909 uint32_t indx; |
7821 float x; | 7910 float x; |
7822 }; | 7911 }; |
7823 | 7912 |
7824 COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12, Sizeof_VertexAttrib1f_is_not_12); | 7913 static_assert(sizeof(VertexAttrib1f) == 12, |
7825 COMPILE_ASSERT(offsetof(VertexAttrib1f, header) == 0, | 7914 "size of VertexAttrib1f should be 12"); |
7826 OffsetOf_VertexAttrib1f_header_not_0); | 7915 static_assert(offsetof(VertexAttrib1f, header) == 0, |
7827 COMPILE_ASSERT(offsetof(VertexAttrib1f, indx) == 4, | 7916 "offset of VertexAttrib1f header should be 0"); |
7828 OffsetOf_VertexAttrib1f_indx_not_4); | 7917 static_assert(offsetof(VertexAttrib1f, indx) == 4, |
7829 COMPILE_ASSERT(offsetof(VertexAttrib1f, x) == 8, | 7918 "offset of VertexAttrib1f indx should be 4"); |
7830 OffsetOf_VertexAttrib1f_x_not_8); | 7919 static_assert(offsetof(VertexAttrib1f, x) == 8, |
| 7920 "offset of VertexAttrib1f x should be 8"); |
7831 | 7921 |
7832 struct VertexAttrib1fvImmediate { | 7922 struct VertexAttrib1fvImmediate { |
7833 typedef VertexAttrib1fvImmediate ValueType; | 7923 typedef VertexAttrib1fvImmediate ValueType; |
7834 static const CommandId kCmdId = kVertexAttrib1fvImmediate; | 7924 static const CommandId kCmdId = kVertexAttrib1fvImmediate; |
7835 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 7925 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7836 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7926 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7837 | 7927 |
7838 static uint32_t ComputeDataSize() { | 7928 static uint32_t ComputeDataSize() { |
7839 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT | 7929 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT |
7840 } | 7930 } |
(...skipping 14 matching lines...) Expand all Loading... |
7855 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { | 7945 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { |
7856 static_cast<ValueType*>(cmd)->Init(_indx, _values); | 7946 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
7857 const uint32_t size = ComputeSize(); | 7947 const uint32_t size = ComputeSize(); |
7858 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 7948 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7859 } | 7949 } |
7860 | 7950 |
7861 gpu::CommandHeader header; | 7951 gpu::CommandHeader header; |
7862 uint32_t indx; | 7952 uint32_t indx; |
7863 }; | 7953 }; |
7864 | 7954 |
7865 COMPILE_ASSERT(sizeof(VertexAttrib1fvImmediate) == 8, | 7955 static_assert(sizeof(VertexAttrib1fvImmediate) == 8, |
7866 Sizeof_VertexAttrib1fvImmediate_is_not_8); | 7956 "size of VertexAttrib1fvImmediate should be 8"); |
7867 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, header) == 0, | 7957 static_assert(offsetof(VertexAttrib1fvImmediate, header) == 0, |
7868 OffsetOf_VertexAttrib1fvImmediate_header_not_0); | 7958 "offset of VertexAttrib1fvImmediate header should be 0"); |
7869 COMPILE_ASSERT(offsetof(VertexAttrib1fvImmediate, indx) == 4, | 7959 static_assert(offsetof(VertexAttrib1fvImmediate, indx) == 4, |
7870 OffsetOf_VertexAttrib1fvImmediate_indx_not_4); | 7960 "offset of VertexAttrib1fvImmediate indx should be 4"); |
7871 | 7961 |
7872 struct VertexAttrib2f { | 7962 struct VertexAttrib2f { |
7873 typedef VertexAttrib2f ValueType; | 7963 typedef VertexAttrib2f ValueType; |
7874 static const CommandId kCmdId = kVertexAttrib2f; | 7964 static const CommandId kCmdId = kVertexAttrib2f; |
7875 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7965 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7876 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7966 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7877 | 7967 |
7878 static uint32_t ComputeSize() { | 7968 static uint32_t ComputeSize() { |
7879 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7969 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7880 } | 7970 } |
(...skipping 11 matching lines...) Expand all Loading... |
7892 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y); | 7982 static_cast<ValueType*>(cmd)->Init(_indx, _x, _y); |
7893 return NextCmdAddress<ValueType>(cmd); | 7983 return NextCmdAddress<ValueType>(cmd); |
7894 } | 7984 } |
7895 | 7985 |
7896 gpu::CommandHeader header; | 7986 gpu::CommandHeader header; |
7897 uint32_t indx; | 7987 uint32_t indx; |
7898 float x; | 7988 float x; |
7899 float y; | 7989 float y; |
7900 }; | 7990 }; |
7901 | 7991 |
7902 COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16, Sizeof_VertexAttrib2f_is_not_16); | 7992 static_assert(sizeof(VertexAttrib2f) == 16, |
7903 COMPILE_ASSERT(offsetof(VertexAttrib2f, header) == 0, | 7993 "size of VertexAttrib2f should be 16"); |
7904 OffsetOf_VertexAttrib2f_header_not_0); | 7994 static_assert(offsetof(VertexAttrib2f, header) == 0, |
7905 COMPILE_ASSERT(offsetof(VertexAttrib2f, indx) == 4, | 7995 "offset of VertexAttrib2f header should be 0"); |
7906 OffsetOf_VertexAttrib2f_indx_not_4); | 7996 static_assert(offsetof(VertexAttrib2f, indx) == 4, |
7907 COMPILE_ASSERT(offsetof(VertexAttrib2f, x) == 8, | 7997 "offset of VertexAttrib2f indx should be 4"); |
7908 OffsetOf_VertexAttrib2f_x_not_8); | 7998 static_assert(offsetof(VertexAttrib2f, x) == 8, |
7909 COMPILE_ASSERT(offsetof(VertexAttrib2f, y) == 12, | 7999 "offset of VertexAttrib2f x should be 8"); |
7910 OffsetOf_VertexAttrib2f_y_not_12); | 8000 static_assert(offsetof(VertexAttrib2f, y) == 12, |
| 8001 "offset of VertexAttrib2f y should be 12"); |
7911 | 8002 |
7912 struct VertexAttrib2fvImmediate { | 8003 struct VertexAttrib2fvImmediate { |
7913 typedef VertexAttrib2fvImmediate ValueType; | 8004 typedef VertexAttrib2fvImmediate ValueType; |
7914 static const CommandId kCmdId = kVertexAttrib2fvImmediate; | 8005 static const CommandId kCmdId = kVertexAttrib2fvImmediate; |
7915 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8006 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
7916 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8007 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7917 | 8008 |
7918 static uint32_t ComputeDataSize() { | 8009 static uint32_t ComputeDataSize() { |
7919 return static_cast<uint32_t>(sizeof(GLfloat) * 2); // NOLINT | 8010 return static_cast<uint32_t>(sizeof(GLfloat) * 2); // NOLINT |
7920 } | 8011 } |
(...skipping 14 matching lines...) Expand all Loading... |
7935 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { | 8026 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { |
7936 static_cast<ValueType*>(cmd)->Init(_indx, _values); | 8027 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
7937 const uint32_t size = ComputeSize(); | 8028 const uint32_t size = ComputeSize(); |
7938 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8029 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
7939 } | 8030 } |
7940 | 8031 |
7941 gpu::CommandHeader header; | 8032 gpu::CommandHeader header; |
7942 uint32_t indx; | 8033 uint32_t indx; |
7943 }; | 8034 }; |
7944 | 8035 |
7945 COMPILE_ASSERT(sizeof(VertexAttrib2fvImmediate) == 8, | 8036 static_assert(sizeof(VertexAttrib2fvImmediate) == 8, |
7946 Sizeof_VertexAttrib2fvImmediate_is_not_8); | 8037 "size of VertexAttrib2fvImmediate should be 8"); |
7947 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, header) == 0, | 8038 static_assert(offsetof(VertexAttrib2fvImmediate, header) == 0, |
7948 OffsetOf_VertexAttrib2fvImmediate_header_not_0); | 8039 "offset of VertexAttrib2fvImmediate header should be 0"); |
7949 COMPILE_ASSERT(offsetof(VertexAttrib2fvImmediate, indx) == 4, | 8040 static_assert(offsetof(VertexAttrib2fvImmediate, indx) == 4, |
7950 OffsetOf_VertexAttrib2fvImmediate_indx_not_4); | 8041 "offset of VertexAttrib2fvImmediate indx should be 4"); |
7951 | 8042 |
7952 struct VertexAttrib3f { | 8043 struct VertexAttrib3f { |
7953 typedef VertexAttrib3f ValueType; | 8044 typedef VertexAttrib3f ValueType; |
7954 static const CommandId kCmdId = kVertexAttrib3f; | 8045 static const CommandId kCmdId = kVertexAttrib3f; |
7955 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8046 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7956 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8047 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7957 | 8048 |
7958 static uint32_t ComputeSize() { | 8049 static uint32_t ComputeSize() { |
7959 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8050 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7960 } | 8051 } |
(...skipping 13 matching lines...) Expand all Loading... |
7974 return NextCmdAddress<ValueType>(cmd); | 8065 return NextCmdAddress<ValueType>(cmd); |
7975 } | 8066 } |
7976 | 8067 |
7977 gpu::CommandHeader header; | 8068 gpu::CommandHeader header; |
7978 uint32_t indx; | 8069 uint32_t indx; |
7979 float x; | 8070 float x; |
7980 float y; | 8071 float y; |
7981 float z; | 8072 float z; |
7982 }; | 8073 }; |
7983 | 8074 |
7984 COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20, Sizeof_VertexAttrib3f_is_not_20); | 8075 static_assert(sizeof(VertexAttrib3f) == 20, |
7985 COMPILE_ASSERT(offsetof(VertexAttrib3f, header) == 0, | 8076 "size of VertexAttrib3f should be 20"); |
7986 OffsetOf_VertexAttrib3f_header_not_0); | 8077 static_assert(offsetof(VertexAttrib3f, header) == 0, |
7987 COMPILE_ASSERT(offsetof(VertexAttrib3f, indx) == 4, | 8078 "offset of VertexAttrib3f header should be 0"); |
7988 OffsetOf_VertexAttrib3f_indx_not_4); | 8079 static_assert(offsetof(VertexAttrib3f, indx) == 4, |
7989 COMPILE_ASSERT(offsetof(VertexAttrib3f, x) == 8, | 8080 "offset of VertexAttrib3f indx should be 4"); |
7990 OffsetOf_VertexAttrib3f_x_not_8); | 8081 static_assert(offsetof(VertexAttrib3f, x) == 8, |
7991 COMPILE_ASSERT(offsetof(VertexAttrib3f, y) == 12, | 8082 "offset of VertexAttrib3f x should be 8"); |
7992 OffsetOf_VertexAttrib3f_y_not_12); | 8083 static_assert(offsetof(VertexAttrib3f, y) == 12, |
7993 COMPILE_ASSERT(offsetof(VertexAttrib3f, z) == 16, | 8084 "offset of VertexAttrib3f y should be 12"); |
7994 OffsetOf_VertexAttrib3f_z_not_16); | 8085 static_assert(offsetof(VertexAttrib3f, z) == 16, |
| 8086 "offset of VertexAttrib3f z should be 16"); |
7995 | 8087 |
7996 struct VertexAttrib3fvImmediate { | 8088 struct VertexAttrib3fvImmediate { |
7997 typedef VertexAttrib3fvImmediate ValueType; | 8089 typedef VertexAttrib3fvImmediate ValueType; |
7998 static const CommandId kCmdId = kVertexAttrib3fvImmediate; | 8090 static const CommandId kCmdId = kVertexAttrib3fvImmediate; |
7999 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8091 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8000 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8092 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8001 | 8093 |
8002 static uint32_t ComputeDataSize() { | 8094 static uint32_t ComputeDataSize() { |
8003 return static_cast<uint32_t>(sizeof(GLfloat) * 3); // NOLINT | 8095 return static_cast<uint32_t>(sizeof(GLfloat) * 3); // NOLINT |
8004 } | 8096 } |
(...skipping 14 matching lines...) Expand all Loading... |
8019 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { | 8111 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { |
8020 static_cast<ValueType*>(cmd)->Init(_indx, _values); | 8112 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
8021 const uint32_t size = ComputeSize(); | 8113 const uint32_t size = ComputeSize(); |
8022 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8114 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
8023 } | 8115 } |
8024 | 8116 |
8025 gpu::CommandHeader header; | 8117 gpu::CommandHeader header; |
8026 uint32_t indx; | 8118 uint32_t indx; |
8027 }; | 8119 }; |
8028 | 8120 |
8029 COMPILE_ASSERT(sizeof(VertexAttrib3fvImmediate) == 8, | 8121 static_assert(sizeof(VertexAttrib3fvImmediate) == 8, |
8030 Sizeof_VertexAttrib3fvImmediate_is_not_8); | 8122 "size of VertexAttrib3fvImmediate should be 8"); |
8031 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, header) == 0, | 8123 static_assert(offsetof(VertexAttrib3fvImmediate, header) == 0, |
8032 OffsetOf_VertexAttrib3fvImmediate_header_not_0); | 8124 "offset of VertexAttrib3fvImmediate header should be 0"); |
8033 COMPILE_ASSERT(offsetof(VertexAttrib3fvImmediate, indx) == 4, | 8125 static_assert(offsetof(VertexAttrib3fvImmediate, indx) == 4, |
8034 OffsetOf_VertexAttrib3fvImmediate_indx_not_4); | 8126 "offset of VertexAttrib3fvImmediate indx should be 4"); |
8035 | 8127 |
8036 struct VertexAttrib4f { | 8128 struct VertexAttrib4f { |
8037 typedef VertexAttrib4f ValueType; | 8129 typedef VertexAttrib4f ValueType; |
8038 static const CommandId kCmdId = kVertexAttrib4f; | 8130 static const CommandId kCmdId = kVertexAttrib4f; |
8039 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8131 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8040 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8132 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8041 | 8133 |
8042 static uint32_t ComputeSize() { | 8134 static uint32_t ComputeSize() { |
8043 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8135 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8044 } | 8136 } |
(...skipping 20 matching lines...) Expand all Loading... |
8065 } | 8157 } |
8066 | 8158 |
8067 gpu::CommandHeader header; | 8159 gpu::CommandHeader header; |
8068 uint32_t indx; | 8160 uint32_t indx; |
8069 float x; | 8161 float x; |
8070 float y; | 8162 float y; |
8071 float z; | 8163 float z; |
8072 float w; | 8164 float w; |
8073 }; | 8165 }; |
8074 | 8166 |
8075 COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24, Sizeof_VertexAttrib4f_is_not_24); | 8167 static_assert(sizeof(VertexAttrib4f) == 24, |
8076 COMPILE_ASSERT(offsetof(VertexAttrib4f, header) == 0, | 8168 "size of VertexAttrib4f should be 24"); |
8077 OffsetOf_VertexAttrib4f_header_not_0); | 8169 static_assert(offsetof(VertexAttrib4f, header) == 0, |
8078 COMPILE_ASSERT(offsetof(VertexAttrib4f, indx) == 4, | 8170 "offset of VertexAttrib4f header should be 0"); |
8079 OffsetOf_VertexAttrib4f_indx_not_4); | 8171 static_assert(offsetof(VertexAttrib4f, indx) == 4, |
8080 COMPILE_ASSERT(offsetof(VertexAttrib4f, x) == 8, | 8172 "offset of VertexAttrib4f indx should be 4"); |
8081 OffsetOf_VertexAttrib4f_x_not_8); | 8173 static_assert(offsetof(VertexAttrib4f, x) == 8, |
8082 COMPILE_ASSERT(offsetof(VertexAttrib4f, y) == 12, | 8174 "offset of VertexAttrib4f x should be 8"); |
8083 OffsetOf_VertexAttrib4f_y_not_12); | 8175 static_assert(offsetof(VertexAttrib4f, y) == 12, |
8084 COMPILE_ASSERT(offsetof(VertexAttrib4f, z) == 16, | 8176 "offset of VertexAttrib4f y should be 12"); |
8085 OffsetOf_VertexAttrib4f_z_not_16); | 8177 static_assert(offsetof(VertexAttrib4f, z) == 16, |
8086 COMPILE_ASSERT(offsetof(VertexAttrib4f, w) == 20, | 8178 "offset of VertexAttrib4f z should be 16"); |
8087 OffsetOf_VertexAttrib4f_w_not_20); | 8179 static_assert(offsetof(VertexAttrib4f, w) == 20, |
| 8180 "offset of VertexAttrib4f w should be 20"); |
8088 | 8181 |
8089 struct VertexAttrib4fvImmediate { | 8182 struct VertexAttrib4fvImmediate { |
8090 typedef VertexAttrib4fvImmediate ValueType; | 8183 typedef VertexAttrib4fvImmediate ValueType; |
8091 static const CommandId kCmdId = kVertexAttrib4fvImmediate; | 8184 static const CommandId kCmdId = kVertexAttrib4fvImmediate; |
8092 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8185 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8093 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8186 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8094 | 8187 |
8095 static uint32_t ComputeDataSize() { | 8188 static uint32_t ComputeDataSize() { |
8096 return static_cast<uint32_t>(sizeof(GLfloat) * 4); // NOLINT | 8189 return static_cast<uint32_t>(sizeof(GLfloat) * 4); // NOLINT |
8097 } | 8190 } |
(...skipping 14 matching lines...) Expand all Loading... |
8112 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { | 8205 void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { |
8113 static_cast<ValueType*>(cmd)->Init(_indx, _values); | 8206 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
8114 const uint32_t size = ComputeSize(); | 8207 const uint32_t size = ComputeSize(); |
8115 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8208 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
8116 } | 8209 } |
8117 | 8210 |
8118 gpu::CommandHeader header; | 8211 gpu::CommandHeader header; |
8119 uint32_t indx; | 8212 uint32_t indx; |
8120 }; | 8213 }; |
8121 | 8214 |
8122 COMPILE_ASSERT(sizeof(VertexAttrib4fvImmediate) == 8, | 8215 static_assert(sizeof(VertexAttrib4fvImmediate) == 8, |
8123 Sizeof_VertexAttrib4fvImmediate_is_not_8); | 8216 "size of VertexAttrib4fvImmediate should be 8"); |
8124 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, header) == 0, | 8217 static_assert(offsetof(VertexAttrib4fvImmediate, header) == 0, |
8125 OffsetOf_VertexAttrib4fvImmediate_header_not_0); | 8218 "offset of VertexAttrib4fvImmediate header should be 0"); |
8126 COMPILE_ASSERT(offsetof(VertexAttrib4fvImmediate, indx) == 4, | 8219 static_assert(offsetof(VertexAttrib4fvImmediate, indx) == 4, |
8127 OffsetOf_VertexAttrib4fvImmediate_indx_not_4); | 8220 "offset of VertexAttrib4fvImmediate indx should be 4"); |
8128 | 8221 |
8129 struct VertexAttribI4i { | 8222 struct VertexAttribI4i { |
8130 typedef VertexAttribI4i ValueType; | 8223 typedef VertexAttribI4i ValueType; |
8131 static const CommandId kCmdId = kVertexAttribI4i; | 8224 static const CommandId kCmdId = kVertexAttribI4i; |
8132 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8225 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8133 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8226 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8134 | 8227 |
8135 static uint32_t ComputeSize() { | 8228 static uint32_t ComputeSize() { |
8136 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8229 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8137 } | 8230 } |
(...skipping 15 matching lines...) Expand all Loading... |
8153 } | 8246 } |
8154 | 8247 |
8155 gpu::CommandHeader header; | 8248 gpu::CommandHeader header; |
8156 uint32_t indx; | 8249 uint32_t indx; |
8157 int32_t x; | 8250 int32_t x; |
8158 int32_t y; | 8251 int32_t y; |
8159 int32_t z; | 8252 int32_t z; |
8160 int32_t w; | 8253 int32_t w; |
8161 }; | 8254 }; |
8162 | 8255 |
8163 COMPILE_ASSERT(sizeof(VertexAttribI4i) == 24, Sizeof_VertexAttribI4i_is_not_24); | 8256 static_assert(sizeof(VertexAttribI4i) == 24, |
8164 COMPILE_ASSERT(offsetof(VertexAttribI4i, header) == 0, | 8257 "size of VertexAttribI4i should be 24"); |
8165 OffsetOf_VertexAttribI4i_header_not_0); | 8258 static_assert(offsetof(VertexAttribI4i, header) == 0, |
8166 COMPILE_ASSERT(offsetof(VertexAttribI4i, indx) == 4, | 8259 "offset of VertexAttribI4i header should be 0"); |
8167 OffsetOf_VertexAttribI4i_indx_not_4); | 8260 static_assert(offsetof(VertexAttribI4i, indx) == 4, |
8168 COMPILE_ASSERT(offsetof(VertexAttribI4i, x) == 8, | 8261 "offset of VertexAttribI4i indx should be 4"); |
8169 OffsetOf_VertexAttribI4i_x_not_8); | 8262 static_assert(offsetof(VertexAttribI4i, x) == 8, |
8170 COMPILE_ASSERT(offsetof(VertexAttribI4i, y) == 12, | 8263 "offset of VertexAttribI4i x should be 8"); |
8171 OffsetOf_VertexAttribI4i_y_not_12); | 8264 static_assert(offsetof(VertexAttribI4i, y) == 12, |
8172 COMPILE_ASSERT(offsetof(VertexAttribI4i, z) == 16, | 8265 "offset of VertexAttribI4i y should be 12"); |
8173 OffsetOf_VertexAttribI4i_z_not_16); | 8266 static_assert(offsetof(VertexAttribI4i, z) == 16, |
8174 COMPILE_ASSERT(offsetof(VertexAttribI4i, w) == 20, | 8267 "offset of VertexAttribI4i z should be 16"); |
8175 OffsetOf_VertexAttribI4i_w_not_20); | 8268 static_assert(offsetof(VertexAttribI4i, w) == 20, |
| 8269 "offset of VertexAttribI4i w should be 20"); |
8176 | 8270 |
8177 struct VertexAttribI4ivImmediate { | 8271 struct VertexAttribI4ivImmediate { |
8178 typedef VertexAttribI4ivImmediate ValueType; | 8272 typedef VertexAttribI4ivImmediate ValueType; |
8179 static const CommandId kCmdId = kVertexAttribI4ivImmediate; | 8273 static const CommandId kCmdId = kVertexAttribI4ivImmediate; |
8180 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8274 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8181 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8182 | 8276 |
8183 static uint32_t ComputeDataSize() { | 8277 static uint32_t ComputeDataSize() { |
8184 return static_cast<uint32_t>(sizeof(GLint) * 4); // NOLINT | 8278 return static_cast<uint32_t>(sizeof(GLint) * 4); // NOLINT |
8185 } | 8279 } |
(...skipping 14 matching lines...) Expand all Loading... |
8200 void* Set(void* cmd, GLuint _indx, const GLint* _values) { | 8294 void* Set(void* cmd, GLuint _indx, const GLint* _values) { |
8201 static_cast<ValueType*>(cmd)->Init(_indx, _values); | 8295 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
8202 const uint32_t size = ComputeSize(); | 8296 const uint32_t size = ComputeSize(); |
8203 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8297 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
8204 } | 8298 } |
8205 | 8299 |
8206 gpu::CommandHeader header; | 8300 gpu::CommandHeader header; |
8207 uint32_t indx; | 8301 uint32_t indx; |
8208 }; | 8302 }; |
8209 | 8303 |
8210 COMPILE_ASSERT(sizeof(VertexAttribI4ivImmediate) == 8, | 8304 static_assert(sizeof(VertexAttribI4ivImmediate) == 8, |
8211 Sizeof_VertexAttribI4ivImmediate_is_not_8); | 8305 "size of VertexAttribI4ivImmediate should be 8"); |
8212 COMPILE_ASSERT(offsetof(VertexAttribI4ivImmediate, header) == 0, | 8306 static_assert(offsetof(VertexAttribI4ivImmediate, header) == 0, |
8213 OffsetOf_VertexAttribI4ivImmediate_header_not_0); | 8307 "offset of VertexAttribI4ivImmediate header should be 0"); |
8214 COMPILE_ASSERT(offsetof(VertexAttribI4ivImmediate, indx) == 4, | 8308 static_assert(offsetof(VertexAttribI4ivImmediate, indx) == 4, |
8215 OffsetOf_VertexAttribI4ivImmediate_indx_not_4); | 8309 "offset of VertexAttribI4ivImmediate indx should be 4"); |
8216 | 8310 |
8217 struct VertexAttribI4ui { | 8311 struct VertexAttribI4ui { |
8218 typedef VertexAttribI4ui ValueType; | 8312 typedef VertexAttribI4ui ValueType; |
8219 static const CommandId kCmdId = kVertexAttribI4ui; | 8313 static const CommandId kCmdId = kVertexAttribI4ui; |
8220 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8314 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8221 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8315 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8222 | 8316 |
8223 static uint32_t ComputeSize() { | 8317 static uint32_t ComputeSize() { |
8224 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8318 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8225 } | 8319 } |
(...skipping 20 matching lines...) Expand all Loading... |
8246 } | 8340 } |
8247 | 8341 |
8248 gpu::CommandHeader header; | 8342 gpu::CommandHeader header; |
8249 uint32_t indx; | 8343 uint32_t indx; |
8250 uint32_t x; | 8344 uint32_t x; |
8251 uint32_t y; | 8345 uint32_t y; |
8252 uint32_t z; | 8346 uint32_t z; |
8253 uint32_t w; | 8347 uint32_t w; |
8254 }; | 8348 }; |
8255 | 8349 |
8256 COMPILE_ASSERT(sizeof(VertexAttribI4ui) == 24, | 8350 static_assert(sizeof(VertexAttribI4ui) == 24, |
8257 Sizeof_VertexAttribI4ui_is_not_24); | 8351 "size of VertexAttribI4ui should be 24"); |
8258 COMPILE_ASSERT(offsetof(VertexAttribI4ui, header) == 0, | 8352 static_assert(offsetof(VertexAttribI4ui, header) == 0, |
8259 OffsetOf_VertexAttribI4ui_header_not_0); | 8353 "offset of VertexAttribI4ui header should be 0"); |
8260 COMPILE_ASSERT(offsetof(VertexAttribI4ui, indx) == 4, | 8354 static_assert(offsetof(VertexAttribI4ui, indx) == 4, |
8261 OffsetOf_VertexAttribI4ui_indx_not_4); | 8355 "offset of VertexAttribI4ui indx should be 4"); |
8262 COMPILE_ASSERT(offsetof(VertexAttribI4ui, x) == 8, | 8356 static_assert(offsetof(VertexAttribI4ui, x) == 8, |
8263 OffsetOf_VertexAttribI4ui_x_not_8); | 8357 "offset of VertexAttribI4ui x should be 8"); |
8264 COMPILE_ASSERT(offsetof(VertexAttribI4ui, y) == 12, | 8358 static_assert(offsetof(VertexAttribI4ui, y) == 12, |
8265 OffsetOf_VertexAttribI4ui_y_not_12); | 8359 "offset of VertexAttribI4ui y should be 12"); |
8266 COMPILE_ASSERT(offsetof(VertexAttribI4ui, z) == 16, | 8360 static_assert(offsetof(VertexAttribI4ui, z) == 16, |
8267 OffsetOf_VertexAttribI4ui_z_not_16); | 8361 "offset of VertexAttribI4ui z should be 16"); |
8268 COMPILE_ASSERT(offsetof(VertexAttribI4ui, w) == 20, | 8362 static_assert(offsetof(VertexAttribI4ui, w) == 20, |
8269 OffsetOf_VertexAttribI4ui_w_not_20); | 8363 "offset of VertexAttribI4ui w should be 20"); |
8270 | 8364 |
8271 struct VertexAttribI4uivImmediate { | 8365 struct VertexAttribI4uivImmediate { |
8272 typedef VertexAttribI4uivImmediate ValueType; | 8366 typedef VertexAttribI4uivImmediate ValueType; |
8273 static const CommandId kCmdId = kVertexAttribI4uivImmediate; | 8367 static const CommandId kCmdId = kVertexAttribI4uivImmediate; |
8274 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8368 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8369 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8276 | 8370 |
8277 static uint32_t ComputeDataSize() { | 8371 static uint32_t ComputeDataSize() { |
8278 return static_cast<uint32_t>(sizeof(GLuint) * 4); // NOLINT | 8372 return static_cast<uint32_t>(sizeof(GLuint) * 4); // NOLINT |
8279 } | 8373 } |
(...skipping 14 matching lines...) Expand all Loading... |
8294 void* Set(void* cmd, GLuint _indx, const GLuint* _values) { | 8388 void* Set(void* cmd, GLuint _indx, const GLuint* _values) { |
8295 static_cast<ValueType*>(cmd)->Init(_indx, _values); | 8389 static_cast<ValueType*>(cmd)->Init(_indx, _values); |
8296 const uint32_t size = ComputeSize(); | 8390 const uint32_t size = ComputeSize(); |
8297 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8391 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
8298 } | 8392 } |
8299 | 8393 |
8300 gpu::CommandHeader header; | 8394 gpu::CommandHeader header; |
8301 uint32_t indx; | 8395 uint32_t indx; |
8302 }; | 8396 }; |
8303 | 8397 |
8304 COMPILE_ASSERT(sizeof(VertexAttribI4uivImmediate) == 8, | 8398 static_assert(sizeof(VertexAttribI4uivImmediate) == 8, |
8305 Sizeof_VertexAttribI4uivImmediate_is_not_8); | 8399 "size of VertexAttribI4uivImmediate should be 8"); |
8306 COMPILE_ASSERT(offsetof(VertexAttribI4uivImmediate, header) == 0, | 8400 static_assert(offsetof(VertexAttribI4uivImmediate, header) == 0, |
8307 OffsetOf_VertexAttribI4uivImmediate_header_not_0); | 8401 "offset of VertexAttribI4uivImmediate header should be 0"); |
8308 COMPILE_ASSERT(offsetof(VertexAttribI4uivImmediate, indx) == 4, | 8402 static_assert(offsetof(VertexAttribI4uivImmediate, indx) == 4, |
8309 OffsetOf_VertexAttribI4uivImmediate_indx_not_4); | 8403 "offset of VertexAttribI4uivImmediate indx should be 4"); |
8310 | 8404 |
8311 struct VertexAttribIPointer { | 8405 struct VertexAttribIPointer { |
8312 typedef VertexAttribIPointer ValueType; | 8406 typedef VertexAttribIPointer ValueType; |
8313 static const CommandId kCmdId = kVertexAttribIPointer; | 8407 static const CommandId kCmdId = kVertexAttribIPointer; |
8314 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8408 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8315 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8409 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8316 | 8410 |
8317 static uint32_t ComputeSize() { | 8411 static uint32_t ComputeSize() { |
8318 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8412 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8319 } | 8413 } |
(...skipping 24 matching lines...) Expand all Loading... |
8344 } | 8438 } |
8345 | 8439 |
8346 gpu::CommandHeader header; | 8440 gpu::CommandHeader header; |
8347 uint32_t indx; | 8441 uint32_t indx; |
8348 int32_t size; | 8442 int32_t size; |
8349 uint32_t type; | 8443 uint32_t type; |
8350 int32_t stride; | 8444 int32_t stride; |
8351 uint32_t offset; | 8445 uint32_t offset; |
8352 }; | 8446 }; |
8353 | 8447 |
8354 COMPILE_ASSERT(sizeof(VertexAttribIPointer) == 24, | 8448 static_assert(sizeof(VertexAttribIPointer) == 24, |
8355 Sizeof_VertexAttribIPointer_is_not_24); | 8449 "size of VertexAttribIPointer should be 24"); |
8356 COMPILE_ASSERT(offsetof(VertexAttribIPointer, header) == 0, | 8450 static_assert(offsetof(VertexAttribIPointer, header) == 0, |
8357 OffsetOf_VertexAttribIPointer_header_not_0); | 8451 "offset of VertexAttribIPointer header should be 0"); |
8358 COMPILE_ASSERT(offsetof(VertexAttribIPointer, indx) == 4, | 8452 static_assert(offsetof(VertexAttribIPointer, indx) == 4, |
8359 OffsetOf_VertexAttribIPointer_indx_not_4); | 8453 "offset of VertexAttribIPointer indx should be 4"); |
8360 COMPILE_ASSERT(offsetof(VertexAttribIPointer, size) == 8, | 8454 static_assert(offsetof(VertexAttribIPointer, size) == 8, |
8361 OffsetOf_VertexAttribIPointer_size_not_8); | 8455 "offset of VertexAttribIPointer size should be 8"); |
8362 COMPILE_ASSERT(offsetof(VertexAttribIPointer, type) == 12, | 8456 static_assert(offsetof(VertexAttribIPointer, type) == 12, |
8363 OffsetOf_VertexAttribIPointer_type_not_12); | 8457 "offset of VertexAttribIPointer type should be 12"); |
8364 COMPILE_ASSERT(offsetof(VertexAttribIPointer, stride) == 16, | 8458 static_assert(offsetof(VertexAttribIPointer, stride) == 16, |
8365 OffsetOf_VertexAttribIPointer_stride_not_16); | 8459 "offset of VertexAttribIPointer stride should be 16"); |
8366 COMPILE_ASSERT(offsetof(VertexAttribIPointer, offset) == 20, | 8460 static_assert(offsetof(VertexAttribIPointer, offset) == 20, |
8367 OffsetOf_VertexAttribIPointer_offset_not_20); | 8461 "offset of VertexAttribIPointer offset should be 20"); |
8368 | 8462 |
8369 struct VertexAttribPointer { | 8463 struct VertexAttribPointer { |
8370 typedef VertexAttribPointer ValueType; | 8464 typedef VertexAttribPointer ValueType; |
8371 static const CommandId kCmdId = kVertexAttribPointer; | 8465 static const CommandId kCmdId = kVertexAttribPointer; |
8372 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8466 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8373 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8467 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8374 | 8468 |
8375 static uint32_t ComputeSize() { | 8469 static uint32_t ComputeSize() { |
8376 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8470 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8377 } | 8471 } |
(...skipping 29 matching lines...) Expand all Loading... |
8407 | 8501 |
8408 gpu::CommandHeader header; | 8502 gpu::CommandHeader header; |
8409 uint32_t indx; | 8503 uint32_t indx; |
8410 int32_t size; | 8504 int32_t size; |
8411 uint32_t type; | 8505 uint32_t type; |
8412 uint32_t normalized; | 8506 uint32_t normalized; |
8413 int32_t stride; | 8507 int32_t stride; |
8414 uint32_t offset; | 8508 uint32_t offset; |
8415 }; | 8509 }; |
8416 | 8510 |
8417 COMPILE_ASSERT(sizeof(VertexAttribPointer) == 28, | 8511 static_assert(sizeof(VertexAttribPointer) == 28, |
8418 Sizeof_VertexAttribPointer_is_not_28); | 8512 "size of VertexAttribPointer should be 28"); |
8419 COMPILE_ASSERT(offsetof(VertexAttribPointer, header) == 0, | 8513 static_assert(offsetof(VertexAttribPointer, header) == 0, |
8420 OffsetOf_VertexAttribPointer_header_not_0); | 8514 "offset of VertexAttribPointer header should be 0"); |
8421 COMPILE_ASSERT(offsetof(VertexAttribPointer, indx) == 4, | 8515 static_assert(offsetof(VertexAttribPointer, indx) == 4, |
8422 OffsetOf_VertexAttribPointer_indx_not_4); | 8516 "offset of VertexAttribPointer indx should be 4"); |
8423 COMPILE_ASSERT(offsetof(VertexAttribPointer, size) == 8, | 8517 static_assert(offsetof(VertexAttribPointer, size) == 8, |
8424 OffsetOf_VertexAttribPointer_size_not_8); | 8518 "offset of VertexAttribPointer size should be 8"); |
8425 COMPILE_ASSERT(offsetof(VertexAttribPointer, type) == 12, | 8519 static_assert(offsetof(VertexAttribPointer, type) == 12, |
8426 OffsetOf_VertexAttribPointer_type_not_12); | 8520 "offset of VertexAttribPointer type should be 12"); |
8427 COMPILE_ASSERT(offsetof(VertexAttribPointer, normalized) == 16, | 8521 static_assert(offsetof(VertexAttribPointer, normalized) == 16, |
8428 OffsetOf_VertexAttribPointer_normalized_not_16); | 8522 "offset of VertexAttribPointer normalized should be 16"); |
8429 COMPILE_ASSERT(offsetof(VertexAttribPointer, stride) == 20, | 8523 static_assert(offsetof(VertexAttribPointer, stride) == 20, |
8430 OffsetOf_VertexAttribPointer_stride_not_20); | 8524 "offset of VertexAttribPointer stride should be 20"); |
8431 COMPILE_ASSERT(offsetof(VertexAttribPointer, offset) == 24, | 8525 static_assert(offsetof(VertexAttribPointer, offset) == 24, |
8432 OffsetOf_VertexAttribPointer_offset_not_24); | 8526 "offset of VertexAttribPointer offset should be 24"); |
8433 | 8527 |
8434 struct Viewport { | 8528 struct Viewport { |
8435 typedef Viewport ValueType; | 8529 typedef Viewport ValueType; |
8436 static const CommandId kCmdId = kViewport; | 8530 static const CommandId kCmdId = kViewport; |
8437 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8531 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8438 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8532 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8439 | 8533 |
8440 static uint32_t ComputeSize() { | 8534 static uint32_t ComputeSize() { |
8441 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8535 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8442 } | 8536 } |
(...skipping 13 matching lines...) Expand all Loading... |
8456 return NextCmdAddress<ValueType>(cmd); | 8550 return NextCmdAddress<ValueType>(cmd); |
8457 } | 8551 } |
8458 | 8552 |
8459 gpu::CommandHeader header; | 8553 gpu::CommandHeader header; |
8460 int32_t x; | 8554 int32_t x; |
8461 int32_t y; | 8555 int32_t y; |
8462 int32_t width; | 8556 int32_t width; |
8463 int32_t height; | 8557 int32_t height; |
8464 }; | 8558 }; |
8465 | 8559 |
8466 COMPILE_ASSERT(sizeof(Viewport) == 20, Sizeof_Viewport_is_not_20); | 8560 static_assert(sizeof(Viewport) == 20, "size of Viewport should be 20"); |
8467 COMPILE_ASSERT(offsetof(Viewport, header) == 0, OffsetOf_Viewport_header_not_0); | 8561 static_assert(offsetof(Viewport, header) == 0, |
8468 COMPILE_ASSERT(offsetof(Viewport, x) == 4, OffsetOf_Viewport_x_not_4); | 8562 "offset of Viewport header should be 0"); |
8469 COMPILE_ASSERT(offsetof(Viewport, y) == 8, OffsetOf_Viewport_y_not_8); | 8563 static_assert(offsetof(Viewport, x) == 4, "offset of Viewport x should be 4"); |
8470 COMPILE_ASSERT(offsetof(Viewport, width) == 12, OffsetOf_Viewport_width_not_12); | 8564 static_assert(offsetof(Viewport, y) == 8, "offset of Viewport y should be 8"); |
8471 COMPILE_ASSERT(offsetof(Viewport, height) == 16, | 8565 static_assert(offsetof(Viewport, width) == 12, |
8472 OffsetOf_Viewport_height_not_16); | 8566 "offset of Viewport width should be 12"); |
| 8567 static_assert(offsetof(Viewport, height) == 16, |
| 8568 "offset of Viewport height should be 16"); |
8473 | 8569 |
8474 struct BlitFramebufferCHROMIUM { | 8570 struct BlitFramebufferCHROMIUM { |
8475 typedef BlitFramebufferCHROMIUM ValueType; | 8571 typedef BlitFramebufferCHROMIUM ValueType; |
8476 static const CommandId kCmdId = kBlitFramebufferCHROMIUM; | 8572 static const CommandId kCmdId = kBlitFramebufferCHROMIUM; |
8477 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8573 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8478 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 8574 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
8479 | 8575 |
8480 static uint32_t ComputeSize() { | 8576 static uint32_t ComputeSize() { |
8481 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8577 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8482 } | 8578 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8528 int32_t srcX1; | 8624 int32_t srcX1; |
8529 int32_t srcY1; | 8625 int32_t srcY1; |
8530 int32_t dstX0; | 8626 int32_t dstX0; |
8531 int32_t dstY0; | 8627 int32_t dstY0; |
8532 int32_t dstX1; | 8628 int32_t dstX1; |
8533 int32_t dstY1; | 8629 int32_t dstY1; |
8534 uint32_t mask; | 8630 uint32_t mask; |
8535 uint32_t filter; | 8631 uint32_t filter; |
8536 }; | 8632 }; |
8537 | 8633 |
8538 COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM) == 44, | 8634 static_assert(sizeof(BlitFramebufferCHROMIUM) == 44, |
8539 Sizeof_BlitFramebufferCHROMIUM_is_not_44); | 8635 "size of BlitFramebufferCHROMIUM should be 44"); |
8540 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, header) == 0, | 8636 static_assert(offsetof(BlitFramebufferCHROMIUM, header) == 0, |
8541 OffsetOf_BlitFramebufferCHROMIUM_header_not_0); | 8637 "offset of BlitFramebufferCHROMIUM header should be 0"); |
8542 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4, | 8638 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4, |
8543 OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4); | 8639 "offset of BlitFramebufferCHROMIUM srcX0 should be 4"); |
8544 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8, | 8640 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8, |
8545 OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8); | 8641 "offset of BlitFramebufferCHROMIUM srcY0 should be 8"); |
8546 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12, | 8642 static_assert(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12, |
8547 OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12); | 8643 "offset of BlitFramebufferCHROMIUM srcX1 should be 12"); |
8548 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16, | 8644 static_assert(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16, |
8549 OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16); | 8645 "offset of BlitFramebufferCHROMIUM srcY1 should be 16"); |
8550 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20, | 8646 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20, |
8551 OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20); | 8647 "offset of BlitFramebufferCHROMIUM dstX0 should be 20"); |
8552 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24, | 8648 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24, |
8553 OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24); | 8649 "offset of BlitFramebufferCHROMIUM dstY0 should be 24"); |
8554 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28, | 8650 static_assert(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28, |
8555 OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28); | 8651 "offset of BlitFramebufferCHROMIUM dstX1 should be 28"); |
8556 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32, | 8652 static_assert(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32, |
8557 OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32); | 8653 "offset of BlitFramebufferCHROMIUM dstY1 should be 32"); |
8558 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, mask) == 36, | 8654 static_assert(offsetof(BlitFramebufferCHROMIUM, mask) == 36, |
8559 OffsetOf_BlitFramebufferCHROMIUM_mask_not_36); | 8655 "offset of BlitFramebufferCHROMIUM mask should be 36"); |
8560 COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, filter) == 40, | 8656 static_assert(offsetof(BlitFramebufferCHROMIUM, filter) == 40, |
8561 OffsetOf_BlitFramebufferCHROMIUM_filter_not_40); | 8657 "offset of BlitFramebufferCHROMIUM filter should be 40"); |
8562 | 8658 |
8563 // GL_CHROMIUM_framebuffer_multisample | 8659 // GL_CHROMIUM_framebuffer_multisample |
8564 struct RenderbufferStorageMultisampleCHROMIUM { | 8660 struct RenderbufferStorageMultisampleCHROMIUM { |
8565 typedef RenderbufferStorageMultisampleCHROMIUM ValueType; | 8661 typedef RenderbufferStorageMultisampleCHROMIUM ValueType; |
8566 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM; | 8662 static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM; |
8567 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8663 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8568 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8664 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8569 | 8665 |
8570 static uint32_t ComputeSize() { | 8666 static uint32_t ComputeSize() { |
8571 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8667 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
(...skipping 26 matching lines...) Expand all Loading... |
8598 } | 8694 } |
8599 | 8695 |
8600 gpu::CommandHeader header; | 8696 gpu::CommandHeader header; |
8601 uint32_t target; | 8697 uint32_t target; |
8602 int32_t samples; | 8698 int32_t samples; |
8603 uint32_t internalformat; | 8699 uint32_t internalformat; |
8604 int32_t width; | 8700 int32_t width; |
8605 int32_t height; | 8701 int32_t height; |
8606 }; | 8702 }; |
8607 | 8703 |
8608 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24, | 8704 static_assert(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24, |
8609 Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24); | 8705 "size of RenderbufferStorageMultisampleCHROMIUM should be 24"); |
8610 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0, | 8706 static_assert( |
8611 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0); | 8707 offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0, |
8612 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4, | 8708 "offset of RenderbufferStorageMultisampleCHROMIUM header should be 0"); |
8613 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4); | 8709 static_assert( |
8614 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8, | 8710 offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4, |
8615 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8); | 8711 "offset of RenderbufferStorageMultisampleCHROMIUM target should be 4"); |
8616 COMPILE_ASSERT( | 8712 static_assert( |
8617 offsetof(RenderbufferStorageMultisampleCHROMIUM, internalformat) == 12, | 8713 offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8, |
8618 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12); | 8714 "offset of RenderbufferStorageMultisampleCHROMIUM samples should be 8"); |
8619 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16, | 8715 static_assert(offsetof(RenderbufferStorageMultisampleCHROMIUM, |
8620 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16); | 8716 internalformat) == 12, |
8621 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20, | 8717 "offset of RenderbufferStorageMultisampleCHROMIUM internalformat " |
8622 OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20); | 8718 "should be 12"); |
| 8719 static_assert( |
| 8720 offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16, |
| 8721 "offset of RenderbufferStorageMultisampleCHROMIUM width should be 16"); |
| 8722 static_assert( |
| 8723 offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20, |
| 8724 "offset of RenderbufferStorageMultisampleCHROMIUM height should be 20"); |
8623 | 8725 |
8624 // GL_EXT_multisampled_render_to_texture | 8726 // GL_EXT_multisampled_render_to_texture |
8625 struct RenderbufferStorageMultisampleEXT { | 8727 struct RenderbufferStorageMultisampleEXT { |
8626 typedef RenderbufferStorageMultisampleEXT ValueType; | 8728 typedef RenderbufferStorageMultisampleEXT ValueType; |
8627 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT; | 8729 static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT; |
8628 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8730 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8629 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8731 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8630 | 8732 |
8631 static uint32_t ComputeSize() { | 8733 static uint32_t ComputeSize() { |
8632 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8734 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
(...skipping 26 matching lines...) Expand all Loading... |
8659 } | 8761 } |
8660 | 8762 |
8661 gpu::CommandHeader header; | 8763 gpu::CommandHeader header; |
8662 uint32_t target; | 8764 uint32_t target; |
8663 int32_t samples; | 8765 int32_t samples; |
8664 uint32_t internalformat; | 8766 uint32_t internalformat; |
8665 int32_t width; | 8767 int32_t width; |
8666 int32_t height; | 8768 int32_t height; |
8667 }; | 8769 }; |
8668 | 8770 |
8669 COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleEXT) == 24, | 8771 static_assert(sizeof(RenderbufferStorageMultisampleEXT) == 24, |
8670 Sizeof_RenderbufferStorageMultisampleEXT_is_not_24); | 8772 "size of RenderbufferStorageMultisampleEXT should be 24"); |
8671 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, header) == 0, | 8773 static_assert(offsetof(RenderbufferStorageMultisampleEXT, header) == 0, |
8672 OffsetOf_RenderbufferStorageMultisampleEXT_header_not_0); | 8774 "offset of RenderbufferStorageMultisampleEXT header should be 0"); |
8673 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, target) == 4, | 8775 static_assert(offsetof(RenderbufferStorageMultisampleEXT, target) == 4, |
8674 OffsetOf_RenderbufferStorageMultisampleEXT_target_not_4); | 8776 "offset of RenderbufferStorageMultisampleEXT target should be 4"); |
8675 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, samples) == 8, | 8777 static_assert( |
8676 OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8); | 8778 offsetof(RenderbufferStorageMultisampleEXT, samples) == 8, |
8677 COMPILE_ASSERT( | 8779 "offset of RenderbufferStorageMultisampleEXT samples should be 8"); |
| 8780 static_assert( |
8678 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12, | 8781 offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12, |
8679 OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12); | 8782 "offset of RenderbufferStorageMultisampleEXT internalformat should be 12"); |
8680 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, width) == 16, | 8783 static_assert(offsetof(RenderbufferStorageMultisampleEXT, width) == 16, |
8681 OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16); | 8784 "offset of RenderbufferStorageMultisampleEXT width should be 16"); |
8682 COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, height) == 20, | 8785 static_assert( |
8683 OffsetOf_RenderbufferStorageMultisampleEXT_height_not_20); | 8786 offsetof(RenderbufferStorageMultisampleEXT, height) == 20, |
| 8787 "offset of RenderbufferStorageMultisampleEXT height should be 20"); |
8684 | 8788 |
8685 struct FramebufferTexture2DMultisampleEXT { | 8789 struct FramebufferTexture2DMultisampleEXT { |
8686 typedef FramebufferTexture2DMultisampleEXT ValueType; | 8790 typedef FramebufferTexture2DMultisampleEXT ValueType; |
8687 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT; | 8791 static const CommandId kCmdId = kFramebufferTexture2DMultisampleEXT; |
8688 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8792 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8689 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 8793 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
8690 | 8794 |
8691 static uint32_t ComputeSize() { | 8795 static uint32_t ComputeSize() { |
8692 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8796 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8693 } | 8797 } |
(...skipping 26 matching lines...) Expand all Loading... |
8720 | 8824 |
8721 gpu::CommandHeader header; | 8825 gpu::CommandHeader header; |
8722 uint32_t target; | 8826 uint32_t target; |
8723 uint32_t attachment; | 8827 uint32_t attachment; |
8724 uint32_t textarget; | 8828 uint32_t textarget; |
8725 uint32_t texture; | 8829 uint32_t texture; |
8726 int32_t samples; | 8830 int32_t samples; |
8727 static const int32_t level = 0; | 8831 static const int32_t level = 0; |
8728 }; | 8832 }; |
8729 | 8833 |
8730 COMPILE_ASSERT(sizeof(FramebufferTexture2DMultisampleEXT) == 24, | 8834 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 24, |
8731 Sizeof_FramebufferTexture2DMultisampleEXT_is_not_24); | 8835 "size of FramebufferTexture2DMultisampleEXT should be 24"); |
8732 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, header) == 0, | 8836 static_assert( |
8733 OffsetOf_FramebufferTexture2DMultisampleEXT_header_not_0); | 8837 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0, |
8734 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, target) == 4, | 8838 "offset of FramebufferTexture2DMultisampleEXT header should be 0"); |
8735 OffsetOf_FramebufferTexture2DMultisampleEXT_target_not_4); | 8839 static_assert( |
8736 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8, | 8840 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4, |
8737 OffsetOf_FramebufferTexture2DMultisampleEXT_attachment_not_8); | 8841 "offset of FramebufferTexture2DMultisampleEXT target should be 4"); |
8738 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12, | 8842 static_assert( |
8739 OffsetOf_FramebufferTexture2DMultisampleEXT_textarget_not_12); | 8843 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8, |
8740 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16, | 8844 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8"); |
8741 OffsetOf_FramebufferTexture2DMultisampleEXT_texture_not_16); | 8845 static_assert( |
8742 COMPILE_ASSERT(offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20, | 8846 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12, |
8743 OffsetOf_FramebufferTexture2DMultisampleEXT_samples_not_20); | 8847 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12"); |
| 8848 static_assert( |
| 8849 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16, |
| 8850 "offset of FramebufferTexture2DMultisampleEXT texture should be 16"); |
| 8851 static_assert( |
| 8852 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20, |
| 8853 "offset of FramebufferTexture2DMultisampleEXT samples should be 20"); |
8744 | 8854 |
8745 struct TexStorage2DEXT { | 8855 struct TexStorage2DEXT { |
8746 typedef TexStorage2DEXT ValueType; | 8856 typedef TexStorage2DEXT ValueType; |
8747 static const CommandId kCmdId = kTexStorage2DEXT; | 8857 static const CommandId kCmdId = kTexStorage2DEXT; |
8748 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 8858 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8749 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8859 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8750 | 8860 |
8751 static uint32_t ComputeSize() { | 8861 static uint32_t ComputeSize() { |
8752 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 8862 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8753 } | 8863 } |
(...skipping 25 matching lines...) Expand all Loading... |
8779 } | 8889 } |
8780 | 8890 |
8781 gpu::CommandHeader header; | 8891 gpu::CommandHeader header; |
8782 uint32_t target; | 8892 uint32_t target; |
8783 int32_t levels; | 8893 int32_t levels; |
8784 uint32_t internalFormat; | 8894 uint32_t internalFormat; |
8785 int32_t width; | 8895 int32_t width; |
8786 int32_t height; | 8896 int32_t height; |
8787 }; | 8897 }; |
8788 | 8898 |
8789 COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24, Sizeof_TexStorage2DEXT_is_not_24); | 8899 static_assert(sizeof(TexStorage2DEXT) == 24, |
8790 COMPILE_ASSERT(offsetof(TexStorage2DEXT, header) == 0, | 8900 "size of TexStorage2DEXT should be 24"); |
8791 OffsetOf_TexStorage2DEXT_header_not_0); | 8901 static_assert(offsetof(TexStorage2DEXT, header) == 0, |
8792 COMPILE_ASSERT(offsetof(TexStorage2DEXT, target) == 4, | 8902 "offset of TexStorage2DEXT header should be 0"); |
8793 OffsetOf_TexStorage2DEXT_target_not_4); | 8903 static_assert(offsetof(TexStorage2DEXT, target) == 4, |
8794 COMPILE_ASSERT(offsetof(TexStorage2DEXT, levels) == 8, | 8904 "offset of TexStorage2DEXT target should be 4"); |
8795 OffsetOf_TexStorage2DEXT_levels_not_8); | 8905 static_assert(offsetof(TexStorage2DEXT, levels) == 8, |
8796 COMPILE_ASSERT(offsetof(TexStorage2DEXT, internalFormat) == 12, | 8906 "offset of TexStorage2DEXT levels should be 8"); |
8797 OffsetOf_TexStorage2DEXT_internalFormat_not_12); | 8907 static_assert(offsetof(TexStorage2DEXT, internalFormat) == 12, |
8798 COMPILE_ASSERT(offsetof(TexStorage2DEXT, width) == 16, | 8908 "offset of TexStorage2DEXT internalFormat should be 12"); |
8799 OffsetOf_TexStorage2DEXT_width_not_16); | 8909 static_assert(offsetof(TexStorage2DEXT, width) == 16, |
8800 COMPILE_ASSERT(offsetof(TexStorage2DEXT, height) == 20, | 8910 "offset of TexStorage2DEXT width should be 16"); |
8801 OffsetOf_TexStorage2DEXT_height_not_20); | 8911 static_assert(offsetof(TexStorage2DEXT, height) == 20, |
| 8912 "offset of TexStorage2DEXT height should be 20"); |
8802 | 8913 |
8803 struct GenQueriesEXTImmediate { | 8914 struct GenQueriesEXTImmediate { |
8804 typedef GenQueriesEXTImmediate ValueType; | 8915 typedef GenQueriesEXTImmediate ValueType; |
8805 static const CommandId kCmdId = kGenQueriesEXTImmediate; | 8916 static const CommandId kCmdId = kGenQueriesEXTImmediate; |
8806 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8917 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8807 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8918 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8808 | 8919 |
8809 static uint32_t ComputeDataSize(GLsizei n) { | 8920 static uint32_t ComputeDataSize(GLsizei n) { |
8810 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 8921 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
8811 } | 8922 } |
(...skipping 16 matching lines...) Expand all Loading... |
8828 void* Set(void* cmd, GLsizei _n, GLuint* _queries) { | 8939 void* Set(void* cmd, GLsizei _n, GLuint* _queries) { |
8829 static_cast<ValueType*>(cmd)->Init(_n, _queries); | 8940 static_cast<ValueType*>(cmd)->Init(_n, _queries); |
8830 const uint32_t size = ComputeSize(_n); | 8941 const uint32_t size = ComputeSize(_n); |
8831 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8942 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
8832 } | 8943 } |
8833 | 8944 |
8834 gpu::CommandHeader header; | 8945 gpu::CommandHeader header; |
8835 int32_t n; | 8946 int32_t n; |
8836 }; | 8947 }; |
8837 | 8948 |
8838 COMPILE_ASSERT(sizeof(GenQueriesEXTImmediate) == 8, | 8949 static_assert(sizeof(GenQueriesEXTImmediate) == 8, |
8839 Sizeof_GenQueriesEXTImmediate_is_not_8); | 8950 "size of GenQueriesEXTImmediate should be 8"); |
8840 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, header) == 0, | 8951 static_assert(offsetof(GenQueriesEXTImmediate, header) == 0, |
8841 OffsetOf_GenQueriesEXTImmediate_header_not_0); | 8952 "offset of GenQueriesEXTImmediate header should be 0"); |
8842 COMPILE_ASSERT(offsetof(GenQueriesEXTImmediate, n) == 4, | 8953 static_assert(offsetof(GenQueriesEXTImmediate, n) == 4, |
8843 OffsetOf_GenQueriesEXTImmediate_n_not_4); | 8954 "offset of GenQueriesEXTImmediate n should be 4"); |
8844 | 8955 |
8845 struct DeleteQueriesEXTImmediate { | 8956 struct DeleteQueriesEXTImmediate { |
8846 typedef DeleteQueriesEXTImmediate ValueType; | 8957 typedef DeleteQueriesEXTImmediate ValueType; |
8847 static const CommandId kCmdId = kDeleteQueriesEXTImmediate; | 8958 static const CommandId kCmdId = kDeleteQueriesEXTImmediate; |
8848 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8959 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8849 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8960 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8850 | 8961 |
8851 static uint32_t ComputeDataSize(GLsizei n) { | 8962 static uint32_t ComputeDataSize(GLsizei n) { |
8852 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 8963 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
8853 } | 8964 } |
(...skipping 16 matching lines...) Expand all Loading... |
8870 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) { | 8981 void* Set(void* cmd, GLsizei _n, const GLuint* _queries) { |
8871 static_cast<ValueType*>(cmd)->Init(_n, _queries); | 8982 static_cast<ValueType*>(cmd)->Init(_n, _queries); |
8872 const uint32_t size = ComputeSize(_n); | 8983 const uint32_t size = ComputeSize(_n); |
8873 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 8984 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
8874 } | 8985 } |
8875 | 8986 |
8876 gpu::CommandHeader header; | 8987 gpu::CommandHeader header; |
8877 int32_t n; | 8988 int32_t n; |
8878 }; | 8989 }; |
8879 | 8990 |
8880 COMPILE_ASSERT(sizeof(DeleteQueriesEXTImmediate) == 8, | 8991 static_assert(sizeof(DeleteQueriesEXTImmediate) == 8, |
8881 Sizeof_DeleteQueriesEXTImmediate_is_not_8); | 8992 "size of DeleteQueriesEXTImmediate should be 8"); |
8882 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, header) == 0, | 8993 static_assert(offsetof(DeleteQueriesEXTImmediate, header) == 0, |
8883 OffsetOf_DeleteQueriesEXTImmediate_header_not_0); | 8994 "offset of DeleteQueriesEXTImmediate header should be 0"); |
8884 COMPILE_ASSERT(offsetof(DeleteQueriesEXTImmediate, n) == 4, | 8995 static_assert(offsetof(DeleteQueriesEXTImmediate, n) == 4, |
8885 OffsetOf_DeleteQueriesEXTImmediate_n_not_4); | 8996 "offset of DeleteQueriesEXTImmediate n should be 4"); |
8886 | 8997 |
8887 struct BeginQueryEXT { | 8998 struct BeginQueryEXT { |
8888 typedef BeginQueryEXT ValueType; | 8999 typedef BeginQueryEXT ValueType; |
8889 static const CommandId kCmdId = kBeginQueryEXT; | 9000 static const CommandId kCmdId = kBeginQueryEXT; |
8890 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9001 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8891 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9002 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8892 | 9003 |
8893 static uint32_t ComputeSize() { | 9004 static uint32_t ComputeSize() { |
8894 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9005 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8895 } | 9006 } |
(...skipping 21 matching lines...) Expand all Loading... |
8917 return NextCmdAddress<ValueType>(cmd); | 9028 return NextCmdAddress<ValueType>(cmd); |
8918 } | 9029 } |
8919 | 9030 |
8920 gpu::CommandHeader header; | 9031 gpu::CommandHeader header; |
8921 uint32_t target; | 9032 uint32_t target; |
8922 uint32_t id; | 9033 uint32_t id; |
8923 uint32_t sync_data_shm_id; | 9034 uint32_t sync_data_shm_id; |
8924 uint32_t sync_data_shm_offset; | 9035 uint32_t sync_data_shm_offset; |
8925 }; | 9036 }; |
8926 | 9037 |
8927 COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20, Sizeof_BeginQueryEXT_is_not_20); | 9038 static_assert(sizeof(BeginQueryEXT) == 20, |
8928 COMPILE_ASSERT(offsetof(BeginQueryEXT, header) == 0, | 9039 "size of BeginQueryEXT should be 20"); |
8929 OffsetOf_BeginQueryEXT_header_not_0); | 9040 static_assert(offsetof(BeginQueryEXT, header) == 0, |
8930 COMPILE_ASSERT(offsetof(BeginQueryEXT, target) == 4, | 9041 "offset of BeginQueryEXT header should be 0"); |
8931 OffsetOf_BeginQueryEXT_target_not_4); | 9042 static_assert(offsetof(BeginQueryEXT, target) == 4, |
8932 COMPILE_ASSERT(offsetof(BeginQueryEXT, id) == 8, | 9043 "offset of BeginQueryEXT target should be 4"); |
8933 OffsetOf_BeginQueryEXT_id_not_8); | 9044 static_assert(offsetof(BeginQueryEXT, id) == 8, |
8934 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_id) == 12, | 9045 "offset of BeginQueryEXT id should be 8"); |
8935 OffsetOf_BeginQueryEXT_sync_data_shm_id_not_12); | 9046 static_assert(offsetof(BeginQueryEXT, sync_data_shm_id) == 12, |
8936 COMPILE_ASSERT(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16, | 9047 "offset of BeginQueryEXT sync_data_shm_id should be 12"); |
8937 OffsetOf_BeginQueryEXT_sync_data_shm_offset_not_16); | 9048 static_assert(offsetof(BeginQueryEXT, sync_data_shm_offset) == 16, |
| 9049 "offset of BeginQueryEXT sync_data_shm_offset should be 16"); |
8938 | 9050 |
8939 struct BeginTransformFeedback { | 9051 struct BeginTransformFeedback { |
8940 typedef BeginTransformFeedback ValueType; | 9052 typedef BeginTransformFeedback ValueType; |
8941 static const CommandId kCmdId = kBeginTransformFeedback; | 9053 static const CommandId kCmdId = kBeginTransformFeedback; |
8942 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9054 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8943 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9055 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8944 | 9056 |
8945 static uint32_t ComputeSize() { | 9057 static uint32_t ComputeSize() { |
8946 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9058 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8947 } | 9059 } |
8948 | 9060 |
8949 void SetHeader() { header.SetCmd<ValueType>(); } | 9061 void SetHeader() { header.SetCmd<ValueType>(); } |
8950 | 9062 |
8951 void Init(GLenum _primitivemode) { | 9063 void Init(GLenum _primitivemode) { |
8952 SetHeader(); | 9064 SetHeader(); |
8953 primitivemode = _primitivemode; | 9065 primitivemode = _primitivemode; |
8954 } | 9066 } |
8955 | 9067 |
8956 void* Set(void* cmd, GLenum _primitivemode) { | 9068 void* Set(void* cmd, GLenum _primitivemode) { |
8957 static_cast<ValueType*>(cmd)->Init(_primitivemode); | 9069 static_cast<ValueType*>(cmd)->Init(_primitivemode); |
8958 return NextCmdAddress<ValueType>(cmd); | 9070 return NextCmdAddress<ValueType>(cmd); |
8959 } | 9071 } |
8960 | 9072 |
8961 gpu::CommandHeader header; | 9073 gpu::CommandHeader header; |
8962 uint32_t primitivemode; | 9074 uint32_t primitivemode; |
8963 }; | 9075 }; |
8964 | 9076 |
8965 COMPILE_ASSERT(sizeof(BeginTransformFeedback) == 8, | 9077 static_assert(sizeof(BeginTransformFeedback) == 8, |
8966 Sizeof_BeginTransformFeedback_is_not_8); | 9078 "size of BeginTransformFeedback should be 8"); |
8967 COMPILE_ASSERT(offsetof(BeginTransformFeedback, header) == 0, | 9079 static_assert(offsetof(BeginTransformFeedback, header) == 0, |
8968 OffsetOf_BeginTransformFeedback_header_not_0); | 9080 "offset of BeginTransformFeedback header should be 0"); |
8969 COMPILE_ASSERT(offsetof(BeginTransformFeedback, primitivemode) == 4, | 9081 static_assert(offsetof(BeginTransformFeedback, primitivemode) == 4, |
8970 OffsetOf_BeginTransformFeedback_primitivemode_not_4); | 9082 "offset of BeginTransformFeedback primitivemode should be 4"); |
8971 | 9083 |
8972 struct EndQueryEXT { | 9084 struct EndQueryEXT { |
8973 typedef EndQueryEXT ValueType; | 9085 typedef EndQueryEXT ValueType; |
8974 static const CommandId kCmdId = kEndQueryEXT; | 9086 static const CommandId kCmdId = kEndQueryEXT; |
8975 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9087 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
8976 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9088 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8977 | 9089 |
8978 static uint32_t ComputeSize() { | 9090 static uint32_t ComputeSize() { |
8979 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9091 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
8980 } | 9092 } |
8981 | 9093 |
8982 void SetHeader() { header.SetCmd<ValueType>(); } | 9094 void SetHeader() { header.SetCmd<ValueType>(); } |
8983 | 9095 |
8984 void Init(GLenum _target, GLuint _submit_count) { | 9096 void Init(GLenum _target, GLuint _submit_count) { |
8985 SetHeader(); | 9097 SetHeader(); |
8986 target = _target; | 9098 target = _target; |
8987 submit_count = _submit_count; | 9099 submit_count = _submit_count; |
8988 } | 9100 } |
8989 | 9101 |
8990 void* Set(void* cmd, GLenum _target, GLuint _submit_count) { | 9102 void* Set(void* cmd, GLenum _target, GLuint _submit_count) { |
8991 static_cast<ValueType*>(cmd)->Init(_target, _submit_count); | 9103 static_cast<ValueType*>(cmd)->Init(_target, _submit_count); |
8992 return NextCmdAddress<ValueType>(cmd); | 9104 return NextCmdAddress<ValueType>(cmd); |
8993 } | 9105 } |
8994 | 9106 |
8995 gpu::CommandHeader header; | 9107 gpu::CommandHeader header; |
8996 uint32_t target; | 9108 uint32_t target; |
8997 uint32_t submit_count; | 9109 uint32_t submit_count; |
8998 }; | 9110 }; |
8999 | 9111 |
9000 COMPILE_ASSERT(sizeof(EndQueryEXT) == 12, Sizeof_EndQueryEXT_is_not_12); | 9112 static_assert(sizeof(EndQueryEXT) == 12, "size of EndQueryEXT should be 12"); |
9001 COMPILE_ASSERT(offsetof(EndQueryEXT, header) == 0, | 9113 static_assert(offsetof(EndQueryEXT, header) == 0, |
9002 OffsetOf_EndQueryEXT_header_not_0); | 9114 "offset of EndQueryEXT header should be 0"); |
9003 COMPILE_ASSERT(offsetof(EndQueryEXT, target) == 4, | 9115 static_assert(offsetof(EndQueryEXT, target) == 4, |
9004 OffsetOf_EndQueryEXT_target_not_4); | 9116 "offset of EndQueryEXT target should be 4"); |
9005 COMPILE_ASSERT(offsetof(EndQueryEXT, submit_count) == 8, | 9117 static_assert(offsetof(EndQueryEXT, submit_count) == 8, |
9006 OffsetOf_EndQueryEXT_submit_count_not_8); | 9118 "offset of EndQueryEXT submit_count should be 8"); |
9007 | 9119 |
9008 struct EndTransformFeedback { | 9120 struct EndTransformFeedback { |
9009 typedef EndTransformFeedback ValueType; | 9121 typedef EndTransformFeedback ValueType; |
9010 static const CommandId kCmdId = kEndTransformFeedback; | 9122 static const CommandId kCmdId = kEndTransformFeedback; |
9011 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9123 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9012 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9124 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9013 | 9125 |
9014 static uint32_t ComputeSize() { | 9126 static uint32_t ComputeSize() { |
9015 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9127 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9016 } | 9128 } |
9017 | 9129 |
9018 void SetHeader() { header.SetCmd<ValueType>(); } | 9130 void SetHeader() { header.SetCmd<ValueType>(); } |
9019 | 9131 |
9020 void Init() { SetHeader(); } | 9132 void Init() { SetHeader(); } |
9021 | 9133 |
9022 void* Set(void* cmd) { | 9134 void* Set(void* cmd) { |
9023 static_cast<ValueType*>(cmd)->Init(); | 9135 static_cast<ValueType*>(cmd)->Init(); |
9024 return NextCmdAddress<ValueType>(cmd); | 9136 return NextCmdAddress<ValueType>(cmd); |
9025 } | 9137 } |
9026 | 9138 |
9027 gpu::CommandHeader header; | 9139 gpu::CommandHeader header; |
9028 }; | 9140 }; |
9029 | 9141 |
9030 COMPILE_ASSERT(sizeof(EndTransformFeedback) == 4, | 9142 static_assert(sizeof(EndTransformFeedback) == 4, |
9031 Sizeof_EndTransformFeedback_is_not_4); | 9143 "size of EndTransformFeedback should be 4"); |
9032 COMPILE_ASSERT(offsetof(EndTransformFeedback, header) == 0, | 9144 static_assert(offsetof(EndTransformFeedback, header) == 0, |
9033 OffsetOf_EndTransformFeedback_header_not_0); | 9145 "offset of EndTransformFeedback header should be 0"); |
9034 | 9146 |
9035 struct InsertEventMarkerEXT { | 9147 struct InsertEventMarkerEXT { |
9036 typedef InsertEventMarkerEXT ValueType; | 9148 typedef InsertEventMarkerEXT ValueType; |
9037 static const CommandId kCmdId = kInsertEventMarkerEXT; | 9149 static const CommandId kCmdId = kInsertEventMarkerEXT; |
9038 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9150 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9039 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9151 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9040 | 9152 |
9041 static uint32_t ComputeSize() { | 9153 static uint32_t ComputeSize() { |
9042 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9154 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9043 } | 9155 } |
9044 | 9156 |
9045 void SetHeader() { header.SetCmd<ValueType>(); } | 9157 void SetHeader() { header.SetCmd<ValueType>(); } |
9046 | 9158 |
9047 void Init(GLuint _bucket_id) { | 9159 void Init(GLuint _bucket_id) { |
9048 SetHeader(); | 9160 SetHeader(); |
9049 bucket_id = _bucket_id; | 9161 bucket_id = _bucket_id; |
9050 } | 9162 } |
9051 | 9163 |
9052 void* Set(void* cmd, GLuint _bucket_id) { | 9164 void* Set(void* cmd, GLuint _bucket_id) { |
9053 static_cast<ValueType*>(cmd)->Init(_bucket_id); | 9165 static_cast<ValueType*>(cmd)->Init(_bucket_id); |
9054 return NextCmdAddress<ValueType>(cmd); | 9166 return NextCmdAddress<ValueType>(cmd); |
9055 } | 9167 } |
9056 | 9168 |
9057 gpu::CommandHeader header; | 9169 gpu::CommandHeader header; |
9058 uint32_t bucket_id; | 9170 uint32_t bucket_id; |
9059 }; | 9171 }; |
9060 | 9172 |
9061 COMPILE_ASSERT(sizeof(InsertEventMarkerEXT) == 8, | 9173 static_assert(sizeof(InsertEventMarkerEXT) == 8, |
9062 Sizeof_InsertEventMarkerEXT_is_not_8); | 9174 "size of InsertEventMarkerEXT should be 8"); |
9063 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, header) == 0, | 9175 static_assert(offsetof(InsertEventMarkerEXT, header) == 0, |
9064 OffsetOf_InsertEventMarkerEXT_header_not_0); | 9176 "offset of InsertEventMarkerEXT header should be 0"); |
9065 COMPILE_ASSERT(offsetof(InsertEventMarkerEXT, bucket_id) == 4, | 9177 static_assert(offsetof(InsertEventMarkerEXT, bucket_id) == 4, |
9066 OffsetOf_InsertEventMarkerEXT_bucket_id_not_4); | 9178 "offset of InsertEventMarkerEXT bucket_id should be 4"); |
9067 | 9179 |
9068 struct PushGroupMarkerEXT { | 9180 struct PushGroupMarkerEXT { |
9069 typedef PushGroupMarkerEXT ValueType; | 9181 typedef PushGroupMarkerEXT ValueType; |
9070 static const CommandId kCmdId = kPushGroupMarkerEXT; | 9182 static const CommandId kCmdId = kPushGroupMarkerEXT; |
9071 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9183 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9072 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9184 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9073 | 9185 |
9074 static uint32_t ComputeSize() { | 9186 static uint32_t ComputeSize() { |
9075 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9187 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9076 } | 9188 } |
9077 | 9189 |
9078 void SetHeader() { header.SetCmd<ValueType>(); } | 9190 void SetHeader() { header.SetCmd<ValueType>(); } |
9079 | 9191 |
9080 void Init(GLuint _bucket_id) { | 9192 void Init(GLuint _bucket_id) { |
9081 SetHeader(); | 9193 SetHeader(); |
9082 bucket_id = _bucket_id; | 9194 bucket_id = _bucket_id; |
9083 } | 9195 } |
9084 | 9196 |
9085 void* Set(void* cmd, GLuint _bucket_id) { | 9197 void* Set(void* cmd, GLuint _bucket_id) { |
9086 static_cast<ValueType*>(cmd)->Init(_bucket_id); | 9198 static_cast<ValueType*>(cmd)->Init(_bucket_id); |
9087 return NextCmdAddress<ValueType>(cmd); | 9199 return NextCmdAddress<ValueType>(cmd); |
9088 } | 9200 } |
9089 | 9201 |
9090 gpu::CommandHeader header; | 9202 gpu::CommandHeader header; |
9091 uint32_t bucket_id; | 9203 uint32_t bucket_id; |
9092 }; | 9204 }; |
9093 | 9205 |
9094 COMPILE_ASSERT(sizeof(PushGroupMarkerEXT) == 8, | 9206 static_assert(sizeof(PushGroupMarkerEXT) == 8, |
9095 Sizeof_PushGroupMarkerEXT_is_not_8); | 9207 "size of PushGroupMarkerEXT should be 8"); |
9096 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, header) == 0, | 9208 static_assert(offsetof(PushGroupMarkerEXT, header) == 0, |
9097 OffsetOf_PushGroupMarkerEXT_header_not_0); | 9209 "offset of PushGroupMarkerEXT header should be 0"); |
9098 COMPILE_ASSERT(offsetof(PushGroupMarkerEXT, bucket_id) == 4, | 9210 static_assert(offsetof(PushGroupMarkerEXT, bucket_id) == 4, |
9099 OffsetOf_PushGroupMarkerEXT_bucket_id_not_4); | 9211 "offset of PushGroupMarkerEXT bucket_id should be 4"); |
9100 | 9212 |
9101 struct PopGroupMarkerEXT { | 9213 struct PopGroupMarkerEXT { |
9102 typedef PopGroupMarkerEXT ValueType; | 9214 typedef PopGroupMarkerEXT ValueType; |
9103 static const CommandId kCmdId = kPopGroupMarkerEXT; | 9215 static const CommandId kCmdId = kPopGroupMarkerEXT; |
9104 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9216 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9105 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9217 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9106 | 9218 |
9107 static uint32_t ComputeSize() { | 9219 static uint32_t ComputeSize() { |
9108 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9220 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9109 } | 9221 } |
9110 | 9222 |
9111 void SetHeader() { header.SetCmd<ValueType>(); } | 9223 void SetHeader() { header.SetCmd<ValueType>(); } |
9112 | 9224 |
9113 void Init() { SetHeader(); } | 9225 void Init() { SetHeader(); } |
9114 | 9226 |
9115 void* Set(void* cmd) { | 9227 void* Set(void* cmd) { |
9116 static_cast<ValueType*>(cmd)->Init(); | 9228 static_cast<ValueType*>(cmd)->Init(); |
9117 return NextCmdAddress<ValueType>(cmd); | 9229 return NextCmdAddress<ValueType>(cmd); |
9118 } | 9230 } |
9119 | 9231 |
9120 gpu::CommandHeader header; | 9232 gpu::CommandHeader header; |
9121 }; | 9233 }; |
9122 | 9234 |
9123 COMPILE_ASSERT(sizeof(PopGroupMarkerEXT) == 4, | 9235 static_assert(sizeof(PopGroupMarkerEXT) == 4, |
9124 Sizeof_PopGroupMarkerEXT_is_not_4); | 9236 "size of PopGroupMarkerEXT should be 4"); |
9125 COMPILE_ASSERT(offsetof(PopGroupMarkerEXT, header) == 0, | 9237 static_assert(offsetof(PopGroupMarkerEXT, header) == 0, |
9126 OffsetOf_PopGroupMarkerEXT_header_not_0); | 9238 "offset of PopGroupMarkerEXT header should be 0"); |
9127 | 9239 |
9128 struct GenVertexArraysOESImmediate { | 9240 struct GenVertexArraysOESImmediate { |
9129 typedef GenVertexArraysOESImmediate ValueType; | 9241 typedef GenVertexArraysOESImmediate ValueType; |
9130 static const CommandId kCmdId = kGenVertexArraysOESImmediate; | 9242 static const CommandId kCmdId = kGenVertexArraysOESImmediate; |
9131 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 9243 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
9132 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9244 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9133 | 9245 |
9134 static uint32_t ComputeDataSize(GLsizei n) { | 9246 static uint32_t ComputeDataSize(GLsizei n) { |
9135 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 9247 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
9136 } | 9248 } |
(...skipping 16 matching lines...) Expand all Loading... |
9153 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) { | 9265 void* Set(void* cmd, GLsizei _n, GLuint* _arrays) { |
9154 static_cast<ValueType*>(cmd)->Init(_n, _arrays); | 9266 static_cast<ValueType*>(cmd)->Init(_n, _arrays); |
9155 const uint32_t size = ComputeSize(_n); | 9267 const uint32_t size = ComputeSize(_n); |
9156 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 9268 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
9157 } | 9269 } |
9158 | 9270 |
9159 gpu::CommandHeader header; | 9271 gpu::CommandHeader header; |
9160 int32_t n; | 9272 int32_t n; |
9161 }; | 9273 }; |
9162 | 9274 |
9163 COMPILE_ASSERT(sizeof(GenVertexArraysOESImmediate) == 8, | 9275 static_assert(sizeof(GenVertexArraysOESImmediate) == 8, |
9164 Sizeof_GenVertexArraysOESImmediate_is_not_8); | 9276 "size of GenVertexArraysOESImmediate should be 8"); |
9165 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, header) == 0, | 9277 static_assert(offsetof(GenVertexArraysOESImmediate, header) == 0, |
9166 OffsetOf_GenVertexArraysOESImmediate_header_not_0); | 9278 "offset of GenVertexArraysOESImmediate header should be 0"); |
9167 COMPILE_ASSERT(offsetof(GenVertexArraysOESImmediate, n) == 4, | 9279 static_assert(offsetof(GenVertexArraysOESImmediate, n) == 4, |
9168 OffsetOf_GenVertexArraysOESImmediate_n_not_4); | 9280 "offset of GenVertexArraysOESImmediate n should be 4"); |
9169 | 9281 |
9170 struct DeleteVertexArraysOESImmediate { | 9282 struct DeleteVertexArraysOESImmediate { |
9171 typedef DeleteVertexArraysOESImmediate ValueType; | 9283 typedef DeleteVertexArraysOESImmediate ValueType; |
9172 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate; | 9284 static const CommandId kCmdId = kDeleteVertexArraysOESImmediate; |
9173 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 9285 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
9174 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9286 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9175 | 9287 |
9176 static uint32_t ComputeDataSize(GLsizei n) { | 9288 static uint32_t ComputeDataSize(GLsizei n) { |
9177 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 9289 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
9178 } | 9290 } |
(...skipping 16 matching lines...) Expand all Loading... |
9195 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) { | 9307 void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) { |
9196 static_cast<ValueType*>(cmd)->Init(_n, _arrays); | 9308 static_cast<ValueType*>(cmd)->Init(_n, _arrays); |
9197 const uint32_t size = ComputeSize(_n); | 9309 const uint32_t size = ComputeSize(_n); |
9198 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 9310 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
9199 } | 9311 } |
9200 | 9312 |
9201 gpu::CommandHeader header; | 9313 gpu::CommandHeader header; |
9202 int32_t n; | 9314 int32_t n; |
9203 }; | 9315 }; |
9204 | 9316 |
9205 COMPILE_ASSERT(sizeof(DeleteVertexArraysOESImmediate) == 8, | 9317 static_assert(sizeof(DeleteVertexArraysOESImmediate) == 8, |
9206 Sizeof_DeleteVertexArraysOESImmediate_is_not_8); | 9318 "size of DeleteVertexArraysOESImmediate should be 8"); |
9207 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, header) == 0, | 9319 static_assert(offsetof(DeleteVertexArraysOESImmediate, header) == 0, |
9208 OffsetOf_DeleteVertexArraysOESImmediate_header_not_0); | 9320 "offset of DeleteVertexArraysOESImmediate header should be 0"); |
9209 COMPILE_ASSERT(offsetof(DeleteVertexArraysOESImmediate, n) == 4, | 9321 static_assert(offsetof(DeleteVertexArraysOESImmediate, n) == 4, |
9210 OffsetOf_DeleteVertexArraysOESImmediate_n_not_4); | 9322 "offset of DeleteVertexArraysOESImmediate n should be 4"); |
9211 | 9323 |
9212 struct IsVertexArrayOES { | 9324 struct IsVertexArrayOES { |
9213 typedef IsVertexArrayOES ValueType; | 9325 typedef IsVertexArrayOES ValueType; |
9214 static const CommandId kCmdId = kIsVertexArrayOES; | 9326 static const CommandId kCmdId = kIsVertexArrayOES; |
9215 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9327 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9216 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9328 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9217 | 9329 |
9218 typedef uint32_t Result; | 9330 typedef uint32_t Result; |
9219 | 9331 |
9220 static uint32_t ComputeSize() { | 9332 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
9240 ->Init(_array, _result_shm_id, _result_shm_offset); | 9352 ->Init(_array, _result_shm_id, _result_shm_offset); |
9241 return NextCmdAddress<ValueType>(cmd); | 9353 return NextCmdAddress<ValueType>(cmd); |
9242 } | 9354 } |
9243 | 9355 |
9244 gpu::CommandHeader header; | 9356 gpu::CommandHeader header; |
9245 uint32_t array; | 9357 uint32_t array; |
9246 uint32_t result_shm_id; | 9358 uint32_t result_shm_id; |
9247 uint32_t result_shm_offset; | 9359 uint32_t result_shm_offset; |
9248 }; | 9360 }; |
9249 | 9361 |
9250 COMPILE_ASSERT(sizeof(IsVertexArrayOES) == 16, | 9362 static_assert(sizeof(IsVertexArrayOES) == 16, |
9251 Sizeof_IsVertexArrayOES_is_not_16); | 9363 "size of IsVertexArrayOES should be 16"); |
9252 COMPILE_ASSERT(offsetof(IsVertexArrayOES, header) == 0, | 9364 static_assert(offsetof(IsVertexArrayOES, header) == 0, |
9253 OffsetOf_IsVertexArrayOES_header_not_0); | 9365 "offset of IsVertexArrayOES header should be 0"); |
9254 COMPILE_ASSERT(offsetof(IsVertexArrayOES, array) == 4, | 9366 static_assert(offsetof(IsVertexArrayOES, array) == 4, |
9255 OffsetOf_IsVertexArrayOES_array_not_4); | 9367 "offset of IsVertexArrayOES array should be 4"); |
9256 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_id) == 8, | 9368 static_assert(offsetof(IsVertexArrayOES, result_shm_id) == 8, |
9257 OffsetOf_IsVertexArrayOES_result_shm_id_not_8); | 9369 "offset of IsVertexArrayOES result_shm_id should be 8"); |
9258 COMPILE_ASSERT(offsetof(IsVertexArrayOES, result_shm_offset) == 12, | 9370 static_assert(offsetof(IsVertexArrayOES, result_shm_offset) == 12, |
9259 OffsetOf_IsVertexArrayOES_result_shm_offset_not_12); | 9371 "offset of IsVertexArrayOES result_shm_offset should be 12"); |
9260 | 9372 |
9261 struct BindVertexArrayOES { | 9373 struct BindVertexArrayOES { |
9262 typedef BindVertexArrayOES ValueType; | 9374 typedef BindVertexArrayOES ValueType; |
9263 static const CommandId kCmdId = kBindVertexArrayOES; | 9375 static const CommandId kCmdId = kBindVertexArrayOES; |
9264 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9376 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9265 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9377 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9266 | 9378 |
9267 static uint32_t ComputeSize() { | 9379 static uint32_t ComputeSize() { |
9268 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9380 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9269 } | 9381 } |
9270 | 9382 |
9271 void SetHeader() { header.SetCmd<ValueType>(); } | 9383 void SetHeader() { header.SetCmd<ValueType>(); } |
9272 | 9384 |
9273 void Init(GLuint _array) { | 9385 void Init(GLuint _array) { |
9274 SetHeader(); | 9386 SetHeader(); |
9275 array = _array; | 9387 array = _array; |
9276 } | 9388 } |
9277 | 9389 |
9278 void* Set(void* cmd, GLuint _array) { | 9390 void* Set(void* cmd, GLuint _array) { |
9279 static_cast<ValueType*>(cmd)->Init(_array); | 9391 static_cast<ValueType*>(cmd)->Init(_array); |
9280 return NextCmdAddress<ValueType>(cmd); | 9392 return NextCmdAddress<ValueType>(cmd); |
9281 } | 9393 } |
9282 | 9394 |
9283 gpu::CommandHeader header; | 9395 gpu::CommandHeader header; |
9284 uint32_t array; | 9396 uint32_t array; |
9285 }; | 9397 }; |
9286 | 9398 |
9287 COMPILE_ASSERT(sizeof(BindVertexArrayOES) == 8, | 9399 static_assert(sizeof(BindVertexArrayOES) == 8, |
9288 Sizeof_BindVertexArrayOES_is_not_8); | 9400 "size of BindVertexArrayOES should be 8"); |
9289 COMPILE_ASSERT(offsetof(BindVertexArrayOES, header) == 0, | 9401 static_assert(offsetof(BindVertexArrayOES, header) == 0, |
9290 OffsetOf_BindVertexArrayOES_header_not_0); | 9402 "offset of BindVertexArrayOES header should be 0"); |
9291 COMPILE_ASSERT(offsetof(BindVertexArrayOES, array) == 4, | 9403 static_assert(offsetof(BindVertexArrayOES, array) == 4, |
9292 OffsetOf_BindVertexArrayOES_array_not_4); | 9404 "offset of BindVertexArrayOES array should be 4"); |
9293 | 9405 |
9294 struct SwapBuffers { | 9406 struct SwapBuffers { |
9295 typedef SwapBuffers ValueType; | 9407 typedef SwapBuffers ValueType; |
9296 static const CommandId kCmdId = kSwapBuffers; | 9408 static const CommandId kCmdId = kSwapBuffers; |
9297 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9409 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9298 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 9410 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
9299 | 9411 |
9300 static uint32_t ComputeSize() { | 9412 static uint32_t ComputeSize() { |
9301 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9413 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9302 } | 9414 } |
9303 | 9415 |
9304 void SetHeader() { header.SetCmd<ValueType>(); } | 9416 void SetHeader() { header.SetCmd<ValueType>(); } |
9305 | 9417 |
9306 void Init() { SetHeader(); } | 9418 void Init() { SetHeader(); } |
9307 | 9419 |
9308 void* Set(void* cmd) { | 9420 void* Set(void* cmd) { |
9309 static_cast<ValueType*>(cmd)->Init(); | 9421 static_cast<ValueType*>(cmd)->Init(); |
9310 return NextCmdAddress<ValueType>(cmd); | 9422 return NextCmdAddress<ValueType>(cmd); |
9311 } | 9423 } |
9312 | 9424 |
9313 gpu::CommandHeader header; | 9425 gpu::CommandHeader header; |
9314 }; | 9426 }; |
9315 | 9427 |
9316 COMPILE_ASSERT(sizeof(SwapBuffers) == 4, Sizeof_SwapBuffers_is_not_4); | 9428 static_assert(sizeof(SwapBuffers) == 4, "size of SwapBuffers should be 4"); |
9317 COMPILE_ASSERT(offsetof(SwapBuffers, header) == 0, | 9429 static_assert(offsetof(SwapBuffers, header) == 0, |
9318 OffsetOf_SwapBuffers_header_not_0); | 9430 "offset of SwapBuffers header should be 0"); |
9319 | 9431 |
9320 struct GetMaxValueInBufferCHROMIUM { | 9432 struct GetMaxValueInBufferCHROMIUM { |
9321 typedef GetMaxValueInBufferCHROMIUM ValueType; | 9433 typedef GetMaxValueInBufferCHROMIUM ValueType; |
9322 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM; | 9434 static const CommandId kCmdId = kGetMaxValueInBufferCHROMIUM; |
9323 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9435 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9324 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9436 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9325 | 9437 |
9326 typedef GLuint Result; | 9438 typedef GLuint Result; |
9327 | 9439 |
9328 static uint32_t ComputeSize() { | 9440 static uint32_t ComputeSize() { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9360 | 9472 |
9361 gpu::CommandHeader header; | 9473 gpu::CommandHeader header; |
9362 uint32_t buffer_id; | 9474 uint32_t buffer_id; |
9363 int32_t count; | 9475 int32_t count; |
9364 uint32_t type; | 9476 uint32_t type; |
9365 uint32_t offset; | 9477 uint32_t offset; |
9366 uint32_t result_shm_id; | 9478 uint32_t result_shm_id; |
9367 uint32_t result_shm_offset; | 9479 uint32_t result_shm_offset; |
9368 }; | 9480 }; |
9369 | 9481 |
9370 COMPILE_ASSERT(sizeof(GetMaxValueInBufferCHROMIUM) == 28, | 9482 static_assert(sizeof(GetMaxValueInBufferCHROMIUM) == 28, |
9371 Sizeof_GetMaxValueInBufferCHROMIUM_is_not_28); | 9483 "size of GetMaxValueInBufferCHROMIUM should be 28"); |
9372 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0, | 9484 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, header) == 0, |
9373 OffsetOf_GetMaxValueInBufferCHROMIUM_header_not_0); | 9485 "offset of GetMaxValueInBufferCHROMIUM header should be 0"); |
9374 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4, | 9486 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, buffer_id) == 4, |
9375 OffsetOf_GetMaxValueInBufferCHROMIUM_buffer_id_not_4); | 9487 "offset of GetMaxValueInBufferCHROMIUM buffer_id should be 4"); |
9376 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8, | 9488 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, count) == 8, |
9377 OffsetOf_GetMaxValueInBufferCHROMIUM_count_not_8); | 9489 "offset of GetMaxValueInBufferCHROMIUM count should be 8"); |
9378 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12, | 9490 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, type) == 12, |
9379 OffsetOf_GetMaxValueInBufferCHROMIUM_type_not_12); | 9491 "offset of GetMaxValueInBufferCHROMIUM type should be 12"); |
9380 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16, | 9492 static_assert(offsetof(GetMaxValueInBufferCHROMIUM, offset) == 16, |
9381 OffsetOf_GetMaxValueInBufferCHROMIUM_offset_not_16); | 9493 "offset of GetMaxValueInBufferCHROMIUM offset should be 16"); |
9382 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20, | 9494 static_assert( |
9383 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_id_not_20); | 9495 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20, |
9384 COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24, | 9496 "offset of GetMaxValueInBufferCHROMIUM result_shm_id should be 20"); |
9385 OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24); | 9497 static_assert( |
| 9498 offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24, |
| 9499 "offset of GetMaxValueInBufferCHROMIUM result_shm_offset should be 24"); |
9386 | 9500 |
9387 struct EnableFeatureCHROMIUM { | 9501 struct EnableFeatureCHROMIUM { |
9388 typedef EnableFeatureCHROMIUM ValueType; | 9502 typedef EnableFeatureCHROMIUM ValueType; |
9389 static const CommandId kCmdId = kEnableFeatureCHROMIUM; | 9503 static const CommandId kCmdId = kEnableFeatureCHROMIUM; |
9390 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9504 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9391 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9505 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9392 | 9506 |
9393 typedef GLint Result; | 9507 typedef GLint Result; |
9394 | 9508 |
9395 static uint32_t ComputeSize() { | 9509 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
9415 ->Init(_bucket_id, _result_shm_id, _result_shm_offset); | 9529 ->Init(_bucket_id, _result_shm_id, _result_shm_offset); |
9416 return NextCmdAddress<ValueType>(cmd); | 9530 return NextCmdAddress<ValueType>(cmd); |
9417 } | 9531 } |
9418 | 9532 |
9419 gpu::CommandHeader header; | 9533 gpu::CommandHeader header; |
9420 uint32_t bucket_id; | 9534 uint32_t bucket_id; |
9421 uint32_t result_shm_id; | 9535 uint32_t result_shm_id; |
9422 uint32_t result_shm_offset; | 9536 uint32_t result_shm_offset; |
9423 }; | 9537 }; |
9424 | 9538 |
9425 COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM) == 16, | 9539 static_assert(sizeof(EnableFeatureCHROMIUM) == 16, |
9426 Sizeof_EnableFeatureCHROMIUM_is_not_16); | 9540 "size of EnableFeatureCHROMIUM should be 16"); |
9427 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, header) == 0, | 9541 static_assert(offsetof(EnableFeatureCHROMIUM, header) == 0, |
9428 OffsetOf_EnableFeatureCHROMIUM_header_not_0); | 9542 "offset of EnableFeatureCHROMIUM header should be 0"); |
9429 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4, | 9543 static_assert(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4, |
9430 OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4); | 9544 "offset of EnableFeatureCHROMIUM bucket_id should be 4"); |
9431 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8, | 9545 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8, |
9432 OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8); | 9546 "offset of EnableFeatureCHROMIUM result_shm_id should be 8"); |
9433 COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12, | 9547 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12, |
9434 OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12); | 9548 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12"); |
9435 | 9549 |
9436 struct ResizeCHROMIUM { | 9550 struct ResizeCHROMIUM { |
9437 typedef ResizeCHROMIUM ValueType; | 9551 typedef ResizeCHROMIUM ValueType; |
9438 static const CommandId kCmdId = kResizeCHROMIUM; | 9552 static const CommandId kCmdId = kResizeCHROMIUM; |
9439 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9553 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9440 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9554 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9441 | 9555 |
9442 static uint32_t ComputeSize() { | 9556 static uint32_t ComputeSize() { |
9443 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9557 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9444 } | 9558 } |
(...skipping 11 matching lines...) Expand all Loading... |
9456 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor); | 9570 static_cast<ValueType*>(cmd)->Init(_width, _height, _scale_factor); |
9457 return NextCmdAddress<ValueType>(cmd); | 9571 return NextCmdAddress<ValueType>(cmd); |
9458 } | 9572 } |
9459 | 9573 |
9460 gpu::CommandHeader header; | 9574 gpu::CommandHeader header; |
9461 uint32_t width; | 9575 uint32_t width; |
9462 uint32_t height; | 9576 uint32_t height; |
9463 float scale_factor; | 9577 float scale_factor; |
9464 }; | 9578 }; |
9465 | 9579 |
9466 COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16, Sizeof_ResizeCHROMIUM_is_not_16); | 9580 static_assert(sizeof(ResizeCHROMIUM) == 16, |
9467 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, header) == 0, | 9581 "size of ResizeCHROMIUM should be 16"); |
9468 OffsetOf_ResizeCHROMIUM_header_not_0); | 9582 static_assert(offsetof(ResizeCHROMIUM, header) == 0, |
9469 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, width) == 4, | 9583 "offset of ResizeCHROMIUM header should be 0"); |
9470 OffsetOf_ResizeCHROMIUM_width_not_4); | 9584 static_assert(offsetof(ResizeCHROMIUM, width) == 4, |
9471 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, height) == 8, | 9585 "offset of ResizeCHROMIUM width should be 4"); |
9472 OffsetOf_ResizeCHROMIUM_height_not_8); | 9586 static_assert(offsetof(ResizeCHROMIUM, height) == 8, |
9473 COMPILE_ASSERT(offsetof(ResizeCHROMIUM, scale_factor) == 12, | 9587 "offset of ResizeCHROMIUM height should be 8"); |
9474 OffsetOf_ResizeCHROMIUM_scale_factor_not_12); | 9588 static_assert(offsetof(ResizeCHROMIUM, scale_factor) == 12, |
| 9589 "offset of ResizeCHROMIUM scale_factor should be 12"); |
9475 | 9590 |
9476 struct GetRequestableExtensionsCHROMIUM { | 9591 struct GetRequestableExtensionsCHROMIUM { |
9477 typedef GetRequestableExtensionsCHROMIUM ValueType; | 9592 typedef GetRequestableExtensionsCHROMIUM ValueType; |
9478 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM; | 9593 static const CommandId kCmdId = kGetRequestableExtensionsCHROMIUM; |
9479 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9594 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9480 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9595 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9481 | 9596 |
9482 static uint32_t ComputeSize() { | 9597 static uint32_t ComputeSize() { |
9483 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9598 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9484 } | 9599 } |
9485 | 9600 |
9486 void SetHeader() { header.SetCmd<ValueType>(); } | 9601 void SetHeader() { header.SetCmd<ValueType>(); } |
9487 | 9602 |
9488 void Init(uint32_t _bucket_id) { | 9603 void Init(uint32_t _bucket_id) { |
9489 SetHeader(); | 9604 SetHeader(); |
9490 bucket_id = _bucket_id; | 9605 bucket_id = _bucket_id; |
9491 } | 9606 } |
9492 | 9607 |
9493 void* Set(void* cmd, uint32_t _bucket_id) { | 9608 void* Set(void* cmd, uint32_t _bucket_id) { |
9494 static_cast<ValueType*>(cmd)->Init(_bucket_id); | 9609 static_cast<ValueType*>(cmd)->Init(_bucket_id); |
9495 return NextCmdAddress<ValueType>(cmd); | 9610 return NextCmdAddress<ValueType>(cmd); |
9496 } | 9611 } |
9497 | 9612 |
9498 gpu::CommandHeader header; | 9613 gpu::CommandHeader header; |
9499 uint32_t bucket_id; | 9614 uint32_t bucket_id; |
9500 }; | 9615 }; |
9501 | 9616 |
9502 COMPILE_ASSERT(sizeof(GetRequestableExtensionsCHROMIUM) == 8, | 9617 static_assert(sizeof(GetRequestableExtensionsCHROMIUM) == 8, |
9503 Sizeof_GetRequestableExtensionsCHROMIUM_is_not_8); | 9618 "size of GetRequestableExtensionsCHROMIUM should be 8"); |
9504 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0, | 9619 static_assert(offsetof(GetRequestableExtensionsCHROMIUM, header) == 0, |
9505 OffsetOf_GetRequestableExtensionsCHROMIUM_header_not_0); | 9620 "offset of GetRequestableExtensionsCHROMIUM header should be 0"); |
9506 COMPILE_ASSERT(offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4, | 9621 static_assert( |
9507 OffsetOf_GetRequestableExtensionsCHROMIUM_bucket_id_not_4); | 9622 offsetof(GetRequestableExtensionsCHROMIUM, bucket_id) == 4, |
| 9623 "offset of GetRequestableExtensionsCHROMIUM bucket_id should be 4"); |
9508 | 9624 |
9509 struct RequestExtensionCHROMIUM { | 9625 struct RequestExtensionCHROMIUM { |
9510 typedef RequestExtensionCHROMIUM ValueType; | 9626 typedef RequestExtensionCHROMIUM ValueType; |
9511 static const CommandId kCmdId = kRequestExtensionCHROMIUM; | 9627 static const CommandId kCmdId = kRequestExtensionCHROMIUM; |
9512 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9628 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9513 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9629 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9514 | 9630 |
9515 static uint32_t ComputeSize() { | 9631 static uint32_t ComputeSize() { |
9516 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9632 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9517 } | 9633 } |
9518 | 9634 |
9519 void SetHeader() { header.SetCmd<ValueType>(); } | 9635 void SetHeader() { header.SetCmd<ValueType>(); } |
9520 | 9636 |
9521 void Init(uint32_t _bucket_id) { | 9637 void Init(uint32_t _bucket_id) { |
9522 SetHeader(); | 9638 SetHeader(); |
9523 bucket_id = _bucket_id; | 9639 bucket_id = _bucket_id; |
9524 } | 9640 } |
9525 | 9641 |
9526 void* Set(void* cmd, uint32_t _bucket_id) { | 9642 void* Set(void* cmd, uint32_t _bucket_id) { |
9527 static_cast<ValueType*>(cmd)->Init(_bucket_id); | 9643 static_cast<ValueType*>(cmd)->Init(_bucket_id); |
9528 return NextCmdAddress<ValueType>(cmd); | 9644 return NextCmdAddress<ValueType>(cmd); |
9529 } | 9645 } |
9530 | 9646 |
9531 gpu::CommandHeader header; | 9647 gpu::CommandHeader header; |
9532 uint32_t bucket_id; | 9648 uint32_t bucket_id; |
9533 }; | 9649 }; |
9534 | 9650 |
9535 COMPILE_ASSERT(sizeof(RequestExtensionCHROMIUM) == 8, | 9651 static_assert(sizeof(RequestExtensionCHROMIUM) == 8, |
9536 Sizeof_RequestExtensionCHROMIUM_is_not_8); | 9652 "size of RequestExtensionCHROMIUM should be 8"); |
9537 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, header) == 0, | 9653 static_assert(offsetof(RequestExtensionCHROMIUM, header) == 0, |
9538 OffsetOf_RequestExtensionCHROMIUM_header_not_0); | 9654 "offset of RequestExtensionCHROMIUM header should be 0"); |
9539 COMPILE_ASSERT(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4, | 9655 static_assert(offsetof(RequestExtensionCHROMIUM, bucket_id) == 4, |
9540 OffsetOf_RequestExtensionCHROMIUM_bucket_id_not_4); | 9656 "offset of RequestExtensionCHROMIUM bucket_id should be 4"); |
9541 | 9657 |
9542 struct GetProgramInfoCHROMIUM { | 9658 struct GetProgramInfoCHROMIUM { |
9543 typedef GetProgramInfoCHROMIUM ValueType; | 9659 typedef GetProgramInfoCHROMIUM ValueType; |
9544 static const CommandId kCmdId = kGetProgramInfoCHROMIUM; | 9660 static const CommandId kCmdId = kGetProgramInfoCHROMIUM; |
9545 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9661 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9546 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9662 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9547 | 9663 |
9548 struct Result { | 9664 struct Result { |
9549 uint32_t link_status; | 9665 uint32_t link_status; |
9550 uint32_t num_attribs; | 9666 uint32_t num_attribs; |
(...skipping 15 matching lines...) Expand all Loading... |
9566 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) { | 9682 void* Set(void* cmd, GLuint _program, uint32_t _bucket_id) { |
9567 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id); | 9683 static_cast<ValueType*>(cmd)->Init(_program, _bucket_id); |
9568 return NextCmdAddress<ValueType>(cmd); | 9684 return NextCmdAddress<ValueType>(cmd); |
9569 } | 9685 } |
9570 | 9686 |
9571 gpu::CommandHeader header; | 9687 gpu::CommandHeader header; |
9572 uint32_t program; | 9688 uint32_t program; |
9573 uint32_t bucket_id; | 9689 uint32_t bucket_id; |
9574 }; | 9690 }; |
9575 | 9691 |
9576 COMPILE_ASSERT(sizeof(GetProgramInfoCHROMIUM) == 12, | 9692 static_assert(sizeof(GetProgramInfoCHROMIUM) == 12, |
9577 Sizeof_GetProgramInfoCHROMIUM_is_not_12); | 9693 "size of GetProgramInfoCHROMIUM should be 12"); |
9578 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, header) == 0, | 9694 static_assert(offsetof(GetProgramInfoCHROMIUM, header) == 0, |
9579 OffsetOf_GetProgramInfoCHROMIUM_header_not_0); | 9695 "offset of GetProgramInfoCHROMIUM header should be 0"); |
9580 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, program) == 4, | 9696 static_assert(offsetof(GetProgramInfoCHROMIUM, program) == 4, |
9581 OffsetOf_GetProgramInfoCHROMIUM_program_not_4); | 9697 "offset of GetProgramInfoCHROMIUM program should be 4"); |
9582 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8, | 9698 static_assert(offsetof(GetProgramInfoCHROMIUM, bucket_id) == 8, |
9583 OffsetOf_GetProgramInfoCHROMIUM_bucket_id_not_8); | 9699 "offset of GetProgramInfoCHROMIUM bucket_id should be 8"); |
9584 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0, | 9700 static_assert( |
9585 OffsetOf_GetProgramInfoCHROMIUM_Result_link_status_not_0); | 9701 offsetof(GetProgramInfoCHROMIUM::Result, link_status) == 0, |
9586 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4, | 9702 "offset of GetProgramInfoCHROMIUM Result link_status should be 0"); |
9587 OffsetOf_GetProgramInfoCHROMIUM_Result_num_attribs_not_4); | 9703 static_assert( |
9588 COMPILE_ASSERT(offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8, | 9704 offsetof(GetProgramInfoCHROMIUM::Result, num_attribs) == 4, |
9589 OffsetOf_GetProgramInfoCHROMIUM_Result_num_uniforms_not_8); | 9705 "offset of GetProgramInfoCHROMIUM Result num_attribs should be 4"); |
| 9706 static_assert( |
| 9707 offsetof(GetProgramInfoCHROMIUM::Result, num_uniforms) == 8, |
| 9708 "offset of GetProgramInfoCHROMIUM Result num_uniforms should be 8"); |
9590 | 9709 |
9591 struct GetTranslatedShaderSourceANGLE { | 9710 struct GetTranslatedShaderSourceANGLE { |
9592 typedef GetTranslatedShaderSourceANGLE ValueType; | 9711 typedef GetTranslatedShaderSourceANGLE ValueType; |
9593 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE; | 9712 static const CommandId kCmdId = kGetTranslatedShaderSourceANGLE; |
9594 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9713 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9595 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9714 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9596 | 9715 |
9597 static uint32_t ComputeSize() { | 9716 static uint32_t ComputeSize() { |
9598 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9717 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9599 } | 9718 } |
9600 | 9719 |
9601 void SetHeader() { header.SetCmd<ValueType>(); } | 9720 void SetHeader() { header.SetCmd<ValueType>(); } |
9602 | 9721 |
9603 void Init(GLuint _shader, uint32_t _bucket_id) { | 9722 void Init(GLuint _shader, uint32_t _bucket_id) { |
9604 SetHeader(); | 9723 SetHeader(); |
9605 shader = _shader; | 9724 shader = _shader; |
9606 bucket_id = _bucket_id; | 9725 bucket_id = _bucket_id; |
9607 } | 9726 } |
9608 | 9727 |
9609 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) { | 9728 void* Set(void* cmd, GLuint _shader, uint32_t _bucket_id) { |
9610 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id); | 9729 static_cast<ValueType*>(cmd)->Init(_shader, _bucket_id); |
9611 return NextCmdAddress<ValueType>(cmd); | 9730 return NextCmdAddress<ValueType>(cmd); |
9612 } | 9731 } |
9613 | 9732 |
9614 gpu::CommandHeader header; | 9733 gpu::CommandHeader header; |
9615 uint32_t shader; | 9734 uint32_t shader; |
9616 uint32_t bucket_id; | 9735 uint32_t bucket_id; |
9617 }; | 9736 }; |
9618 | 9737 |
9619 COMPILE_ASSERT(sizeof(GetTranslatedShaderSourceANGLE) == 12, | 9738 static_assert(sizeof(GetTranslatedShaderSourceANGLE) == 12, |
9620 Sizeof_GetTranslatedShaderSourceANGLE_is_not_12); | 9739 "size of GetTranslatedShaderSourceANGLE should be 12"); |
9621 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, header) == 0, | 9740 static_assert(offsetof(GetTranslatedShaderSourceANGLE, header) == 0, |
9622 OffsetOf_GetTranslatedShaderSourceANGLE_header_not_0); | 9741 "offset of GetTranslatedShaderSourceANGLE header should be 0"); |
9623 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4, | 9742 static_assert(offsetof(GetTranslatedShaderSourceANGLE, shader) == 4, |
9624 OffsetOf_GetTranslatedShaderSourceANGLE_shader_not_4); | 9743 "offset of GetTranslatedShaderSourceANGLE shader should be 4"); |
9625 COMPILE_ASSERT(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8, | 9744 static_assert(offsetof(GetTranslatedShaderSourceANGLE, bucket_id) == 8, |
9626 OffsetOf_GetTranslatedShaderSourceANGLE_bucket_id_not_8); | 9745 "offset of GetTranslatedShaderSourceANGLE bucket_id should be 8"); |
9627 | 9746 |
9628 struct PostSubBufferCHROMIUM { | 9747 struct PostSubBufferCHROMIUM { |
9629 typedef PostSubBufferCHROMIUM ValueType; | 9748 typedef PostSubBufferCHROMIUM ValueType; |
9630 static const CommandId kCmdId = kPostSubBufferCHROMIUM; | 9749 static const CommandId kCmdId = kPostSubBufferCHROMIUM; |
9631 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9750 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9632 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9751 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9633 | 9752 |
9634 static uint32_t ComputeSize() { | 9753 static uint32_t ComputeSize() { |
9635 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9754 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9636 } | 9755 } |
(...skipping 13 matching lines...) Expand all Loading... |
9650 return NextCmdAddress<ValueType>(cmd); | 9769 return NextCmdAddress<ValueType>(cmd); |
9651 } | 9770 } |
9652 | 9771 |
9653 gpu::CommandHeader header; | 9772 gpu::CommandHeader header; |
9654 int32_t x; | 9773 int32_t x; |
9655 int32_t y; | 9774 int32_t y; |
9656 int32_t width; | 9775 int32_t width; |
9657 int32_t height; | 9776 int32_t height; |
9658 }; | 9777 }; |
9659 | 9778 |
9660 COMPILE_ASSERT(sizeof(PostSubBufferCHROMIUM) == 20, | 9779 static_assert(sizeof(PostSubBufferCHROMIUM) == 20, |
9661 Sizeof_PostSubBufferCHROMIUM_is_not_20); | 9780 "size of PostSubBufferCHROMIUM should be 20"); |
9662 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, header) == 0, | 9781 static_assert(offsetof(PostSubBufferCHROMIUM, header) == 0, |
9663 OffsetOf_PostSubBufferCHROMIUM_header_not_0); | 9782 "offset of PostSubBufferCHROMIUM header should be 0"); |
9664 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, x) == 4, | 9783 static_assert(offsetof(PostSubBufferCHROMIUM, x) == 4, |
9665 OffsetOf_PostSubBufferCHROMIUM_x_not_4); | 9784 "offset of PostSubBufferCHROMIUM x should be 4"); |
9666 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, y) == 8, | 9785 static_assert(offsetof(PostSubBufferCHROMIUM, y) == 8, |
9667 OffsetOf_PostSubBufferCHROMIUM_y_not_8); | 9786 "offset of PostSubBufferCHROMIUM y should be 8"); |
9668 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, width) == 12, | 9787 static_assert(offsetof(PostSubBufferCHROMIUM, width) == 12, |
9669 OffsetOf_PostSubBufferCHROMIUM_width_not_12); | 9788 "offset of PostSubBufferCHROMIUM width should be 12"); |
9670 COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16, | 9789 static_assert(offsetof(PostSubBufferCHROMIUM, height) == 16, |
9671 OffsetOf_PostSubBufferCHROMIUM_height_not_16); | 9790 "offset of PostSubBufferCHROMIUM height should be 16"); |
9672 | 9791 |
9673 struct TexImageIOSurface2DCHROMIUM { | 9792 struct TexImageIOSurface2DCHROMIUM { |
9674 typedef TexImageIOSurface2DCHROMIUM ValueType; | 9793 typedef TexImageIOSurface2DCHROMIUM ValueType; |
9675 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM; | 9794 static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM; |
9676 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9795 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9677 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9796 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9678 | 9797 |
9679 static uint32_t ComputeSize() { | 9798 static uint32_t ComputeSize() { |
9680 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9799 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9681 } | 9800 } |
(...skipping 25 matching lines...) Expand all Loading... |
9707 } | 9826 } |
9708 | 9827 |
9709 gpu::CommandHeader header; | 9828 gpu::CommandHeader header; |
9710 uint32_t target; | 9829 uint32_t target; |
9711 int32_t width; | 9830 int32_t width; |
9712 int32_t height; | 9831 int32_t height; |
9713 uint32_t ioSurfaceId; | 9832 uint32_t ioSurfaceId; |
9714 uint32_t plane; | 9833 uint32_t plane; |
9715 }; | 9834 }; |
9716 | 9835 |
9717 COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM) == 24, | 9836 static_assert(sizeof(TexImageIOSurface2DCHROMIUM) == 24, |
9718 Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24); | 9837 "size of TexImageIOSurface2DCHROMIUM should be 24"); |
9719 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0, | 9838 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0, |
9720 OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0); | 9839 "offset of TexImageIOSurface2DCHROMIUM header should be 0"); |
9721 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4, | 9840 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4, |
9722 OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4); | 9841 "offset of TexImageIOSurface2DCHROMIUM target should be 4"); |
9723 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8, | 9842 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8, |
9724 OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8); | 9843 "offset of TexImageIOSurface2DCHROMIUM width should be 8"); |
9725 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12, | 9844 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12, |
9726 OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12); | 9845 "offset of TexImageIOSurface2DCHROMIUM height should be 12"); |
9727 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16, | 9846 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16, |
9728 OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16); | 9847 "offset of TexImageIOSurface2DCHROMIUM ioSurfaceId should be 16"); |
9729 COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20, | 9848 static_assert(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20, |
9730 OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20); | 9849 "offset of TexImageIOSurface2DCHROMIUM plane should be 20"); |
9731 | 9850 |
9732 struct CopyTextureCHROMIUM { | 9851 struct CopyTextureCHROMIUM { |
9733 typedef CopyTextureCHROMIUM ValueType; | 9852 typedef CopyTextureCHROMIUM ValueType; |
9734 static const CommandId kCmdId = kCopyTextureCHROMIUM; | 9853 static const CommandId kCmdId = kCopyTextureCHROMIUM; |
9735 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9854 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9736 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9855 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9737 | 9856 |
9738 static uint32_t ComputeSize() { | 9857 static uint32_t ComputeSize() { |
9739 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9858 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9740 } | 9859 } |
(...skipping 29 matching lines...) Expand all Loading... |
9770 | 9889 |
9771 gpu::CommandHeader header; | 9890 gpu::CommandHeader header; |
9772 uint32_t target; | 9891 uint32_t target; |
9773 uint32_t source_id; | 9892 uint32_t source_id; |
9774 uint32_t dest_id; | 9893 uint32_t dest_id; |
9775 int32_t level; | 9894 int32_t level; |
9776 int32_t internalformat; | 9895 int32_t internalformat; |
9777 uint32_t dest_type; | 9896 uint32_t dest_type; |
9778 }; | 9897 }; |
9779 | 9898 |
9780 COMPILE_ASSERT(sizeof(CopyTextureCHROMIUM) == 28, | 9899 static_assert(sizeof(CopyTextureCHROMIUM) == 28, |
9781 Sizeof_CopyTextureCHROMIUM_is_not_28); | 9900 "size of CopyTextureCHROMIUM should be 28"); |
9782 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, header) == 0, | 9901 static_assert(offsetof(CopyTextureCHROMIUM, header) == 0, |
9783 OffsetOf_CopyTextureCHROMIUM_header_not_0); | 9902 "offset of CopyTextureCHROMIUM header should be 0"); |
9784 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, target) == 4, | 9903 static_assert(offsetof(CopyTextureCHROMIUM, target) == 4, |
9785 OffsetOf_CopyTextureCHROMIUM_target_not_4); | 9904 "offset of CopyTextureCHROMIUM target should be 4"); |
9786 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, source_id) == 8, | 9905 static_assert(offsetof(CopyTextureCHROMIUM, source_id) == 8, |
9787 OffsetOf_CopyTextureCHROMIUM_source_id_not_8); | 9906 "offset of CopyTextureCHROMIUM source_id should be 8"); |
9788 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_id) == 12, | 9907 static_assert(offsetof(CopyTextureCHROMIUM, dest_id) == 12, |
9789 OffsetOf_CopyTextureCHROMIUM_dest_id_not_12); | 9908 "offset of CopyTextureCHROMIUM dest_id should be 12"); |
9790 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, level) == 16, | 9909 static_assert(offsetof(CopyTextureCHROMIUM, level) == 16, |
9791 OffsetOf_CopyTextureCHROMIUM_level_not_16); | 9910 "offset of CopyTextureCHROMIUM level should be 16"); |
9792 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, internalformat) == 20, | 9911 static_assert(offsetof(CopyTextureCHROMIUM, internalformat) == 20, |
9793 OffsetOf_CopyTextureCHROMIUM_internalformat_not_20); | 9912 "offset of CopyTextureCHROMIUM internalformat should be 20"); |
9794 COMPILE_ASSERT(offsetof(CopyTextureCHROMIUM, dest_type) == 24, | 9913 static_assert(offsetof(CopyTextureCHROMIUM, dest_type) == 24, |
9795 OffsetOf_CopyTextureCHROMIUM_dest_type_not_24); | 9914 "offset of CopyTextureCHROMIUM dest_type should be 24"); |
9796 | 9915 |
9797 struct DrawArraysInstancedANGLE { | 9916 struct DrawArraysInstancedANGLE { |
9798 typedef DrawArraysInstancedANGLE ValueType; | 9917 typedef DrawArraysInstancedANGLE ValueType; |
9799 static const CommandId kCmdId = kDrawArraysInstancedANGLE; | 9918 static const CommandId kCmdId = kDrawArraysInstancedANGLE; |
9800 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9919 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9801 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9920 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9802 | 9921 |
9803 static uint32_t ComputeSize() { | 9922 static uint32_t ComputeSize() { |
9804 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9923 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9805 } | 9924 } |
(...skipping 17 matching lines...) Expand all Loading... |
9823 return NextCmdAddress<ValueType>(cmd); | 9942 return NextCmdAddress<ValueType>(cmd); |
9824 } | 9943 } |
9825 | 9944 |
9826 gpu::CommandHeader header; | 9945 gpu::CommandHeader header; |
9827 uint32_t mode; | 9946 uint32_t mode; |
9828 int32_t first; | 9947 int32_t first; |
9829 int32_t count; | 9948 int32_t count; |
9830 int32_t primcount; | 9949 int32_t primcount; |
9831 }; | 9950 }; |
9832 | 9951 |
9833 COMPILE_ASSERT(sizeof(DrawArraysInstancedANGLE) == 20, | 9952 static_assert(sizeof(DrawArraysInstancedANGLE) == 20, |
9834 Sizeof_DrawArraysInstancedANGLE_is_not_20); | 9953 "size of DrawArraysInstancedANGLE should be 20"); |
9835 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, header) == 0, | 9954 static_assert(offsetof(DrawArraysInstancedANGLE, header) == 0, |
9836 OffsetOf_DrawArraysInstancedANGLE_header_not_0); | 9955 "offset of DrawArraysInstancedANGLE header should be 0"); |
9837 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, mode) == 4, | 9956 static_assert(offsetof(DrawArraysInstancedANGLE, mode) == 4, |
9838 OffsetOf_DrawArraysInstancedANGLE_mode_not_4); | 9957 "offset of DrawArraysInstancedANGLE mode should be 4"); |
9839 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, first) == 8, | 9958 static_assert(offsetof(DrawArraysInstancedANGLE, first) == 8, |
9840 OffsetOf_DrawArraysInstancedANGLE_first_not_8); | 9959 "offset of DrawArraysInstancedANGLE first should be 8"); |
9841 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, count) == 12, | 9960 static_assert(offsetof(DrawArraysInstancedANGLE, count) == 12, |
9842 OffsetOf_DrawArraysInstancedANGLE_count_not_12); | 9961 "offset of DrawArraysInstancedANGLE count should be 12"); |
9843 COMPILE_ASSERT(offsetof(DrawArraysInstancedANGLE, primcount) == 16, | 9962 static_assert(offsetof(DrawArraysInstancedANGLE, primcount) == 16, |
9844 OffsetOf_DrawArraysInstancedANGLE_primcount_not_16); | 9963 "offset of DrawArraysInstancedANGLE primcount should be 16"); |
9845 | 9964 |
9846 struct DrawElementsInstancedANGLE { | 9965 struct DrawElementsInstancedANGLE { |
9847 typedef DrawElementsInstancedANGLE ValueType; | 9966 typedef DrawElementsInstancedANGLE ValueType; |
9848 static const CommandId kCmdId = kDrawElementsInstancedANGLE; | 9967 static const CommandId kCmdId = kDrawElementsInstancedANGLE; |
9849 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 9968 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9850 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 9969 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9851 | 9970 |
9852 static uint32_t ComputeSize() { | 9971 static uint32_t ComputeSize() { |
9853 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 9972 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9854 } | 9973 } |
(...skipping 25 matching lines...) Expand all Loading... |
9880 } | 9999 } |
9881 | 10000 |
9882 gpu::CommandHeader header; | 10001 gpu::CommandHeader header; |
9883 uint32_t mode; | 10002 uint32_t mode; |
9884 int32_t count; | 10003 int32_t count; |
9885 uint32_t type; | 10004 uint32_t type; |
9886 uint32_t index_offset; | 10005 uint32_t index_offset; |
9887 int32_t primcount; | 10006 int32_t primcount; |
9888 }; | 10007 }; |
9889 | 10008 |
9890 COMPILE_ASSERT(sizeof(DrawElementsInstancedANGLE) == 24, | 10009 static_assert(sizeof(DrawElementsInstancedANGLE) == 24, |
9891 Sizeof_DrawElementsInstancedANGLE_is_not_24); | 10010 "size of DrawElementsInstancedANGLE should be 24"); |
9892 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, header) == 0, | 10011 static_assert(offsetof(DrawElementsInstancedANGLE, header) == 0, |
9893 OffsetOf_DrawElementsInstancedANGLE_header_not_0); | 10012 "offset of DrawElementsInstancedANGLE header should be 0"); |
9894 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, mode) == 4, | 10013 static_assert(offsetof(DrawElementsInstancedANGLE, mode) == 4, |
9895 OffsetOf_DrawElementsInstancedANGLE_mode_not_4); | 10014 "offset of DrawElementsInstancedANGLE mode should be 4"); |
9896 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, count) == 8, | 10015 static_assert(offsetof(DrawElementsInstancedANGLE, count) == 8, |
9897 OffsetOf_DrawElementsInstancedANGLE_count_not_8); | 10016 "offset of DrawElementsInstancedANGLE count should be 8"); |
9898 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, type) == 12, | 10017 static_assert(offsetof(DrawElementsInstancedANGLE, type) == 12, |
9899 OffsetOf_DrawElementsInstancedANGLE_type_not_12); | 10018 "offset of DrawElementsInstancedANGLE type should be 12"); |
9900 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, index_offset) == 16, | 10019 static_assert(offsetof(DrawElementsInstancedANGLE, index_offset) == 16, |
9901 OffsetOf_DrawElementsInstancedANGLE_index_offset_not_16); | 10020 "offset of DrawElementsInstancedANGLE index_offset should be 16"); |
9902 COMPILE_ASSERT(offsetof(DrawElementsInstancedANGLE, primcount) == 20, | 10021 static_assert(offsetof(DrawElementsInstancedANGLE, primcount) == 20, |
9903 OffsetOf_DrawElementsInstancedANGLE_primcount_not_20); | 10022 "offset of DrawElementsInstancedANGLE primcount should be 20"); |
9904 | 10023 |
9905 struct VertexAttribDivisorANGLE { | 10024 struct VertexAttribDivisorANGLE { |
9906 typedef VertexAttribDivisorANGLE ValueType; | 10025 typedef VertexAttribDivisorANGLE ValueType; |
9907 static const CommandId kCmdId = kVertexAttribDivisorANGLE; | 10026 static const CommandId kCmdId = kVertexAttribDivisorANGLE; |
9908 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10027 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
9909 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10028 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
9910 | 10029 |
9911 static uint32_t ComputeSize() { | 10030 static uint32_t ComputeSize() { |
9912 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10031 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
9913 } | 10032 } |
9914 | 10033 |
9915 void SetHeader() { header.SetCmd<ValueType>(); } | 10034 void SetHeader() { header.SetCmd<ValueType>(); } |
9916 | 10035 |
9917 void Init(GLuint _index, GLuint _divisor) { | 10036 void Init(GLuint _index, GLuint _divisor) { |
9918 SetHeader(); | 10037 SetHeader(); |
9919 index = _index; | 10038 index = _index; |
9920 divisor = _divisor; | 10039 divisor = _divisor; |
9921 } | 10040 } |
9922 | 10041 |
9923 void* Set(void* cmd, GLuint _index, GLuint _divisor) { | 10042 void* Set(void* cmd, GLuint _index, GLuint _divisor) { |
9924 static_cast<ValueType*>(cmd)->Init(_index, _divisor); | 10043 static_cast<ValueType*>(cmd)->Init(_index, _divisor); |
9925 return NextCmdAddress<ValueType>(cmd); | 10044 return NextCmdAddress<ValueType>(cmd); |
9926 } | 10045 } |
9927 | 10046 |
9928 gpu::CommandHeader header; | 10047 gpu::CommandHeader header; |
9929 uint32_t index; | 10048 uint32_t index; |
9930 uint32_t divisor; | 10049 uint32_t divisor; |
9931 }; | 10050 }; |
9932 | 10051 |
9933 COMPILE_ASSERT(sizeof(VertexAttribDivisorANGLE) == 12, | 10052 static_assert(sizeof(VertexAttribDivisorANGLE) == 12, |
9934 Sizeof_VertexAttribDivisorANGLE_is_not_12); | 10053 "size of VertexAttribDivisorANGLE should be 12"); |
9935 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, header) == 0, | 10054 static_assert(offsetof(VertexAttribDivisorANGLE, header) == 0, |
9936 OffsetOf_VertexAttribDivisorANGLE_header_not_0); | 10055 "offset of VertexAttribDivisorANGLE header should be 0"); |
9937 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4, | 10056 static_assert(offsetof(VertexAttribDivisorANGLE, index) == 4, |
9938 OffsetOf_VertexAttribDivisorANGLE_index_not_4); | 10057 "offset of VertexAttribDivisorANGLE index should be 4"); |
9939 COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8, | 10058 static_assert(offsetof(VertexAttribDivisorANGLE, divisor) == 8, |
9940 OffsetOf_VertexAttribDivisorANGLE_divisor_not_8); | 10059 "offset of VertexAttribDivisorANGLE divisor should be 8"); |
9941 | 10060 |
9942 struct ProduceTextureCHROMIUMImmediate { | 10061 struct ProduceTextureCHROMIUMImmediate { |
9943 typedef ProduceTextureCHROMIUMImmediate ValueType; | 10062 typedef ProduceTextureCHROMIUMImmediate ValueType; |
9944 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate; | 10063 static const CommandId kCmdId = kProduceTextureCHROMIUMImmediate; |
9945 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 10064 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
9946 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 10065 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
9947 | 10066 |
9948 static uint32_t ComputeDataSize() { | 10067 static uint32_t ComputeDataSize() { |
9949 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT | 10068 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT |
9950 } | 10069 } |
(...skipping 14 matching lines...) Expand all Loading... |
9965 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { | 10084 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { |
9966 static_cast<ValueType*>(cmd)->Init(_target, _mailbox); | 10085 static_cast<ValueType*>(cmd)->Init(_target, _mailbox); |
9967 const uint32_t size = ComputeSize(); | 10086 const uint32_t size = ComputeSize(); |
9968 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 10087 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
9969 } | 10088 } |
9970 | 10089 |
9971 gpu::CommandHeader header; | 10090 gpu::CommandHeader header; |
9972 uint32_t target; | 10091 uint32_t target; |
9973 }; | 10092 }; |
9974 | 10093 |
9975 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8, | 10094 static_assert(sizeof(ProduceTextureCHROMIUMImmediate) == 8, |
9976 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8); | 10095 "size of ProduceTextureCHROMIUMImmediate should be 8"); |
9977 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0, | 10096 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0, |
9978 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0); | 10097 "offset of ProduceTextureCHROMIUMImmediate header should be 0"); |
9979 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4, | 10098 static_assert(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4, |
9980 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4); | 10099 "offset of ProduceTextureCHROMIUMImmediate target should be 4"); |
9981 | 10100 |
9982 struct ProduceTextureDirectCHROMIUMImmediate { | 10101 struct ProduceTextureDirectCHROMIUMImmediate { |
9983 typedef ProduceTextureDirectCHROMIUMImmediate ValueType; | 10102 typedef ProduceTextureDirectCHROMIUMImmediate ValueType; |
9984 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate; | 10103 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate; |
9985 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 10104 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
9986 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 10105 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
9987 | 10106 |
9988 static uint32_t ComputeDataSize() { | 10107 static uint32_t ComputeDataSize() { |
9989 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT | 10108 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT |
9990 } | 10109 } |
(...skipping 19 matching lines...) Expand all Loading... |
10010 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox); | 10129 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox); |
10011 const uint32_t size = ComputeSize(); | 10130 const uint32_t size = ComputeSize(); |
10012 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 10131 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
10013 } | 10132 } |
10014 | 10133 |
10015 gpu::CommandHeader header; | 10134 gpu::CommandHeader header; |
10016 uint32_t texture; | 10135 uint32_t texture; |
10017 uint32_t target; | 10136 uint32_t target; |
10018 }; | 10137 }; |
10019 | 10138 |
10020 COMPILE_ASSERT(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12, | 10139 static_assert(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12, |
10021 Sizeof_ProduceTextureDirectCHROMIUMImmediate_is_not_12); | 10140 "size of ProduceTextureDirectCHROMIUMImmediate should be 12"); |
10022 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0, | 10141 static_assert( |
10023 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_header_not_0); | 10142 offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0, |
10024 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4, | 10143 "offset of ProduceTextureDirectCHROMIUMImmediate header should be 0"); |
10025 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_texture_not_4); | 10144 static_assert( |
10026 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8, | 10145 offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4, |
10027 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_target_not_8); | 10146 "offset of ProduceTextureDirectCHROMIUMImmediate texture should be 4"); |
| 10147 static_assert( |
| 10148 offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8, |
| 10149 "offset of ProduceTextureDirectCHROMIUMImmediate target should be 8"); |
10028 | 10150 |
10029 struct ConsumeTextureCHROMIUMImmediate { | 10151 struct ConsumeTextureCHROMIUMImmediate { |
10030 typedef ConsumeTextureCHROMIUMImmediate ValueType; | 10152 typedef ConsumeTextureCHROMIUMImmediate ValueType; |
10031 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate; | 10153 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate; |
10032 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 10154 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
10033 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 10155 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
10034 | 10156 |
10035 static uint32_t ComputeDataSize() { | 10157 static uint32_t ComputeDataSize() { |
10036 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT | 10158 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT |
10037 } | 10159 } |
(...skipping 14 matching lines...) Expand all Loading... |
10052 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { | 10174 void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { |
10053 static_cast<ValueType*>(cmd)->Init(_target, _mailbox); | 10175 static_cast<ValueType*>(cmd)->Init(_target, _mailbox); |
10054 const uint32_t size = ComputeSize(); | 10176 const uint32_t size = ComputeSize(); |
10055 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 10177 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
10056 } | 10178 } |
10057 | 10179 |
10058 gpu::CommandHeader header; | 10180 gpu::CommandHeader header; |
10059 uint32_t target; | 10181 uint32_t target; |
10060 }; | 10182 }; |
10061 | 10183 |
10062 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, | 10184 static_assert(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, |
10063 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); | 10185 "size of ConsumeTextureCHROMIUMImmediate should be 8"); |
10064 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, | 10186 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, |
10065 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); | 10187 "offset of ConsumeTextureCHROMIUMImmediate header should be 0"); |
10066 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, | 10188 static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, |
10067 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); | 10189 "offset of ConsumeTextureCHROMIUMImmediate target should be 4"); |
10068 | 10190 |
10069 struct BindUniformLocationCHROMIUMBucket { | 10191 struct BindUniformLocationCHROMIUMBucket { |
10070 typedef BindUniformLocationCHROMIUMBucket ValueType; | 10192 typedef BindUniformLocationCHROMIUMBucket ValueType; |
10071 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket; | 10193 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket; |
10072 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10194 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10073 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10195 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10074 | 10196 |
10075 static uint32_t ComputeSize() { | 10197 static uint32_t ComputeSize() { |
10076 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10198 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10077 } | 10199 } |
(...skipping 14 matching lines...) Expand all Loading... |
10092 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id); | 10214 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id); |
10093 return NextCmdAddress<ValueType>(cmd); | 10215 return NextCmdAddress<ValueType>(cmd); |
10094 } | 10216 } |
10095 | 10217 |
10096 gpu::CommandHeader header; | 10218 gpu::CommandHeader header; |
10097 uint32_t program; | 10219 uint32_t program; |
10098 int32_t location; | 10220 int32_t location; |
10099 uint32_t name_bucket_id; | 10221 uint32_t name_bucket_id; |
10100 }; | 10222 }; |
10101 | 10223 |
10102 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket) == 16, | 10224 static_assert(sizeof(BindUniformLocationCHROMIUMBucket) == 16, |
10103 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16); | 10225 "size of BindUniformLocationCHROMIUMBucket should be 16"); |
10104 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0, | 10226 static_assert(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0, |
10105 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0); | 10227 "offset of BindUniformLocationCHROMIUMBucket header should be 0"); |
10106 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, | 10228 static_assert( |
10107 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4); | 10229 offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, |
10108 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, | 10230 "offset of BindUniformLocationCHROMIUMBucket program should be 4"); |
10109 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8); | 10231 static_assert( |
10110 COMPILE_ASSERT( | 10232 offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, |
| 10233 "offset of BindUniformLocationCHROMIUMBucket location should be 8"); |
| 10234 static_assert( |
10111 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, | 10235 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, |
10112 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); | 10236 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12"); |
10113 | 10237 |
10114 struct GenValuebuffersCHROMIUMImmediate { | 10238 struct GenValuebuffersCHROMIUMImmediate { |
10115 typedef GenValuebuffersCHROMIUMImmediate ValueType; | 10239 typedef GenValuebuffersCHROMIUMImmediate ValueType; |
10116 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate; | 10240 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate; |
10117 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 10241 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
10118 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10242 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10119 | 10243 |
10120 static uint32_t ComputeDataSize(GLsizei n) { | 10244 static uint32_t ComputeDataSize(GLsizei n) { |
10121 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 10245 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
10122 } | 10246 } |
(...skipping 16 matching lines...) Expand all Loading... |
10139 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { | 10263 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { |
10140 static_cast<ValueType*>(cmd)->Init(_n, _buffers); | 10264 static_cast<ValueType*>(cmd)->Init(_n, _buffers); |
10141 const uint32_t size = ComputeSize(_n); | 10265 const uint32_t size = ComputeSize(_n); |
10142 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 10266 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
10143 } | 10267 } |
10144 | 10268 |
10145 gpu::CommandHeader header; | 10269 gpu::CommandHeader header; |
10146 int32_t n; | 10270 int32_t n; |
10147 }; | 10271 }; |
10148 | 10272 |
10149 COMPILE_ASSERT(sizeof(GenValuebuffersCHROMIUMImmediate) == 8, | 10273 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate) == 8, |
10150 Sizeof_GenValuebuffersCHROMIUMImmediate_is_not_8); | 10274 "size of GenValuebuffersCHROMIUMImmediate should be 8"); |
10151 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0, | 10275 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0, |
10152 OffsetOf_GenValuebuffersCHROMIUMImmediate_header_not_0); | 10276 "offset of GenValuebuffersCHROMIUMImmediate header should be 0"); |
10153 COMPILE_ASSERT(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4, | 10277 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4, |
10154 OffsetOf_GenValuebuffersCHROMIUMImmediate_n_not_4); | 10278 "offset of GenValuebuffersCHROMIUMImmediate n should be 4"); |
10155 | 10279 |
10156 struct DeleteValuebuffersCHROMIUMImmediate { | 10280 struct DeleteValuebuffersCHROMIUMImmediate { |
10157 typedef DeleteValuebuffersCHROMIUMImmediate ValueType; | 10281 typedef DeleteValuebuffersCHROMIUMImmediate ValueType; |
10158 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate; | 10282 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate; |
10159 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 10283 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
10160 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10284 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10161 | 10285 |
10162 static uint32_t ComputeDataSize(GLsizei n) { | 10286 static uint32_t ComputeDataSize(GLsizei n) { |
10163 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 10287 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
10164 } | 10288 } |
(...skipping 16 matching lines...) Expand all Loading... |
10181 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) { | 10305 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) { |
10182 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers); | 10306 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers); |
10183 const uint32_t size = ComputeSize(_n); | 10307 const uint32_t size = ComputeSize(_n); |
10184 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 10308 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
10185 } | 10309 } |
10186 | 10310 |
10187 gpu::CommandHeader header; | 10311 gpu::CommandHeader header; |
10188 int32_t n; | 10312 int32_t n; |
10189 }; | 10313 }; |
10190 | 10314 |
10191 COMPILE_ASSERT(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8, | 10315 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8, |
10192 Sizeof_DeleteValuebuffersCHROMIUMImmediate_is_not_8); | 10316 "size of DeleteValuebuffersCHROMIUMImmediate should be 8"); |
10193 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0, | 10317 static_assert( |
10194 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_header_not_0); | 10318 offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0, |
10195 COMPILE_ASSERT(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4, | 10319 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0"); |
10196 OffsetOf_DeleteValuebuffersCHROMIUMImmediate_n_not_4); | 10320 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4, |
| 10321 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4"); |
10197 | 10322 |
10198 struct IsValuebufferCHROMIUM { | 10323 struct IsValuebufferCHROMIUM { |
10199 typedef IsValuebufferCHROMIUM ValueType; | 10324 typedef IsValuebufferCHROMIUM ValueType; |
10200 static const CommandId kCmdId = kIsValuebufferCHROMIUM; | 10325 static const CommandId kCmdId = kIsValuebufferCHROMIUM; |
10201 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10326 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10202 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10327 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10203 | 10328 |
10204 typedef uint32_t Result; | 10329 typedef uint32_t Result; |
10205 | 10330 |
10206 static uint32_t ComputeSize() { | 10331 static uint32_t ComputeSize() { |
(...skipping 19 matching lines...) Expand all Loading... |
10226 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset); | 10351 ->Init(_valuebuffer, _result_shm_id, _result_shm_offset); |
10227 return NextCmdAddress<ValueType>(cmd); | 10352 return NextCmdAddress<ValueType>(cmd); |
10228 } | 10353 } |
10229 | 10354 |
10230 gpu::CommandHeader header; | 10355 gpu::CommandHeader header; |
10231 uint32_t valuebuffer; | 10356 uint32_t valuebuffer; |
10232 uint32_t result_shm_id; | 10357 uint32_t result_shm_id; |
10233 uint32_t result_shm_offset; | 10358 uint32_t result_shm_offset; |
10234 }; | 10359 }; |
10235 | 10360 |
10236 COMPILE_ASSERT(sizeof(IsValuebufferCHROMIUM) == 16, | 10361 static_assert(sizeof(IsValuebufferCHROMIUM) == 16, |
10237 Sizeof_IsValuebufferCHROMIUM_is_not_16); | 10362 "size of IsValuebufferCHROMIUM should be 16"); |
10238 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, header) == 0, | 10363 static_assert(offsetof(IsValuebufferCHROMIUM, header) == 0, |
10239 OffsetOf_IsValuebufferCHROMIUM_header_not_0); | 10364 "offset of IsValuebufferCHROMIUM header should be 0"); |
10240 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4, | 10365 static_assert(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4, |
10241 OffsetOf_IsValuebufferCHROMIUM_valuebuffer_not_4); | 10366 "offset of IsValuebufferCHROMIUM valuebuffer should be 4"); |
10242 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8, | 10367 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8, |
10243 OffsetOf_IsValuebufferCHROMIUM_result_shm_id_not_8); | 10368 "offset of IsValuebufferCHROMIUM result_shm_id should be 8"); |
10244 COMPILE_ASSERT(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12, | 10369 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12, |
10245 OffsetOf_IsValuebufferCHROMIUM_result_shm_offset_not_12); | 10370 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12"); |
10246 | 10371 |
10247 struct BindValuebufferCHROMIUM { | 10372 struct BindValuebufferCHROMIUM { |
10248 typedef BindValuebufferCHROMIUM ValueType; | 10373 typedef BindValuebufferCHROMIUM ValueType; |
10249 static const CommandId kCmdId = kBindValuebufferCHROMIUM; | 10374 static const CommandId kCmdId = kBindValuebufferCHROMIUM; |
10250 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10375 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10251 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10376 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10252 | 10377 |
10253 static uint32_t ComputeSize() { | 10378 static uint32_t ComputeSize() { |
10254 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10379 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10255 } | 10380 } |
10256 | 10381 |
10257 void SetHeader() { header.SetCmd<ValueType>(); } | 10382 void SetHeader() { header.SetCmd<ValueType>(); } |
10258 | 10383 |
10259 void Init(GLenum _target, GLuint _valuebuffer) { | 10384 void Init(GLenum _target, GLuint _valuebuffer) { |
10260 SetHeader(); | 10385 SetHeader(); |
10261 target = _target; | 10386 target = _target; |
10262 valuebuffer = _valuebuffer; | 10387 valuebuffer = _valuebuffer; |
10263 } | 10388 } |
10264 | 10389 |
10265 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) { | 10390 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) { |
10266 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer); | 10391 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer); |
10267 return NextCmdAddress<ValueType>(cmd); | 10392 return NextCmdAddress<ValueType>(cmd); |
10268 } | 10393 } |
10269 | 10394 |
10270 gpu::CommandHeader header; | 10395 gpu::CommandHeader header; |
10271 uint32_t target; | 10396 uint32_t target; |
10272 uint32_t valuebuffer; | 10397 uint32_t valuebuffer; |
10273 }; | 10398 }; |
10274 | 10399 |
10275 COMPILE_ASSERT(sizeof(BindValuebufferCHROMIUM) == 12, | 10400 static_assert(sizeof(BindValuebufferCHROMIUM) == 12, |
10276 Sizeof_BindValuebufferCHROMIUM_is_not_12); | 10401 "size of BindValuebufferCHROMIUM should be 12"); |
10277 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, header) == 0, | 10402 static_assert(offsetof(BindValuebufferCHROMIUM, header) == 0, |
10278 OffsetOf_BindValuebufferCHROMIUM_header_not_0); | 10403 "offset of BindValuebufferCHROMIUM header should be 0"); |
10279 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, target) == 4, | 10404 static_assert(offsetof(BindValuebufferCHROMIUM, target) == 4, |
10280 OffsetOf_BindValuebufferCHROMIUM_target_not_4); | 10405 "offset of BindValuebufferCHROMIUM target should be 4"); |
10281 COMPILE_ASSERT(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8, | 10406 static_assert(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8, |
10282 OffsetOf_BindValuebufferCHROMIUM_valuebuffer_not_8); | 10407 "offset of BindValuebufferCHROMIUM valuebuffer should be 8"); |
10283 | 10408 |
10284 struct SubscribeValueCHROMIUM { | 10409 struct SubscribeValueCHROMIUM { |
10285 typedef SubscribeValueCHROMIUM ValueType; | 10410 typedef SubscribeValueCHROMIUM ValueType; |
10286 static const CommandId kCmdId = kSubscribeValueCHROMIUM; | 10411 static const CommandId kCmdId = kSubscribeValueCHROMIUM; |
10287 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10412 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10288 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10413 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10289 | 10414 |
10290 static uint32_t ComputeSize() { | 10415 static uint32_t ComputeSize() { |
10291 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10416 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10292 } | 10417 } |
10293 | 10418 |
10294 void SetHeader() { header.SetCmd<ValueType>(); } | 10419 void SetHeader() { header.SetCmd<ValueType>(); } |
10295 | 10420 |
10296 void Init(GLenum _target, GLenum _subscription) { | 10421 void Init(GLenum _target, GLenum _subscription) { |
10297 SetHeader(); | 10422 SetHeader(); |
10298 target = _target; | 10423 target = _target; |
10299 subscription = _subscription; | 10424 subscription = _subscription; |
10300 } | 10425 } |
10301 | 10426 |
10302 void* Set(void* cmd, GLenum _target, GLenum _subscription) { | 10427 void* Set(void* cmd, GLenum _target, GLenum _subscription) { |
10303 static_cast<ValueType*>(cmd)->Init(_target, _subscription); | 10428 static_cast<ValueType*>(cmd)->Init(_target, _subscription); |
10304 return NextCmdAddress<ValueType>(cmd); | 10429 return NextCmdAddress<ValueType>(cmd); |
10305 } | 10430 } |
10306 | 10431 |
10307 gpu::CommandHeader header; | 10432 gpu::CommandHeader header; |
10308 uint32_t target; | 10433 uint32_t target; |
10309 uint32_t subscription; | 10434 uint32_t subscription; |
10310 }; | 10435 }; |
10311 | 10436 |
10312 COMPILE_ASSERT(sizeof(SubscribeValueCHROMIUM) == 12, | 10437 static_assert(sizeof(SubscribeValueCHROMIUM) == 12, |
10313 Sizeof_SubscribeValueCHROMIUM_is_not_12); | 10438 "size of SubscribeValueCHROMIUM should be 12"); |
10314 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, header) == 0, | 10439 static_assert(offsetof(SubscribeValueCHROMIUM, header) == 0, |
10315 OffsetOf_SubscribeValueCHROMIUM_header_not_0); | 10440 "offset of SubscribeValueCHROMIUM header should be 0"); |
10316 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, target) == 4, | 10441 static_assert(offsetof(SubscribeValueCHROMIUM, target) == 4, |
10317 OffsetOf_SubscribeValueCHROMIUM_target_not_4); | 10442 "offset of SubscribeValueCHROMIUM target should be 4"); |
10318 COMPILE_ASSERT(offsetof(SubscribeValueCHROMIUM, subscription) == 8, | 10443 static_assert(offsetof(SubscribeValueCHROMIUM, subscription) == 8, |
10319 OffsetOf_SubscribeValueCHROMIUM_subscription_not_8); | 10444 "offset of SubscribeValueCHROMIUM subscription should be 8"); |
10320 | 10445 |
10321 struct PopulateSubscribedValuesCHROMIUM { | 10446 struct PopulateSubscribedValuesCHROMIUM { |
10322 typedef PopulateSubscribedValuesCHROMIUM ValueType; | 10447 typedef PopulateSubscribedValuesCHROMIUM ValueType; |
10323 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM; | 10448 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM; |
10324 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10449 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10325 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10450 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10326 | 10451 |
10327 static uint32_t ComputeSize() { | 10452 static uint32_t ComputeSize() { |
10328 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10453 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10329 } | 10454 } |
10330 | 10455 |
10331 void SetHeader() { header.SetCmd<ValueType>(); } | 10456 void SetHeader() { header.SetCmd<ValueType>(); } |
10332 | 10457 |
10333 void Init(GLenum _target) { | 10458 void Init(GLenum _target) { |
10334 SetHeader(); | 10459 SetHeader(); |
10335 target = _target; | 10460 target = _target; |
10336 } | 10461 } |
10337 | 10462 |
10338 void* Set(void* cmd, GLenum _target) { | 10463 void* Set(void* cmd, GLenum _target) { |
10339 static_cast<ValueType*>(cmd)->Init(_target); | 10464 static_cast<ValueType*>(cmd)->Init(_target); |
10340 return NextCmdAddress<ValueType>(cmd); | 10465 return NextCmdAddress<ValueType>(cmd); |
10341 } | 10466 } |
10342 | 10467 |
10343 gpu::CommandHeader header; | 10468 gpu::CommandHeader header; |
10344 uint32_t target; | 10469 uint32_t target; |
10345 }; | 10470 }; |
10346 | 10471 |
10347 COMPILE_ASSERT(sizeof(PopulateSubscribedValuesCHROMIUM) == 8, | 10472 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM) == 8, |
10348 Sizeof_PopulateSubscribedValuesCHROMIUM_is_not_8); | 10473 "size of PopulateSubscribedValuesCHROMIUM should be 8"); |
10349 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0, | 10474 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0, |
10350 OffsetOf_PopulateSubscribedValuesCHROMIUM_header_not_0); | 10475 "offset of PopulateSubscribedValuesCHROMIUM header should be 0"); |
10351 COMPILE_ASSERT(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4, | 10476 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4, |
10352 OffsetOf_PopulateSubscribedValuesCHROMIUM_target_not_4); | 10477 "offset of PopulateSubscribedValuesCHROMIUM target should be 4"); |
10353 | 10478 |
10354 struct UniformValuebufferCHROMIUM { | 10479 struct UniformValuebufferCHROMIUM { |
10355 typedef UniformValuebufferCHROMIUM ValueType; | 10480 typedef UniformValuebufferCHROMIUM ValueType; |
10356 static const CommandId kCmdId = kUniformValuebufferCHROMIUM; | 10481 static const CommandId kCmdId = kUniformValuebufferCHROMIUM; |
10357 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10482 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10358 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10483 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10359 | 10484 |
10360 static uint32_t ComputeSize() { | 10485 static uint32_t ComputeSize() { |
10361 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10486 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10362 } | 10487 } |
(...skipping 11 matching lines...) Expand all Loading... |
10374 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription); | 10499 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription); |
10375 return NextCmdAddress<ValueType>(cmd); | 10500 return NextCmdAddress<ValueType>(cmd); |
10376 } | 10501 } |
10377 | 10502 |
10378 gpu::CommandHeader header; | 10503 gpu::CommandHeader header; |
10379 int32_t location; | 10504 int32_t location; |
10380 uint32_t target; | 10505 uint32_t target; |
10381 uint32_t subscription; | 10506 uint32_t subscription; |
10382 }; | 10507 }; |
10383 | 10508 |
10384 COMPILE_ASSERT(sizeof(UniformValuebufferCHROMIUM) == 16, | 10509 static_assert(sizeof(UniformValuebufferCHROMIUM) == 16, |
10385 Sizeof_UniformValuebufferCHROMIUM_is_not_16); | 10510 "size of UniformValuebufferCHROMIUM should be 16"); |
10386 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, header) == 0, | 10511 static_assert(offsetof(UniformValuebufferCHROMIUM, header) == 0, |
10387 OffsetOf_UniformValuebufferCHROMIUM_header_not_0); | 10512 "offset of UniformValuebufferCHROMIUM header should be 0"); |
10388 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, location) == 4, | 10513 static_assert(offsetof(UniformValuebufferCHROMIUM, location) == 4, |
10389 OffsetOf_UniformValuebufferCHROMIUM_location_not_4); | 10514 "offset of UniformValuebufferCHROMIUM location should be 4"); |
10390 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, target) == 8, | 10515 static_assert(offsetof(UniformValuebufferCHROMIUM, target) == 8, |
10391 OffsetOf_UniformValuebufferCHROMIUM_target_not_8); | 10516 "offset of UniformValuebufferCHROMIUM target should be 8"); |
10392 COMPILE_ASSERT(offsetof(UniformValuebufferCHROMIUM, subscription) == 12, | 10517 static_assert(offsetof(UniformValuebufferCHROMIUM, subscription) == 12, |
10393 OffsetOf_UniformValuebufferCHROMIUM_subscription_not_12); | 10518 "offset of UniformValuebufferCHROMIUM subscription should be 12"); |
10394 | 10519 |
10395 struct BindTexImage2DCHROMIUM { | 10520 struct BindTexImage2DCHROMIUM { |
10396 typedef BindTexImage2DCHROMIUM ValueType; | 10521 typedef BindTexImage2DCHROMIUM ValueType; |
10397 static const CommandId kCmdId = kBindTexImage2DCHROMIUM; | 10522 static const CommandId kCmdId = kBindTexImage2DCHROMIUM; |
10398 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10523 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10399 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10524 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10400 | 10525 |
10401 static uint32_t ComputeSize() { | 10526 static uint32_t ComputeSize() { |
10402 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10527 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10403 } | 10528 } |
10404 | 10529 |
10405 void SetHeader() { header.SetCmd<ValueType>(); } | 10530 void SetHeader() { header.SetCmd<ValueType>(); } |
10406 | 10531 |
10407 void Init(GLenum _target, GLint _imageId) { | 10532 void Init(GLenum _target, GLint _imageId) { |
10408 SetHeader(); | 10533 SetHeader(); |
10409 target = _target; | 10534 target = _target; |
10410 imageId = _imageId; | 10535 imageId = _imageId; |
10411 } | 10536 } |
10412 | 10537 |
10413 void* Set(void* cmd, GLenum _target, GLint _imageId) { | 10538 void* Set(void* cmd, GLenum _target, GLint _imageId) { |
10414 static_cast<ValueType*>(cmd)->Init(_target, _imageId); | 10539 static_cast<ValueType*>(cmd)->Init(_target, _imageId); |
10415 return NextCmdAddress<ValueType>(cmd); | 10540 return NextCmdAddress<ValueType>(cmd); |
10416 } | 10541 } |
10417 | 10542 |
10418 gpu::CommandHeader header; | 10543 gpu::CommandHeader header; |
10419 uint32_t target; | 10544 uint32_t target; |
10420 int32_t imageId; | 10545 int32_t imageId; |
10421 }; | 10546 }; |
10422 | 10547 |
10423 COMPILE_ASSERT(sizeof(BindTexImage2DCHROMIUM) == 12, | 10548 static_assert(sizeof(BindTexImage2DCHROMIUM) == 12, |
10424 Sizeof_BindTexImage2DCHROMIUM_is_not_12); | 10549 "size of BindTexImage2DCHROMIUM should be 12"); |
10425 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, header) == 0, | 10550 static_assert(offsetof(BindTexImage2DCHROMIUM, header) == 0, |
10426 OffsetOf_BindTexImage2DCHROMIUM_header_not_0); | 10551 "offset of BindTexImage2DCHROMIUM header should be 0"); |
10427 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, target) == 4, | 10552 static_assert(offsetof(BindTexImage2DCHROMIUM, target) == 4, |
10428 OffsetOf_BindTexImage2DCHROMIUM_target_not_4); | 10553 "offset of BindTexImage2DCHROMIUM target should be 4"); |
10429 COMPILE_ASSERT(offsetof(BindTexImage2DCHROMIUM, imageId) == 8, | 10554 static_assert(offsetof(BindTexImage2DCHROMIUM, imageId) == 8, |
10430 OffsetOf_BindTexImage2DCHROMIUM_imageId_not_8); | 10555 "offset of BindTexImage2DCHROMIUM imageId should be 8"); |
10431 | 10556 |
10432 struct ReleaseTexImage2DCHROMIUM { | 10557 struct ReleaseTexImage2DCHROMIUM { |
10433 typedef ReleaseTexImage2DCHROMIUM ValueType; | 10558 typedef ReleaseTexImage2DCHROMIUM ValueType; |
10434 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM; | 10559 static const CommandId kCmdId = kReleaseTexImage2DCHROMIUM; |
10435 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10560 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10436 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10561 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10437 | 10562 |
10438 static uint32_t ComputeSize() { | 10563 static uint32_t ComputeSize() { |
10439 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10564 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10440 } | 10565 } |
10441 | 10566 |
10442 void SetHeader() { header.SetCmd<ValueType>(); } | 10567 void SetHeader() { header.SetCmd<ValueType>(); } |
10443 | 10568 |
10444 void Init(GLenum _target, GLint _imageId) { | 10569 void Init(GLenum _target, GLint _imageId) { |
10445 SetHeader(); | 10570 SetHeader(); |
10446 target = _target; | 10571 target = _target; |
10447 imageId = _imageId; | 10572 imageId = _imageId; |
10448 } | 10573 } |
10449 | 10574 |
10450 void* Set(void* cmd, GLenum _target, GLint _imageId) { | 10575 void* Set(void* cmd, GLenum _target, GLint _imageId) { |
10451 static_cast<ValueType*>(cmd)->Init(_target, _imageId); | 10576 static_cast<ValueType*>(cmd)->Init(_target, _imageId); |
10452 return NextCmdAddress<ValueType>(cmd); | 10577 return NextCmdAddress<ValueType>(cmd); |
10453 } | 10578 } |
10454 | 10579 |
10455 gpu::CommandHeader header; | 10580 gpu::CommandHeader header; |
10456 uint32_t target; | 10581 uint32_t target; |
10457 int32_t imageId; | 10582 int32_t imageId; |
10458 }; | 10583 }; |
10459 | 10584 |
10460 COMPILE_ASSERT(sizeof(ReleaseTexImage2DCHROMIUM) == 12, | 10585 static_assert(sizeof(ReleaseTexImage2DCHROMIUM) == 12, |
10461 Sizeof_ReleaseTexImage2DCHROMIUM_is_not_12); | 10586 "size of ReleaseTexImage2DCHROMIUM should be 12"); |
10462 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0, | 10587 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, header) == 0, |
10463 OffsetOf_ReleaseTexImage2DCHROMIUM_header_not_0); | 10588 "offset of ReleaseTexImage2DCHROMIUM header should be 0"); |
10464 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4, | 10589 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4, |
10465 OffsetOf_ReleaseTexImage2DCHROMIUM_target_not_4); | 10590 "offset of ReleaseTexImage2DCHROMIUM target should be 4"); |
10466 COMPILE_ASSERT(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8, | 10591 static_assert(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8, |
10467 OffsetOf_ReleaseTexImage2DCHROMIUM_imageId_not_8); | 10592 "offset of ReleaseTexImage2DCHROMIUM imageId should be 8"); |
10468 | 10593 |
10469 struct TraceBeginCHROMIUM { | 10594 struct TraceBeginCHROMIUM { |
10470 typedef TraceBeginCHROMIUM ValueType; | 10595 typedef TraceBeginCHROMIUM ValueType; |
10471 static const CommandId kCmdId = kTraceBeginCHROMIUM; | 10596 static const CommandId kCmdId = kTraceBeginCHROMIUM; |
10472 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10597 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10473 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10598 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10474 | 10599 |
10475 static uint32_t ComputeSize() { | 10600 static uint32_t ComputeSize() { |
10476 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10601 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10477 } | 10602 } |
10478 | 10603 |
10479 void SetHeader() { header.SetCmd<ValueType>(); } | 10604 void SetHeader() { header.SetCmd<ValueType>(); } |
10480 | 10605 |
10481 void Init(GLuint _category_bucket_id, GLuint _name_bucket_id) { | 10606 void Init(GLuint _category_bucket_id, GLuint _name_bucket_id) { |
10482 SetHeader(); | 10607 SetHeader(); |
10483 category_bucket_id = _category_bucket_id; | 10608 category_bucket_id = _category_bucket_id; |
10484 name_bucket_id = _name_bucket_id; | 10609 name_bucket_id = _name_bucket_id; |
10485 } | 10610 } |
10486 | 10611 |
10487 void* Set(void* cmd, GLuint _category_bucket_id, GLuint _name_bucket_id) { | 10612 void* Set(void* cmd, GLuint _category_bucket_id, GLuint _name_bucket_id) { |
10488 static_cast<ValueType*>(cmd)->Init(_category_bucket_id, _name_bucket_id); | 10613 static_cast<ValueType*>(cmd)->Init(_category_bucket_id, _name_bucket_id); |
10489 return NextCmdAddress<ValueType>(cmd); | 10614 return NextCmdAddress<ValueType>(cmd); |
10490 } | 10615 } |
10491 | 10616 |
10492 gpu::CommandHeader header; | 10617 gpu::CommandHeader header; |
10493 uint32_t category_bucket_id; | 10618 uint32_t category_bucket_id; |
10494 uint32_t name_bucket_id; | 10619 uint32_t name_bucket_id; |
10495 }; | 10620 }; |
10496 | 10621 |
10497 COMPILE_ASSERT(sizeof(TraceBeginCHROMIUM) == 12, | 10622 static_assert(sizeof(TraceBeginCHROMIUM) == 12, |
10498 Sizeof_TraceBeginCHROMIUM_is_not_12); | 10623 "size of TraceBeginCHROMIUM should be 12"); |
10499 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, header) == 0, | 10624 static_assert(offsetof(TraceBeginCHROMIUM, header) == 0, |
10500 OffsetOf_TraceBeginCHROMIUM_header_not_0); | 10625 "offset of TraceBeginCHROMIUM header should be 0"); |
10501 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, category_bucket_id) == 4, | 10626 static_assert(offsetof(TraceBeginCHROMIUM, category_bucket_id) == 4, |
10502 OffsetOf_TraceBeginCHROMIUM_category_bucket_id_not_4); | 10627 "offset of TraceBeginCHROMIUM category_bucket_id should be 4"); |
10503 COMPILE_ASSERT(offsetof(TraceBeginCHROMIUM, name_bucket_id) == 8, | 10628 static_assert(offsetof(TraceBeginCHROMIUM, name_bucket_id) == 8, |
10504 OffsetOf_TraceBeginCHROMIUM_name_bucket_id_not_8); | 10629 "offset of TraceBeginCHROMIUM name_bucket_id should be 8"); |
10505 | 10630 |
10506 struct TraceEndCHROMIUM { | 10631 struct TraceEndCHROMIUM { |
10507 typedef TraceEndCHROMIUM ValueType; | 10632 typedef TraceEndCHROMIUM ValueType; |
10508 static const CommandId kCmdId = kTraceEndCHROMIUM; | 10633 static const CommandId kCmdId = kTraceEndCHROMIUM; |
10509 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10634 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10510 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10635 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10511 | 10636 |
10512 static uint32_t ComputeSize() { | 10637 static uint32_t ComputeSize() { |
10513 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10638 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10514 } | 10639 } |
10515 | 10640 |
10516 void SetHeader() { header.SetCmd<ValueType>(); } | 10641 void SetHeader() { header.SetCmd<ValueType>(); } |
10517 | 10642 |
10518 void Init() { SetHeader(); } | 10643 void Init() { SetHeader(); } |
10519 | 10644 |
10520 void* Set(void* cmd) { | 10645 void* Set(void* cmd) { |
10521 static_cast<ValueType*>(cmd)->Init(); | 10646 static_cast<ValueType*>(cmd)->Init(); |
10522 return NextCmdAddress<ValueType>(cmd); | 10647 return NextCmdAddress<ValueType>(cmd); |
10523 } | 10648 } |
10524 | 10649 |
10525 gpu::CommandHeader header; | 10650 gpu::CommandHeader header; |
10526 }; | 10651 }; |
10527 | 10652 |
10528 COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4, Sizeof_TraceEndCHROMIUM_is_not_4); | 10653 static_assert(sizeof(TraceEndCHROMIUM) == 4, |
10529 COMPILE_ASSERT(offsetof(TraceEndCHROMIUM, header) == 0, | 10654 "size of TraceEndCHROMIUM should be 4"); |
10530 OffsetOf_TraceEndCHROMIUM_header_not_0); | 10655 static_assert(offsetof(TraceEndCHROMIUM, header) == 0, |
| 10656 "offset of TraceEndCHROMIUM header should be 0"); |
10531 | 10657 |
10532 struct AsyncTexSubImage2DCHROMIUM { | 10658 struct AsyncTexSubImage2DCHROMIUM { |
10533 typedef AsyncTexSubImage2DCHROMIUM ValueType; | 10659 typedef AsyncTexSubImage2DCHROMIUM ValueType; |
10534 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM; | 10660 static const CommandId kCmdId = kAsyncTexSubImage2DCHROMIUM; |
10535 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10661 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10536 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10662 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10537 | 10663 |
10538 static uint32_t ComputeSize() { | 10664 static uint32_t ComputeSize() { |
10539 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10665 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10540 } | 10666 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10600 int32_t height; | 10726 int32_t height; |
10601 uint32_t format; | 10727 uint32_t format; |
10602 uint32_t type; | 10728 uint32_t type; |
10603 uint32_t data_shm_id; | 10729 uint32_t data_shm_id; |
10604 uint32_t data_shm_offset; | 10730 uint32_t data_shm_offset; |
10605 uint32_t async_upload_token; | 10731 uint32_t async_upload_token; |
10606 uint32_t sync_data_shm_id; | 10732 uint32_t sync_data_shm_id; |
10607 uint32_t sync_data_shm_offset; | 10733 uint32_t sync_data_shm_offset; |
10608 }; | 10734 }; |
10609 | 10735 |
10610 COMPILE_ASSERT(sizeof(AsyncTexSubImage2DCHROMIUM) == 56, | 10736 static_assert(sizeof(AsyncTexSubImage2DCHROMIUM) == 56, |
10611 Sizeof_AsyncTexSubImage2DCHROMIUM_is_not_56); | 10737 "size of AsyncTexSubImage2DCHROMIUM should be 56"); |
10612 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0, | 10738 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, header) == 0, |
10613 OffsetOf_AsyncTexSubImage2DCHROMIUM_header_not_0); | 10739 "offset of AsyncTexSubImage2DCHROMIUM header should be 0"); |
10614 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4, | 10740 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, target) == 4, |
10615 OffsetOf_AsyncTexSubImage2DCHROMIUM_target_not_4); | 10741 "offset of AsyncTexSubImage2DCHROMIUM target should be 4"); |
10616 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8, | 10742 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, level) == 8, |
10617 OffsetOf_AsyncTexSubImage2DCHROMIUM_level_not_8); | 10743 "offset of AsyncTexSubImage2DCHROMIUM level should be 8"); |
10618 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12, | 10744 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, xoffset) == 12, |
10619 OffsetOf_AsyncTexSubImage2DCHROMIUM_xoffset_not_12); | 10745 "offset of AsyncTexSubImage2DCHROMIUM xoffset should be 12"); |
10620 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16, | 10746 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, yoffset) == 16, |
10621 OffsetOf_AsyncTexSubImage2DCHROMIUM_yoffset_not_16); | 10747 "offset of AsyncTexSubImage2DCHROMIUM yoffset should be 16"); |
10622 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20, | 10748 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, width) == 20, |
10623 OffsetOf_AsyncTexSubImage2DCHROMIUM_width_not_20); | 10749 "offset of AsyncTexSubImage2DCHROMIUM width should be 20"); |
10624 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24, | 10750 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, height) == 24, |
10625 OffsetOf_AsyncTexSubImage2DCHROMIUM_height_not_24); | 10751 "offset of AsyncTexSubImage2DCHROMIUM height should be 24"); |
10626 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28, | 10752 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, format) == 28, |
10627 OffsetOf_AsyncTexSubImage2DCHROMIUM_format_not_28); | 10753 "offset of AsyncTexSubImage2DCHROMIUM format should be 28"); |
10628 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32, | 10754 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, type) == 32, |
10629 OffsetOf_AsyncTexSubImage2DCHROMIUM_type_not_32); | 10755 "offset of AsyncTexSubImage2DCHROMIUM type should be 32"); |
10630 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36, | 10756 static_assert(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_id) == 36, |
10631 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_id_not_36); | 10757 "offset of AsyncTexSubImage2DCHROMIUM data_shm_id should be 36"); |
10632 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40, | 10758 static_assert( |
10633 OffsetOf_AsyncTexSubImage2DCHROMIUM_data_shm_offset_not_40); | 10759 offsetof(AsyncTexSubImage2DCHROMIUM, data_shm_offset) == 40, |
10634 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, async_upload_token) == 44, | 10760 "offset of AsyncTexSubImage2DCHROMIUM data_shm_offset should be 40"); |
10635 OffsetOf_AsyncTexSubImage2DCHROMIUM_async_upload_token_not_44); | 10761 static_assert( |
10636 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_id) == 48, | 10762 offsetof(AsyncTexSubImage2DCHROMIUM, async_upload_token) == 44, |
10637 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_id_not_48); | 10763 "offset of AsyncTexSubImage2DCHROMIUM async_upload_token should be 44"); |
10638 COMPILE_ASSERT(offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_offset) == 52, | 10764 static_assert( |
10639 OffsetOf_AsyncTexSubImage2DCHROMIUM_sync_data_shm_offset_not_52); | 10765 offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_id) == 48, |
| 10766 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_id should be 48"); |
| 10767 static_assert( |
| 10768 offsetof(AsyncTexSubImage2DCHROMIUM, sync_data_shm_offset) == 52, |
| 10769 "offset of AsyncTexSubImage2DCHROMIUM sync_data_shm_offset should be 52"); |
10640 | 10770 |
10641 struct AsyncTexImage2DCHROMIUM { | 10771 struct AsyncTexImage2DCHROMIUM { |
10642 typedef AsyncTexImage2DCHROMIUM ValueType; | 10772 typedef AsyncTexImage2DCHROMIUM ValueType; |
10643 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM; | 10773 static const CommandId kCmdId = kAsyncTexImage2DCHROMIUM; |
10644 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10774 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10645 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10775 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10646 | 10776 |
10647 static uint32_t ComputeSize() { | 10777 static uint32_t ComputeSize() { |
10648 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10778 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10649 } | 10779 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10706 uint32_t format; | 10836 uint32_t format; |
10707 uint32_t type; | 10837 uint32_t type; |
10708 uint32_t pixels_shm_id; | 10838 uint32_t pixels_shm_id; |
10709 uint32_t pixels_shm_offset; | 10839 uint32_t pixels_shm_offset; |
10710 uint32_t async_upload_token; | 10840 uint32_t async_upload_token; |
10711 uint32_t sync_data_shm_id; | 10841 uint32_t sync_data_shm_id; |
10712 uint32_t sync_data_shm_offset; | 10842 uint32_t sync_data_shm_offset; |
10713 static const int32_t border = 0; | 10843 static const int32_t border = 0; |
10714 }; | 10844 }; |
10715 | 10845 |
10716 COMPILE_ASSERT(sizeof(AsyncTexImage2DCHROMIUM) == 52, | 10846 static_assert(sizeof(AsyncTexImage2DCHROMIUM) == 52, |
10717 Sizeof_AsyncTexImage2DCHROMIUM_is_not_52); | 10847 "size of AsyncTexImage2DCHROMIUM should be 52"); |
10718 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, header) == 0, | 10848 static_assert(offsetof(AsyncTexImage2DCHROMIUM, header) == 0, |
10719 OffsetOf_AsyncTexImage2DCHROMIUM_header_not_0); | 10849 "offset of AsyncTexImage2DCHROMIUM header should be 0"); |
10720 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, target) == 4, | 10850 static_assert(offsetof(AsyncTexImage2DCHROMIUM, target) == 4, |
10721 OffsetOf_AsyncTexImage2DCHROMIUM_target_not_4); | 10851 "offset of AsyncTexImage2DCHROMIUM target should be 4"); |
10722 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, level) == 8, | 10852 static_assert(offsetof(AsyncTexImage2DCHROMIUM, level) == 8, |
10723 OffsetOf_AsyncTexImage2DCHROMIUM_level_not_8); | 10853 "offset of AsyncTexImage2DCHROMIUM level should be 8"); |
10724 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12, | 10854 static_assert(offsetof(AsyncTexImage2DCHROMIUM, internalformat) == 12, |
10725 OffsetOf_AsyncTexImage2DCHROMIUM_internalformat_not_12); | 10855 "offset of AsyncTexImage2DCHROMIUM internalformat should be 12"); |
10726 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, width) == 16, | 10856 static_assert(offsetof(AsyncTexImage2DCHROMIUM, width) == 16, |
10727 OffsetOf_AsyncTexImage2DCHROMIUM_width_not_16); | 10857 "offset of AsyncTexImage2DCHROMIUM width should be 16"); |
10728 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, height) == 20, | 10858 static_assert(offsetof(AsyncTexImage2DCHROMIUM, height) == 20, |
10729 OffsetOf_AsyncTexImage2DCHROMIUM_height_not_20); | 10859 "offset of AsyncTexImage2DCHROMIUM height should be 20"); |
10730 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, format) == 24, | 10860 static_assert(offsetof(AsyncTexImage2DCHROMIUM, format) == 24, |
10731 OffsetOf_AsyncTexImage2DCHROMIUM_format_not_24); | 10861 "offset of AsyncTexImage2DCHROMIUM format should be 24"); |
10732 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, type) == 28, | 10862 static_assert(offsetof(AsyncTexImage2DCHROMIUM, type) == 28, |
10733 OffsetOf_AsyncTexImage2DCHROMIUM_type_not_28); | 10863 "offset of AsyncTexImage2DCHROMIUM type should be 28"); |
10734 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 32, | 10864 static_assert(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_id) == 32, |
10735 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_id_not_32); | 10865 "offset of AsyncTexImage2DCHROMIUM pixels_shm_id should be 32"); |
10736 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 36, | 10866 static_assert( |
10737 OffsetOf_AsyncTexImage2DCHROMIUM_pixels_shm_offset_not_36); | 10867 offsetof(AsyncTexImage2DCHROMIUM, pixels_shm_offset) == 36, |
10738 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, async_upload_token) == 40, | 10868 "offset of AsyncTexImage2DCHROMIUM pixels_shm_offset should be 36"); |
10739 OffsetOf_AsyncTexImage2DCHROMIUM_async_upload_token_not_40); | 10869 static_assert( |
10740 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_id) == 44, | 10870 offsetof(AsyncTexImage2DCHROMIUM, async_upload_token) == 40, |
10741 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_id_not_44); | 10871 "offset of AsyncTexImage2DCHROMIUM async_upload_token should be 40"); |
10742 COMPILE_ASSERT(offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_offset) == 48, | 10872 static_assert( |
10743 OffsetOf_AsyncTexImage2DCHROMIUM_sync_data_shm_offset_not_48); | 10873 offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_id) == 44, |
| 10874 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_id should be 44"); |
| 10875 static_assert( |
| 10876 offsetof(AsyncTexImage2DCHROMIUM, sync_data_shm_offset) == 48, |
| 10877 "offset of AsyncTexImage2DCHROMIUM sync_data_shm_offset should be 48"); |
10744 | 10878 |
10745 struct WaitAsyncTexImage2DCHROMIUM { | 10879 struct WaitAsyncTexImage2DCHROMIUM { |
10746 typedef WaitAsyncTexImage2DCHROMIUM ValueType; | 10880 typedef WaitAsyncTexImage2DCHROMIUM ValueType; |
10747 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM; | 10881 static const CommandId kCmdId = kWaitAsyncTexImage2DCHROMIUM; |
10748 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10882 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10749 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10883 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10750 | 10884 |
10751 static uint32_t ComputeSize() { | 10885 static uint32_t ComputeSize() { |
10752 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10886 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10753 } | 10887 } |
10754 | 10888 |
10755 void SetHeader() { header.SetCmd<ValueType>(); } | 10889 void SetHeader() { header.SetCmd<ValueType>(); } |
10756 | 10890 |
10757 void Init(GLenum _target) { | 10891 void Init(GLenum _target) { |
10758 SetHeader(); | 10892 SetHeader(); |
10759 target = _target; | 10893 target = _target; |
10760 } | 10894 } |
10761 | 10895 |
10762 void* Set(void* cmd, GLenum _target) { | 10896 void* Set(void* cmd, GLenum _target) { |
10763 static_cast<ValueType*>(cmd)->Init(_target); | 10897 static_cast<ValueType*>(cmd)->Init(_target); |
10764 return NextCmdAddress<ValueType>(cmd); | 10898 return NextCmdAddress<ValueType>(cmd); |
10765 } | 10899 } |
10766 | 10900 |
10767 gpu::CommandHeader header; | 10901 gpu::CommandHeader header; |
10768 uint32_t target; | 10902 uint32_t target; |
10769 }; | 10903 }; |
10770 | 10904 |
10771 COMPILE_ASSERT(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8, | 10905 static_assert(sizeof(WaitAsyncTexImage2DCHROMIUM) == 8, |
10772 Sizeof_WaitAsyncTexImage2DCHROMIUM_is_not_8); | 10906 "size of WaitAsyncTexImage2DCHROMIUM should be 8"); |
10773 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0, | 10907 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM, header) == 0, |
10774 OffsetOf_WaitAsyncTexImage2DCHROMIUM_header_not_0); | 10908 "offset of WaitAsyncTexImage2DCHROMIUM header should be 0"); |
10775 COMPILE_ASSERT(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4, | 10909 static_assert(offsetof(WaitAsyncTexImage2DCHROMIUM, target) == 4, |
10776 OffsetOf_WaitAsyncTexImage2DCHROMIUM_target_not_4); | 10910 "offset of WaitAsyncTexImage2DCHROMIUM target should be 4"); |
10777 | 10911 |
10778 struct WaitAllAsyncTexImage2DCHROMIUM { | 10912 struct WaitAllAsyncTexImage2DCHROMIUM { |
10779 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType; | 10913 typedef WaitAllAsyncTexImage2DCHROMIUM ValueType; |
10780 static const CommandId kCmdId = kWaitAllAsyncTexImage2DCHROMIUM; | 10914 static const CommandId kCmdId = kWaitAllAsyncTexImage2DCHROMIUM; |
10781 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10915 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10782 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10916 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10783 | 10917 |
10784 static uint32_t ComputeSize() { | 10918 static uint32_t ComputeSize() { |
10785 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10919 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10786 } | 10920 } |
10787 | 10921 |
10788 void SetHeader() { header.SetCmd<ValueType>(); } | 10922 void SetHeader() { header.SetCmd<ValueType>(); } |
10789 | 10923 |
10790 void Init() { SetHeader(); } | 10924 void Init() { SetHeader(); } |
10791 | 10925 |
10792 void* Set(void* cmd) { | 10926 void* Set(void* cmd) { |
10793 static_cast<ValueType*>(cmd)->Init(); | 10927 static_cast<ValueType*>(cmd)->Init(); |
10794 return NextCmdAddress<ValueType>(cmd); | 10928 return NextCmdAddress<ValueType>(cmd); |
10795 } | 10929 } |
10796 | 10930 |
10797 gpu::CommandHeader header; | 10931 gpu::CommandHeader header; |
10798 }; | 10932 }; |
10799 | 10933 |
10800 COMPILE_ASSERT(sizeof(WaitAllAsyncTexImage2DCHROMIUM) == 4, | 10934 static_assert(sizeof(WaitAllAsyncTexImage2DCHROMIUM) == 4, |
10801 Sizeof_WaitAllAsyncTexImage2DCHROMIUM_is_not_4); | 10935 "size of WaitAllAsyncTexImage2DCHROMIUM should be 4"); |
10802 COMPILE_ASSERT(offsetof(WaitAllAsyncTexImage2DCHROMIUM, header) == 0, | 10936 static_assert(offsetof(WaitAllAsyncTexImage2DCHROMIUM, header) == 0, |
10803 OffsetOf_WaitAllAsyncTexImage2DCHROMIUM_header_not_0); | 10937 "offset of WaitAllAsyncTexImage2DCHROMIUM header should be 0"); |
10804 | 10938 |
10805 struct DiscardFramebufferEXTImmediate { | 10939 struct DiscardFramebufferEXTImmediate { |
10806 typedef DiscardFramebufferEXTImmediate ValueType; | 10940 typedef DiscardFramebufferEXTImmediate ValueType; |
10807 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate; | 10941 static const CommandId kCmdId = kDiscardFramebufferEXTImmediate; |
10808 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 10942 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
10809 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10943 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10810 | 10944 |
10811 static uint32_t ComputeDataSize(GLsizei count) { | 10945 static uint32_t ComputeDataSize(GLsizei count) { |
10812 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT | 10946 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT |
10813 } | 10947 } |
(...skipping 21 matching lines...) Expand all Loading... |
10835 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments); | 10969 static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments); |
10836 const uint32_t size = ComputeSize(_count); | 10970 const uint32_t size = ComputeSize(_count); |
10837 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 10971 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
10838 } | 10972 } |
10839 | 10973 |
10840 gpu::CommandHeader header; | 10974 gpu::CommandHeader header; |
10841 uint32_t target; | 10975 uint32_t target; |
10842 int32_t count; | 10976 int32_t count; |
10843 }; | 10977 }; |
10844 | 10978 |
10845 COMPILE_ASSERT(sizeof(DiscardFramebufferEXTImmediate) == 12, | 10979 static_assert(sizeof(DiscardFramebufferEXTImmediate) == 12, |
10846 Sizeof_DiscardFramebufferEXTImmediate_is_not_12); | 10980 "size of DiscardFramebufferEXTImmediate should be 12"); |
10847 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, header) == 0, | 10981 static_assert(offsetof(DiscardFramebufferEXTImmediate, header) == 0, |
10848 OffsetOf_DiscardFramebufferEXTImmediate_header_not_0); | 10982 "offset of DiscardFramebufferEXTImmediate header should be 0"); |
10849 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, target) == 4, | 10983 static_assert(offsetof(DiscardFramebufferEXTImmediate, target) == 4, |
10850 OffsetOf_DiscardFramebufferEXTImmediate_target_not_4); | 10984 "offset of DiscardFramebufferEXTImmediate target should be 4"); |
10851 COMPILE_ASSERT(offsetof(DiscardFramebufferEXTImmediate, count) == 8, | 10985 static_assert(offsetof(DiscardFramebufferEXTImmediate, count) == 8, |
10852 OffsetOf_DiscardFramebufferEXTImmediate_count_not_8); | 10986 "offset of DiscardFramebufferEXTImmediate count should be 8"); |
10853 | 10987 |
10854 struct LoseContextCHROMIUM { | 10988 struct LoseContextCHROMIUM { |
10855 typedef LoseContextCHROMIUM ValueType; | 10989 typedef LoseContextCHROMIUM ValueType; |
10856 static const CommandId kCmdId = kLoseContextCHROMIUM; | 10990 static const CommandId kCmdId = kLoseContextCHROMIUM; |
10857 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10991 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10858 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10992 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10859 | 10993 |
10860 static uint32_t ComputeSize() { | 10994 static uint32_t ComputeSize() { |
10861 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10995 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10862 } | 10996 } |
10863 | 10997 |
10864 void SetHeader() { header.SetCmd<ValueType>(); } | 10998 void SetHeader() { header.SetCmd<ValueType>(); } |
10865 | 10999 |
10866 void Init(GLenum _current, GLenum _other) { | 11000 void Init(GLenum _current, GLenum _other) { |
10867 SetHeader(); | 11001 SetHeader(); |
10868 current = _current; | 11002 current = _current; |
10869 other = _other; | 11003 other = _other; |
10870 } | 11004 } |
10871 | 11005 |
10872 void* Set(void* cmd, GLenum _current, GLenum _other) { | 11006 void* Set(void* cmd, GLenum _current, GLenum _other) { |
10873 static_cast<ValueType*>(cmd)->Init(_current, _other); | 11007 static_cast<ValueType*>(cmd)->Init(_current, _other); |
10874 return NextCmdAddress<ValueType>(cmd); | 11008 return NextCmdAddress<ValueType>(cmd); |
10875 } | 11009 } |
10876 | 11010 |
10877 gpu::CommandHeader header; | 11011 gpu::CommandHeader header; |
10878 uint32_t current; | 11012 uint32_t current; |
10879 uint32_t other; | 11013 uint32_t other; |
10880 }; | 11014 }; |
10881 | 11015 |
10882 COMPILE_ASSERT(sizeof(LoseContextCHROMIUM) == 12, | 11016 static_assert(sizeof(LoseContextCHROMIUM) == 12, |
10883 Sizeof_LoseContextCHROMIUM_is_not_12); | 11017 "size of LoseContextCHROMIUM should be 12"); |
10884 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, header) == 0, | 11018 static_assert(offsetof(LoseContextCHROMIUM, header) == 0, |
10885 OffsetOf_LoseContextCHROMIUM_header_not_0); | 11019 "offset of LoseContextCHROMIUM header should be 0"); |
10886 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, current) == 4, | 11020 static_assert(offsetof(LoseContextCHROMIUM, current) == 4, |
10887 OffsetOf_LoseContextCHROMIUM_current_not_4); | 11021 "offset of LoseContextCHROMIUM current should be 4"); |
10888 COMPILE_ASSERT(offsetof(LoseContextCHROMIUM, other) == 8, | 11022 static_assert(offsetof(LoseContextCHROMIUM, other) == 8, |
10889 OffsetOf_LoseContextCHROMIUM_other_not_8); | 11023 "offset of LoseContextCHROMIUM other should be 8"); |
10890 | 11024 |
10891 struct WaitSyncPointCHROMIUM { | 11025 struct WaitSyncPointCHROMIUM { |
10892 typedef WaitSyncPointCHROMIUM ValueType; | 11026 typedef WaitSyncPointCHROMIUM ValueType; |
10893 static const CommandId kCmdId = kWaitSyncPointCHROMIUM; | 11027 static const CommandId kCmdId = kWaitSyncPointCHROMIUM; |
10894 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 11028 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10895 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 11029 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
10896 | 11030 |
10897 static uint32_t ComputeSize() { | 11031 static uint32_t ComputeSize() { |
10898 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 11032 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10899 } | 11033 } |
10900 | 11034 |
10901 void SetHeader() { header.SetCmd<ValueType>(); } | 11035 void SetHeader() { header.SetCmd<ValueType>(); } |
10902 | 11036 |
10903 void Init(GLuint _sync_point) { | 11037 void Init(GLuint _sync_point) { |
10904 SetHeader(); | 11038 SetHeader(); |
10905 sync_point = _sync_point; | 11039 sync_point = _sync_point; |
10906 } | 11040 } |
10907 | 11041 |
10908 void* Set(void* cmd, GLuint _sync_point) { | 11042 void* Set(void* cmd, GLuint _sync_point) { |
10909 static_cast<ValueType*>(cmd)->Init(_sync_point); | 11043 static_cast<ValueType*>(cmd)->Init(_sync_point); |
10910 return NextCmdAddress<ValueType>(cmd); | 11044 return NextCmdAddress<ValueType>(cmd); |
10911 } | 11045 } |
10912 | 11046 |
10913 gpu::CommandHeader header; | 11047 gpu::CommandHeader header; |
10914 uint32_t sync_point; | 11048 uint32_t sync_point; |
10915 }; | 11049 }; |
10916 | 11050 |
10917 COMPILE_ASSERT(sizeof(WaitSyncPointCHROMIUM) == 8, | 11051 static_assert(sizeof(WaitSyncPointCHROMIUM) == 8, |
10918 Sizeof_WaitSyncPointCHROMIUM_is_not_8); | 11052 "size of WaitSyncPointCHROMIUM should be 8"); |
10919 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, header) == 0, | 11053 static_assert(offsetof(WaitSyncPointCHROMIUM, header) == 0, |
10920 OffsetOf_WaitSyncPointCHROMIUM_header_not_0); | 11054 "offset of WaitSyncPointCHROMIUM header should be 0"); |
10921 COMPILE_ASSERT(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4, | 11055 static_assert(offsetof(WaitSyncPointCHROMIUM, sync_point) == 4, |
10922 OffsetOf_WaitSyncPointCHROMIUM_sync_point_not_4); | 11056 "offset of WaitSyncPointCHROMIUM sync_point should be 4"); |
10923 | 11057 |
10924 struct DrawBuffersEXTImmediate { | 11058 struct DrawBuffersEXTImmediate { |
10925 typedef DrawBuffersEXTImmediate ValueType; | 11059 typedef DrawBuffersEXTImmediate ValueType; |
10926 static const CommandId kCmdId = kDrawBuffersEXTImmediate; | 11060 static const CommandId kCmdId = kDrawBuffersEXTImmediate; |
10927 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 11061 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
10928 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 11062 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10929 | 11063 |
10930 static uint32_t ComputeDataSize(GLsizei count) { | 11064 static uint32_t ComputeDataSize(GLsizei count) { |
10931 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT | 11065 return static_cast<uint32_t>(sizeof(GLenum) * 1 * count); // NOLINT |
10932 } | 11066 } |
(...skipping 16 matching lines...) Expand all Loading... |
10949 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) { | 11083 void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) { |
10950 static_cast<ValueType*>(cmd)->Init(_count, _bufs); | 11084 static_cast<ValueType*>(cmd)->Init(_count, _bufs); |
10951 const uint32_t size = ComputeSize(_count); | 11085 const uint32_t size = ComputeSize(_count); |
10952 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 11086 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
10953 } | 11087 } |
10954 | 11088 |
10955 gpu::CommandHeader header; | 11089 gpu::CommandHeader header; |
10956 int32_t count; | 11090 int32_t count; |
10957 }; | 11091 }; |
10958 | 11092 |
10959 COMPILE_ASSERT(sizeof(DrawBuffersEXTImmediate) == 8, | 11093 static_assert(sizeof(DrawBuffersEXTImmediate) == 8, |
10960 Sizeof_DrawBuffersEXTImmediate_is_not_8); | 11094 "size of DrawBuffersEXTImmediate should be 8"); |
10961 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0, | 11095 static_assert(offsetof(DrawBuffersEXTImmediate, header) == 0, |
10962 OffsetOf_DrawBuffersEXTImmediate_header_not_0); | 11096 "offset of DrawBuffersEXTImmediate header should be 0"); |
10963 COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4, | 11097 static_assert(offsetof(DrawBuffersEXTImmediate, count) == 4, |
10964 OffsetOf_DrawBuffersEXTImmediate_count_not_4); | 11098 "offset of DrawBuffersEXTImmediate count should be 4"); |
10965 | 11099 |
10966 struct DiscardBackbufferCHROMIUM { | 11100 struct DiscardBackbufferCHROMIUM { |
10967 typedef DiscardBackbufferCHROMIUM ValueType; | 11101 typedef DiscardBackbufferCHROMIUM ValueType; |
10968 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM; | 11102 static const CommandId kCmdId = kDiscardBackbufferCHROMIUM; |
10969 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 11103 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10970 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 11104 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10971 | 11105 |
10972 static uint32_t ComputeSize() { | 11106 static uint32_t ComputeSize() { |
10973 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 11107 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10974 } | 11108 } |
10975 | 11109 |
10976 void SetHeader() { header.SetCmd<ValueType>(); } | 11110 void SetHeader() { header.SetCmd<ValueType>(); } |
10977 | 11111 |
10978 void Init() { SetHeader(); } | 11112 void Init() { SetHeader(); } |
10979 | 11113 |
10980 void* Set(void* cmd) { | 11114 void* Set(void* cmd) { |
10981 static_cast<ValueType*>(cmd)->Init(); | 11115 static_cast<ValueType*>(cmd)->Init(); |
10982 return NextCmdAddress<ValueType>(cmd); | 11116 return NextCmdAddress<ValueType>(cmd); |
10983 } | 11117 } |
10984 | 11118 |
10985 gpu::CommandHeader header; | 11119 gpu::CommandHeader header; |
10986 }; | 11120 }; |
10987 | 11121 |
10988 COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM) == 4, | 11122 static_assert(sizeof(DiscardBackbufferCHROMIUM) == 4, |
10989 Sizeof_DiscardBackbufferCHROMIUM_is_not_4); | 11123 "size of DiscardBackbufferCHROMIUM should be 4"); |
10990 COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM, header) == 0, | 11124 static_assert(offsetof(DiscardBackbufferCHROMIUM, header) == 0, |
10991 OffsetOf_DiscardBackbufferCHROMIUM_header_not_0); | 11125 "offset of DiscardBackbufferCHROMIUM header should be 0"); |
10992 | 11126 |
10993 struct ScheduleOverlayPlaneCHROMIUM { | 11127 struct ScheduleOverlayPlaneCHROMIUM { |
10994 typedef ScheduleOverlayPlaneCHROMIUM ValueType; | 11128 typedef ScheduleOverlayPlaneCHROMIUM ValueType; |
10995 static const CommandId kCmdId = kScheduleOverlayPlaneCHROMIUM; | 11129 static const CommandId kCmdId = kScheduleOverlayPlaneCHROMIUM; |
10996 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 11130 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10997 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 11131 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10998 | 11132 |
10999 static uint32_t ComputeSize() { | 11133 static uint32_t ComputeSize() { |
11000 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 11134 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
11001 } | 11135 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11053 int32_t bounds_x; | 11187 int32_t bounds_x; |
11054 int32_t bounds_y; | 11188 int32_t bounds_y; |
11055 int32_t bounds_width; | 11189 int32_t bounds_width; |
11056 int32_t bounds_height; | 11190 int32_t bounds_height; |
11057 float uv_x; | 11191 float uv_x; |
11058 float uv_y; | 11192 float uv_y; |
11059 float uv_width; | 11193 float uv_width; |
11060 float uv_height; | 11194 float uv_height; |
11061 }; | 11195 }; |
11062 | 11196 |
11063 COMPILE_ASSERT(sizeof(ScheduleOverlayPlaneCHROMIUM) == 48, | 11197 static_assert(sizeof(ScheduleOverlayPlaneCHROMIUM) == 48, |
11064 Sizeof_ScheduleOverlayPlaneCHROMIUM_is_not_48); | 11198 "size of ScheduleOverlayPlaneCHROMIUM should be 48"); |
11065 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, header) == 0, | 11199 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, header) == 0, |
11066 OffsetOf_ScheduleOverlayPlaneCHROMIUM_header_not_0); | 11200 "offset of ScheduleOverlayPlaneCHROMIUM header should be 0"); |
11067 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, plane_z_order) == 4, | 11201 static_assert( |
11068 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_z_order_not_4); | 11202 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_z_order) == 4, |
11069 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, plane_transform) == 8, | 11203 "offset of ScheduleOverlayPlaneCHROMIUM plane_z_order should be 4"); |
11070 OffsetOf_ScheduleOverlayPlaneCHROMIUM_plane_transform_not_8); | 11204 static_assert( |
11071 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, overlay_texture_id) == 12, | 11205 offsetof(ScheduleOverlayPlaneCHROMIUM, plane_transform) == 8, |
11072 OffsetOf_ScheduleOverlayPlaneCHROMIUM_overlay_texture_id_not_12); | 11206 "offset of ScheduleOverlayPlaneCHROMIUM plane_transform should be 8"); |
11073 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_x) == 16, | 11207 static_assert( |
11074 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_x_not_16); | 11208 offsetof(ScheduleOverlayPlaneCHROMIUM, overlay_texture_id) == 12, |
11075 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_y) == 20, | 11209 "offset of ScheduleOverlayPlaneCHROMIUM overlay_texture_id should be 12"); |
11076 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_y_not_20); | 11210 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_x) == 16, |
11077 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_width) == 24, | 11211 "offset of ScheduleOverlayPlaneCHROMIUM bounds_x should be 16"); |
11078 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_width_not_24); | 11212 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_y) == 20, |
11079 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_height) == 28, | 11213 "offset of ScheduleOverlayPlaneCHROMIUM bounds_y should be 20"); |
11080 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_height_not_28); | 11214 static_assert( |
11081 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, | 11215 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_width) == 24, |
11082 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); | 11216 "offset of ScheduleOverlayPlaneCHROMIUM bounds_width should be 24"); |
11083 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, | 11217 static_assert( |
11084 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); | 11218 offsetof(ScheduleOverlayPlaneCHROMIUM, bounds_height) == 28, |
11085 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, | 11219 "offset of ScheduleOverlayPlaneCHROMIUM bounds_height should be 28"); |
11086 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); | 11220 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, |
11087 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, | 11221 "offset of ScheduleOverlayPlaneCHROMIUM uv_x should be 32"); |
11088 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); | 11222 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, |
| 11223 "offset of ScheduleOverlayPlaneCHROMIUM uv_y should be 36"); |
| 11224 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, |
| 11225 "offset of ScheduleOverlayPlaneCHROMIUM uv_width should be 40"); |
| 11226 static_assert(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, |
| 11227 "offset of ScheduleOverlayPlaneCHROMIUM uv_height should be 44"); |
11089 | 11228 |
11090 struct SwapInterval { | 11229 struct SwapInterval { |
11091 typedef SwapInterval ValueType; | 11230 typedef SwapInterval ValueType; |
11092 static const CommandId kCmdId = kSwapInterval; | 11231 static const CommandId kCmdId = kSwapInterval; |
11093 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 11232 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
11094 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 11233 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
11095 | 11234 |
11096 static uint32_t ComputeSize() { | 11235 static uint32_t ComputeSize() { |
11097 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 11236 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
11098 } | 11237 } |
11099 | 11238 |
11100 void SetHeader() { header.SetCmd<ValueType>(); } | 11239 void SetHeader() { header.SetCmd<ValueType>(); } |
11101 | 11240 |
11102 void Init(GLint _interval) { | 11241 void Init(GLint _interval) { |
11103 SetHeader(); | 11242 SetHeader(); |
11104 interval = _interval; | 11243 interval = _interval; |
11105 } | 11244 } |
11106 | 11245 |
11107 void* Set(void* cmd, GLint _interval) { | 11246 void* Set(void* cmd, GLint _interval) { |
11108 static_cast<ValueType*>(cmd)->Init(_interval); | 11247 static_cast<ValueType*>(cmd)->Init(_interval); |
11109 return NextCmdAddress<ValueType>(cmd); | 11248 return NextCmdAddress<ValueType>(cmd); |
11110 } | 11249 } |
11111 | 11250 |
11112 gpu::CommandHeader header; | 11251 gpu::CommandHeader header; |
11113 int32_t interval; | 11252 int32_t interval; |
11114 }; | 11253 }; |
11115 | 11254 |
11116 COMPILE_ASSERT(sizeof(SwapInterval) == 8, Sizeof_SwapInterval_is_not_8); | 11255 static_assert(sizeof(SwapInterval) == 8, "size of SwapInterval should be 8"); |
11117 COMPILE_ASSERT(offsetof(SwapInterval, header) == 0, | 11256 static_assert(offsetof(SwapInterval, header) == 0, |
11118 OffsetOf_SwapInterval_header_not_0); | 11257 "offset of SwapInterval header should be 0"); |
11119 COMPILE_ASSERT(offsetof(SwapInterval, interval) == 4, | 11258 static_assert(offsetof(SwapInterval, interval) == 4, |
11120 OffsetOf_SwapInterval_interval_not_4); | 11259 "offset of SwapInterval interval should be 4"); |
11121 | 11260 |
11122 struct MatrixLoadfCHROMIUMImmediate { | 11261 struct MatrixLoadfCHROMIUMImmediate { |
11123 typedef MatrixLoadfCHROMIUMImmediate ValueType; | 11262 typedef MatrixLoadfCHROMIUMImmediate ValueType; |
11124 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate; | 11263 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate; |
11125 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 11264 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
11126 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 11265 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
11127 | 11266 |
11128 static uint32_t ComputeDataSize() { | 11267 static uint32_t ComputeDataSize() { |
11129 return static_cast<uint32_t>(sizeof(GLfloat) * 16); // NOLINT | 11268 return static_cast<uint32_t>(sizeof(GLfloat) * 16); // NOLINT |
11130 } | 11269 } |
(...skipping 14 matching lines...) Expand all Loading... |
11145 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) { | 11284 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) { |
11146 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m); | 11285 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m); |
11147 const uint32_t size = ComputeSize(); | 11286 const uint32_t size = ComputeSize(); |
11148 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | 11287 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
11149 } | 11288 } |
11150 | 11289 |
11151 gpu::CommandHeader header; | 11290 gpu::CommandHeader header; |
11152 uint32_t matrixMode; | 11291 uint32_t matrixMode; |
11153 }; | 11292 }; |
11154 | 11293 |
11155 COMPILE_ASSERT(sizeof(MatrixLoadfCHROMIUMImmediate) == 8, | 11294 static_assert(sizeof(MatrixLoadfCHROMIUMImmediate) == 8, |
11156 Sizeof_MatrixLoadfCHROMIUMImmediate_is_not_8); | 11295 "size of MatrixLoadfCHROMIUMImmediate should be 8"); |
11157 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0, | 11296 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0, |
11158 OffsetOf_MatrixLoadfCHROMIUMImmediate_header_not_0); | 11297 "offset of MatrixLoadfCHROMIUMImmediate header should be 0"); |
11159 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4, | 11298 static_assert(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4, |
11160 OffsetOf_MatrixLoadfCHROMIUMImmediate_matrixMode_not_4); | 11299 "offset of MatrixLoadfCHROMIUMImmediate matrixMode should be 4"); |
11161 | 11300 |
11162 struct MatrixLoadIdentityCHROMIUM { | 11301 struct MatrixLoadIdentityCHROMIUM { |
11163 typedef MatrixLoadIdentityCHROMIUM ValueType; | 11302 typedef MatrixLoadIdentityCHROMIUM ValueType; |
11164 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM; | 11303 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM; |
11165 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 11304 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
11166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 11305 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
11167 | 11306 |
11168 static uint32_t ComputeSize() { | 11307 static uint32_t ComputeSize() { |
11169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 11308 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
11170 } | 11309 } |
11171 | 11310 |
11172 void SetHeader() { header.SetCmd<ValueType>(); } | 11311 void SetHeader() { header.SetCmd<ValueType>(); } |
11173 | 11312 |
11174 void Init(GLenum _matrixMode) { | 11313 void Init(GLenum _matrixMode) { |
11175 SetHeader(); | 11314 SetHeader(); |
11176 matrixMode = _matrixMode; | 11315 matrixMode = _matrixMode; |
11177 } | 11316 } |
11178 | 11317 |
11179 void* Set(void* cmd, GLenum _matrixMode) { | 11318 void* Set(void* cmd, GLenum _matrixMode) { |
11180 static_cast<ValueType*>(cmd)->Init(_matrixMode); | 11319 static_cast<ValueType*>(cmd)->Init(_matrixMode); |
11181 return NextCmdAddress<ValueType>(cmd); | 11320 return NextCmdAddress<ValueType>(cmd); |
11182 } | 11321 } |
11183 | 11322 |
11184 gpu::CommandHeader header; | 11323 gpu::CommandHeader header; |
11185 uint32_t matrixMode; | 11324 uint32_t matrixMode; |
11186 }; | 11325 }; |
11187 | 11326 |
11188 COMPILE_ASSERT(sizeof(MatrixLoadIdentityCHROMIUM) == 8, | 11327 static_assert(sizeof(MatrixLoadIdentityCHROMIUM) == 8, |
11189 Sizeof_MatrixLoadIdentityCHROMIUM_is_not_8); | 11328 "size of MatrixLoadIdentityCHROMIUM should be 8"); |
11190 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0, | 11329 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0, |
11191 OffsetOf_MatrixLoadIdentityCHROMIUM_header_not_0); | 11330 "offset of MatrixLoadIdentityCHROMIUM header should be 0"); |
11192 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4, | 11331 static_assert(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4, |
11193 OffsetOf_MatrixLoadIdentityCHROMIUM_matrixMode_not_4); | 11332 "offset of MatrixLoadIdentityCHROMIUM matrixMode should be 4"); |
11194 | 11333 |
11195 struct BlendBarrierKHR { | 11334 struct BlendBarrierKHR { |
11196 typedef BlendBarrierKHR ValueType; | 11335 typedef BlendBarrierKHR ValueType; |
11197 static const CommandId kCmdId = kBlendBarrierKHR; | 11336 static const CommandId kCmdId = kBlendBarrierKHR; |
11198 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 11337 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
11199 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 11338 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
11200 | 11339 |
11201 static uint32_t ComputeSize() { | 11340 static uint32_t ComputeSize() { |
11202 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 11341 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
11203 } | 11342 } |
11204 | 11343 |
11205 void SetHeader() { header.SetCmd<ValueType>(); } | 11344 void SetHeader() { header.SetCmd<ValueType>(); } |
11206 | 11345 |
11207 void Init() { SetHeader(); } | 11346 void Init() { SetHeader(); } |
11208 | 11347 |
11209 void* Set(void* cmd) { | 11348 void* Set(void* cmd) { |
11210 static_cast<ValueType*>(cmd)->Init(); | 11349 static_cast<ValueType*>(cmd)->Init(); |
11211 return NextCmdAddress<ValueType>(cmd); | 11350 return NextCmdAddress<ValueType>(cmd); |
11212 } | 11351 } |
11213 | 11352 |
11214 gpu::CommandHeader header; | 11353 gpu::CommandHeader header; |
11215 }; | 11354 }; |
11216 | 11355 |
11217 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); | 11356 static_assert(sizeof(BlendBarrierKHR) == 4, |
11218 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, | 11357 "size of BlendBarrierKHR should be 4"); |
11219 OffsetOf_BlendBarrierKHR_header_not_0); | 11358 static_assert(offsetof(BlendBarrierKHR, header) == 0, |
| 11359 "offset of BlendBarrierKHR header should be 0"); |
11220 | 11360 |
11221 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 11361 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |