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

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

Issue 2221173002: Implementing FlushMappedBufferRange in GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: attempt to fix win build 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 3a8ba35913f781030ad6ed9a85476e6bed78c936..70b45bad40b068fd363cfeb543df5aa4f962b0bc 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -11991,6 +11991,47 @@ static_assert(offsetof(UnmapBuffer, header) == 0,
static_assert(offsetof(UnmapBuffer, target) == 4,
"offset of UnmapBuffer target should be 4");
+struct FlushMappedBufferRange {
+ typedef FlushMappedBufferRange ValueType;
+ static const CommandId kCmdId = kFlushMappedBufferRange;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLenum _target, GLintptr _offset, GLsizeiptr _size) {
+ SetHeader();
+ target = _target;
+ offset = _offset;
+ size = _size;
+ }
+
+ void* Set(void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size) {
+ static_cast<ValueType*>(cmd)->Init(_target, _offset, _size);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ int32_t offset;
+ int32_t size;
+};
+
+static_assert(sizeof(FlushMappedBufferRange) == 16,
+ "size of FlushMappedBufferRange should be 16");
+static_assert(offsetof(FlushMappedBufferRange, header) == 0,
+ "offset of FlushMappedBufferRange header should be 0");
+static_assert(offsetof(FlushMappedBufferRange, target) == 4,
+ "offset of FlushMappedBufferRange target should be 4");
+static_assert(offsetof(FlushMappedBufferRange, offset) == 8,
+ "offset of FlushMappedBufferRange offset should be 8");
+static_assert(offsetof(FlushMappedBufferRange, size) == 12,
+ "offset of FlushMappedBufferRange size should be 12");
+
struct ResizeCHROMIUM {
typedef ResizeCHROMIUM ValueType;
static const CommandId kCmdId = kResizeCHROMIUM;
« 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