diff options
Diffstat (limited to 'chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h')
-rw-r--r-- | chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h | 701 |
1 files changed, 115 insertions, 586 deletions
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h index 11b990145d2..248ad460001 100644 --- a/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ b/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h @@ -137,53 +137,6 @@ COMPILE_ASSERT(offsetof(BindAttribLocation, name_shm_offset) == 16, COMPILE_ASSERT(offsetof(BindAttribLocation, data_size) == 20, OffsetOf_BindAttribLocation_data_size_not_20); -struct BindAttribLocationImmediate { - typedef BindAttribLocationImmediate ValueType; - static const CommandId kCmdId = kBindAttribLocationImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 data_size) { - return static_cast<uint32>( - sizeof(ValueType) + data_size); // NOLINT - } - - void SetHeader(uint32 data_size) { - header.SetCmdBySize<ValueType>(data_size); - } - - void Init( - GLuint _program, GLuint _index, const char* _name, uint32 _data_size) { - SetHeader(_data_size); - program = _program; - index = _index; - data_size = _data_size; - memcpy(ImmediateDataAddress(this), _name, _data_size); - } - - void* Set( - void* cmd, GLuint _program, GLuint _index, const char* _name, - uint32 _data_size) { - static_cast<ValueType*>(cmd)->Init(_program, _index, _name, _data_size); - return NextImmediateCmdAddress<ValueType>(cmd, _data_size); - } - - gpu::CommandHeader header; - uint32 program; - uint32 index; - uint32 data_size; -}; - -COMPILE_ASSERT(sizeof(BindAttribLocationImmediate) == 16, - Sizeof_BindAttribLocationImmediate_is_not_16); -COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, header) == 0, - OffsetOf_BindAttribLocationImmediate_header_not_0); -COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, program) == 4, - OffsetOf_BindAttribLocationImmediate_program_not_4); -COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, index) == 8, - OffsetOf_BindAttribLocationImmediate_index_not_8); -COMPILE_ASSERT(offsetof(BindAttribLocationImmediate, data_size) == 12, - OffsetOf_BindAttribLocationImmediate_data_size_not_12); - struct BindAttribLocationBucket { typedef BindAttribLocationBucket ValueType; static const CommandId kCmdId = kBindAttribLocationBucket; @@ -641,52 +594,6 @@ COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16, COMPILE_ASSERT(offsetof(BufferData, usage) == 20, OffsetOf_BufferData_usage_not_20); -struct BufferDataImmediate { - typedef BufferDataImmediate ValueType; - static const CommandId kCmdId = kBufferDataImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init(GLenum _target, GLsizeiptr _size, GLenum _usage) { - uint32 total_size = 0; // TODO(gman): get correct size. - SetHeader(total_size); - target = _target; - size = _size; - usage = _usage; - } - - void* Set(void* cmd, GLenum _target, GLsizeiptr _size, GLenum _usage) { - uint32 total_size = 0; // TODO(gman): get correct size. - static_cast<ValueType*>(cmd)->Init(_target, _size, _usage); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 size; - uint32 usage; -}; - -COMPILE_ASSERT(sizeof(BufferDataImmediate) == 16, - Sizeof_BufferDataImmediate_is_not_16); -COMPILE_ASSERT(offsetof(BufferDataImmediate, header) == 0, - OffsetOf_BufferDataImmediate_header_not_0); -COMPILE_ASSERT(offsetof(BufferDataImmediate, target) == 4, - OffsetOf_BufferDataImmediate_target_not_4); -COMPILE_ASSERT(offsetof(BufferDataImmediate, size) == 8, - OffsetOf_BufferDataImmediate_size_not_8); -COMPILE_ASSERT(offsetof(BufferDataImmediate, usage) == 12, - OffsetOf_BufferDataImmediate_usage_not_12); - struct BufferSubData { typedef BufferSubData ValueType; static const CommandId kCmdId = kBufferSubData; @@ -742,52 +649,6 @@ COMPILE_ASSERT(offsetof(BufferSubData, data_shm_id) == 16, COMPILE_ASSERT(offsetof(BufferSubData, data_shm_offset) == 20, OffsetOf_BufferSubData_data_shm_offset_not_20); -struct BufferSubDataImmediate { - typedef BufferSubDataImmediate ValueType; - static const CommandId kCmdId = kBufferSubDataImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init(GLenum _target, GLintptr _offset, GLsizeiptr _size) { - uint32 total_size = ComputeSize(_size); - SetHeader(total_size); - target = _target; - offset = _offset; - size = _size; - } - - void* Set(void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size) { - uint32 total_size = ComputeSize(_size); - static_cast<ValueType*>(cmd)->Init(_target, _offset, _size); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 offset; - int32 size; -}; - -COMPILE_ASSERT(sizeof(BufferSubDataImmediate) == 16, - Sizeof_BufferSubDataImmediate_is_not_16); -COMPILE_ASSERT(offsetof(BufferSubDataImmediate, header) == 0, - OffsetOf_BufferSubDataImmediate_header_not_0); -COMPILE_ASSERT(offsetof(BufferSubDataImmediate, target) == 4, - OffsetOf_BufferSubDataImmediate_target_not_4); -COMPILE_ASSERT(offsetof(BufferSubDataImmediate, offset) == 8, - OffsetOf_BufferSubDataImmediate_offset_not_8); -COMPILE_ASSERT(offsetof(BufferSubDataImmediate, size) == 12, - OffsetOf_BufferSubDataImmediate_size_not_12); - struct CheckFramebufferStatus { typedef CheckFramebufferStatus ValueType; static const CommandId kCmdId = kCheckFramebufferStatus; @@ -1143,75 +1004,6 @@ COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 32, COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 36, OffsetOf_CompressedTexImage2D_data_shm_offset_not_36); -struct CompressedTexImage2DImmediate { - typedef CompressedTexImage2DImmediate ValueType; - static const CommandId kCmdId = kCompressedTexImage2DImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init( - GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLsizei _imageSize) { - uint32 total_size = 0; // TODO(gman): get correct size. - SetHeader(total_size); - target = _target; - level = _level; - internalformat = _internalformat; - width = _width; - height = _height; - border = _border; - imageSize = _imageSize; - } - - void* Set( - void* cmd, GLenum _target, GLint _level, GLenum _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLsizei _imageSize) { - uint32 total_size = 0; // TODO(gman): get correct size. - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, - _imageSize); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 level; - uint32 internalformat; - int32 width; - int32 height; - int32 border; - int32 imageSize; -}; - -COMPILE_ASSERT(sizeof(CompressedTexImage2DImmediate) == 32, - Sizeof_CompressedTexImage2DImmediate_is_not_32); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, header) == 0, - OffsetOf_CompressedTexImage2DImmediate_header_not_0); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, target) == 4, - OffsetOf_CompressedTexImage2DImmediate_target_not_4); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, level) == 8, - OffsetOf_CompressedTexImage2DImmediate_level_not_8); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, internalformat) == 12, - OffsetOf_CompressedTexImage2DImmediate_internalformat_not_12); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, width) == 16, - OffsetOf_CompressedTexImage2DImmediate_width_not_16); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, height) == 20, - OffsetOf_CompressedTexImage2DImmediate_height_not_20); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, border) == 24, - OffsetOf_CompressedTexImage2DImmediate_border_not_24); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, imageSize) == 28, - OffsetOf_CompressedTexImage2DImmediate_imageSize_not_28); - struct CompressedTexImage2DBucket { typedef CompressedTexImage2DBucket ValueType; static const CommandId kCmdId = kCompressedTexImage2DBucket; @@ -1356,79 +1148,6 @@ COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_id) == 36, COMPILE_ASSERT(offsetof(CompressedTexSubImage2D, data_shm_offset) == 40, OffsetOf_CompressedTexSubImage2D_data_shm_offset_not_40); -struct CompressedTexSubImage2DImmediate { - typedef CompressedTexSubImage2DImmediate ValueType; - static const CommandId kCmdId = kCompressedTexSubImage2DImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize) { - uint32 total_size = ComputeSize(_imageSize); - SetHeader(total_size); - target = _target; - level = _level; - xoffset = _xoffset; - yoffset = _yoffset; - width = _width; - height = _height; - format = _format; - imageSize = _imageSize; - } - - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize) { - uint32 total_size = ComputeSize(_imageSize); - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _imageSize); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 level; - int32 xoffset; - int32 yoffset; - int32 width; - int32 height; - uint32 format; - int32 imageSize; -}; - -COMPILE_ASSERT(sizeof(CompressedTexSubImage2DImmediate) == 36, - Sizeof_CompressedTexSubImage2DImmediate_is_not_36); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, header) == 0, - OffsetOf_CompressedTexSubImage2DImmediate_header_not_0); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, target) == 4, - OffsetOf_CompressedTexSubImage2DImmediate_target_not_4); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, level) == 8, - OffsetOf_CompressedTexSubImage2DImmediate_level_not_8); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, xoffset) == 12, - OffsetOf_CompressedTexSubImage2DImmediate_xoffset_not_12); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, yoffset) == 16, - OffsetOf_CompressedTexSubImage2DImmediate_yoffset_not_16); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, width) == 20, - OffsetOf_CompressedTexSubImage2DImmediate_width_not_20); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, height) == 24, - OffsetOf_CompressedTexSubImage2DImmediate_height_not_24); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, format) == 28, - OffsetOf_CompressedTexSubImage2DImmediate_format_not_28); -COMPILE_ASSERT(offsetof(CompressedTexSubImage2DImmediate, imageSize) == 32, - OffsetOf_CompressedTexSubImage2DImmediate_imageSize_not_32); - struct CompressedTexSubImage2DBucket { typedef CompressedTexSubImage2DBucket ValueType; static const CommandId kCmdId = kCompressedTexSubImage2DBucket; @@ -5238,48 +4957,6 @@ COMPILE_ASSERT(offsetof(ShaderSource, data_shm_offset) == 12, COMPILE_ASSERT(offsetof(ShaderSource, data_size) == 16, OffsetOf_ShaderSource_data_size_not_16); -struct ShaderSourceImmediate { - typedef ShaderSourceImmediate ValueType; - static const CommandId kCmdId = kShaderSourceImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init(GLuint _shader, uint32 _data_size) { - uint32 total_size = ComputeSize(_data_size); - SetHeader(total_size); - shader = _shader; - data_size = _data_size; - } - - void* Set(void* cmd, GLuint _shader, uint32 _data_size) { - uint32 total_size = ComputeSize(_data_size); - static_cast<ValueType*>(cmd)->Init(_shader, _data_size); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 shader; - uint32 data_size; -}; - -COMPILE_ASSERT(sizeof(ShaderSourceImmediate) == 12, - Sizeof_ShaderSourceImmediate_is_not_12); -COMPILE_ASSERT(offsetof(ShaderSourceImmediate, header) == 0, - OffsetOf_ShaderSourceImmediate_header_not_0); -COMPILE_ASSERT(offsetof(ShaderSourceImmediate, shader) == 4, - OffsetOf_ShaderSourceImmediate_shader_not_4); -COMPILE_ASSERT(offsetof(ShaderSourceImmediate, data_size) == 8, - OffsetOf_ShaderSourceImmediate_data_size_not_8); - struct ShaderSourceBucket { typedef ShaderSourceBucket ValueType; static const CommandId kCmdId = kShaderSourceBucket; @@ -5646,80 +5323,6 @@ COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_id) == 36, COMPILE_ASSERT(offsetof(TexImage2D, pixels_shm_offset) == 40, OffsetOf_TexImage2D_pixels_shm_offset_not_40); -struct TexImage2DImmediate { - typedef TexImage2DImmediate ValueType; - static const CommandId kCmdId = kTexImage2DImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init( - GLenum _target, GLint _level, GLint _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLenum _format, GLenum _type) { - uint32 total_size = 0; // TODO(gman): get correct size. - SetHeader(total_size); - target = _target; - level = _level; - internalformat = _internalformat; - width = _width; - height = _height; - border = _border; - format = _format; - type = _type; - } - - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLenum _format, - GLenum _type) { - uint32 total_size = 0; // TODO(gman): get correct size. - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, _format, - _type); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 level; - int32 internalformat; - int32 width; - int32 height; - int32 border; - uint32 format; - uint32 type; -}; - -COMPILE_ASSERT(sizeof(TexImage2DImmediate) == 36, - Sizeof_TexImage2DImmediate_is_not_36); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, header) == 0, - OffsetOf_TexImage2DImmediate_header_not_0); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, target) == 4, - OffsetOf_TexImage2DImmediate_target_not_4); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, level) == 8, - OffsetOf_TexImage2DImmediate_level_not_8); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, internalformat) == 12, - OffsetOf_TexImage2DImmediate_internalformat_not_12); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, width) == 16, - OffsetOf_TexImage2DImmediate_width_not_16); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, height) == 20, - OffsetOf_TexImage2DImmediate_height_not_20); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, border) == 24, - OffsetOf_TexImage2DImmediate_border_not_24); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, format) == 28, - OffsetOf_TexImage2DImmediate_format_not_28); -COMPILE_ASSERT(offsetof(TexImage2DImmediate, type) == 32, - OffsetOf_TexImage2DImmediate_type_not_32); - struct TexParameterf { typedef TexParameterf ValueType; static const CommandId kCmdId = kTexParameterf; @@ -6083,85 +5686,6 @@ COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40, COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44, OffsetOf_TexSubImage2D_internal_not_44); -struct TexSubImage2DImmediate { - typedef TexSubImage2DImmediate ValueType; - static const CommandId kCmdId = kTexSubImage2DImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - GLboolean _internal) { - uint32 total_size = 0; // TODO(gman): get correct size. - SetHeader(total_size); - target = _target; - level = _level; - xoffset = _xoffset; - yoffset = _yoffset; - width = _width; - height = _height; - format = _format; - type = _type; - internal = _internal; - } - - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - GLboolean _internal) { - uint32 total_size = 0; // TODO(gman): get correct size. - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _type, _internal); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 level; - int32 xoffset; - int32 yoffset; - int32 width; - int32 height; - uint32 format; - uint32 type; - uint32 internal; -}; - -COMPILE_ASSERT(sizeof(TexSubImage2DImmediate) == 40, - Sizeof_TexSubImage2DImmediate_is_not_40); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, header) == 0, - OffsetOf_TexSubImage2DImmediate_header_not_0); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, target) == 4, - OffsetOf_TexSubImage2DImmediate_target_not_4); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, level) == 8, - OffsetOf_TexSubImage2DImmediate_level_not_8); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, xoffset) == 12, - OffsetOf_TexSubImage2DImmediate_xoffset_not_12); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, yoffset) == 16, - OffsetOf_TexSubImage2DImmediate_yoffset_not_16); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, width) == 20, - OffsetOf_TexSubImage2DImmediate_width_not_20); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, height) == 24, - OffsetOf_TexSubImage2DImmediate_height_not_24); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, format) == 28, - OffsetOf_TexSubImage2DImmediate_format_not_28); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, type) == 32, - OffsetOf_TexSubImage2DImmediate_type_not_32); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, internal) == 36, - OffsetOf_TexSubImage2DImmediate_internal_not_36); - struct Uniform1f { typedef Uniform1f ValueType; static const CommandId kCmdId = kUniform1f; @@ -8337,9 +7861,9 @@ COMPILE_ASSERT(offsetof(Viewport, width) == 12, COMPILE_ASSERT(offsetof(Viewport, height) == 16, OffsetOf_Viewport_height_not_16); -struct BlitFramebufferEXT { - typedef BlitFramebufferEXT ValueType; - static const CommandId kCmdId = kBlitFramebufferEXT; +struct BlitFramebufferCHROMIUM { + typedef BlitFramebufferCHROMIUM ValueType; + static const CommandId kCmdId = kBlitFramebufferCHROMIUM; static const cmd::ArgFlags kArgFlags = cmd::kFixed; static uint32 ComputeSize() { @@ -8391,31 +7915,89 @@ struct BlitFramebufferEXT { uint32 filter; }; -COMPILE_ASSERT(sizeof(BlitFramebufferEXT) == 44, - Sizeof_BlitFramebufferEXT_is_not_44); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, header) == 0, - OffsetOf_BlitFramebufferEXT_header_not_0); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcX0) == 4, - OffsetOf_BlitFramebufferEXT_srcX0_not_4); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcY0) == 8, - OffsetOf_BlitFramebufferEXT_srcY0_not_8); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcX1) == 12, - OffsetOf_BlitFramebufferEXT_srcX1_not_12); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, srcY1) == 16, - OffsetOf_BlitFramebufferEXT_srcY1_not_16); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstX0) == 20, - OffsetOf_BlitFramebufferEXT_dstX0_not_20); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstY0) == 24, - OffsetOf_BlitFramebufferEXT_dstY0_not_24); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstX1) == 28, - OffsetOf_BlitFramebufferEXT_dstX1_not_28); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, dstY1) == 32, - OffsetOf_BlitFramebufferEXT_dstY1_not_32); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, mask) == 36, - OffsetOf_BlitFramebufferEXT_mask_not_36); -COMPILE_ASSERT(offsetof(BlitFramebufferEXT, filter) == 40, - OffsetOf_BlitFramebufferEXT_filter_not_40); +COMPILE_ASSERT(sizeof(BlitFramebufferCHROMIUM) == 44, + Sizeof_BlitFramebufferCHROMIUM_is_not_44); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, header) == 0, + OffsetOf_BlitFramebufferCHROMIUM_header_not_0); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX0) == 4, + OffsetOf_BlitFramebufferCHROMIUM_srcX0_not_4); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY0) == 8, + OffsetOf_BlitFramebufferCHROMIUM_srcY0_not_8); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcX1) == 12, + OffsetOf_BlitFramebufferCHROMIUM_srcX1_not_12); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, srcY1) == 16, + OffsetOf_BlitFramebufferCHROMIUM_srcY1_not_16); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX0) == 20, + OffsetOf_BlitFramebufferCHROMIUM_dstX0_not_20); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY0) == 24, + OffsetOf_BlitFramebufferCHROMIUM_dstY0_not_24); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstX1) == 28, + OffsetOf_BlitFramebufferCHROMIUM_dstX1_not_28); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, dstY1) == 32, + OffsetOf_BlitFramebufferCHROMIUM_dstY1_not_32); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, mask) == 36, + OffsetOf_BlitFramebufferCHROMIUM_mask_not_36); +COMPILE_ASSERT(offsetof(BlitFramebufferCHROMIUM, filter) == 40, + OffsetOf_BlitFramebufferCHROMIUM_filter_not_40); + +// GL_CHROMIUM_framebuffer_multisample +struct RenderbufferStorageMultisampleCHROMIUM { + typedef RenderbufferStorageMultisampleCHROMIUM ValueType; + static const CommandId kCmdId = kRenderbufferStorageMultisampleCHROMIUM; + static const cmd::ArgFlags kArgFlags = cmd::kFixed; + + static uint32 ComputeSize() { + return static_cast<uint32>(sizeof(ValueType)); // NOLINT + } + + void SetHeader() { + header.SetCmd<ValueType>(); + } + + void Init( + GLenum _target, GLsizei _samples, GLenum _internalformat, GLsizei _width, + GLsizei _height) { + SetHeader(); + target = _target; + samples = _samples; + internalformat = _internalformat; + width = _width; + height = _height; + } + + void* Set( + void* cmd, GLenum _target, GLsizei _samples, GLenum _internalformat, + GLsizei _width, GLsizei _height) { + static_cast<ValueType*>( + cmd)->Init(_target, _samples, _internalformat, _width, _height); + return NextCmdAddress<ValueType>(cmd); + } + + gpu::CommandHeader header; + uint32 target; + int32 samples; + uint32 internalformat; + int32 width; + int32 height; +}; +COMPILE_ASSERT(sizeof(RenderbufferStorageMultisampleCHROMIUM) == 24, + Sizeof_RenderbufferStorageMultisampleCHROMIUM_is_not_24); +COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, header) == 0, + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_header_not_0); +COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, target) == 4, + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_target_not_4); +COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8, + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8); +COMPILE_ASSERT( + offsetof(RenderbufferStorageMultisampleCHROMIUM, internalformat) == 12, + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12); // NOLINT +COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16, + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16); +COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20, + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_height_not_20); + +// GL_EXT_multisampled_render_to_texture struct RenderbufferStorageMultisampleEXT { typedef RenderbufferStorageMultisampleEXT ValueType; static const CommandId kCmdId = kRenderbufferStorageMultisampleEXT; @@ -10145,42 +9727,6 @@ COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, index) == 4, COMPILE_ASSERT(offsetof(VertexAttribDivisorANGLE, divisor) == 8, OffsetOf_VertexAttribDivisorANGLE_divisor_not_8); -struct GenMailboxCHROMIUM { - typedef GenMailboxCHROMIUM ValueType; - static const CommandId kCmdId = kGenMailboxCHROMIUM; - static const cmd::ArgFlags kArgFlags = cmd::kFixed; - - typedef SizedResult<GLint> Result; - - static uint32 ComputeSize() { - return static_cast<uint32>(sizeof(ValueType)); // NOLINT - } - - void SetHeader() { - header.SetCmd<ValueType>(); - } - - void Init(GLuint _bucket_id) { - SetHeader(); - bucket_id = _bucket_id; - } - - void* Set(void* cmd, GLuint _bucket_id) { - static_cast<ValueType*>(cmd)->Init(_bucket_id); - return NextCmdAddress<ValueType>(cmd); - } - - gpu::CommandHeader header; - uint32 bucket_id; -}; - -COMPILE_ASSERT(sizeof(GenMailboxCHROMIUM) == 8, - Sizeof_GenMailboxCHROMIUM_is_not_8); -COMPILE_ASSERT(offsetof(GenMailboxCHROMIUM, header) == 0, - OffsetOf_GenMailboxCHROMIUM_header_not_0); -COMPILE_ASSERT(offsetof(GenMailboxCHROMIUM, bucket_id) == 4, - OffsetOf_GenMailboxCHROMIUM_bucket_id_not_4); - struct ProduceTextureCHROMIUM { typedef ProduceTextureCHROMIUM ValueType; static const CommandId kCmdId = kProduceTextureCHROMIUM; @@ -10415,53 +9961,6 @@ COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_offset) == 16, COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, data_size) == 20, OffsetOf_BindUniformLocationCHROMIUM_data_size_not_20); -struct BindUniformLocationCHROMIUMImmediate { - typedef BindUniformLocationCHROMIUMImmediate ValueType; - static const CommandId kCmdId = kBindUniformLocationCHROMIUMImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 data_size) { - return static_cast<uint32>( - sizeof(ValueType) + data_size); // NOLINT - } - - void SetHeader(uint32 data_size) { - header.SetCmdBySize<ValueType>(data_size); - } - - void Init( - GLuint _program, GLint _location, const char* _name, uint32 _data_size) { - SetHeader(_data_size); - program = _program; - location = _location; - data_size = _data_size; - memcpy(ImmediateDataAddress(this), _name, _data_size); - } - - void* Set( - void* cmd, GLuint _program, GLint _location, const char* _name, - uint32 _data_size) { - static_cast<ValueType*>(cmd)->Init(_program, _location, _name, _data_size); - return NextImmediateCmdAddress<ValueType>(cmd, _data_size); - } - - gpu::CommandHeader header; - uint32 program; - int32 location; - uint32 data_size; -}; - -COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMImmediate) == 16, - Sizeof_BindUniformLocationCHROMIUMImmediate_is_not_16); -COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, header) == 0, - OffsetOf_BindUniformLocationCHROMIUMImmediate_header_not_0); -COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, program) == 4, - OffsetOf_BindUniformLocationCHROMIUMImmediate_program_not_4); -COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, location) == 8, - OffsetOf_BindUniformLocationCHROMIUMImmediate_location_not_8); -COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, data_size) == 12, - OffsetOf_BindUniformLocationCHROMIUMImmediate_data_size_not_12); - struct BindUniformLocationCHROMIUMBucket { typedef BindUniformLocationCHROMIUMBucket ValueType; static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket; @@ -11097,6 +10596,36 @@ COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, header) == 0, COMPILE_ASSERT(offsetof(DrawBuffersEXTImmediate, count) == 4, OffsetOf_DrawBuffersEXTImmediate_count_not_4); +struct DiscardBackbufferCHROMIUM { + typedef DiscardBackbufferCHROMIUM ValueType; + static const CommandId kCmdId = kDiscardBackbufferCHROMIUM; + static const cmd::ArgFlags kArgFlags = cmd::kFixed; + + static uint32 ComputeSize() { + return static_cast<uint32>(sizeof(ValueType)); // NOLINT + } + + void SetHeader() { + header.SetCmd<ValueType>(); + } + + void Init() { + SetHeader(); + } + + void* Set(void* cmd) { + static_cast<ValueType*>(cmd)->Init(); + return NextCmdAddress<ValueType>(cmd); + } + + gpu::CommandHeader header; +}; + +COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM) == 4, + Sizeof_DiscardBackbufferCHROMIUM_is_not_4); +COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM, header) == 0, + OffsetOf_DiscardBackbufferCHROMIUM_header_not_0); + #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |