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

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: s/GL_EXPORT/GPU_EXPORT for windows 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..3f3fe78311572f138b70648014065d7707f03f07 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -15704,4 +15704,61 @@ static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12,
static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16,
"offset of GetFragDataIndexEXT index_shm_offset should be 16");
+struct UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate {
+ typedef UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate ValueType;
+ static const CommandId kCmdId =
+ kUniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate;
+ 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,
+ GLboolean _transpose,
+ const GLfloat* _default_value) {
+ SetHeader();
+ location = _location;
+ transpose = _transpose;
+ memcpy(ImmediateDataAddress(this), _default_value, ComputeDataSize());
+ }
+
+ void* Set(void* cmd,
+ GLint _location,
+ GLboolean _transpose,
+ const GLfloat* _default_value) {
+ static_cast<ValueType*>(cmd)->Init(_location, _transpose, _default_value);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ int32_t location;
+ uint32_t transpose;
+};
+
+static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) ==
+ 12,
+ "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
+ "should be 12");
+static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
+ header) == 0,
+ "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
+ "header should be 0");
+static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
+ location) == 4,
+ "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
+ "location should be 4");
+static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
+ transpose) == 8,
+ "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
+ "transpose should be 8");
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
« 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