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

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

Issue 878793002: Add CopyTexSubImage3D to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 00ee1b53b866b1120a8ea9fbfcf100987bb79830..5d9a8188ea5884530f28f47a8f75e50736950df4 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -1773,6 +1773,89 @@ static_assert(offsetof(CopyTexSubImage2D, width) == 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 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,
+ 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;
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_test_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698