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

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

Issue 2443023002: gpu: Add CHROMIUM_copy_image extension.
Patch Set: rebase Created 4 years, 2 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 96bc3271b10addb25d40529299aaf56a9b0e7a32..21347d8cfcad0d9428bc8e42d428504f24c6091f 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -13087,6 +13087,96 @@ static_assert(offsetof(ReleaseTexImage2DCHROMIUM, target) == 4,
static_assert(offsetof(ReleaseTexImage2DCHROMIUM, imageId) == 8,
"offset of ReleaseTexImage2DCHROMIUM imageId should be 8");
+struct CopyImageSubDataCHROMIUM {
+ typedef CopyImageSubDataCHROMIUM ValueType;
+ static const CommandId kCmdId = kCopyImageSubDataCHROMIUM;
+ 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 _source_image_id,
+ GLint _dest_texture_id,
+ GLint _xoffset,
+ GLint _yoffset,
+ GLint _x,
+ GLint _y,
+ GLsizei _width,
+ GLsizei _height,
+ GLint _in_fence_id,
+ GLint _out_fence_id) {
+ SetHeader();
+ source_image_id = _source_image_id;
+ dest_texture_id = _dest_texture_id;
+ xoffset = _xoffset;
+ yoffset = _yoffset;
+ x = _x;
+ y = _y;
+ width = _width;
+ height = _height;
+ in_fence_id = _in_fence_id;
+ out_fence_id = _out_fence_id;
+ }
+
+ void* Set(void* cmd,
+ GLint _source_image_id,
+ GLint _dest_texture_id,
+ GLint _xoffset,
+ GLint _yoffset,
+ GLint _x,
+ GLint _y,
+ GLsizei _width,
+ GLsizei _height,
+ GLint _in_fence_id,
+ GLint _out_fence_id) {
+ static_cast<ValueType*>(cmd)->Init(_source_image_id, _dest_texture_id,
+ _xoffset, _yoffset, _x, _y, _width,
+ _height, _in_fence_id, _out_fence_id);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ int32_t source_image_id;
+ int32_t dest_texture_id;
+ int32_t xoffset;
+ int32_t yoffset;
+ int32_t x;
+ int32_t y;
+ int32_t width;
+ int32_t height;
+ int32_t in_fence_id;
+ int32_t out_fence_id;
+};
+
+static_assert(sizeof(CopyImageSubDataCHROMIUM) == 44,
+ "size of CopyImageSubDataCHROMIUM should be 44");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, header) == 0,
+ "offset of CopyImageSubDataCHROMIUM header should be 0");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, source_image_id) == 4,
+ "offset of CopyImageSubDataCHROMIUM source_image_id should be 4");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, dest_texture_id) == 8,
+ "offset of CopyImageSubDataCHROMIUM dest_texture_id should be 8");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, xoffset) == 12,
+ "offset of CopyImageSubDataCHROMIUM xoffset should be 12");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, yoffset) == 16,
+ "offset of CopyImageSubDataCHROMIUM yoffset should be 16");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, x) == 20,
+ "offset of CopyImageSubDataCHROMIUM x should be 20");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, y) == 24,
+ "offset of CopyImageSubDataCHROMIUM y should be 24");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, width) == 28,
+ "offset of CopyImageSubDataCHROMIUM width should be 28");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, height) == 32,
+ "offset of CopyImageSubDataCHROMIUM height should be 32");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, in_fence_id) == 36,
+ "offset of CopyImageSubDataCHROMIUM in_fence_id should be 36");
+static_assert(offsetof(CopyImageSubDataCHROMIUM, out_fence_id) == 40,
+ "offset of CopyImageSubDataCHROMIUM out_fence_id should be 40");
+
struct TraceBeginCHROMIUM {
typedef TraceBeginCHROMIUM ValueType;
static const CommandId kCmdId = kTraceBeginCHROMIUM;
« 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