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

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

Issue 2257533007: Autogenerate CreateAndConsumeTextureCHROMIUM handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 fba8b0081d341a3eb8cca8b30f525e5fdf47abe3..59d3d0c16bf486219da4285f280651aa6d59f2be 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -12872,6 +12872,55 @@ static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0,
static_assert(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4,
"offset of ConsumeTextureCHROMIUMImmediate target should be 4");
+struct CreateAndConsumeTextureINTERNALImmediate {
+ typedef CreateAndConsumeTextureINTERNALImmediate ValueType;
+ static const CommandId kCmdId = kCreateAndConsumeTextureINTERNALImmediate;
+ 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(GLbyte) * 64);
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
+ }
+
+ void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
+
+ void Init(GLenum _target, GLuint _texture, const GLbyte* _mailbox) {
+ SetHeader();
+ target = _target;
+ texture = _texture;
+ memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
+ }
+
+ void* Set(void* cmd,
+ GLenum _target,
+ GLuint _texture,
+ const GLbyte* _mailbox) {
+ static_cast<ValueType*>(cmd)->Init(_target, _texture, _mailbox);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ uint32_t texture;
+};
+
+static_assert(sizeof(CreateAndConsumeTextureINTERNALImmediate) == 12,
+ "size of CreateAndConsumeTextureINTERNALImmediate should be 12");
+static_assert(
+ offsetof(CreateAndConsumeTextureINTERNALImmediate, header) == 0,
+ "offset of CreateAndConsumeTextureINTERNALImmediate header should be 0");
+static_assert(
+ offsetof(CreateAndConsumeTextureINTERNALImmediate, target) == 4,
+ "offset of CreateAndConsumeTextureINTERNALImmediate target should be 4");
+static_assert(
+ offsetof(CreateAndConsumeTextureINTERNALImmediate, texture) == 8,
+ "offset of CreateAndConsumeTextureINTERNALImmediate texture should be 8");
+
struct BindUniformLocationCHROMIUMBucket {
typedef BindUniformLocationCHROMIUMBucket ValueType;
static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket;
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format.h ('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