blob: 3c392f592bb82483e783ddd21e1367775f9899fa [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is auto-generated from
// gpu/command_buffer/build_gles2_cmd_buffer.py
// It's formatted by clang-format using chromium coding style:
// clang-format -i -style=chromium filename
// DO NOT EDIT!
#ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
#define GL_SCANOUT_CHROMIUM 0x6000
#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
struct ActiveTexture {
typedef ActiveTexture ValueType;
static const CommandId kCmdId = kActiveTexture;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _texture) {
SetHeader();
texture = _texture;
}
void* Set(void* cmd, GLenum _texture) {
static_cast<ValueType*>(cmd)->Init(_texture);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t texture;
};
static_assert(sizeof(ActiveTexture) == 8, "size of ActiveTexture should be 8");
static_assert(offsetof(ActiveTexture, header) == 0,
"offset of ActiveTexture header should be 0");
static_assert(offsetof(ActiveTexture, texture) == 4,
"offset of ActiveTexture texture should be 4");
struct AttachShader {
typedef AttachShader ValueType;
static const CommandId kCmdId = kAttachShader;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _program, GLuint _shader) {
SetHeader();
program = _program;
shader = _shader;
}
void* Set(void* cmd, GLuint _program, GLuint _shader) {
static_cast<ValueType*>(cmd)->Init(_program, _shader);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t program;
uint32_t shader;
};
static_assert(sizeof(AttachShader) == 12, "size of AttachShader should be 12");
static_assert(offsetof(AttachShader, header) == 0,
"offset of AttachShader header should be 0");
static_assert(offsetof(AttachShader, program) == 4,
"offset of AttachShader program should be 4");
static_assert(offsetof(AttachShader, shader) == 8,
"offset of AttachShader shader should be 8");
struct BindAttribLocationBucket {
typedef BindAttribLocationBucket ValueType;
static const CommandId kCmdId = kBindAttribLocationBucket;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _program, GLuint _index, uint32_t _name_bucket_id) {
SetHeader();
program = _program;
index = _index;
name_bucket_id = _name_bucket_id;
}
void* Set(void* cmd,
GLuint _program,
GLuint _index,
uint32_t _name_bucket_id) {
static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t program;
uint32_t index;
uint32_t name_bucket_id;
};
static_assert(sizeof(BindAttribLocationBucket) == 16,
"size of BindAttribLocationBucket should be 16");
static_assert(offsetof(BindAttribLocationBucket, header) == 0,
"offset of BindAttribLocationBucket header should be 0");
static_assert(offsetof(BindAttribLocationBucket, program) == 4,
"offset of BindAttribLocationBucket program should be 4");
static_assert(offsetof(BindAttribLocationBucket, index) == 8,
"offset of BindAttribLocationBucket index should be 8");
static_assert(offsetof(BindAttribLocationBucket, name_bucket_id) == 12,
"offset of BindAttribLocationBucket name_bucket_id should be 12");
struct BindBuffer {
typedef BindBuffer ValueType;
static const CommandId kCmdId = kBindBuffer;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target, GLuint _buffer) {
SetHeader();
target = _target;
buffer = _buffer;
}
void* Set(void* cmd, GLenum _target, GLuint _buffer) {
static_cast<ValueType*>(cmd)->Init(_target, _buffer);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t buffer;
};
static_assert(sizeof(BindBuffer) == 12, "size of BindBuffer should be 12");
static_assert(offsetof(BindBuffer, header) == 0,
"offset of BindBuffer header should be 0");
static_assert(offsetof(BindBuffer, target) == 4,
"offset of BindBuffer target should be 4");
static_assert(offsetof(BindBuffer, buffer) == 8,
"offset of BindBuffer buffer should be 8");
struct BindBufferBase {
typedef BindBufferBase ValueType;
static const CommandId kCmdId = kBindBufferBase;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target, GLuint _index, GLuint _buffer) {
SetHeader();
target = _target;
index = _index;
buffer = _buffer;
}
void* Set(void* cmd, GLenum _target, GLuint _index, GLuint _buffer) {
static_cast<ValueType*>(cmd)->Init(_target, _index, _buffer);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t index;
uint32_t buffer;
};
static_assert(sizeof(BindBufferBase) == 16,
"size of BindBufferBase should be 16");
static_assert(offsetof(BindBufferBase, header) == 0,
"offset of BindBufferBase header should be 0");
static_assert(offsetof(BindBufferBase, target) == 4,
"offset of BindBufferBase target should be 4");
static_assert(offsetof(BindBufferBase, index) == 8,
"offset of BindBufferBase index should be 8");
static_assert(offsetof(BindBufferBase, buffer) == 12,
"offset of BindBufferBase buffer should be 12");
struct BindBufferRange {
typedef BindBufferRange ValueType;
static const CommandId kCmdId = kBindBufferRange;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLuint _index,
GLuint _buffer,
GLintptr _offset,
GLsizeiptr _size) {
SetHeader();
target = _target;
index = _index;
buffer = _buffer;
offset = _offset;
size = _size;
}
void* Set(void* cmd,
GLenum _target,
GLuint _index,
GLuint _buffer,
GLintptr _offset,
GLsizeiptr _size) {
static_cast<ValueType*>(cmd)->Init(_target, _index, _buffer, _offset,
_size);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t index;
uint32_t buffer;
int32_t offset;
int32_t size;
};
static_assert(sizeof(BindBufferRange) == 24,
"size of BindBufferRange should be 24");
static_assert(offsetof(BindBufferRange, header) == 0,
"offset of BindBufferRange header should be 0");
static_assert(offsetof(BindBufferRange, target) == 4,
"offset of BindBufferRange target should be 4");
static_assert(offsetof(BindBufferRange, index) == 8,
"offset of BindBufferRange index should be 8");
static_assert(offsetof(BindBufferRange, buffer) == 12,
"offset of BindBufferRange buffer should be 12");
static_assert(offsetof(BindBufferRange, offset) == 16,
"offset of BindBufferRange offset should be 16");
static_assert(offsetof(BindBufferRange, size) == 20,
"offset of BindBufferRange size should be 20");
struct BindFramebuffer {
typedef BindFramebuffer ValueType;
static const CommandId kCmdId = kBindFramebuffer;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target, GLuint _framebuffer) {
SetHeader();
target = _target;
framebuffer = _framebuffer;
}
void* Set(void* cmd, GLenum _target, GLuint _framebuffer) {
static_cast<ValueType*>(cmd)->Init(_target, _framebuffer);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t framebuffer;
};
static_assert(sizeof(BindFramebuffer) == 12,
"size of BindFramebuffer should be 12");
static_assert(offsetof(BindFramebuffer, header) == 0,
"offset of BindFramebuffer header should be 0");
static_assert(offsetof(BindFramebuffer, target) == 4,
"offset of BindFramebuffer target should be 4");
static_assert(offsetof(BindFramebuffer, framebuffer) == 8,
"offset of BindFramebuffer framebuffer should be 8");
struct BindRenderbuffer {
typedef BindRenderbuffer ValueType;
static const CommandId kCmdId = kBindRenderbuffer;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target, GLuint _renderbuffer) {
SetHeader();
target = _target;
renderbuffer = _renderbuffer;
}
void* Set(void* cmd, GLenum _target, GLuint _renderbuffer) {
static_cast<ValueType*>(cmd)->Init(_target, _renderbuffer);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t renderbuffer;
};
static_assert(sizeof(BindRenderbuffer) == 12,
"size of BindRenderbuffer should be 12");
static_assert(offsetof(BindRenderbuffer, header) == 0,
"offset of BindRenderbuffer header should be 0");
static_assert(offsetof(BindRenderbuffer, target) == 4,
"offset of BindRenderbuffer target should be 4");
static_assert(offsetof(BindRenderbuffer, renderbuffer) == 8,
"offset of BindRenderbuffer renderbuffer should be 8");
struct BindSampler {
typedef BindSampler ValueType;
static const CommandId kCmdId = kBindSampler;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _unit, GLuint _sampler) {
SetHeader();
unit = _unit;
sampler = _sampler;
}
void* Set(void* cmd, GLuint _unit, GLuint _sampler) {
static_cast<ValueType*>(cmd)->Init(_unit, _sampler);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t unit;
uint32_t sampler;
};
static_assert(sizeof(BindSampler) == 12, "size of BindSampler should be 12");
static_assert(offsetof(BindSampler, header) == 0,
"offset of BindSampler header should be 0");
static_assert(offsetof(BindSampler, unit) == 4,
"offset of BindSampler unit should be 4");
static_assert(offsetof(BindSampler, sampler) == 8,
"offset of BindSampler sampler should be 8");
struct BindTexture {
typedef BindTexture ValueType;
static const CommandId kCmdId = kBindTexture;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target, GLuint _texture) {
SetHeader();
target = _target;
texture = _texture;
}
void* Set(void* cmd, GLenum _target, GLuint _texture) {
static_cast<ValueType*>(cmd)->Init(_target, _texture);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t texture;
};
static_assert(sizeof(BindTexture) == 12, "size of BindTexture should be 12");
static_assert(offsetof(BindTexture, header) == 0,
"offset of BindTexture header should be 0");
static_assert(offsetof(BindTexture, target) == 4,
"offset of BindTexture target should be 4");
static_assert(offsetof(BindTexture, texture) == 8,
"offset of BindTexture texture should be 8");
struct BindTransformFeedback {
typedef BindTransformFeedback ValueType;
static const CommandId kCmdId = kBindTransformFeedback;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target, GLuint _transformfeedback) {
SetHeader();
target = _target;
transformfeedback = _transformfeedback;
}
void* Set(void* cmd, GLenum _target, GLuint _transformfeedback) {
static_cast<ValueType*>(cmd)->Init(_target, _transformfeedback);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t transformfeedback;
};
static_assert(sizeof(BindTransformFeedback) == 12,
"size of BindTransformFeedback should be 12");
static_assert(offsetof(BindTransformFeedback, header) == 0,
"offset of BindTransformFeedback header should be 0");
static_assert(offsetof(BindTransformFeedback, target) == 4,
"offset of BindTransformFeedback target should be 4");
static_assert(offsetof(BindTransformFeedback, transformfeedback) == 8,
"offset of BindTransformFeedback transformfeedback should be 8");
struct BlendColor {
typedef BlendColor ValueType;
static const CommandId kCmdId = kBlendColor;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
SetHeader();
red = _red;
green = _green;
blue = _blue;
alpha = _alpha;
}
void* Set(void* cmd,
GLclampf _red,
GLclampf _green,
GLclampf _blue,
GLclampf _alpha) {
static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
float red;
float green;
float blue;
float alpha;
};
static_assert(sizeof(BlendColor) == 20, "size of BlendColor should be 20");
static_assert(offsetof(BlendColor, header) == 0,
"offset of BlendColor header should be 0");
static_assert(offsetof(BlendColor, red) == 4,
"offset of BlendColor red should be 4");
static_assert(offsetof(BlendColor, green) == 8,
"offset of BlendColor green should be 8");
static_assert(offsetof(BlendColor, blue) == 12,
"offset of BlendColor blue should be 12");
static_assert(offsetof(BlendColor, alpha) == 16,
"offset of BlendColor alpha should be 16");
struct BlendEquation {
typedef BlendEquation ValueType;
static const CommandId kCmdId = kBlendEquation;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _mode) {
SetHeader();
mode = _mode;
}
void* Set(void* cmd, GLenum _mode) {
static_cast<ValueType*>(cmd)->Init(_mode);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t mode;
};
static_assert(sizeof(BlendEquation) == 8, "size of BlendEquation should be 8");
static_assert(offsetof(BlendEquation, header) == 0,
"offset of BlendEquation header should be 0");
static_assert(offsetof(BlendEquation, mode) == 4,
"offset of BlendEquation mode should be 4");
struct BlendEquationSeparate {
typedef BlendEquationSeparate ValueType;
static const CommandId kCmdId = kBlendEquationSeparate;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _modeRGB, GLenum _modeAlpha) {
SetHeader();
modeRGB = _modeRGB;
modeAlpha = _modeAlpha;
}
void* Set(void* cmd, GLenum _modeRGB, GLenum _modeAlpha) {
static_cast<ValueType*>(cmd)->Init(_modeRGB, _modeAlpha);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t modeRGB;
uint32_t modeAlpha;
};
static_assert(sizeof(BlendEquationSeparate) == 12,
"size of BlendEquationSeparate should be 12");
static_assert(offsetof(BlendEquationSeparate, header) == 0,
"offset of BlendEquationSeparate header should be 0");
static_assert(offsetof(BlendEquationSeparate, modeRGB) == 4,
"offset of BlendEquationSeparate modeRGB should be 4");
static_assert(offsetof(BlendEquationSeparate, modeAlpha) == 8,
"offset of BlendEquationSeparate modeAlpha should be 8");
struct BlendFunc {
typedef BlendFunc ValueType;
static const CommandId kCmdId = kBlendFunc;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _sfactor, GLenum _dfactor) {
SetHeader();
sfactor = _sfactor;
dfactor = _dfactor;
}
void* Set(void* cmd, GLenum _sfactor, GLenum _dfactor) {
static_cast<ValueType*>(cmd)->Init(_sfactor, _dfactor);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t sfactor;
uint32_t dfactor;
};
static_assert(sizeof(BlendFunc) == 12, "size of BlendFunc should be 12");
static_assert(offsetof(BlendFunc, header) == 0,
"offset of BlendFunc header should be 0");
static_assert(offsetof(BlendFunc, sfactor) == 4,
"offset of BlendFunc sfactor should be 4");
static_assert(offsetof(BlendFunc, dfactor) == 8,
"offset of BlendFunc dfactor should be 8");
struct BlendFuncSeparate {
typedef BlendFuncSeparate ValueType;
static const CommandId kCmdId = kBlendFuncSeparate;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _srcRGB,
GLenum _dstRGB,
GLenum _srcAlpha,
GLenum _dstAlpha) {
SetHeader();
srcRGB = _srcRGB;
dstRGB = _dstRGB;
srcAlpha = _srcAlpha;
dstAlpha = _dstAlpha;
}
void* Set(void* cmd,
GLenum _srcRGB,
GLenum _dstRGB,
GLenum _srcAlpha,
GLenum _dstAlpha) {
static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t srcRGB;
uint32_t dstRGB;
uint32_t srcAlpha;
uint32_t dstAlpha;
};
static_assert(sizeof(BlendFuncSeparate) == 20,
"size of BlendFuncSeparate should be 20");
static_assert(offsetof(BlendFuncSeparate, header) == 0,
"offset of BlendFuncSeparate header should be 0");
static_assert(offsetof(BlendFuncSeparate, srcRGB) == 4,
"offset of BlendFuncSeparate srcRGB should be 4");
static_assert(offsetof(BlendFuncSeparate, dstRGB) == 8,
"offset of BlendFuncSeparate dstRGB should be 8");
static_assert(offsetof(BlendFuncSeparate, srcAlpha) == 12,
"offset of BlendFuncSeparate srcAlpha should be 12");
static_assert(offsetof(BlendFuncSeparate, dstAlpha) == 16,
"offset of BlendFuncSeparate dstAlpha should be 16");
struct BufferData {
typedef BufferData ValueType;
static const CommandId kCmdId = kBufferData;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLsizeiptr _size,
uint32_t _data_shm_id,
uint32_t _data_shm_offset,
GLenum _usage) {
SetHeader();
target = _target;
size = _size;
data_shm_id = _data_shm_id;
data_shm_offset = _data_shm_offset;
usage = _usage;
}
void* Set(void* cmd,
GLenum _target,
GLsizeiptr _size,
uint32_t _data_shm_id,
uint32_t _data_shm_offset,
GLenum _usage) {
static_cast<ValueType*>(cmd)->Init(_target, _size, _data_shm_id,
_data_shm_offset, _usage);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t size;
uint32_t data_shm_id;
uint32_t data_shm_offset;
uint32_t usage;
};
static_assert(sizeof(BufferData) == 24, "size of BufferData should be 24");
static_assert(offsetof(BufferData, header) == 0,
"offset of BufferData header should be 0");
static_assert(offsetof(BufferData, target) == 4,
"offset of BufferData target should be 4");
static_assert(offsetof(BufferData, size) == 8,
"offset of BufferData size should be 8");
static_assert(offsetof(BufferData, data_shm_id) == 12,
"offset of BufferData data_shm_id should be 12");
static_assert(offsetof(BufferData, data_shm_offset) == 16,
"offset of BufferData data_shm_offset should be 16");
static_assert(offsetof(BufferData, usage) == 20,
"offset of BufferData usage should be 20");
struct BufferSubData {
typedef BufferSubData ValueType;
static const CommandId kCmdId = kBufferSubData;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLintptr _offset,
GLsizeiptr _size,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
SetHeader();
target = _target;
offset = _offset;
size = _size;
data_shm_id = _data_shm_id;
data_shm_offset = _data_shm_offset;
}
void* Set(void* cmd,
GLenum _target,
GLintptr _offset,
GLsizeiptr _size,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
static_cast<ValueType*>(cmd)->Init(_target, _offset, _size, _data_shm_id,
_data_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t offset;
int32_t size;
uint32_t data_shm_id;
uint32_t data_shm_offset;
};
static_assert(sizeof(BufferSubData) == 24,
"size of BufferSubData should be 24");
static_assert(offsetof(BufferSubData, header) == 0,
"offset of BufferSubData header should be 0");
static_assert(offsetof(BufferSubData, target) == 4,
"offset of BufferSubData target should be 4");
static_assert(offsetof(BufferSubData, offset) == 8,
"offset of BufferSubData offset should be 8");
static_assert(offsetof(BufferSubData, size) == 12,
"offset of BufferSubData size should be 12");
static_assert(offsetof(BufferSubData, data_shm_id) == 16,
"offset of BufferSubData data_shm_id should be 16");
static_assert(offsetof(BufferSubData, data_shm_offset) == 20,
"offset of BufferSubData data_shm_offset should be 20");
struct CheckFramebufferStatus {
typedef CheckFramebufferStatus ValueType;
static const CommandId kCmdId = kCheckFramebufferStatus;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
typedef GLenum Result;
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
uint32_t _result_shm_id,
uint32_t _result_shm_offset) {
SetHeader();
target = _target;
result_shm_id = _result_shm_id;
result_shm_offset = _result_shm_offset;
}
void* Set(void* cmd,
GLenum _target,
uint32_t _result_shm_id,
uint32_t _result_shm_offset) {
static_cast<ValueType*>(cmd)->Init(_target, _result_shm_id,
_result_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
uint32_t result_shm_id;
uint32_t result_shm_offset;
};
static_assert(sizeof(CheckFramebufferStatus) == 16,
"size of CheckFramebufferStatus should be 16");
static_assert(offsetof(CheckFramebufferStatus, header) == 0,
"offset of CheckFramebufferStatus header should be 0");
static_assert(offsetof(CheckFramebufferStatus, target) == 4,
"offset of CheckFramebufferStatus target should be 4");
static_assert(offsetof(CheckFramebufferStatus, result_shm_id) == 8,
"offset of CheckFramebufferStatus result_shm_id should be 8");
static_assert(
offsetof(CheckFramebufferStatus, result_shm_offset) == 12,
"offset of CheckFramebufferStatus result_shm_offset should be 12");
struct Clear {
typedef Clear ValueType;
static const CommandId kCmdId = kClear;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLbitfield _mask) {
SetHeader();
mask = _mask;
}
void* Set(void* cmd, GLbitfield _mask) {
static_cast<ValueType*>(cmd)->Init(_mask);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t mask;
};
static_assert(sizeof(Clear) == 8, "size of Clear should be 8");
static_assert(offsetof(Clear, header) == 0,
"offset of Clear header should be 0");
static_assert(offsetof(Clear, mask) == 4, "offset of Clear mask should be 4");
struct ClearBufferfi {
typedef ClearBufferfi ValueType;
static const CommandId kCmdId = kClearBufferfi;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _buffer,
GLint _drawbuffers,
GLfloat _depth,
GLint _stencil) {
SetHeader();
buffer = _buffer;
drawbuffers = _drawbuffers;
depth = _depth;
stencil = _stencil;
}
void* Set(void* cmd,
GLenum _buffer,
GLint _drawbuffers,
GLfloat _depth,
GLint _stencil) {
static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _depth, _stencil);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t buffer;
int32_t drawbuffers;
float depth;
int32_t stencil;
};
static_assert(sizeof(ClearBufferfi) == 20,
"size of ClearBufferfi should be 20");
static_assert(offsetof(ClearBufferfi, header) == 0,
"offset of ClearBufferfi header should be 0");
static_assert(offsetof(ClearBufferfi, buffer) == 4,
"offset of ClearBufferfi buffer should be 4");
static_assert(offsetof(ClearBufferfi, drawbuffers) == 8,
"offset of ClearBufferfi drawbuffers should be 8");
static_assert(offsetof(ClearBufferfi, depth) == 12,
"offset of ClearBufferfi depth should be 12");
static_assert(offsetof(ClearBufferfi, stencil) == 16,
"offset of ClearBufferfi stencil should be 16");
struct ClearBufferfvImmediate {
typedef ClearBufferfvImmediate ValueType;
static const CommandId kCmdId = kClearBufferfvImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeDataSize() {
return static_cast<uint32_t>(sizeof(GLfloat) * 4);
}
static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
return static_cast<uint32_t>(sizeof(GLfloat) *
GLES2Util::CalcClearBufferfvDataCount(buffer));
}
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
void Init(GLenum _buffer, GLint _drawbuffers, const GLfloat* _value) {
SetHeader();
buffer = _buffer;
drawbuffers = _drawbuffers;
memcpy(ImmediateDataAddress(this), _value,
ComputeEffectiveDataSize(buffer));
DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
ComputeEffectiveDataSize(buffer);
memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
}
void* Set(void* cmd,
GLenum _buffer,
GLint _drawbuffers,
const GLfloat* _value) {
static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
const uint32_t size = ComputeSize();
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
uint32_t buffer;
int32_t drawbuffers;
};
static_assert(sizeof(ClearBufferfvImmediate) == 12,
"size of ClearBufferfvImmediate should be 12");
static_assert(offsetof(ClearBufferfvImmediate, header) == 0,
"offset of ClearBufferfvImmediate header should be 0");
static_assert(offsetof(ClearBufferfvImmediate, buffer) == 4,
"offset of ClearBufferfvImmediate buffer should be 4");
static_assert(offsetof(ClearBufferfvImmediate, drawbuffers) == 8,
"offset of ClearBufferfvImmediate drawbuffers should be 8");
struct ClearBufferivImmediate {
typedef ClearBufferivImmediate ValueType;
static const CommandId kCmdId = kClearBufferivImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeDataSize() {
return static_cast<uint32_t>(sizeof(GLint) * 4);
}
static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
return static_cast<uint32_t>(sizeof(GLint) *
GLES2Util::CalcClearBufferivDataCount(buffer));
}
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
void Init(GLenum _buffer, GLint _drawbuffers, const GLint* _value) {
SetHeader();
buffer = _buffer;
drawbuffers = _drawbuffers;
memcpy(ImmediateDataAddress(this), _value,
ComputeEffectiveDataSize(buffer));
DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
ComputeEffectiveDataSize(buffer);
memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
}
void* Set(void* cmd,
GLenum _buffer,
GLint _drawbuffers,
const GLint* _value) {
static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
const uint32_t size = ComputeSize();
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
uint32_t buffer;
int32_t drawbuffers;
};
static_assert(sizeof(ClearBufferivImmediate) == 12,
"size of ClearBufferivImmediate should be 12");
static_assert(offsetof(ClearBufferivImmediate, header) == 0,
"offset of ClearBufferivImmediate header should be 0");
static_assert(offsetof(ClearBufferivImmediate, buffer) == 4,
"offset of ClearBufferivImmediate buffer should be 4");
static_assert(offsetof(ClearBufferivImmediate, drawbuffers) == 8,
"offset of ClearBufferivImmediate drawbuffers should be 8");
struct ClearBufferuivImmediate {
typedef ClearBufferuivImmediate ValueType;
static const CommandId kCmdId = kClearBufferuivImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeDataSize() {
return static_cast<uint32_t>(sizeof(GLuint) * 4);
}
static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
return static_cast<uint32_t>(
sizeof(GLuint) * GLES2Util::CalcClearBufferuivDataCount(buffer));
}
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
void Init(GLenum _buffer, GLint _drawbuffers, const GLuint* _value) {
SetHeader();
buffer = _buffer;
drawbuffers = _drawbuffers;
memcpy(ImmediateDataAddress(this), _value,
ComputeEffectiveDataSize(buffer));
DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
ComputeEffectiveDataSize(buffer);
memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
}
void* Set(void* cmd,
GLenum _buffer,
GLint _drawbuffers,
const GLuint* _value) {
static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
const uint32_t size = ComputeSize();
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
uint32_t buffer;
int32_t drawbuffers;
};
static_assert(sizeof(ClearBufferuivImmediate) == 12,
"size of ClearBufferuivImmediate should be 12");
static_assert(offsetof(ClearBufferuivImmediate, header) == 0,
"offset of ClearBufferuivImmediate header should be 0");
static_assert(offsetof(ClearBufferuivImmediate, buffer) == 4,
"offset of ClearBufferuivImmediate buffer should be 4");
static_assert(offsetof(ClearBufferuivImmediate, drawbuffers) == 8,
"offset of ClearBufferuivImmediate drawbuffers should be 8");
struct ClearColor {
typedef ClearColor ValueType;
static const CommandId kCmdId = kClearColor;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) {
SetHeader();
red = _red;
green = _green;
blue = _blue;
alpha = _alpha;
}
void* Set(void* cmd,
GLclampf _red,
GLclampf _green,
GLclampf _blue,
GLclampf _alpha) {
static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
float red;
float green;
float blue;
float alpha;
};
static_assert(sizeof(ClearColor) == 20, "size of ClearColor should be 20");
static_assert(offsetof(ClearColor, header) == 0,
"offset of ClearColor header should be 0");
static_assert(offsetof(ClearColor, red) == 4,
"offset of ClearColor red should be 4");
static_assert(offsetof(ClearColor, green) == 8,
"offset of ClearColor green should be 8");
static_assert(offsetof(ClearColor, blue) == 12,
"offset of ClearColor blue should be 12");
static_assert(offsetof(ClearColor, alpha) == 16,
"offset of ClearColor alpha should be 16");
struct ClearDepthf {
typedef ClearDepthf ValueType;
static const CommandId kCmdId = kClearDepthf;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLclampf _depth) {
SetHeader();
depth = _depth;
}
void* Set(void* cmd, GLclampf _depth) {
static_cast<ValueType*>(cmd)->Init(_depth);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
float depth;
};
static_assert(sizeof(ClearDepthf) == 8, "size of ClearDepthf should be 8");
static_assert(offsetof(ClearDepthf, header) == 0,
"offset of ClearDepthf header should be 0");
static_assert(offsetof(ClearDepthf, depth) == 4,
"offset of ClearDepthf depth should be 4");
struct ClearStencil {
typedef ClearStencil ValueType;
static const CommandId kCmdId = kClearStencil;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLint _s) {
SetHeader();
s = _s;
}
void* Set(void* cmd, GLint _s) {
static_cast<ValueType*>(cmd)->Init(_s);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
int32_t s;
};
static_assert(sizeof(ClearStencil) == 8, "size of ClearStencil should be 8");
static_assert(offsetof(ClearStencil, header) == 0,
"offset of ClearStencil header should be 0");
static_assert(offsetof(ClearStencil, s) == 4,
"offset of ClearStencil s should be 4");
struct ClientWaitSync {
typedef ClientWaitSync ValueType;
static const CommandId kCmdId = kClientWaitSync;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
typedef GLenum Result;
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _sync,
GLbitfield _flags,
GLuint64 _timeout,
uint32_t _result_shm_id,
uint32_t _result_shm_offset) {
SetHeader();
sync = _sync;
flags = _flags;
GLES2Util::MapUint64ToTwoUint32(static_cast<uint64_t>(_timeout), &timeout_0,
&timeout_1);
result_shm_id = _result_shm_id;
result_shm_offset = _result_shm_offset;
}
void* Set(void* cmd,
GLuint _sync,
GLbitfield _flags,
GLuint64 _timeout,
uint32_t _result_shm_id,
uint32_t _result_shm_offset) {
static_cast<ValueType*>(cmd)->Init(_sync, _flags, _timeout, _result_shm_id,
_result_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
GLuint64 timeout() const volatile {
return static_cast<GLuint64>(
GLES2Util::MapTwoUint32ToUint64(timeout_0, timeout_1));
}
gpu::CommandHeader header;
uint32_t sync;
uint32_t flags;
uint32_t timeout_0;
uint32_t timeout_1;
uint32_t result_shm_id;
uint32_t result_shm_offset;
};
static_assert(sizeof(ClientWaitSync) == 28,
"size of ClientWaitSync should be 28");
static_assert(offsetof(ClientWaitSync, header) == 0,
"offset of ClientWaitSync header should be 0");
static_assert(offsetof(ClientWaitSync, sync) == 4,
"offset of ClientWaitSync sync should be 4");
static_assert(offsetof(ClientWaitSync, flags) == 8,
"offset of ClientWaitSync flags should be 8");
static_assert(offsetof(ClientWaitSync, timeout_0) == 12,
"offset of ClientWaitSync timeout_0 should be 12");
static_assert(offsetof(ClientWaitSync, timeout_1) == 16,
"offset of ClientWaitSync timeout_1 should be 16");
static_assert(offsetof(ClientWaitSync, result_shm_id) == 20,
"offset of ClientWaitSync result_shm_id should be 20");
static_assert(offsetof(ClientWaitSync, result_shm_offset) == 24,
"offset of ClientWaitSync result_shm_offset should be 24");
struct ColorMask {
typedef ColorMask ValueType;
static const CommandId kCmdId = kColorMask;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLboolean _red,
GLboolean _green,
GLboolean _blue,
GLboolean _alpha) {
SetHeader();
red = _red;
green = _green;
blue = _blue;
alpha = _alpha;
}
void* Set(void* cmd,
GLboolean _red,
GLboolean _green,
GLboolean _blue,
GLboolean _alpha) {
static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t red;
uint32_t green;
uint32_t blue;
uint32_t alpha;
};
static_assert(sizeof(ColorMask) == 20, "size of ColorMask should be 20");
static_assert(offsetof(ColorMask, header) == 0,
"offset of ColorMask header should be 0");
static_assert(offsetof(ColorMask, red) == 4,
"offset of ColorMask red should be 4");
static_assert(offsetof(ColorMask, green) == 8,
"offset of ColorMask green should be 8");
static_assert(offsetof(ColorMask, blue) == 12,
"offset of ColorMask blue should be 12");
static_assert(offsetof(ColorMask, alpha) == 16,
"offset of ColorMask alpha should be 16");
struct CompileShader {
typedef CompileShader ValueType;
static const CommandId kCmdId = kCompileShader;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _shader) {
SetHeader();
shader = _shader;
}
void* Set(void* cmd, GLuint _shader) {
static_cast<ValueType*>(cmd)->Init(_shader);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t shader;
};
static_assert(sizeof(CompileShader) == 8, "size of CompileShader should be 8");
static_assert(offsetof(CompileShader, header) == 0,
"offset of CompileShader header should be 0");
static_assert(offsetof(CompileShader, shader) == 4,
"offset of CompileShader shader should be 4");
struct CompressedTexImage2DBucket {
typedef CompressedTexImage2DBucket ValueType;
static const CommandId kCmdId = kCompressedTexImage2DBucket;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLuint _bucket_id) {
SetHeader();
target = _target;
level = _level;
internalformat = _internalformat;
width = _width;
height = _height;
bucket_id = _bucket_id;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLuint _bucket_id) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
_height, _bucket_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
uint32_t internalformat;
int32_t width;
int32_t height;
uint32_t bucket_id;
static const int32_t border = 0;
};
static_assert(sizeof(CompressedTexImage2DBucket) == 28,
"size of CompressedTexImage2DBucket should be 28");
static_assert(offsetof(CompressedTexImage2DBucket, header) == 0,
"offset of CompressedTexImage2DBucket header should be 0");
static_assert(offsetof(CompressedTexImage2DBucket, target) == 4,
"offset of CompressedTexImage2DBucket target should be 4");
static_assert(offsetof(CompressedTexImage2DBucket, level) == 8,
"offset of CompressedTexImage2DBucket level should be 8");
static_assert(
offsetof(CompressedTexImage2DBucket, internalformat) == 12,
"offset of CompressedTexImage2DBucket internalformat should be 12");
static_assert(offsetof(CompressedTexImage2DBucket, width) == 16,
"offset of CompressedTexImage2DBucket width should be 16");
static_assert(offsetof(CompressedTexImage2DBucket, height) == 20,
"offset of CompressedTexImage2DBucket height should be 20");
static_assert(offsetof(CompressedTexImage2DBucket, bucket_id) == 24,
"offset of CompressedTexImage2DBucket bucket_id should be 24");
struct CompressedTexImage2D {
typedef CompressedTexImage2D ValueType;
static const CommandId kCmdId = kCompressedTexImage2D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
SetHeader();
target = _target;
level = _level;
internalformat = _internalformat;
width = _width;
height = _height;
imageSize = _imageSize;
data_shm_id = _data_shm_id;
data_shm_offset = _data_shm_offset;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
_height, _imageSize, _data_shm_id,
_data_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
uint32_t internalformat;
int32_t width;
int32_t height;
int32_t imageSize;
uint32_t data_shm_id;
uint32_t data_shm_offset;
static const int32_t border = 0;
};
static_assert(sizeof(CompressedTexImage2D) == 36,
"size of CompressedTexImage2D should be 36");
static_assert(offsetof(CompressedTexImage2D, header) == 0,
"offset of CompressedTexImage2D header should be 0");
static_assert(offsetof(CompressedTexImage2D, target) == 4,
"offset of CompressedTexImage2D target should be 4");
static_assert(offsetof(CompressedTexImage2D, level) == 8,
"offset of CompressedTexImage2D level should be 8");
static_assert(offsetof(CompressedTexImage2D, internalformat) == 12,
"offset of CompressedTexImage2D internalformat should be 12");
static_assert(offsetof(CompressedTexImage2D, width) == 16,
"offset of CompressedTexImage2D width should be 16");
static_assert(offsetof(CompressedTexImage2D, height) == 20,
"offset of CompressedTexImage2D height should be 20");
static_assert(offsetof(CompressedTexImage2D, imageSize) == 24,
"offset of CompressedTexImage2D imageSize should be 24");
static_assert(offsetof(CompressedTexImage2D, data_shm_id) == 28,
"offset of CompressedTexImage2D data_shm_id should be 28");
static_assert(offsetof(CompressedTexImage2D, data_shm_offset) == 32,
"offset of CompressedTexImage2D data_shm_offset should be 32");
struct CompressedTexSubImage2DBucket {
typedef CompressedTexSubImage2DBucket ValueType;
static const CommandId kCmdId = kCompressedTexSubImage2DBucket;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLsizei _width,
GLsizei _height,
GLenum _format,
GLuint _bucket_id) {
SetHeader();
target = _target;
level = _level;
xoffset = _xoffset;
yoffset = _yoffset;
width = _width;
height = _height;
format = _format;
bucket_id = _bucket_id;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLsizei _width,
GLsizei _height,
GLenum _format,
GLuint _bucket_id) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
_width, _height, _format, _bucket_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
int32_t xoffset;
int32_t yoffset;
int32_t width;
int32_t height;
uint32_t format;
uint32_t bucket_id;
};
static_assert(sizeof(CompressedTexSubImage2DBucket) == 36,
"size of CompressedTexSubImage2DBucket should be 36");
static_assert(offsetof(CompressedTexSubImage2DBucket, header) == 0,
"offset of CompressedTexSubImage2DBucket header should be 0");
static_assert(offsetof(CompressedTexSubImage2DBucket, target) == 4,
"offset of CompressedTexSubImage2DBucket target should be 4");
static_assert(offsetof(CompressedTexSubImage2DBucket, level) == 8,
"offset of CompressedTexSubImage2DBucket level should be 8");
static_assert(offsetof(CompressedTexSubImage2DBucket, xoffset) == 12,
"offset of CompressedTexSubImage2DBucket xoffset should be 12");
static_assert(offsetof(CompressedTexSubImage2DBucket, yoffset) == 16,
"offset of CompressedTexSubImage2DBucket yoffset should be 16");
static_assert(offsetof(CompressedTexSubImage2DBucket, width) == 20,
"offset of CompressedTexSubImage2DBucket width should be 20");
static_assert(offsetof(CompressedTexSubImage2DBucket, height) == 24,
"offset of CompressedTexSubImage2DBucket height should be 24");
static_assert(offsetof(CompressedTexSubImage2DBucket, format) == 28,
"offset of CompressedTexSubImage2DBucket format should be 28");
static_assert(offsetof(CompressedTexSubImage2DBucket, bucket_id) == 32,
"offset of CompressedTexSubImage2DBucket bucket_id should be 32");
struct CompressedTexSubImage2D {
typedef CompressedTexSubImage2D ValueType;
static const CommandId kCmdId = kCompressedTexSubImage2D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLsizei _width,
GLsizei _height,
GLenum _format,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
SetHeader();
target = _target;
level = _level;
xoffset = _xoffset;
yoffset = _yoffset;
width = _width;
height = _height;
format = _format;
imageSize = _imageSize;
data_shm_id = _data_shm_id;
data_shm_offset = _data_shm_offset;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLsizei _width,
GLsizei _height,
GLenum _format,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
_width, _height, _format, _imageSize,
_data_shm_id, _data_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
int32_t xoffset;
int32_t yoffset;
int32_t width;
int32_t height;
uint32_t format;
int32_t imageSize;
uint32_t data_shm_id;
uint32_t data_shm_offset;
};
static_assert(sizeof(CompressedTexSubImage2D) == 44,
"size of CompressedTexSubImage2D should be 44");
static_assert(offsetof(CompressedTexSubImage2D, header) == 0,
"offset of CompressedTexSubImage2D header should be 0");
static_assert(offsetof(CompressedTexSubImage2D, target) == 4,
"offset of CompressedTexSubImage2D target should be 4");
static_assert(offsetof(CompressedTexSubImage2D, level) == 8,
"offset of CompressedTexSubImage2D level should be 8");
static_assert(offsetof(CompressedTexSubImage2D, xoffset) == 12,
"offset of CompressedTexSubImage2D xoffset should be 12");
static_assert(offsetof(CompressedTexSubImage2D, yoffset) == 16,
"offset of CompressedTexSubImage2D yoffset should be 16");
static_assert(offsetof(CompressedTexSubImage2D, width) == 20,
"offset of CompressedTexSubImage2D width should be 20");
static_assert(offsetof(CompressedTexSubImage2D, height) == 24,
"offset of CompressedTexSubImage2D height should be 24");
static_assert(offsetof(CompressedTexSubImage2D, format) == 28,
"offset of CompressedTexSubImage2D format should be 28");
static_assert(offsetof(CompressedTexSubImage2D, imageSize) == 32,
"offset of CompressedTexSubImage2D imageSize should be 32");
static_assert(offsetof(CompressedTexSubImage2D, data_shm_id) == 36,
"offset of CompressedTexSubImage2D data_shm_id should be 36");
static_assert(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40,
"offset of CompressedTexSubImage2D data_shm_offset should be 40");
struct CompressedTexImage3DBucket {
typedef CompressedTexImage3DBucket ValueType;
static const CommandId kCmdId = kCompressedTexImage3DBucket;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLuint _bucket_id) {
SetHeader();
target = _target;
level = _level;
internalformat = _internalformat;
width = _width;
height = _height;
depth = _depth;
bucket_id = _bucket_id;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLuint _bucket_id) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
_height, _depth, _bucket_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
uint32_t internalformat;
int32_t width;
int32_t height;
int32_t depth;
uint32_t bucket_id;
static const int32_t border = 0;
};
static_assert(sizeof(CompressedTexImage3DBucket) == 32,
"size of CompressedTexImage3DBucket should be 32");
static_assert(offsetof(CompressedTexImage3DBucket, header) == 0,
"offset of CompressedTexImage3DBucket header should be 0");
static_assert(offsetof(CompressedTexImage3DBucket, target) == 4,
"offset of CompressedTexImage3DBucket target should be 4");
static_assert(offsetof(CompressedTexImage3DBucket, level) == 8,
"offset of CompressedTexImage3DBucket level should be 8");
static_assert(
offsetof(CompressedTexImage3DBucket, internalformat) == 12,
"offset of CompressedTexImage3DBucket internalformat should be 12");
static_assert(offsetof(CompressedTexImage3DBucket, width) == 16,
"offset of CompressedTexImage3DBucket width should be 16");
static_assert(offsetof(CompressedTexImage3DBucket, height) == 20,
"offset of CompressedTexImage3DBucket height should be 20");
static_assert(offsetof(CompressedTexImage3DBucket, depth) == 24,
"offset of CompressedTexImage3DBucket depth should be 24");
static_assert(offsetof(CompressedTexImage3DBucket, bucket_id) == 28,
"offset of CompressedTexImage3DBucket bucket_id should be 28");
struct CompressedTexImage3D {
typedef CompressedTexImage3D ValueType;
static const CommandId kCmdId = kCompressedTexImage3D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
SetHeader();
target = _target;
level = _level;
internalformat = _internalformat;
width = _width;
height = _height;
depth = _depth;
imageSize = _imageSize;
data_shm_id = _data_shm_id;
data_shm_offset = _data_shm_offset;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLenum _internalformat,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _width,
_height, _depth, _imageSize,
_data_shm_id, _data_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
uint32_t internalformat;
int32_t width;
int32_t height;
int32_t depth;
int32_t imageSize;
uint32_t data_shm_id;
uint32_t data_shm_offset;
static const int32_t border = 0;
};
static_assert(sizeof(CompressedTexImage3D) == 40,
"size of CompressedTexImage3D should be 40");
static_assert(offsetof(CompressedTexImage3D, header) == 0,
"offset of CompressedTexImage3D header should be 0");
static_assert(offsetof(CompressedTexImage3D, target) == 4,
"offset of CompressedTexImage3D target should be 4");
static_assert(offsetof(CompressedTexImage3D, level) == 8,
"offset of CompressedTexImage3D level should be 8");
static_assert(offsetof(CompressedTexImage3D, internalformat) == 12,
"offset of CompressedTexImage3D internalformat should be 12");
static_assert(offsetof(CompressedTexImage3D, width) == 16,
"offset of CompressedTexImage3D width should be 16");
static_assert(offsetof(CompressedTexImage3D, height) == 20,
"offset of CompressedTexImage3D height should be 20");
static_assert(offsetof(CompressedTexImage3D, depth) == 24,
"offset of CompressedTexImage3D depth should be 24");
static_assert(offsetof(CompressedTexImage3D, imageSize) == 28,
"offset of CompressedTexImage3D imageSize should be 28");
static_assert(offsetof(CompressedTexImage3D, data_shm_id) == 32,
"offset of CompressedTexImage3D data_shm_id should be 32");
static_assert(offsetof(CompressedTexImage3D, data_shm_offset) == 36,
"offset of CompressedTexImage3D data_shm_offset should be 36");
struct CompressedTexSubImage3DBucket {
typedef CompressedTexSubImage3DBucket ValueType;
static const CommandId kCmdId = kCompressedTexSubImage3DBucket;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _zoffset,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLenum _format,
GLuint _bucket_id) {
SetHeader();
target = _target;
level = _level;
xoffset = _xoffset;
yoffset = _yoffset;
zoffset = _zoffset;
width = _width;
height = _height;
depth = _depth;
format = _format;
bucket_id = _bucket_id;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _zoffset,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLenum _format,
GLuint _bucket_id) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
_zoffset, _width, _height, _depth,
_format, _bucket_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
int32_t xoffset;
int32_t yoffset;
int32_t zoffset;
int32_t width;
int32_t height;
int32_t depth;
uint32_t format;
uint32_t bucket_id;
};
static_assert(sizeof(CompressedTexSubImage3DBucket) == 44,
"size of CompressedTexSubImage3DBucket should be 44");
static_assert(offsetof(CompressedTexSubImage3DBucket, header) == 0,
"offset of CompressedTexSubImage3DBucket header should be 0");
static_assert(offsetof(CompressedTexSubImage3DBucket, target) == 4,
"offset of CompressedTexSubImage3DBucket target should be 4");
static_assert(offsetof(CompressedTexSubImage3DBucket, level) == 8,
"offset of CompressedTexSubImage3DBucket level should be 8");
static_assert(offsetof(CompressedTexSubImage3DBucket, xoffset) == 12,
"offset of CompressedTexSubImage3DBucket xoffset should be 12");
static_assert(offsetof(CompressedTexSubImage3DBucket, yoffset) == 16,
"offset of CompressedTexSubImage3DBucket yoffset should be 16");
static_assert(offsetof(CompressedTexSubImage3DBucket, zoffset) == 20,
"offset of CompressedTexSubImage3DBucket zoffset should be 20");
static_assert(offsetof(CompressedTexSubImage3DBucket, width) == 24,
"offset of CompressedTexSubImage3DBucket width should be 24");
static_assert(offsetof(CompressedTexSubImage3DBucket, height) == 28,
"offset of CompressedTexSubImage3DBucket height should be 28");
static_assert(offsetof(CompressedTexSubImage3DBucket, depth) == 32,
"offset of CompressedTexSubImage3DBucket depth should be 32");
static_assert(offsetof(CompressedTexSubImage3DBucket, format) == 36,
"offset of CompressedTexSubImage3DBucket format should be 36");
static_assert(offsetof(CompressedTexSubImage3DBucket, bucket_id) == 40,
"offset of CompressedTexSubImage3DBucket bucket_id should be 40");
struct CompressedTexSubImage3D {
typedef CompressedTexSubImage3D ValueType;
static const CommandId kCmdId = kCompressedTexSubImage3D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _zoffset,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLenum _format,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
SetHeader();
target = _target;
level = _level;
xoffset = _xoffset;
yoffset = _yoffset;
zoffset = _zoffset;
width = _width;
height = _height;
depth = _depth;
format = _format;
imageSize = _imageSize;
data_shm_id = _data_shm_id;
data_shm_offset = _data_shm_offset;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _zoffset,
GLsizei _width,
GLsizei _height,
GLsizei _depth,
GLenum _format,
GLsizei _imageSize,
uint32_t _data_shm_id,
uint32_t _data_shm_offset) {
static_cast<ValueType*>(cmd)->Init(
_target, _level, _xoffset, _yoffset, _zoffset, _width, _height, _depth,
_format, _imageSize, _data_shm_id, _data_shm_offset);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
int32_t xoffset;
int32_t yoffset;
int32_t zoffset;
int32_t width;
int32_t height;
int32_t depth;
uint32_t format;
int32_t imageSize;
uint32_t data_shm_id;
uint32_t data_shm_offset;
};
static_assert(sizeof(CompressedTexSubImage3D) == 52,
"size of CompressedTexSubImage3D should be 52");
static_assert(offsetof(CompressedTexSubImage3D, header) == 0,
"offset of CompressedTexSubImage3D header should be 0");
static_assert(offsetof(CompressedTexSubImage3D, target) == 4,
"offset of CompressedTexSubImage3D target should be 4");
static_assert(offsetof(CompressedTexSubImage3D, level) == 8,
"offset of CompressedTexSubImage3D level should be 8");
static_assert(offsetof(CompressedTexSubImage3D, xoffset) == 12,
"offset of CompressedTexSubImage3D xoffset should be 12");
static_assert(offsetof(CompressedTexSubImage3D, yoffset) == 16,
"offset of CompressedTexSubImage3D yoffset should be 16");
static_assert(offsetof(CompressedTexSubImage3D, zoffset) == 20,
"offset of CompressedTexSubImage3D zoffset should be 20");
static_assert(offsetof(CompressedTexSubImage3D, width) == 24,
"offset of CompressedTexSubImage3D width should be 24");
static_assert(offsetof(CompressedTexSubImage3D, height) == 28,
"offset of CompressedTexSubImage3D height should be 28");
static_assert(offsetof(CompressedTexSubImage3D, depth) == 32,
"offset of CompressedTexSubImage3D depth should be 32");
static_assert(offsetof(CompressedTexSubImage3D, format) == 36,
"offset of CompressedTexSubImage3D format should be 36");
static_assert(offsetof(CompressedTexSubImage3D, imageSize) == 40,
"offset of CompressedTexSubImage3D imageSize should be 40");
static_assert(offsetof(CompressedTexSubImage3D, data_shm_id) == 44,
"offset of CompressedTexSubImage3D data_shm_id should be 44");
static_assert(offsetof(CompressedTexSubImage3D, data_shm_offset) == 48,
"offset of CompressedTexSubImage3D data_shm_offset should be 48");
struct CopyBufferSubData {
typedef CopyBufferSubData ValueType;
static const CommandId kCmdId = kCopyBufferSubData;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _readtarget,
GLenum _writetarget,
GLintptr _readoffset,
GLintptr _writeoffset,
GLsizeiptr _size) {
SetHeader();
readtarget = _readtarget;
writetarget = _writetarget;
readoffset = _readoffset;
writeoffset = _writeoffset;
size = _size;
}
void* Set(void* cmd,
GLenum _readtarget,
GLenum _writetarget,
GLintptr _readoffset,
GLintptr _writeoffset,
GLsizeiptr _size) {
static_cast<ValueType*>(cmd)->Init(_readtarget, _writetarget, _readoffset,
_writeoffset, _size);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t readtarget;
uint32_t writetarget;
int32_t readoffset;
int32_t writeoffset;
int32_t size;
};
static_assert(sizeof(CopyBufferSubData) == 24,
"size of CopyBufferSubData should be 24");
static_assert(offsetof(CopyBufferSubData, header) == 0,
"offset of CopyBufferSubData header should be 0");
static_assert(offsetof(CopyBufferSubData, readtarget) == 4,
"offset of CopyBufferSubData readtarget should be 4");
static_assert(offsetof(CopyBufferSubData, writetarget) == 8,
"offset of CopyBufferSubData writetarget should be 8");
static_assert(offsetof(CopyBufferSubData, readoffset) == 12,
"offset of CopyBufferSubData readoffset should be 12");
static_assert(offsetof(CopyBufferSubData, writeoffset) == 16,
"offset of CopyBufferSubData writeoffset should be 16");
static_assert(offsetof(CopyBufferSubData, size) == 20,
"offset of CopyBufferSubData size should be 20");
struct CopyTexImage2D {
typedef CopyTexImage2D ValueType;
static const CommandId kCmdId = kCopyTexImage2D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLenum _internalformat,
GLint _x,
GLint _y,
GLsizei _width,
GLsizei _height) {
SetHeader();
target = _target;
level = _level;
internalformat = _internalformat;
x = _x;
y = _y;
width = _width;
height = _height;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLenum _internalformat,
GLint _x,
GLint _y,
GLsizei _width,
GLsizei _height) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _internalformat, _x, _y,
_width, _height);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
uint32_t internalformat;
int32_t x;
int32_t y;
int32_t width;
int32_t height;
static const int32_t border = 0;
};
static_assert(sizeof(CopyTexImage2D) == 32,
"size of CopyTexImage2D should be 32");
static_assert(offsetof(CopyTexImage2D, header) == 0,
"offset of CopyTexImage2D header should be 0");
static_assert(offsetof(CopyTexImage2D, target) == 4,
"offset of CopyTexImage2D target should be 4");
static_assert(offsetof(CopyTexImage2D, level) == 8,
"offset of CopyTexImage2D level should be 8");
static_assert(offsetof(CopyTexImage2D, internalformat) == 12,
"offset of CopyTexImage2D internalformat should be 12");
static_assert(offsetof(CopyTexImage2D, x) == 16,
"offset of CopyTexImage2D x should be 16");
static_assert(offsetof(CopyTexImage2D, y) == 20,
"offset of CopyTexImage2D y should be 20");
static_assert(offsetof(CopyTexImage2D, width) == 24,
"offset of CopyTexImage2D width should be 24");
static_assert(offsetof(CopyTexImage2D, height) == 28,
"offset of CopyTexImage2D height should be 28");
struct CopyTexSubImage2D {
typedef CopyTexSubImage2D ValueType;
static const CommandId kCmdId = kCopyTexSubImage2D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _x,
GLint _y,
GLsizei _width,
GLsizei _height) {
SetHeader();
target = _target;
level = _level;
xoffset = _xoffset;
yoffset = _yoffset;
x = _x;
y = _y;
width = _width;
height = _height;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _x,
GLint _y,
GLsizei _width,
GLsizei _height) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset, _x,
_y, _width, _height);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
int32_t xoffset;
int32_t yoffset;
int32_t x;
int32_t y;
int32_t width;
int32_t height;
};
static_assert(sizeof(CopyTexSubImage2D) == 36,
"size of CopyTexSubImage2D should be 36");
static_assert(offsetof(CopyTexSubImage2D, header) == 0,
"offset of CopyTexSubImage2D header should be 0");
static_assert(offsetof(CopyTexSubImage2D, target) == 4,
"offset of CopyTexSubImage2D target should be 4");
static_assert(offsetof(CopyTexSubImage2D, level) == 8,
"offset of CopyTexSubImage2D level should be 8");
static_assert(offsetof(CopyTexSubImage2D, xoffset) == 12,
"offset of CopyTexSubImage2D xoffset should be 12");
static_assert(offsetof(CopyTexSubImage2D, yoffset) == 16,
"offset of CopyTexSubImage2D yoffset should be 16");
static_assert(offsetof(CopyTexSubImage2D, x) == 20,
"offset of CopyTexSubImage2D x should be 20");
static_assert(offsetof(CopyTexSubImage2D, y) == 24,
"offset of CopyTexSubImage2D y should be 24");
static_assert(offsetof(CopyTexSubImage2D, width) == 28,
"offset of CopyTexSubImage2D width should be 28");
static_assert(offsetof(CopyTexSubImage2D, height) == 32,
"offset of CopyTexSubImage2D height should be 32");
struct CopyTexSubImage3D {
typedef CopyTexSubImage3D ValueType;
static const CommandId kCmdId = kCopyTexSubImage3D;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _zoffset,
GLint _x,
GLint _y,
GLsizei _width,
GLsizei _height) {
SetHeader();
target = _target;
level = _level;
xoffset = _xoffset;
yoffset = _yoffset;
zoffset = _zoffset;
x = _x;
y = _y;
width = _width;
height = _height;
}
void* Set(void* cmd,
GLenum _target,
GLint _level,
GLint _xoffset,
GLint _yoffset,
GLint _zoffset,
GLint _x,
GLint _y,
GLsizei _width,
GLsizei _height) {
static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset,
_zoffset, _x, _y, _width, _height);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t target;
int32_t level;
int32_t xoffset;
int32_t yoffset;
int32_t zoffset;
int32_t x;
int32_t y;
int32_t width;
int32_t height;
};
static_assert(sizeof(CopyTexSubImage3D) == 40,
"size of CopyTexSubImage3D should be 40");
static_assert(offsetof(CopyTexSubImage3D, header) == 0,
"offset of CopyTexSubImage3D header should be 0");
static_assert(offsetof(CopyTexSubImage3D, target) == 4,
"offset of CopyTexSubImage3D target should be 4");
static_assert(offsetof(CopyTexSubImage3D, level) == 8,
"offset of CopyTexSubImage3D level should be 8");
static_assert(offsetof(CopyTexSubImage3D, xoffset) == 12,
"offset of CopyTexSubImage3D xoffset should be 12");
static_assert(offsetof(CopyTexSubImage3D, yoffset) == 16,
"offset of CopyTexSubImage3D yoffset should be 16");
static_assert(offsetof(CopyTexSubImage3D, zoffset) == 20,
"offset of CopyTexSubImage3D zoffset should be 20");
static_assert(offsetof(CopyTexSubImage3D, x) == 24,
"offset of CopyTexSubImage3D x should be 24");
static_assert(offsetof(CopyTexSubImage3D, y) == 28,
"offset of CopyTexSubImage3D y should be 28");
static_assert(offsetof(CopyTexSubImage3D, width) == 32,
"offset of CopyTexSubImage3D width should be 32");
static_assert(offsetof(CopyTexSubImage3D, height) == 36,
"offset of CopyTexSubImage3D height should be 36");
struct CreateProgram {
typedef CreateProgram ValueType;
static const CommandId kCmdId = kCreateProgram;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(uint32_t _client_id) {
SetHeader();
client_id = _client_id;
}
void* Set(void* cmd, uint32_t _client_id) {
static_cast<ValueType*>(cmd)->Init(_client_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t client_id;
};
static_assert(sizeof(CreateProgram) == 8, "size of CreateProgram should be 8");
static_assert(offsetof(CreateProgram, header) == 0,
"offset of CreateProgram header should be 0");
static_assert(offsetof(CreateProgram, client_id) == 4,
"offset of CreateProgram client_id should be 4");
struct CreateShader {
typedef CreateShader ValueType;
static const CommandId kCmdId = kCreateShader;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _type, uint32_t _client_id) {
SetHeader();
type = _type;
client_id = _client_id;
}
void* Set(void* cmd, GLenum _type, uint32_t _client_id) {
static_cast<ValueType*>(cmd)->Init(_type, _client_id);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t type;
uint32_t client_id;
};
static_assert(sizeof(CreateShader) == 12, "size of CreateShader should be 12");
static_assert(offsetof(CreateShader, header) == 0,
"offset of CreateShader header should be 0");
static_assert(offsetof(CreateShader, type) == 4,
"offset of CreateShader type should be 4");
static_assert(offsetof(CreateShader, client_id) == 8,
"offset of CreateShader client_id should be 8");
struct CullFace {
typedef CullFace ValueType;
static const CommandId kCmdId = kCullFace;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _mode) {
SetHeader();
mode = _mode;
}
void* Set(void* cmd, GLenum _mode) {
static_cast<ValueType*>(cmd)->Init(_mode);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t mode;
};
static_assert(sizeof(CullFace) == 8, "size of CullFace should be 8");
static_assert(offsetof(CullFace, header) == 0,
"offset of CullFace header should be 0");
static_assert(offsetof(CullFace, mode) == 4,
"offset of CullFace mode should be 4");
struct DeleteBuffersImmediate {
typedef DeleteBuffersImmediate ValueType;
static const CommandId kCmdId = kDeleteBuffersImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(GLuint) * _n); // NOLINT
}
static uint32_t ComputeSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(ValueType) +
ComputeDataSize(_n)); // NOLINT
}
void SetHeader(GLsizei _n) {
header.SetCmdByTotalSize<ValueType>(ComputeSize(_n));
}
void Init(GLsizei _n, const GLuint* _buffers) {
SetHeader(_n);
n = _n;
memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n));
}
void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) {
static_cast<ValueType*>(cmd)->Init(_n, _buffers);
const uint32_t size = ComputeSize(_n);
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
int32_t n;
};
static_assert(sizeof(DeleteBuffersImmediate) == 8,
"size of DeleteBuffersImmediate should be 8");
static_assert(offsetof(DeleteBuffersImmediate, header) == 0,
"offset of DeleteBuffersImmediate header should be 0");
static_assert(offsetof(DeleteBuffersImmediate, n) == 4,
"offset of DeleteBuffersImmediate n should be 4");
struct DeleteFramebuffersImmediate {
typedef DeleteFramebuffersImmediate ValueType;
static const CommandId kCmdId = kDeleteFramebuffersImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeDataSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(GLuint) * _n); // NOLINT
}
static uint32_t ComputeSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(ValueType) +
ComputeDataSize(_n)); // NOLINT
}
void SetHeader(GLsizei _n) {
header.SetCmdByTotalSize<ValueType>(ComputeSize(_n));
}
void Init(GLsizei _n, const GLuint* _framebuffers) {
SetHeader(_n);
n = _n;
memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n));
}
void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) {
static_cast<ValueType*>(cmd)->Init(_n, _framebuffers);
const uint32_t size = ComputeSize(_n);
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
int32_t n;
};
static_assert(sizeof(DeleteFramebuffersImmediate) == 8,
"size of DeleteFramebuffersImmediate should be 8");
static_assert(offsetof(DeleteFramebuffersImmediate, header) == 0,
"offset of DeleteFramebuffersImmediate header should be 0");
static_assert(offsetof(DeleteFramebuffersImmediate, n) == 4,
"offset of DeleteFramebuffersImmediate n should be 4");
struct DeleteProgram {
typedef DeleteProgram ValueType;
static const CommandId kCmdId = kDeleteProgram;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _program) {
SetHeader();
program = _program;
}
void* Set(void* cmd, GLuint _program) {
static_cast<ValueType*>(cmd)->Init(_program);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t program;
};
static_assert(sizeof(DeleteProgram) == 8, "size of DeleteProgram should be 8");
static_assert(offsetof(DeleteProgram, header) == 0,
"offset of DeleteProgram header should be 0");
static_assert(offsetof(DeleteProgram, program) == 4,
"offset of DeleteProgram program should be 4");
struct DeleteRenderbuffersImmediate {
typedef DeleteRenderbuffersImmediate ValueType;
static const CommandId kCmdId = kDeleteRenderbuffersImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2);
static uint32_t ComputeDataSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(GLuint) * _n); // NOLINT
}
static uint32_t ComputeSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(ValueType) +
ComputeDataSize(_n)); // NOLINT
}
void SetHeader(GLsizei _n) {
header.SetCmdByTotalSize<ValueType>(ComputeSize(_n));
}
void Init(GLsizei _n, const GLuint* _renderbuffers) {
SetHeader(_n);
n = _n;
memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n));
}
void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) {
static_cast<ValueType*>(cmd)->Init(_n, _renderbuffers);
const uint32_t size = ComputeSize(_n);
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
int32_t n;
};
static_assert(sizeof(DeleteRenderbuffersImmediate) == 8,
"size of DeleteRenderbuffersImmediate should be 8");
static_assert(offsetof(DeleteRenderbuffersImmediate, header) == 0,
"offset of DeleteRenderbuffersImmediate header should be 0");
static_assert(offsetof(DeleteRenderbuffersImmediate, n) == 4,
"offset of DeleteRenderbuffersImmediate n should be 4");
struct DeleteSamplersImmediate {
typedef DeleteSamplersImmediate ValueType;
static const CommandId kCmdId = kDeleteSamplersImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(GLuint) * _n); // NOLINT
}
static uint32_t ComputeSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(ValueType) +
ComputeDataSize(_n)); // NOLINT
}
void SetHeader(GLsizei _n) {
header.SetCmdByTotalSize<ValueType>(ComputeSize(_n));
}
void Init(GLsizei _n, const GLuint* _samplers) {
SetHeader(_n);
n = _n;
memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n));
}
void* Set(void* cmd, GLsizei _n, const GLuint* _samplers) {
static_cast<ValueType*>(cmd)->Init(_n, _samplers);
const uint32_t size = ComputeSize(_n);
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
int32_t n;
};
static_assert(sizeof(DeleteSamplersImmediate) == 8,
"size of DeleteSamplersImmediate should be 8");
static_assert(offsetof(DeleteSamplersImmediate, header) == 0,
"offset of DeleteSamplersImmediate header should be 0");
static_assert(offsetof(DeleteSamplersImmediate, n) == 4,
"offset of DeleteSamplersImmediate n should be 4");
struct DeleteSync {
typedef DeleteSync ValueType;
static const CommandId kCmdId = kDeleteSync;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _sync) {
SetHeader();
sync = _sync;
}
void* Set(void* cmd, GLuint _sync) {
static_cast<ValueType*>(cmd)->Init(_sync);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t sync;
};
static_assert(sizeof(DeleteSync) == 8, "size of DeleteSync should be 8");
static_assert(offsetof(DeleteSync, header) == 0,
"offset of DeleteSync header should be 0");
static_assert(offsetof(DeleteSync, sync) == 4,
"offset of DeleteSync sync should be 4");
struct DeleteShader {
typedef DeleteShader ValueType;
static const CommandId kCmdId = kDeleteShader;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLuint _shader) {
SetHeader();
shader = _shader;
}
void* Set(void* cmd, GLuint _shader) {
static_cast<ValueType*>(cmd)->Init(_shader);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t shader;
};
static_assert(sizeof(DeleteShader) == 8, "size of DeleteShader should be 8");
static_assert(offsetof(DeleteShader, header) == 0,
"offset of DeleteShader header should be 0");
static_assert(offsetof(DeleteShader, shader) == 4,
"offset of DeleteShader shader should be 4");
struct DeleteTexturesImmediate {
typedef DeleteTexturesImmediate ValueType;
static const CommandId kCmdId = kDeleteTexturesImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(GLuint) * _n); // NOLINT
}
static uint32_t ComputeSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(ValueType) +
ComputeDataSize(_n)); // NOLINT
}
void SetHeader(GLsizei _n) {
header.SetCmdByTotalSize<ValueType>(ComputeSize(_n));
}
void Init(GLsizei _n, const GLuint* _textures) {
SetHeader(_n);
n = _n;
memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n));
}
void* Set(void* cmd, GLsizei _n, const GLuint* _textures) {
static_cast<ValueType*>(cmd)->Init(_n, _textures);
const uint32_t size = ComputeSize(_n);
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
int32_t n;
};
static_assert(sizeof(DeleteTexturesImmediate) == 8,
"size of DeleteTexturesImmediate should be 8");
static_assert(offsetof(DeleteTexturesImmediate, header) == 0,
"offset of DeleteTexturesImmediate header should be 0");
static_assert(offsetof(DeleteTexturesImmediate, n) == 4,
"offset of DeleteTexturesImmediate n should be 4");
struct DeleteTransformFeedbacksImmediate {
typedef DeleteTransformFeedbacksImmediate ValueType;
static const CommandId kCmdId = kDeleteTransformFeedbacksImmediate;
static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(GLuint) * _n); // NOLINT
}
static uint32_t ComputeSize(GLsizei _n) {
return static_cast<uint32_t>(sizeof(ValueType) +
ComputeDataSize(_n)); // NOLINT
}
void SetHeader(GLsizei _n) {
header.SetCmdByTotalSize<ValueType>(ComputeSize(_n));
}
void Init(GLsizei _n, const GLuint* _ids) {
SetHeader(_n);
n = _n;
memcpy(ImmediateDataAddress(this), _ids, ComputeDataSize(_n));
}
void* Set(void* cmd, GLsizei _n, const GLuint* _ids) {
static_cast<ValueType*>(cmd)->Init(_n, _ids);
const uint32_t size = ComputeSize(_n);
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
gpu::CommandHeader header;
int32_t n;
};
static_assert(sizeof(DeleteTransformFeedbacksImmediate) == 8,
"size of DeleteTransformFeedbacksImmediate should be 8");
static_assert(offsetof(DeleteTransformFeedbacksImmediate, header) == 0,
"offset of DeleteTransformFeedbacksImmediate header should be 0");
static_assert(offsetof(DeleteTransformFeedbacksImmediate, n) == 4,
"offset of DeleteTransformFeedbacksImmediate n should be 4");
struct DepthFunc {
typedef DepthFunc ValueType;
static const CommandId kCmdId = kDepthFunc;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLenum _func) {
SetHeader();
func = _func;
}
void* Set(void* cmd, GLenum _func) {
static_cast<ValueType*>(cmd)->Init(_func);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t func;
};
static_assert(sizeof(DepthFunc) == 8, "size of DepthFunc should be 8");
static_assert(offsetof(DepthFunc, header) == 0,
"offset of DepthFunc header should be 0");
static_assert(offsetof(DepthFunc, func) == 4,
"offset of DepthFunc func should be 4");
struct DepthMask {
typedef DepthMask ValueType;
static const CommandId kCmdId = kDepthMask;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeSize() {
return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
}
void SetHeader() { header.SetCmd<ValueType>(); }
void Init(GLboolean _flag) {
SetHeader();
flag = _flag;
}
void* Set(void* cmd, GLboolean _flag) {
static_cast<ValueType*>(cmd)->Init(_flag);
return NextCmdAddress<ValueType>(cmd);
}
gpu::CommandHeader header;
uint32_t flag;
};
static_assert(sizeof(DepthMask) == 8, "size of DepthMask should be 8");
static_assert(offsetof(DepthMask, header) == 0,