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

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

Issue 1559203003: Add GLStreamTextureImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added enum, removed count parameter. Created 4 years, 10 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 7d678caed89bd29bf26a371ca2086ade71088c14..c48c18cd5e5473ba484d719a38a35a066f850d3d 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -9999,6 +9999,71 @@ static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8,
static_assert(offsetof(UniformMatrix4x3fvImmediate, transpose) == 12,
"offset of UniformMatrix4x3fvImmediate transpose should be 12");
+struct UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate {
+ typedef UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate ValueType;
+ static const CommandId kCmdId =
+ kUniformMatrix4fvWithCustomMatrixCHROMIUMImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeDataSize() {
+ return static_cast<uint32_t>(sizeof(GLfloat) * 16);
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
+ }
+
+ void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
+
+ void Init(GLint _location,
+ GLenum _custom_matrix,
+ GLboolean _transpose,
+ const GLfloat* _default_value) {
+ SetHeader();
+ location = _location;
+ custom_matrix = _custom_matrix;
+ transpose = _transpose;
+ memcpy(ImmediateDataAddress(this), _default_value, ComputeDataSize());
+ }
+
+ void* Set(void* cmd,
+ GLint _location,
+ GLenum _custom_matrix,
+ GLboolean _transpose,
+ const GLfloat* _default_value) {
+ static_cast<ValueType*>(cmd)->Init(_location, _custom_matrix, _transpose,
+ _default_value);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ int32_t location;
+ uint32_t custom_matrix;
+ uint32_t transpose;
+};
+
+static_assert(
+ sizeof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate) == 16,
+ "size of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate should be 16");
+static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate,
+ header) == 0,
+ "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate "
+ "header should be 0");
+static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate,
+ location) == 4,
+ "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate "
+ "location should be 4");
+static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate,
+ custom_matrix) == 8,
+ "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate "
+ "custom_matrix should be 8");
+static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate,
+ transpose) == 12,
+ "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate "
+ "transpose should be 12");
+
struct UseProgram {
typedef UseProgram ValueType;
static const CommandId kCmdId = kUseProgram;

Powered by Google App Engine
This is Rietveld 408576698