gles2_cmd_format.h revision 4ad1aa43a48567659193a298fad74f55e00b3dd9
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This file defines the GLES2 command buffer commands.
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <KHR/khrplatform.h>
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string.h>
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
154e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#include "base/atomicops.h"
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "gpu/command_buffer/common/bitfield_helpers.h"
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "gpu/command_buffer/common/cmd_buffer_common.h"
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "gpu/command_buffer/common/gles2_cmd_ids.h"
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "gpu/command_buffer/common/types.h"
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// GL types are forward declared to avoid including the GL headers. The problem
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// is determining which GL headers to include from code that is common to the
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// client and service sides (GLES2 or one of several GL implementations).
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned int GLenum;
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned int GLbitfield;
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned int GLuint;
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int GLint;
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int GLsizei;
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned char GLboolean;
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef signed char GLbyte;
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef short GLshort;
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned char GLubyte;
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned short GLushort;
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef unsigned long GLulong;
35a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochtypedef float GLfloat;
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef float GLclampf;
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef double GLdouble;
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef double GLclampd;
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void GLvoid;
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef khronos_intptr_t GLintptr;
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef khronos_ssize_t  GLsizeiptr;
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace gpu {
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace gles2 {
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Command buffer is GPU_COMMAND_BUFFER_ENTRY_ALIGNMENT byte aligned.
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#pragma pack(push, GPU_COMMAND_BUFFER_ENTRY_ALIGNMENT)
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace id_namespaces {
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// These are used when contexts share resources.
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)enum IdNamespaces {
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kBuffers,
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kFramebuffers,
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kProgramsAndShaders,
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kRenderbuffers,
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kTextures,
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kQueries,
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kVertexArrays,
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  kNumIdNamespaces
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
62
63// These numbers must not change
64COMPILE_ASSERT(kBuffers == 0, kBuffers_is_not_0);
65COMPILE_ASSERT(kFramebuffers == 1, kFramebuffers_is_not_1);
66COMPILE_ASSERT(kProgramsAndShaders == 2, kProgramsAndShaders_is_not_2);
67COMPILE_ASSERT(kRenderbuffers == 3, kRenderbuffers_is_not_3);
68COMPILE_ASSERT(kTextures == 4, kTextures_is_not_4);
69
70}  // namespace id_namespaces
71
72// Used for some glGetXXX commands that return a result through a pointer. We
73// need to know if the command succeeded or not and the size of the result. If
74// the command failed its result size will 0.
75template <typename T>
76struct SizedResult {
77  typedef T Type;
78
79  T* GetData() {
80    return static_cast<T*>(static_cast<void*>(&data));
81  }
82
83  // Returns the total size in bytes of the SizedResult for a given number of
84  // results including the size field.
85  static size_t ComputeSize(size_t num_results) {
86    return sizeof(T) * num_results + sizeof(uint32);  // NOLINT
87  }
88
89  // Returns the total size in bytes of the SizedResult for a given size of
90  // results.
91  static size_t ComputeSizeFromBytes(size_t size_of_result_in_bytes) {
92    return size_of_result_in_bytes + sizeof(uint32);  // NOLINT
93  }
94
95  // Returns the maximum number of results for a given buffer size.
96  static uint32 ComputeMaxResults(size_t size_of_buffer) {
97    return (size_of_buffer >= sizeof(uint32)) ?
98        ((size_of_buffer - sizeof(uint32)) / sizeof(T)) : 0;  // NOLINT
99  }
100
101  // Set the size for a given number of results.
102  void SetNumResults(size_t num_results) {
103    size = sizeof(T) * num_results;  // NOLINT
104  }
105
106  // Get the number of elements in the result
107  int32 GetNumResults() const {
108    return size / sizeof(T);  // NOLINT
109  }
110
111  // Copy the result.
112  void CopyResult(void* dst) const {
113    memcpy(dst, &data, size);
114  }
115
116  uint32 size;  // in bytes.
117  int32 data;  // this is just here to get an offset.
118};
119
120COMPILE_ASSERT(sizeof(SizedResult<int8>) == 8, SizedResult_size_not_8);
121COMPILE_ASSERT(offsetof(SizedResult<int8>, size) == 0,
122               OffsetOf_SizedResult_size_not_0);
123COMPILE_ASSERT(offsetof(SizedResult<int8>, data) == 4,
124               OffsetOf_SizedResult_data_not_4);
125
126// The data for one attrib or uniform from GetProgramInfoCHROMIUM.
127struct ProgramInput {
128  uint32 type;             // The type (GL_VEC3, GL_MAT3, GL_SAMPLER_2D, etc.
129  int32 size;              // The size (how big the array is for uniforms)
130  uint32 location_offset;  // offset from ProgramInfoHeader to 'size' locations
131                           // for uniforms, 1 for attribs.
132  uint32 name_offset;      // offset from ProgrmaInfoHeader to start of name.
133  uint32 name_length;      // length of the name.
134};
135
136// The format of the bucket filled out by GetProgramInfoCHROMIUM
137struct ProgramInfoHeader {
138  uint32 link_status;
139  uint32 num_attribs;
140  uint32 num_uniforms;
141  // ProgramInput inputs[num_attribs + num_uniforms];
142};
143
144// The format of QuerySync used by EXT_occlusion_query_boolean
145struct QuerySync {
146  void Reset() {
147    process_count = 0;
148    result = 0;
149  }
150
151  base::subtle::Atomic32 process_count;
152  uint64 result;
153};
154
155struct AsyncUploadSync {
156  void Reset() {
157    base::subtle::Release_Store(&async_upload_token, 0);
158  }
159
160  void SetAsyncUploadToken(uint32 token) {
161    DCHECK_NE(token, 0u);
162    base::subtle::Release_Store(&async_upload_token, token);
163  }
164
165  bool HasAsyncUploadTokenPassed(uint32 token) {
166    DCHECK_NE(token, 0u);
167    uint32_t current_token = base::subtle::Acquire_Load(&async_upload_token);
168    return (current_token - token < 0x80000000);
169  }
170
171  base::subtle::Atomic32 async_upload_token;
172};
173
174COMPILE_ASSERT(sizeof(ProgramInput) == 20, ProgramInput_size_not_20);
175COMPILE_ASSERT(offsetof(ProgramInput, type) == 0,
176               OffsetOf_ProgramInput_type_not_0);
177COMPILE_ASSERT(offsetof(ProgramInput, size) == 4,
178               OffsetOf_ProgramInput_size_not_4);
179COMPILE_ASSERT(offsetof(ProgramInput, location_offset) == 8,
180               OffsetOf_ProgramInput_location_offset_not_8);
181COMPILE_ASSERT(offsetof(ProgramInput, name_offset) == 12,
182               OffsetOf_ProgramInput_name_offset_not_12);
183COMPILE_ASSERT(offsetof(ProgramInput, name_length) == 16,
184               OffsetOf_ProgramInput_name_length_not_16);
185
186COMPILE_ASSERT(sizeof(ProgramInfoHeader) == 12, ProgramInfoHeader_size_not_12);
187COMPILE_ASSERT(offsetof(ProgramInfoHeader, link_status) == 0,
188               OffsetOf_ProgramInfoHeader_link_status_not_0);
189COMPILE_ASSERT(offsetof(ProgramInfoHeader, num_attribs) == 4,
190               OffsetOf_ProgramInfoHeader_num_attribs_not_4);
191COMPILE_ASSERT(offsetof(ProgramInfoHeader, num_uniforms) == 8,
192               OffsetOf_ProgramInfoHeader_num_uniforms_not_8);
193
194namespace cmds {
195
196#include "../common/gles2_cmd_format_autogen.h"
197
198// These are hand written commands.
199// TODO(gman): Attempt to make these auto-generated.
200
201struct GetAttribLocation {
202  typedef GetAttribLocation ValueType;
203  static const CommandId kCmdId = kGetAttribLocation;
204  static const cmd::ArgFlags kArgFlags = cmd::kFixed;
205  static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
206
207  typedef GLint Result;
208
209  static uint32 ComputeSize() {
210    return static_cast<uint32>(sizeof(ValueType));  // NOLINT
211  }
212
213  void SetHeader() {
214    header.SetCmd<ValueType>();
215  }
216
217  void Init(
218      GLuint _program, uint32 _name_shm_id, uint32 _name_shm_offset,
219      uint32 _location_shm_id, uint32 _location_shm_offset,
220      uint32 _data_size) {
221    SetHeader();
222    program = _program;
223    name_shm_id = _name_shm_id;
224    name_shm_offset = _name_shm_offset;
225    location_shm_id = _location_shm_id;
226    location_shm_offset = _location_shm_offset;
227    data_size = _data_size;
228  }
229
230  void* Set(
231      void* cmd, GLuint _program, uint32 _name_shm_id, uint32 _name_shm_offset,
232      uint32 _location_shm_id, uint32 _location_shm_offset,
233      uint32 _data_size) {
234    static_cast<ValueType*>(
235        cmd)->Init(
236            _program, _name_shm_id, _name_shm_offset, _location_shm_id,
237            _location_shm_offset, _data_size);
238    return NextCmdAddress<ValueType>(cmd);
239  }
240
241  CommandHeader header;
242  uint32 program;
243  uint32 name_shm_id;
244  uint32 name_shm_offset;
245  uint32 location_shm_id;
246  uint32 location_shm_offset;
247  uint32 data_size;
248};
249
250COMPILE_ASSERT(sizeof(GetAttribLocation) == 28,
251               Sizeof_GetAttribLocation_is_not_28);
252COMPILE_ASSERT(offsetof(GetAttribLocation, header) == 0,
253               OffsetOf_GetAttribLocation_header_not_0);
254COMPILE_ASSERT(offsetof(GetAttribLocation, program) == 4,
255               OffsetOf_GetAttribLocation_program_not_4);
256COMPILE_ASSERT(offsetof(GetAttribLocation, name_shm_id) == 8,
257               OffsetOf_GetAttribLocation_name_shm_id_not_8);
258COMPILE_ASSERT(offsetof(GetAttribLocation, name_shm_offset) == 12,
259               OffsetOf_GetAttribLocation_name_shm_offset_not_12);
260COMPILE_ASSERT(offsetof(GetAttribLocation, location_shm_id) == 16,
261               OffsetOf_GetAttribLocation_location_shm_id_not_16);
262COMPILE_ASSERT(offsetof(GetAttribLocation, location_shm_offset) == 20,
263               OffsetOf_GetAttribLocation_location_shm_offset_not_20);
264COMPILE_ASSERT(offsetof(GetAttribLocation, data_size) == 24,
265               OffsetOf_GetAttribLocation_data_size_not_24);
266
267
268struct GetAttribLocationBucket {
269  typedef GetAttribLocationBucket ValueType;
270  static const CommandId kCmdId = kGetAttribLocationBucket;
271  static const cmd::ArgFlags kArgFlags = cmd::kFixed;
272  static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
273
274  typedef GLint Result;
275
276  static uint32 ComputeSize() {
277    return static_cast<uint32>(sizeof(ValueType));  // NOLINT
278  }
279
280  void SetHeader() {
281    header.SetCmd<ValueType>();
282  }
283
284  void Init(
285      GLuint _program, uint32 _name_bucket_id,
286      uint32 _location_shm_id, uint32 _location_shm_offset) {
287    SetHeader();
288    program = _program;
289    name_bucket_id = _name_bucket_id;
290    location_shm_id = _location_shm_id;
291    location_shm_offset = _location_shm_offset;
292  }
293
294  void* Set(
295      void* cmd, GLuint _program, uint32 _name_bucket_id,
296      uint32 _location_shm_id, uint32 _location_shm_offset) {
297    static_cast<ValueType*>(
298        cmd)->Init(
299            _program, _name_bucket_id, _location_shm_id,
300            _location_shm_offset);
301    return NextCmdAddress<ValueType>(cmd);
302  }
303
304  CommandHeader header;
305  uint32 program;
306  uint32 name_bucket_id;
307  uint32 location_shm_id;
308  uint32 location_shm_offset;
309};
310
311COMPILE_ASSERT(sizeof(GetAttribLocationBucket) == 20,
312               Sizeof_GetAttribLocationBucket_is_not_24);
313COMPILE_ASSERT(offsetof(GetAttribLocationBucket, header) == 0,
314               OffsetOf_GetAttribLocationBucket_header_not_0);
315COMPILE_ASSERT(offsetof(GetAttribLocationBucket, program) == 4,
316               OffsetOf_GetAttribLocationBucket_program_not_4);
317COMPILE_ASSERT(offsetof(GetAttribLocationBucket, name_bucket_id) == 8,
318               OffsetOf_GetAttribLocationBucket_name_bucket_id_not_8);
319COMPILE_ASSERT(offsetof(GetAttribLocationBucket, location_shm_id) == 12,
320               OffsetOf_GetAttribLocationBucket_location_shm_id_not_12);
321COMPILE_ASSERT(offsetof(GetAttribLocationBucket, location_shm_offset) == 16,
322               OffsetOf_GetAttribLocationBucket_location_shm_offset_not_16);
323
324struct GetUniformLocation {
325  typedef GetUniformLocation ValueType;
326  static const CommandId kCmdId = kGetUniformLocation;
327  static const cmd::ArgFlags kArgFlags = cmd::kFixed;
328  static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
329
330  typedef GLint Result;
331
332  static uint32 ComputeSize() {
333    return static_cast<uint32>(sizeof(ValueType));  // NOLINT
334  }
335
336  void SetHeader() {
337    header.SetCmd<ValueType>();
338  }
339
340  void Init(
341      GLuint _program, uint32 _name_shm_id, uint32 _name_shm_offset,
342      uint32 _location_shm_id, uint32 _location_shm_offset,
343      uint32 _data_size) {
344    SetHeader();
345    program = _program;
346    name_shm_id = _name_shm_id;
347    name_shm_offset = _name_shm_offset;
348    location_shm_id = _location_shm_id;
349    location_shm_offset = _location_shm_offset;
350    data_size = _data_size;
351  }
352
353  void* Set(
354      void* cmd, GLuint _program, uint32 _name_shm_id, uint32 _name_shm_offset,
355      uint32 _location_shm_id, uint32 _location_shm_offset,
356      uint32 _data_size) {
357    static_cast<ValueType*>(
358        cmd)->Init(
359            _program, _name_shm_id, _name_shm_offset, _location_shm_id,
360            _location_shm_offset, _data_size);
361    return NextCmdAddress<ValueType>(cmd);
362  }
363
364  CommandHeader header;
365  uint32 program;
366  uint32 name_shm_id;
367  uint32 name_shm_offset;
368  uint32 location_shm_id;
369  uint32 location_shm_offset;
370  uint32 data_size;
371};
372
373COMPILE_ASSERT(sizeof(GetUniformLocation) == 28,
374               Sizeof_GetUniformLocation_is_not_28);
375COMPILE_ASSERT(offsetof(GetUniformLocation, header) == 0,
376               OffsetOf_GetUniformLocation_header_not_0);
377COMPILE_ASSERT(offsetof(GetUniformLocation, program) == 4,
378               OffsetOf_GetUniformLocation_program_not_4);
379COMPILE_ASSERT(offsetof(GetUniformLocation, name_shm_id) == 8,
380               OffsetOf_GetUniformLocation_name_shm_id_not_8);
381COMPILE_ASSERT(offsetof(GetUniformLocation, name_shm_offset) == 12,
382               OffsetOf_GetUniformLocation_name_shm_offset_not_12);
383COMPILE_ASSERT(offsetof(GetUniformLocation, location_shm_id) == 16,
384               OffsetOf_GetUniformLocation_location_shm_id_not_16);
385COMPILE_ASSERT(offsetof(GetUniformLocation, location_shm_offset) == 20,
386               OffsetOf_GetUniformLocation_location_shm_offset_not_20);
387COMPILE_ASSERT(offsetof(GetUniformLocation, data_size) == 24,
388               OffsetOf_GetUniformLocation_data_size_not_24);
389
390struct GetUniformLocationBucket {
391  typedef GetUniformLocationBucket ValueType;
392  static const CommandId kCmdId = kGetUniformLocationBucket;
393  static const cmd::ArgFlags kArgFlags = cmd::kFixed;
394  static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
395
396  typedef GLint Result;
397
398  static uint32 ComputeSize() {
399    return static_cast<uint32>(sizeof(ValueType));  // NOLINT
400  }
401
402  void SetHeader() {
403    header.SetCmd<ValueType>();
404  }
405
406  void Init(
407      GLuint _program, uint32 _name_bucket_id,
408      uint32 _location_shm_id, uint32 _location_shm_offset) {
409    SetHeader();
410    program = _program;
411    name_bucket_id = _name_bucket_id;
412    location_shm_id = _location_shm_id;
413    location_shm_offset = _location_shm_offset;
414  }
415
416  void* Set(
417      void* cmd, GLuint _program, uint32 _name_bucket_id,
418      uint32 _location_shm_id, uint32 _location_shm_offset) {
419    static_cast<ValueType*>(
420        cmd)->Init(
421            _program, _name_bucket_id, _location_shm_id,
422            _location_shm_offset);
423    return NextCmdAddress<ValueType>(cmd);
424  }
425
426  CommandHeader header;
427  uint32 program;
428  uint32 name_bucket_id;
429  uint32 location_shm_id;
430  uint32 location_shm_offset;
431};
432
433COMPILE_ASSERT(sizeof(GetUniformLocationBucket) == 20,
434               Sizeof_GetUniformLocationBucket_is_not_24);
435COMPILE_ASSERT(offsetof(GetUniformLocationBucket, header) == 0,
436               OffsetOf_GetUniformLocationBucket_header_not_0);
437COMPILE_ASSERT(offsetof(GetUniformLocationBucket, program) == 4,
438               OffsetOf_GetUniformLocationBucket_program_not_4);
439COMPILE_ASSERT(offsetof(GetUniformLocationBucket, name_bucket_id) == 8,
440               OffsetOf_GetUniformLocationBucket_name_bucket_id_not_8);
441COMPILE_ASSERT(offsetof(GetUniformLocationBucket, location_shm_id) == 12,
442               OffsetOf_GetUniformLocationBucket_location_shm_id_not_12);
443COMPILE_ASSERT(offsetof(GetUniformLocationBucket, location_shm_offset) == 16,
444               OffsetOf_GetUniformLocationBucket_location_shm_offset_not_16);
445
446struct GenMailboxCHROMIUM {
447  typedef GenMailboxCHROMIUM ValueType;
448  static const CommandId kCmdId = kGenMailboxCHROMIUM;
449  static const cmd::ArgFlags kArgFlags = cmd::kFixed;
450  static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
451  CommandHeader header;
452};
453
454struct InsertSyncPointCHROMIUM {
455  typedef InsertSyncPointCHROMIUM ValueType;
456  static const CommandId kCmdId = kInsertSyncPointCHROMIUM;
457  static const cmd::ArgFlags kArgFlags = cmd::kFixed;
458  static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
459  CommandHeader header;
460};
461
462#pragma pack(pop)
463
464}  // namespace cmd
465}  // namespace gles2
466}  // namespace gpu
467
468#endif  // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_
469