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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format_autogen.h

Issue 8680002: Added minimal support to command buffer for GL_ARB_texture_rectangle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_format_autogen.h
===================================================================
--- gpu/command_buffer/common/gles2_cmd_format_autogen.h (revision 111321)
+++ gpu/command_buffer/common/gles2_cmd_format_autogen.h (working copy)
@@ -9211,6 +9211,61 @@
COMPILE_ASSERT(offsetof(PostSubBufferCHROMIUM, height) == 16,
OffsetOf_PostSubBufferCHROMIUM_height_not_16);
+struct TexImageIOSurface2DCHROMIUM {
+ typedef TexImageIOSurface2DCHROMIUM ValueType;
+ static const CommandId kCmdId = kTexImageIOSurface2DCHROMIUM;
+ 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 _width, GLsizei _height, GLuint _ioSurfaceId,
+ GLuint _plane) {
+ SetHeader();
+ target = _target;
+ width = _width;
+ height = _height;
+ ioSurfaceId = _ioSurfaceId;
+ plane = _plane;
+ }
+
+ void* Set(
+ void* cmd, GLenum _target, GLsizei _width, GLsizei _height,
+ GLuint _ioSurfaceId, GLuint _plane) {
+ static_cast<ValueType*>(
+ cmd)->Init(_target, _width, _height, _ioSurfaceId, _plane);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32 target;
+ int32 width;
+ int32 height;
+ uint32 ioSurfaceId;
+ uint32 plane;
+};
+
+COMPILE_ASSERT(sizeof(TexImageIOSurface2DCHROMIUM) == 24,
+ Sizeof_TexImageIOSurface2DCHROMIUM_is_not_24);
+COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, header) == 0,
+ OffsetOf_TexImageIOSurface2DCHROMIUM_header_not_0);
+COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, target) == 4,
+ OffsetOf_TexImageIOSurface2DCHROMIUM_target_not_4);
+COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, width) == 8,
+ OffsetOf_TexImageIOSurface2DCHROMIUM_width_not_8);
+COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, height) == 12,
+ OffsetOf_TexImageIOSurface2DCHROMIUM_height_not_12);
+COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, ioSurfaceId) == 16,
+ OffsetOf_TexImageIOSurface2DCHROMIUM_ioSurfaceId_not_16);
+COMPILE_ASSERT(offsetof(TexImageIOSurface2DCHROMIUM, plane) == 20,
+ OffsetOf_TexImageIOSurface2DCHROMIUM_plane_not_20);
+
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_

Powered by Google App Engine
This is Rietveld 408576698