summaryrefslogtreecommitdiff
path: root/chromium/gpu/command_buffer/common
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/gpu/command_buffer/common')
-rw-r--r--chromium/gpu/command_buffer/common/BUILD.gn21
-rw-r--r--chromium/gpu/command_buffer/common/cmd_buffer_common.h2
-rw-r--r--chromium/gpu/command_buffer/common/discardable_handle.cc1
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format.h2
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h418
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h127
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_ids_autogen.h507
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils.cc3
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils.h2
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h13
-rw-r--r--chromium/gpu/command_buffer/common/mailbox.h4
-rw-r--r--chromium/gpu/command_buffer/common/raster_cmd_format.h1
-rw-r--r--chromium/gpu/command_buffer/common/swap_buffers_complete_params.h8
13 files changed, 851 insertions, 258 deletions
diff --git a/chromium/gpu/command_buffer/common/BUILD.gn b/chromium/gpu/command_buffer/common/BUILD.gn
index bcf81ea98b9..9696af1c3a3 100644
--- a/chromium/gpu/command_buffer/common/BUILD.gn
+++ b/chromium/gpu/command_buffer/common/BUILD.gn
@@ -34,6 +34,14 @@ group("raster") {
}
}
+group("mailbox") {
+ if (is_component_build) {
+ public_deps = [ "//gpu:mailbox" ]
+ } else {
+ public_deps = [ ":mailbox_sources" ]
+ }
+}
+
group("webgpu") {
public_deps = [ ":webgpu_sources" ]
}
@@ -68,8 +76,6 @@ jumbo_source_set("common_sources") {
"gpu_memory_buffer_support.h",
"id_allocator.cc",
"id_allocator.h",
- "mailbox.cc",
- "mailbox.h",
"mailbox_holder.cc",
"mailbox_holder.h",
"presentation_feedback_utils.cc",
@@ -92,6 +98,7 @@ jumbo_source_set("common_sources") {
configs += [ "//gpu:gpu_implementation" ]
public_deps = [
+ ":mailbox",
"//base/util/type_safety",
"//mojo/public/cpp/system",
"//ui/gfx:memory_buffer",
@@ -105,6 +112,16 @@ jumbo_source_set("common_sources") {
configs += [ "//third_party/khronos:khronos_headers" ]
}
+source_set("mailbox_sources") {
+ visibility = [ "//gpu/*" ]
+ defines = [ "IS_GPU_MAILBOX_IMPL" ]
+ sources = [
+ "mailbox.cc",
+ "mailbox.h",
+ ]
+ deps = [ "//base" ]
+}
+
source_set("gles2_sources") {
visibility = [ "//gpu/*" ]
diff --git a/chromium/gpu/command_buffer/common/cmd_buffer_common.h b/chromium/gpu/command_buffer/common/cmd_buffer_common.h
index ae83e190a06..a4a01c35c3b 100644
--- a/chromium/gpu/command_buffer/common/cmd_buffer_common.h
+++ b/chromium/gpu/command_buffer/common/cmd_buffer_common.h
@@ -10,7 +10,7 @@
#include <stddef.h>
#include <stdint.h>
-#include "base/logging.h"
+#include "base/check_op.h"
#include "base/macros.h"
#include "gpu/command_buffer/common/bitfield_helpers.h"
#include "gpu/gpu_export.h"
diff --git a/chromium/gpu/command_buffer/common/discardable_handle.cc b/chromium/gpu/command_buffer/common/discardable_handle.cc
index c32bd8c20ba..8540d91ac28 100644
--- a/chromium/gpu/command_buffer/common/discardable_handle.cc
+++ b/chromium/gpu/command_buffer/common/discardable_handle.cc
@@ -5,6 +5,7 @@
#include "gpu/command_buffer/common/discardable_handle.h"
#include "base/atomicops.h"
+#include "base/logging.h"
#include "gpu/command_buffer/common/buffer.h"
namespace gpu {
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_format.h b/chromium/gpu/command_buffer/common/gles2_cmd_format.h
index 6bcbe51c0f3..ecb2dc4a03d 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_format.h
@@ -12,7 +12,7 @@
#include <string.h>
#include "base/atomicops.h"
-#include "base/logging.h"
+#include "base/check_op.h"
#include "base/macros.h"
#include "base/rand_util.h"
#include "base/trace_event/trace_event.h"
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 05a48970424..2fc6747211d 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -4155,6 +4155,61 @@ static_assert(offsetof(GetBooleanv, params_shm_id) == 8,
static_assert(offsetof(GetBooleanv, params_shm_offset) == 12,
"offset of GetBooleanv params_shm_offset should be 12");
+struct GetBooleani_v {
+ typedef GetBooleani_v ValueType;
+ static const CommandId kCmdId = kGetBooleani_v;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ typedef SizedResult<GLboolean> Result;
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLenum _pname,
+ GLuint _index,
+ uint32_t _data_shm_id,
+ uint32_t _data_shm_offset) {
+ SetHeader();
+ pname = _pname;
+ index = _index;
+ data_shm_id = _data_shm_id;
+ data_shm_offset = _data_shm_offset;
+ }
+
+ void* Set(void* cmd,
+ GLenum _pname,
+ GLuint _index,
+ uint32_t _data_shm_id,
+ uint32_t _data_shm_offset) {
+ static_cast<ValueType*>(cmd)->Init(_pname, _index, _data_shm_id,
+ _data_shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t pname;
+ uint32_t index;
+ uint32_t data_shm_id;
+ uint32_t data_shm_offset;
+};
+
+static_assert(sizeof(GetBooleani_v) == 20,
+ "size of GetBooleani_v should be 20");
+static_assert(offsetof(GetBooleani_v, header) == 0,
+ "offset of GetBooleani_v header should be 0");
+static_assert(offsetof(GetBooleani_v, pname) == 4,
+ "offset of GetBooleani_v pname should be 4");
+static_assert(offsetof(GetBooleani_v, index) == 8,
+ "offset of GetBooleani_v index should be 8");
+static_assert(offsetof(GetBooleani_v, data_shm_id) == 12,
+ "offset of GetBooleani_v data_shm_id should be 12");
+static_assert(offsetof(GetBooleani_v, data_shm_offset) == 16,
+ "offset of GetBooleani_v data_shm_offset should be 16");
+
struct GetBufferParameteri64v {
typedef GetBufferParameteri64v ValueType;
static const CommandId kCmdId = kGetBufferParameteri64v;
@@ -16777,4 +16832,367 @@ static_assert(
offsetof(EndBatchReadAccessSharedImageCHROMIUM, header) == 0,
"offset of EndBatchReadAccessSharedImageCHROMIUM header should be 0");
+struct EnableiOES {
+ typedef EnableiOES ValueType;
+ static const CommandId kCmdId = kEnableiOES;
+ 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(GLenum _target, GLuint _index) {
+ SetHeader();
+ target = _target;
+ index = _index;
+ }
+
+ void* Set(void* cmd, GLenum _target, GLuint _index) {
+ static_cast<ValueType*>(cmd)->Init(_target, _index);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ uint32_t index;
+};
+
+static_assert(sizeof(EnableiOES) == 12, "size of EnableiOES should be 12");
+static_assert(offsetof(EnableiOES, header) == 0,
+ "offset of EnableiOES header should be 0");
+static_assert(offsetof(EnableiOES, target) == 4,
+ "offset of EnableiOES target should be 4");
+static_assert(offsetof(EnableiOES, index) == 8,
+ "offset of EnableiOES index should be 8");
+
+struct DisableiOES {
+ typedef DisableiOES ValueType;
+ static const CommandId kCmdId = kDisableiOES;
+ 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(GLenum _target, GLuint _index) {
+ SetHeader();
+ target = _target;
+ index = _index;
+ }
+
+ void* Set(void* cmd, GLenum _target, GLuint _index) {
+ static_cast<ValueType*>(cmd)->Init(_target, _index);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ uint32_t index;
+};
+
+static_assert(sizeof(DisableiOES) == 12, "size of DisableiOES should be 12");
+static_assert(offsetof(DisableiOES, header) == 0,
+ "offset of DisableiOES header should be 0");
+static_assert(offsetof(DisableiOES, target) == 4,
+ "offset of DisableiOES target should be 4");
+static_assert(offsetof(DisableiOES, index) == 8,
+ "offset of DisableiOES index should be 8");
+
+struct BlendEquationiOES {
+ typedef BlendEquationiOES ValueType;
+ static const CommandId kCmdId = kBlendEquationiOES;
+ 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(GLuint _buf, GLenum _mode) {
+ SetHeader();
+ buf = _buf;
+ mode = _mode;
+ }
+
+ void* Set(void* cmd, GLuint _buf, GLenum _mode) {
+ static_cast<ValueType*>(cmd)->Init(_buf, _mode);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buf;
+ uint32_t mode;
+};
+
+static_assert(sizeof(BlendEquationiOES) == 12,
+ "size of BlendEquationiOES should be 12");
+static_assert(offsetof(BlendEquationiOES, header) == 0,
+ "offset of BlendEquationiOES header should be 0");
+static_assert(offsetof(BlendEquationiOES, buf) == 4,
+ "offset of BlendEquationiOES buf should be 4");
+static_assert(offsetof(BlendEquationiOES, mode) == 8,
+ "offset of BlendEquationiOES mode should be 8");
+
+struct BlendEquationSeparateiOES {
+ typedef BlendEquationSeparateiOES ValueType;
+ static const CommandId kCmdId = kBlendEquationSeparateiOES;
+ 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(GLuint _buf, GLenum _modeRGB, GLenum _modeAlpha) {
+ SetHeader();
+ buf = _buf;
+ modeRGB = _modeRGB;
+ modeAlpha = _modeAlpha;
+ }
+
+ void* Set(void* cmd, GLuint _buf, GLenum _modeRGB, GLenum _modeAlpha) {
+ static_cast<ValueType*>(cmd)->Init(_buf, _modeRGB, _modeAlpha);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buf;
+ uint32_t modeRGB;
+ uint32_t modeAlpha;
+};
+
+static_assert(sizeof(BlendEquationSeparateiOES) == 16,
+ "size of BlendEquationSeparateiOES should be 16");
+static_assert(offsetof(BlendEquationSeparateiOES, header) == 0,
+ "offset of BlendEquationSeparateiOES header should be 0");
+static_assert(offsetof(BlendEquationSeparateiOES, buf) == 4,
+ "offset of BlendEquationSeparateiOES buf should be 4");
+static_assert(offsetof(BlendEquationSeparateiOES, modeRGB) == 8,
+ "offset of BlendEquationSeparateiOES modeRGB should be 8");
+static_assert(offsetof(BlendEquationSeparateiOES, modeAlpha) == 12,
+ "offset of BlendEquationSeparateiOES modeAlpha should be 12");
+
+struct BlendFunciOES {
+ typedef BlendFunciOES ValueType;
+ static const CommandId kCmdId = kBlendFunciOES;
+ 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(GLuint _buf, GLenum _src, GLenum _dst) {
+ SetHeader();
+ buf = _buf;
+ src = _src;
+ dst = _dst;
+ }
+
+ void* Set(void* cmd, GLuint _buf, GLenum _src, GLenum _dst) {
+ static_cast<ValueType*>(cmd)->Init(_buf, _src, _dst);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buf;
+ uint32_t src;
+ uint32_t dst;
+};
+
+static_assert(sizeof(BlendFunciOES) == 16,
+ "size of BlendFunciOES should be 16");
+static_assert(offsetof(BlendFunciOES, header) == 0,
+ "offset of BlendFunciOES header should be 0");
+static_assert(offsetof(BlendFunciOES, buf) == 4,
+ "offset of BlendFunciOES buf should be 4");
+static_assert(offsetof(BlendFunciOES, src) == 8,
+ "offset of BlendFunciOES src should be 8");
+static_assert(offsetof(BlendFunciOES, dst) == 12,
+ "offset of BlendFunciOES dst should be 12");
+
+struct BlendFuncSeparateiOES {
+ typedef BlendFuncSeparateiOES ValueType;
+ static const CommandId kCmdId = kBlendFuncSeparateiOES;
+ 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(GLuint _buf,
+ GLenum _srcRGB,
+ GLenum _dstRGB,
+ GLenum _srcAlpha,
+ GLenum _dstAlpha) {
+ SetHeader();
+ buf = _buf;
+ srcRGB = _srcRGB;
+ dstRGB = _dstRGB;
+ srcAlpha = _srcAlpha;
+ dstAlpha = _dstAlpha;
+ }
+
+ void* Set(void* cmd,
+ GLuint _buf,
+ GLenum _srcRGB,
+ GLenum _dstRGB,
+ GLenum _srcAlpha,
+ GLenum _dstAlpha) {
+ static_cast<ValueType*>(cmd)->Init(_buf, _srcRGB, _dstRGB, _srcAlpha,
+ _dstAlpha);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buf;
+ uint32_t srcRGB;
+ uint32_t dstRGB;
+ uint32_t srcAlpha;
+ uint32_t dstAlpha;
+};
+
+static_assert(sizeof(BlendFuncSeparateiOES) == 24,
+ "size of BlendFuncSeparateiOES should be 24");
+static_assert(offsetof(BlendFuncSeparateiOES, header) == 0,
+ "offset of BlendFuncSeparateiOES header should be 0");
+static_assert(offsetof(BlendFuncSeparateiOES, buf) == 4,
+ "offset of BlendFuncSeparateiOES buf should be 4");
+static_assert(offsetof(BlendFuncSeparateiOES, srcRGB) == 8,
+ "offset of BlendFuncSeparateiOES srcRGB should be 8");
+static_assert(offsetof(BlendFuncSeparateiOES, dstRGB) == 12,
+ "offset of BlendFuncSeparateiOES dstRGB should be 12");
+static_assert(offsetof(BlendFuncSeparateiOES, srcAlpha) == 16,
+ "offset of BlendFuncSeparateiOES srcAlpha should be 16");
+static_assert(offsetof(BlendFuncSeparateiOES, dstAlpha) == 20,
+ "offset of BlendFuncSeparateiOES dstAlpha should be 20");
+
+struct ColorMaskiOES {
+ typedef ColorMaskiOES ValueType;
+ static const CommandId kCmdId = kColorMaskiOES;
+ 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(GLuint _buf,
+ GLboolean _r,
+ GLboolean _g,
+ GLboolean _b,
+ GLboolean _a) {
+ SetHeader();
+ buf = _buf;
+ r = _r;
+ g = _g;
+ b = _b;
+ a = _a;
+ }
+
+ void* Set(void* cmd,
+ GLuint _buf,
+ GLboolean _r,
+ GLboolean _g,
+ GLboolean _b,
+ GLboolean _a) {
+ static_cast<ValueType*>(cmd)->Init(_buf, _r, _g, _b, _a);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buf;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+};
+
+static_assert(sizeof(ColorMaskiOES) == 24,
+ "size of ColorMaskiOES should be 24");
+static_assert(offsetof(ColorMaskiOES, header) == 0,
+ "offset of ColorMaskiOES header should be 0");
+static_assert(offsetof(ColorMaskiOES, buf) == 4,
+ "offset of ColorMaskiOES buf should be 4");
+static_assert(offsetof(ColorMaskiOES, r) == 8,
+ "offset of ColorMaskiOES r should be 8");
+static_assert(offsetof(ColorMaskiOES, g) == 12,
+ "offset of ColorMaskiOES g should be 12");
+static_assert(offsetof(ColorMaskiOES, b) == 16,
+ "offset of ColorMaskiOES b should be 16");
+static_assert(offsetof(ColorMaskiOES, a) == 20,
+ "offset of ColorMaskiOES a should be 20");
+
+struct IsEnablediOES {
+ typedef IsEnablediOES ValueType;
+ static const CommandId kCmdId = kIsEnablediOES;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ typedef uint32_t Result;
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLenum _target,
+ GLuint _index,
+ uint32_t _result_shm_id,
+ uint32_t _result_shm_offset) {
+ SetHeader();
+ target = _target;
+ index = _index;
+ result_shm_id = _result_shm_id;
+ result_shm_offset = _result_shm_offset;
+ }
+
+ void* Set(void* cmd,
+ GLenum _target,
+ GLuint _index,
+ uint32_t _result_shm_id,
+ uint32_t _result_shm_offset) {
+ static_cast<ValueType*>(cmd)->Init(_target, _index, _result_shm_id,
+ _result_shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ uint32_t index;
+ uint32_t result_shm_id;
+ uint32_t result_shm_offset;
+};
+
+static_assert(sizeof(IsEnablediOES) == 20,
+ "size of IsEnablediOES should be 20");
+static_assert(offsetof(IsEnablediOES, header) == 0,
+ "offset of IsEnablediOES header should be 0");
+static_assert(offsetof(IsEnablediOES, target) == 4,
+ "offset of IsEnablediOES target should be 4");
+static_assert(offsetof(IsEnablediOES, index) == 8,
+ "offset of IsEnablediOES index should be 8");
+static_assert(offsetof(IsEnablediOES, result_shm_id) == 12,
+ "offset of IsEnablediOES result_shm_id should be 12");
+static_assert(offsetof(IsEnablediOES, result_shm_offset) == 16,
+ "offset of IsEnablediOES result_shm_offset should be 16");
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/chromium/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 791783b0664..a07cf3607ae 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -1327,6 +1327,21 @@ TEST_F(GLES2FormatTest, GetBooleanv) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, GetBooleani_v) {
+ cmds::GetBooleani_v& cmd = *GetBufferAs<cmds::GetBooleani_v>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12),
+ static_cast<uint32_t>(13), static_cast<uint32_t>(14));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::GetBooleani_v::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.pname);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.index);
+ EXPECT_EQ(static_cast<uint32_t>(13), cmd.data_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(14), cmd.data_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, GetBufferParameteri64v) {
cmds::GetBufferParameteri64v& cmd =
*GetBufferAs<cmds::GetBufferParameteri64v>();
@@ -5558,4 +5573,116 @@ TEST_F(GLES2FormatTest, EndBatchReadAccessSharedImageCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, EnableiOES) {
+ cmds::EnableiOES& cmd = *GetBufferAs<cmds::EnableiOES>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::EnableiOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.index);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, DisableiOES) {
+ cmds::DisableiOES& cmd = *GetBufferAs<cmds::DisableiOES>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::DisableiOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.index);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, BlendEquationiOES) {
+ cmds::BlendEquationiOES& cmd = *GetBufferAs<cmds::BlendEquationiOES>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLenum>(12));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::BlendEquationiOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.buf);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.mode);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, BlendEquationSeparateiOES) {
+ cmds::BlendEquationSeparateiOES& cmd =
+ *GetBufferAs<cmds::BlendEquationSeparateiOES>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
+ static_cast<GLenum>(12), static_cast<GLenum>(13));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::BlendEquationSeparateiOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.buf);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.modeRGB);
+ EXPECT_EQ(static_cast<GLenum>(13), cmd.modeAlpha);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, BlendFunciOES) {
+ cmds::BlendFunciOES& cmd = *GetBufferAs<cmds::BlendFunciOES>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
+ static_cast<GLenum>(12), static_cast<GLenum>(13));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::BlendFunciOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.buf);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.src);
+ EXPECT_EQ(static_cast<GLenum>(13), cmd.dst);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, BlendFuncSeparateiOES) {
+ cmds::BlendFuncSeparateiOES& cmd =
+ *GetBufferAs<cmds::BlendFuncSeparateiOES>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
+ static_cast<GLenum>(12), static_cast<GLenum>(13),
+ static_cast<GLenum>(14), static_cast<GLenum>(15));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::BlendFuncSeparateiOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.buf);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.srcRGB);
+ EXPECT_EQ(static_cast<GLenum>(13), cmd.dstRGB);
+ EXPECT_EQ(static_cast<GLenum>(14), cmd.srcAlpha);
+ EXPECT_EQ(static_cast<GLenum>(15), cmd.dstAlpha);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, ColorMaskiOES) {
+ cmds::ColorMaskiOES& cmd = *GetBufferAs<cmds::ColorMaskiOES>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLboolean>(12),
+ static_cast<GLboolean>(13), static_cast<GLboolean>(14),
+ static_cast<GLboolean>(15));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::ColorMaskiOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.buf);
+ EXPECT_EQ(static_cast<GLboolean>(12), cmd.r);
+ EXPECT_EQ(static_cast<GLboolean>(13), cmd.g);
+ EXPECT_EQ(static_cast<GLboolean>(14), cmd.b);
+ EXPECT_EQ(static_cast<GLboolean>(15), cmd.a);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, IsEnablediOES) {
+ cmds::IsEnablediOES& cmd = *GetBufferAs<cmds::IsEnablediOES>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12),
+ static_cast<uint32_t>(13), static_cast<uint32_t>(14));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::IsEnablediOES::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.index);
+ EXPECT_EQ(static_cast<uint32_t>(13), cmd.result_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(14), cmd.result_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/chromium/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index 5ed67e6e384..5d2242b00d5 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -98,255 +98,264 @@
OP(GetAttachedShaders) /* 339 */ \
OP(GetAttribLocation) /* 340 */ \
OP(GetBooleanv) /* 341 */ \
- OP(GetBufferParameteri64v) /* 342 */ \
- OP(GetBufferParameteriv) /* 343 */ \
- OP(GetError) /* 344 */ \
- OP(GetFloatv) /* 345 */ \
- OP(GetFragDataLocation) /* 346 */ \
- OP(GetFramebufferAttachmentParameteriv) /* 347 */ \
- OP(GetInteger64v) /* 348 */ \
- OP(GetIntegeri_v) /* 349 */ \
- OP(GetInteger64i_v) /* 350 */ \
- OP(GetIntegerv) /* 351 */ \
- OP(GetInternalformativ) /* 352 */ \
- OP(GetProgramiv) /* 353 */ \
- OP(GetProgramInfoLog) /* 354 */ \
- OP(GetRenderbufferParameteriv) /* 355 */ \
- OP(GetSamplerParameterfv) /* 356 */ \
- OP(GetSamplerParameteriv) /* 357 */ \
- OP(GetShaderiv) /* 358 */ \
- OP(GetShaderInfoLog) /* 359 */ \
- OP(GetShaderPrecisionFormat) /* 360 */ \
- OP(GetShaderSource) /* 361 */ \
- OP(GetString) /* 362 */ \
- OP(GetSynciv) /* 363 */ \
- OP(GetTexParameterfv) /* 364 */ \
- OP(GetTexParameteriv) /* 365 */ \
- OP(GetTransformFeedbackVarying) /* 366 */ \
- OP(GetUniformBlockIndex) /* 367 */ \
- OP(GetUniformfv) /* 368 */ \
- OP(GetUniformiv) /* 369 */ \
- OP(GetUniformuiv) /* 370 */ \
- OP(GetUniformIndices) /* 371 */ \
- OP(GetUniformLocation) /* 372 */ \
- OP(GetVertexAttribfv) /* 373 */ \
- OP(GetVertexAttribiv) /* 374 */ \
- OP(GetVertexAttribIiv) /* 375 */ \
- OP(GetVertexAttribIuiv) /* 376 */ \
- OP(GetVertexAttribPointerv) /* 377 */ \
- OP(Hint) /* 378 */ \
- OP(InvalidateFramebufferImmediate) /* 379 */ \
- OP(InvalidateSubFramebufferImmediate) /* 380 */ \
- OP(IsBuffer) /* 381 */ \
- OP(IsEnabled) /* 382 */ \
- OP(IsFramebuffer) /* 383 */ \
- OP(IsProgram) /* 384 */ \
- OP(IsRenderbuffer) /* 385 */ \
- OP(IsSampler) /* 386 */ \
- OP(IsShader) /* 387 */ \
- OP(IsSync) /* 388 */ \
- OP(IsTexture) /* 389 */ \
- OP(IsTransformFeedback) /* 390 */ \
- OP(LineWidth) /* 391 */ \
- OP(LinkProgram) /* 392 */ \
- OP(PauseTransformFeedback) /* 393 */ \
- OP(PixelStorei) /* 394 */ \
- OP(PolygonOffset) /* 395 */ \
- OP(ReadBuffer) /* 396 */ \
- OP(ReadPixels) /* 397 */ \
- OP(ReleaseShaderCompiler) /* 398 */ \
- OP(RenderbufferStorage) /* 399 */ \
- OP(ResumeTransformFeedback) /* 400 */ \
- OP(SampleCoverage) /* 401 */ \
- OP(SamplerParameterf) /* 402 */ \
- OP(SamplerParameterfvImmediate) /* 403 */ \
- OP(SamplerParameteri) /* 404 */ \
- OP(SamplerParameterivImmediate) /* 405 */ \
- OP(Scissor) /* 406 */ \
- OP(ShaderBinary) /* 407 */ \
- OP(ShaderSourceBucket) /* 408 */ \
- OP(MultiDrawBeginCHROMIUM) /* 409 */ \
- OP(MultiDrawEndCHROMIUM) /* 410 */ \
- OP(MultiDrawArraysCHROMIUM) /* 411 */ \
- OP(MultiDrawArraysInstancedCHROMIUM) /* 412 */ \
- OP(MultiDrawArraysInstancedBaseInstanceCHROMIUM) /* 413 */ \
- OP(MultiDrawElementsCHROMIUM) /* 414 */ \
- OP(MultiDrawElementsInstancedCHROMIUM) /* 415 */ \
- OP(MultiDrawElementsInstancedBaseVertexBaseInstanceCHROMIUM) /* 416 */ \
- OP(StencilFunc) /* 417 */ \
- OP(StencilFuncSeparate) /* 418 */ \
- OP(StencilMask) /* 419 */ \
- OP(StencilMaskSeparate) /* 420 */ \
- OP(StencilOp) /* 421 */ \
- OP(StencilOpSeparate) /* 422 */ \
- OP(TexImage2D) /* 423 */ \
- OP(TexImage3D) /* 424 */ \
- OP(TexParameterf) /* 425 */ \
- OP(TexParameterfvImmediate) /* 426 */ \
- OP(TexParameteri) /* 427 */ \
- OP(TexParameterivImmediate) /* 428 */ \
- OP(TexStorage3D) /* 429 */ \
- OP(TexSubImage2D) /* 430 */ \
- OP(TexSubImage3D) /* 431 */ \
- OP(TransformFeedbackVaryingsBucket) /* 432 */ \
- OP(Uniform1f) /* 433 */ \
- OP(Uniform1fvImmediate) /* 434 */ \
- OP(Uniform1i) /* 435 */ \
- OP(Uniform1ivImmediate) /* 436 */ \
- OP(Uniform1ui) /* 437 */ \
- OP(Uniform1uivImmediate) /* 438 */ \
- OP(Uniform2f) /* 439 */ \
- OP(Uniform2fvImmediate) /* 440 */ \
- OP(Uniform2i) /* 441 */ \
- OP(Uniform2ivImmediate) /* 442 */ \
- OP(Uniform2ui) /* 443 */ \
- OP(Uniform2uivImmediate) /* 444 */ \
- OP(Uniform3f) /* 445 */ \
- OP(Uniform3fvImmediate) /* 446 */ \
- OP(Uniform3i) /* 447 */ \
- OP(Uniform3ivImmediate) /* 448 */ \
- OP(Uniform3ui) /* 449 */ \
- OP(Uniform3uivImmediate) /* 450 */ \
- OP(Uniform4f) /* 451 */ \
- OP(Uniform4fvImmediate) /* 452 */ \
- OP(Uniform4i) /* 453 */ \
- OP(Uniform4ivImmediate) /* 454 */ \
- OP(Uniform4ui) /* 455 */ \
- OP(Uniform4uivImmediate) /* 456 */ \
- OP(UniformBlockBinding) /* 457 */ \
- OP(UniformMatrix2fvImmediate) /* 458 */ \
- OP(UniformMatrix2x3fvImmediate) /* 459 */ \
- OP(UniformMatrix2x4fvImmediate) /* 460 */ \
- OP(UniformMatrix3fvImmediate) /* 461 */ \
- OP(UniformMatrix3x2fvImmediate) /* 462 */ \
- OP(UniformMatrix3x4fvImmediate) /* 463 */ \
- OP(UniformMatrix4fvImmediate) /* 464 */ \
- OP(UniformMatrix4x2fvImmediate) /* 465 */ \
- OP(UniformMatrix4x3fvImmediate) /* 466 */ \
- OP(UseProgram) /* 467 */ \
- OP(ValidateProgram) /* 468 */ \
- OP(VertexAttrib1f) /* 469 */ \
- OP(VertexAttrib1fvImmediate) /* 470 */ \
- OP(VertexAttrib2f) /* 471 */ \
- OP(VertexAttrib2fvImmediate) /* 472 */ \
- OP(VertexAttrib3f) /* 473 */ \
- OP(VertexAttrib3fvImmediate) /* 474 */ \
- OP(VertexAttrib4f) /* 475 */ \
- OP(VertexAttrib4fvImmediate) /* 476 */ \
- OP(VertexAttribI4i) /* 477 */ \
- OP(VertexAttribI4ivImmediate) /* 478 */ \
- OP(VertexAttribI4ui) /* 479 */ \
- OP(VertexAttribI4uivImmediate) /* 480 */ \
- OP(VertexAttribIPointer) /* 481 */ \
- OP(VertexAttribPointer) /* 482 */ \
- OP(Viewport) /* 483 */ \
- OP(WaitSync) /* 484 */ \
- OP(BlitFramebufferCHROMIUM) /* 485 */ \
- OP(RenderbufferStorageMultisampleCHROMIUM) /* 486 */ \
- OP(RenderbufferStorageMultisampleAdvancedAMD) /* 487 */ \
- OP(RenderbufferStorageMultisampleEXT) /* 488 */ \
- OP(FramebufferTexture2DMultisampleEXT) /* 489 */ \
- OP(TexStorage2DEXT) /* 490 */ \
- OP(GenQueriesEXTImmediate) /* 491 */ \
- OP(DeleteQueriesEXTImmediate) /* 492 */ \
- OP(QueryCounterEXT) /* 493 */ \
- OP(BeginQueryEXT) /* 494 */ \
- OP(BeginTransformFeedback) /* 495 */ \
- OP(EndQueryEXT) /* 496 */ \
- OP(EndTransformFeedback) /* 497 */ \
- OP(SetDisjointValueSyncCHROMIUM) /* 498 */ \
- OP(InsertEventMarkerEXT) /* 499 */ \
- OP(PushGroupMarkerEXT) /* 500 */ \
- OP(PopGroupMarkerEXT) /* 501 */ \
- OP(GenVertexArraysOESImmediate) /* 502 */ \
- OP(DeleteVertexArraysOESImmediate) /* 503 */ \
- OP(IsVertexArrayOES) /* 504 */ \
- OP(BindVertexArrayOES) /* 505 */ \
- OP(FramebufferParameteri) /* 506 */ \
- OP(BindImageTexture) /* 507 */ \
- OP(DispatchCompute) /* 508 */ \
- OP(DispatchComputeIndirect) /* 509 */ \
- OP(DrawArraysIndirect) /* 510 */ \
- OP(DrawElementsIndirect) /* 511 */ \
- OP(GetProgramInterfaceiv) /* 512 */ \
- OP(GetProgramResourceIndex) /* 513 */ \
- OP(GetProgramResourceName) /* 514 */ \
- OP(GetProgramResourceiv) /* 515 */ \
- OP(GetProgramResourceLocation) /* 516 */ \
- OP(MemoryBarrierEXT) /* 517 */ \
- OP(MemoryBarrierByRegion) /* 518 */ \
- OP(SwapBuffers) /* 519 */ \
- OP(GetMaxValueInBufferCHROMIUM) /* 520 */ \
- OP(EnableFeatureCHROMIUM) /* 521 */ \
- OP(MapBufferRange) /* 522 */ \
- OP(UnmapBuffer) /* 523 */ \
- OP(FlushMappedBufferRange) /* 524 */ \
- OP(ResizeCHROMIUM) /* 525 */ \
- OP(GetRequestableExtensionsCHROMIUM) /* 526 */ \
- OP(RequestExtensionCHROMIUM) /* 527 */ \
- OP(GetProgramInfoCHROMIUM) /* 528 */ \
- OP(GetUniformBlocksCHROMIUM) /* 529 */ \
- OP(GetTransformFeedbackVaryingsCHROMIUM) /* 530 */ \
- OP(GetUniformsES3CHROMIUM) /* 531 */ \
- OP(DescheduleUntilFinishedCHROMIUM) /* 532 */ \
- OP(GetTranslatedShaderSourceANGLE) /* 533 */ \
- OP(PostSubBufferCHROMIUM) /* 534 */ \
- OP(CopyTextureCHROMIUM) /* 535 */ \
- OP(CopySubTextureCHROMIUM) /* 536 */ \
- OP(DrawArraysInstancedANGLE) /* 537 */ \
- OP(DrawArraysInstancedBaseInstanceANGLE) /* 538 */ \
- OP(DrawElementsInstancedANGLE) /* 539 */ \
- OP(DrawElementsInstancedBaseVertexBaseInstanceANGLE) /* 540 */ \
- OP(VertexAttribDivisorANGLE) /* 541 */ \
- OP(ProduceTextureDirectCHROMIUMImmediate) /* 542 */ \
- OP(CreateAndConsumeTextureINTERNALImmediate) /* 543 */ \
- OP(BindUniformLocationCHROMIUMBucket) /* 544 */ \
- OP(BindTexImage2DCHROMIUM) /* 545 */ \
- OP(BindTexImage2DWithInternalformatCHROMIUM) /* 546 */ \
- OP(ReleaseTexImage2DCHROMIUM) /* 547 */ \
- OP(TraceBeginCHROMIUM) /* 548 */ \
- OP(TraceEndCHROMIUM) /* 549 */ \
- OP(DiscardFramebufferEXTImmediate) /* 550 */ \
- OP(LoseContextCHROMIUM) /* 551 */ \
- OP(UnpremultiplyAndDitherCopyCHROMIUM) /* 552 */ \
- OP(DrawBuffersEXTImmediate) /* 553 */ \
- OP(DiscardBackbufferCHROMIUM) /* 554 */ \
- OP(ScheduleOverlayPlaneCHROMIUM) /* 555 */ \
- OP(ScheduleCALayerSharedStateCHROMIUM) /* 556 */ \
- OP(ScheduleCALayerCHROMIUM) /* 557 */ \
- OP(ScheduleCALayerInUseQueryCHROMIUMImmediate) /* 558 */ \
- OP(CommitOverlayPlanesCHROMIUM) /* 559 */ \
- OP(FlushDriverCachesCHROMIUM) /* 560 */ \
- OP(ScheduleDCLayerCHROMIUM) /* 561 */ \
- OP(SetActiveURLCHROMIUM) /* 562 */ \
- OP(ContextVisibilityHintCHROMIUM) /* 563 */ \
- OP(CoverageModulationCHROMIUM) /* 564 */ \
- OP(BlendBarrierKHR) /* 565 */ \
- OP(BindFragDataLocationIndexedEXTBucket) /* 566 */ \
- OP(BindFragDataLocationEXTBucket) /* 567 */ \
- OP(GetFragDataIndexEXT) /* 568 */ \
- OP(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) /* 569 */ \
- OP(OverlayPromotionHintCHROMIUM) /* 570 */ \
- OP(SwapBuffersWithBoundsCHROMIUMImmediate) /* 571 */ \
- OP(SetDrawRectangleCHROMIUM) /* 572 */ \
- OP(SetEnableDCLayersCHROMIUM) /* 573 */ \
- OP(InitializeDiscardableTextureCHROMIUM) /* 574 */ \
- OP(UnlockDiscardableTextureCHROMIUM) /* 575 */ \
- OP(LockDiscardableTextureCHROMIUM) /* 576 */ \
- OP(TexStorage2DImageCHROMIUM) /* 577 */ \
- OP(SetColorSpaceMetadataCHROMIUM) /* 578 */ \
- OP(WindowRectanglesEXTImmediate) /* 579 */ \
- OP(CreateGpuFenceINTERNAL) /* 580 */ \
- OP(WaitGpuFenceCHROMIUM) /* 581 */ \
- OP(DestroyGpuFenceCHROMIUM) /* 582 */ \
- OP(SetReadbackBufferShadowAllocationINTERNAL) /* 583 */ \
- OP(FramebufferTextureMultiviewOVR) /* 584 */ \
- OP(MaxShaderCompilerThreadsKHR) /* 585 */ \
- OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 586 */ \
- OP(BeginSharedImageAccessDirectCHROMIUM) /* 587 */ \
- OP(EndSharedImageAccessDirectCHROMIUM) /* 588 */ \
- OP(BeginBatchReadAccessSharedImageCHROMIUM) /* 589 */ \
- OP(EndBatchReadAccessSharedImageCHROMIUM) /* 590 */
+ OP(GetBooleani_v) /* 342 */ \
+ OP(GetBufferParameteri64v) /* 343 */ \
+ OP(GetBufferParameteriv) /* 344 */ \
+ OP(GetError) /* 345 */ \
+ OP(GetFloatv) /* 346 */ \
+ OP(GetFragDataLocation) /* 347 */ \
+ OP(GetFramebufferAttachmentParameteriv) /* 348 */ \
+ OP(GetInteger64v) /* 349 */ \
+ OP(GetIntegeri_v) /* 350 */ \
+ OP(GetInteger64i_v) /* 351 */ \
+ OP(GetIntegerv) /* 352 */ \
+ OP(GetInternalformativ) /* 353 */ \
+ OP(GetProgramiv) /* 354 */ \
+ OP(GetProgramInfoLog) /* 355 */ \
+ OP(GetRenderbufferParameteriv) /* 356 */ \
+ OP(GetSamplerParameterfv) /* 357 */ \
+ OP(GetSamplerParameteriv) /* 358 */ \
+ OP(GetShaderiv) /* 359 */ \
+ OP(GetShaderInfoLog) /* 360 */ \
+ OP(GetShaderPrecisionFormat) /* 361 */ \
+ OP(GetShaderSource) /* 362 */ \
+ OP(GetString) /* 363 */ \
+ OP(GetSynciv) /* 364 */ \
+ OP(GetTexParameterfv) /* 365 */ \
+ OP(GetTexParameteriv) /* 366 */ \
+ OP(GetTransformFeedbackVarying) /* 367 */ \
+ OP(GetUniformBlockIndex) /* 368 */ \
+ OP(GetUniformfv) /* 369 */ \
+ OP(GetUniformiv) /* 370 */ \
+ OP(GetUniformuiv) /* 371 */ \
+ OP(GetUniformIndices) /* 372 */ \
+ OP(GetUniformLocation) /* 373 */ \
+ OP(GetVertexAttribfv) /* 374 */ \
+ OP(GetVertexAttribiv) /* 375 */ \
+ OP(GetVertexAttribIiv) /* 376 */ \
+ OP(GetVertexAttribIuiv) /* 377 */ \
+ OP(GetVertexAttribPointerv) /* 378 */ \
+ OP(Hint) /* 379 */ \
+ OP(InvalidateFramebufferImmediate) /* 380 */ \
+ OP(InvalidateSubFramebufferImmediate) /* 381 */ \
+ OP(IsBuffer) /* 382 */ \
+ OP(IsEnabled) /* 383 */ \
+ OP(IsFramebuffer) /* 384 */ \
+ OP(IsProgram) /* 385 */ \
+ OP(IsRenderbuffer) /* 386 */ \
+ OP(IsSampler) /* 387 */ \
+ OP(IsShader) /* 388 */ \
+ OP(IsSync) /* 389 */ \
+ OP(IsTexture) /* 390 */ \
+ OP(IsTransformFeedback) /* 391 */ \
+ OP(LineWidth) /* 392 */ \
+ OP(LinkProgram) /* 393 */ \
+ OP(PauseTransformFeedback) /* 394 */ \
+ OP(PixelStorei) /* 395 */ \
+ OP(PolygonOffset) /* 396 */ \
+ OP(ReadBuffer) /* 397 */ \
+ OP(ReadPixels) /* 398 */ \
+ OP(ReleaseShaderCompiler) /* 399 */ \
+ OP(RenderbufferStorage) /* 400 */ \
+ OP(ResumeTransformFeedback) /* 401 */ \
+ OP(SampleCoverage) /* 402 */ \
+ OP(SamplerParameterf) /* 403 */ \
+ OP(SamplerParameterfvImmediate) /* 404 */ \
+ OP(SamplerParameteri) /* 405 */ \
+ OP(SamplerParameterivImmediate) /* 406 */ \
+ OP(Scissor) /* 407 */ \
+ OP(ShaderBinary) /* 408 */ \
+ OP(ShaderSourceBucket) /* 409 */ \
+ OP(MultiDrawBeginCHROMIUM) /* 410 */ \
+ OP(MultiDrawEndCHROMIUM) /* 411 */ \
+ OP(MultiDrawArraysCHROMIUM) /* 412 */ \
+ OP(MultiDrawArraysInstancedCHROMIUM) /* 413 */ \
+ OP(MultiDrawArraysInstancedBaseInstanceCHROMIUM) /* 414 */ \
+ OP(MultiDrawElementsCHROMIUM) /* 415 */ \
+ OP(MultiDrawElementsInstancedCHROMIUM) /* 416 */ \
+ OP(MultiDrawElementsInstancedBaseVertexBaseInstanceCHROMIUM) /* 417 */ \
+ OP(StencilFunc) /* 418 */ \
+ OP(StencilFuncSeparate) /* 419 */ \
+ OP(StencilMask) /* 420 */ \
+ OP(StencilMaskSeparate) /* 421 */ \
+ OP(StencilOp) /* 422 */ \
+ OP(StencilOpSeparate) /* 423 */ \
+ OP(TexImage2D) /* 424 */ \
+ OP(TexImage3D) /* 425 */ \
+ OP(TexParameterf) /* 426 */ \
+ OP(TexParameterfvImmediate) /* 427 */ \
+ OP(TexParameteri) /* 428 */ \
+ OP(TexParameterivImmediate) /* 429 */ \
+ OP(TexStorage3D) /* 430 */ \
+ OP(TexSubImage2D) /* 431 */ \
+ OP(TexSubImage3D) /* 432 */ \
+ OP(TransformFeedbackVaryingsBucket) /* 433 */ \
+ OP(Uniform1f) /* 434 */ \
+ OP(Uniform1fvImmediate) /* 435 */ \
+ OP(Uniform1i) /* 436 */ \
+ OP(Uniform1ivImmediate) /* 437 */ \
+ OP(Uniform1ui) /* 438 */ \
+ OP(Uniform1uivImmediate) /* 439 */ \
+ OP(Uniform2f) /* 440 */ \
+ OP(Uniform2fvImmediate) /* 441 */ \
+ OP(Uniform2i) /* 442 */ \
+ OP(Uniform2ivImmediate) /* 443 */ \
+ OP(Uniform2ui) /* 444 */ \
+ OP(Uniform2uivImmediate) /* 445 */ \
+ OP(Uniform3f) /* 446 */ \
+ OP(Uniform3fvImmediate) /* 447 */ \
+ OP(Uniform3i) /* 448 */ \
+ OP(Uniform3ivImmediate) /* 449 */ \
+ OP(Uniform3ui) /* 450 */ \
+ OP(Uniform3uivImmediate) /* 451 */ \
+ OP(Uniform4f) /* 452 */ \
+ OP(Uniform4fvImmediate) /* 453 */ \
+ OP(Uniform4i) /* 454 */ \
+ OP(Uniform4ivImmediate) /* 455 */ \
+ OP(Uniform4ui) /* 456 */ \
+ OP(Uniform4uivImmediate) /* 457 */ \
+ OP(UniformBlockBinding) /* 458 */ \
+ OP(UniformMatrix2fvImmediate) /* 459 */ \
+ OP(UniformMatrix2x3fvImmediate) /* 460 */ \
+ OP(UniformMatrix2x4fvImmediate) /* 461 */ \
+ OP(UniformMatrix3fvImmediate) /* 462 */ \
+ OP(UniformMatrix3x2fvImmediate) /* 463 */ \
+ OP(UniformMatrix3x4fvImmediate) /* 464 */ \
+ OP(UniformMatrix4fvImmediate) /* 465 */ \
+ OP(UniformMatrix4x2fvImmediate) /* 466 */ \
+ OP(UniformMatrix4x3fvImmediate) /* 467 */ \
+ OP(UseProgram) /* 468 */ \
+ OP(ValidateProgram) /* 469 */ \
+ OP(VertexAttrib1f) /* 470 */ \
+ OP(VertexAttrib1fvImmediate) /* 471 */ \
+ OP(VertexAttrib2f) /* 472 */ \
+ OP(VertexAttrib2fvImmediate) /* 473 */ \
+ OP(VertexAttrib3f) /* 474 */ \
+ OP(VertexAttrib3fvImmediate) /* 475 */ \
+ OP(VertexAttrib4f) /* 476 */ \
+ OP(VertexAttrib4fvImmediate) /* 477 */ \
+ OP(VertexAttribI4i) /* 478 */ \
+ OP(VertexAttribI4ivImmediate) /* 479 */ \
+ OP(VertexAttribI4ui) /* 480 */ \
+ OP(VertexAttribI4uivImmediate) /* 481 */ \
+ OP(VertexAttribIPointer) /* 482 */ \
+ OP(VertexAttribPointer) /* 483 */ \
+ OP(Viewport) /* 484 */ \
+ OP(WaitSync) /* 485 */ \
+ OP(BlitFramebufferCHROMIUM) /* 486 */ \
+ OP(RenderbufferStorageMultisampleCHROMIUM) /* 487 */ \
+ OP(RenderbufferStorageMultisampleAdvancedAMD) /* 488 */ \
+ OP(RenderbufferStorageMultisampleEXT) /* 489 */ \
+ OP(FramebufferTexture2DMultisampleEXT) /* 490 */ \
+ OP(TexStorage2DEXT) /* 491 */ \
+ OP(GenQueriesEXTImmediate) /* 492 */ \
+ OP(DeleteQueriesEXTImmediate) /* 493 */ \
+ OP(QueryCounterEXT) /* 494 */ \
+ OP(BeginQueryEXT) /* 495 */ \
+ OP(BeginTransformFeedback) /* 496 */ \
+ OP(EndQueryEXT) /* 497 */ \
+ OP(EndTransformFeedback) /* 498 */ \
+ OP(SetDisjointValueSyncCHROMIUM) /* 499 */ \
+ OP(InsertEventMarkerEXT) /* 500 */ \
+ OP(PushGroupMarkerEXT) /* 501 */ \
+ OP(PopGroupMarkerEXT) /* 502 */ \
+ OP(GenVertexArraysOESImmediate) /* 503 */ \
+ OP(DeleteVertexArraysOESImmediate) /* 504 */ \
+ OP(IsVertexArrayOES) /* 505 */ \
+ OP(BindVertexArrayOES) /* 506 */ \
+ OP(FramebufferParameteri) /* 507 */ \
+ OP(BindImageTexture) /* 508 */ \
+ OP(DispatchCompute) /* 509 */ \
+ OP(DispatchComputeIndirect) /* 510 */ \
+ OP(DrawArraysIndirect) /* 511 */ \
+ OP(DrawElementsIndirect) /* 512 */ \
+ OP(GetProgramInterfaceiv) /* 513 */ \
+ OP(GetProgramResourceIndex) /* 514 */ \
+ OP(GetProgramResourceName) /* 515 */ \
+ OP(GetProgramResourceiv) /* 516 */ \
+ OP(GetProgramResourceLocation) /* 517 */ \
+ OP(MemoryBarrierEXT) /* 518 */ \
+ OP(MemoryBarrierByRegion) /* 519 */ \
+ OP(SwapBuffers) /* 520 */ \
+ OP(GetMaxValueInBufferCHROMIUM) /* 521 */ \
+ OP(EnableFeatureCHROMIUM) /* 522 */ \
+ OP(MapBufferRange) /* 523 */ \
+ OP(UnmapBuffer) /* 524 */ \
+ OP(FlushMappedBufferRange) /* 525 */ \
+ OP(ResizeCHROMIUM) /* 526 */ \
+ OP(GetRequestableExtensionsCHROMIUM) /* 527 */ \
+ OP(RequestExtensionCHROMIUM) /* 528 */ \
+ OP(GetProgramInfoCHROMIUM) /* 529 */ \
+ OP(GetUniformBlocksCHROMIUM) /* 530 */ \
+ OP(GetTransformFeedbackVaryingsCHROMIUM) /* 531 */ \
+ OP(GetUniformsES3CHROMIUM) /* 532 */ \
+ OP(DescheduleUntilFinishedCHROMIUM) /* 533 */ \
+ OP(GetTranslatedShaderSourceANGLE) /* 534 */ \
+ OP(PostSubBufferCHROMIUM) /* 535 */ \
+ OP(CopyTextureCHROMIUM) /* 536 */ \
+ OP(CopySubTextureCHROMIUM) /* 537 */ \
+ OP(DrawArraysInstancedANGLE) /* 538 */ \
+ OP(DrawArraysInstancedBaseInstanceANGLE) /* 539 */ \
+ OP(DrawElementsInstancedANGLE) /* 540 */ \
+ OP(DrawElementsInstancedBaseVertexBaseInstanceANGLE) /* 541 */ \
+ OP(VertexAttribDivisorANGLE) /* 542 */ \
+ OP(ProduceTextureDirectCHROMIUMImmediate) /* 543 */ \
+ OP(CreateAndConsumeTextureINTERNALImmediate) /* 544 */ \
+ OP(BindUniformLocationCHROMIUMBucket) /* 545 */ \
+ OP(BindTexImage2DCHROMIUM) /* 546 */ \
+ OP(BindTexImage2DWithInternalformatCHROMIUM) /* 547 */ \
+ OP(ReleaseTexImage2DCHROMIUM) /* 548 */ \
+ OP(TraceBeginCHROMIUM) /* 549 */ \
+ OP(TraceEndCHROMIUM) /* 550 */ \
+ OP(DiscardFramebufferEXTImmediate) /* 551 */ \
+ OP(LoseContextCHROMIUM) /* 552 */ \
+ OP(UnpremultiplyAndDitherCopyCHROMIUM) /* 553 */ \
+ OP(DrawBuffersEXTImmediate) /* 554 */ \
+ OP(DiscardBackbufferCHROMIUM) /* 555 */ \
+ OP(ScheduleOverlayPlaneCHROMIUM) /* 556 */ \
+ OP(ScheduleCALayerSharedStateCHROMIUM) /* 557 */ \
+ OP(ScheduleCALayerCHROMIUM) /* 558 */ \
+ OP(ScheduleCALayerInUseQueryCHROMIUMImmediate) /* 559 */ \
+ OP(CommitOverlayPlanesCHROMIUM) /* 560 */ \
+ OP(FlushDriverCachesCHROMIUM) /* 561 */ \
+ OP(ScheduleDCLayerCHROMIUM) /* 562 */ \
+ OP(SetActiveURLCHROMIUM) /* 563 */ \
+ OP(ContextVisibilityHintCHROMIUM) /* 564 */ \
+ OP(CoverageModulationCHROMIUM) /* 565 */ \
+ OP(BlendBarrierKHR) /* 566 */ \
+ OP(BindFragDataLocationIndexedEXTBucket) /* 567 */ \
+ OP(BindFragDataLocationEXTBucket) /* 568 */ \
+ OP(GetFragDataIndexEXT) /* 569 */ \
+ OP(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) /* 570 */ \
+ OP(OverlayPromotionHintCHROMIUM) /* 571 */ \
+ OP(SwapBuffersWithBoundsCHROMIUMImmediate) /* 572 */ \
+ OP(SetDrawRectangleCHROMIUM) /* 573 */ \
+ OP(SetEnableDCLayersCHROMIUM) /* 574 */ \
+ OP(InitializeDiscardableTextureCHROMIUM) /* 575 */ \
+ OP(UnlockDiscardableTextureCHROMIUM) /* 576 */ \
+ OP(LockDiscardableTextureCHROMIUM) /* 577 */ \
+ OP(TexStorage2DImageCHROMIUM) /* 578 */ \
+ OP(SetColorSpaceMetadataCHROMIUM) /* 579 */ \
+ OP(WindowRectanglesEXTImmediate) /* 580 */ \
+ OP(CreateGpuFenceINTERNAL) /* 581 */ \
+ OP(WaitGpuFenceCHROMIUM) /* 582 */ \
+ OP(DestroyGpuFenceCHROMIUM) /* 583 */ \
+ OP(SetReadbackBufferShadowAllocationINTERNAL) /* 584 */ \
+ OP(FramebufferTextureMultiviewOVR) /* 585 */ \
+ OP(MaxShaderCompilerThreadsKHR) /* 586 */ \
+ OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 587 */ \
+ OP(BeginSharedImageAccessDirectCHROMIUM) /* 588 */ \
+ OP(EndSharedImageAccessDirectCHROMIUM) /* 589 */ \
+ OP(BeginBatchReadAccessSharedImageCHROMIUM) /* 590 */ \
+ OP(EndBatchReadAccessSharedImageCHROMIUM) /* 591 */ \
+ OP(EnableiOES) /* 592 */ \
+ OP(DisableiOES) /* 593 */ \
+ OP(BlendEquationiOES) /* 594 */ \
+ OP(BlendEquationSeparateiOES) /* 595 */ \
+ OP(BlendFunciOES) /* 596 */ \
+ OP(BlendFuncSeparateiOES) /* 597 */ \
+ OP(ColorMaskiOES) /* 598 */ \
+ OP(IsEnablediOES) /* 599 */
enum CommandId {
kOneBeforeStartPoint =
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_utils.cc b/chromium/gpu/command_buffer/common/gles2_cmd_utils.cc
index 5a062329521..90a60f27ac2 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -15,7 +15,8 @@
#include <sstream>
-#include "base/logging.h"
+#include "base/check_op.h"
+#include "base/notreached.h"
#include "base/numerics/safe_math.h"
#include "base/stl_util.h"
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_utils.h b/chromium/gpu/command_buffer/common/gles2_cmd_utils.h
index 238fce0975b..4d6be9b2fb4 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -14,7 +14,7 @@
#include <limits>
#include <string>
-#include "base/logging.h"
+#include "base/check.h"
#include "base/macros.h"
#include "base/numerics/safe_math.h"
#include "gpu/command_buffer/common/gles2_utils_export.h"
diff --git a/chromium/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/chromium/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
index f7510c53ddd..3ceac4dfc5b 100644
--- a/chromium/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/chromium/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -2685,6 +2685,10 @@ static const GLES2Util::EnumToString enum_to_string_table[] = {
"GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM",
},
{
+ 0x8AF8,
+ "GL_SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM",
+ },
+ {
0x8B30,
"GL_FRAGMENT_SHADER",
},
@@ -7447,6 +7451,13 @@ std::string GLES2Util::GetStringIndexedGLState(uint32_t value) {
{GL_UNIFORM_BUFFER_BINDING, "GL_UNIFORM_BUFFER_BINDING"},
{GL_UNIFORM_BUFFER_SIZE, "GL_UNIFORM_BUFFER_SIZE"},
{GL_UNIFORM_BUFFER_START, "GL_UNIFORM_BUFFER_START"},
+ {GL_BLEND_EQUATION_RGB, "GL_BLEND_EQUATION_RGB"},
+ {GL_BLEND_EQUATION_ALPHA, "GL_BLEND_EQUATION_ALPHA"},
+ {GL_BLEND_SRC_RGB, "GL_BLEND_SRC_RGB"},
+ {GL_BLEND_SRC_ALPHA, "GL_BLEND_SRC_ALPHA"},
+ {GL_BLEND_DST_RGB, "GL_BLEND_DST_RGB"},
+ {GL_BLEND_DST_ALPHA, "GL_BLEND_DST_ALPHA"},
+ {GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK"},
};
return GLES2Util::GetQualifiedEnumString(string_table,
base::size(string_table), value);
@@ -7777,6 +7788,8 @@ std::string GLES2Util::GetStringShaderType(uint32_t value) {
std::string GLES2Util::GetStringSharedImageAccessMode(uint32_t value) {
static const EnumToString string_table[] = {
+ {GL_SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM,
+ "GL_SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM"},
{GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM,
"GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM"},
{GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM,
diff --git a/chromium/gpu/command_buffer/common/mailbox.h b/chromium/gpu/command_buffer/common/mailbox.h
index 5cd20835b43..9c68b87b316 100644
--- a/chromium/gpu/command_buffer/common/mailbox.h
+++ b/chromium/gpu/command_buffer/common/mailbox.h
@@ -10,7 +10,7 @@
#include <string>
-#include "gpu/gpu_export.h"
+#include "base/component_export.h"
// From gl2/gl2ext.h.
#ifndef GL_MAILBOX_SIZE_CHROMIUM
@@ -26,7 +26,7 @@ namespace gpu {
// name is valid.
// See src/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_mailbox.txt for more
// details.
-struct GPU_EXPORT Mailbox {
+struct COMPONENT_EXPORT(GPU_MAILBOX) Mailbox {
using Name = int8_t[GL_MAILBOX_SIZE_CHROMIUM];
Mailbox();
diff --git a/chromium/gpu/command_buffer/common/raster_cmd_format.h b/chromium/gpu/command_buffer/common/raster_cmd_format.h
index 3e7a7e1b7f1..c8b8b072c68 100644
--- a/chromium/gpu/command_buffer/common/raster_cmd_format.h
+++ b/chromium/gpu/command_buffer/common/raster_cmd_format.h
@@ -12,7 +12,6 @@
#include <string.h>
#include "base/atomicops.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "components/viz/common/resources/resource_format.h"
#include "gpu/command_buffer/common/bitfield_helpers.h"
diff --git a/chromium/gpu/command_buffer/common/swap_buffers_complete_params.h b/chromium/gpu/command_buffer/common/swap_buffers_complete_params.h
index c2971e249c4..766c0bcb20b 100644
--- a/chromium/gpu/command_buffer/common/swap_buffers_complete_params.h
+++ b/chromium/gpu/command_buffer/common/swap_buffers_complete_params.h
@@ -5,8 +5,10 @@
#ifndef GPU_COMMAND_BUFFER_COMMON_SWAP_BUFFERS_COMPLETE_PARAMS_H_
#define GPU_COMMAND_BUFFER_COMMON_SWAP_BUFFERS_COMPLETE_PARAMS_H_
+#include "base/optional.h"
#include "gpu/command_buffer/common/texture_in_use_response.h"
#include "ui/gfx/ca_layer_params.h"
+#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/swap_result.h"
namespace gpu {
@@ -20,6 +22,12 @@ struct GPU_EXPORT SwapBuffersCompleteParams {
~SwapBuffersCompleteParams();
gfx::SwapResponse swap_response;
+
+ // Damage area of the current backing buffer compare to the previous swapped
+ // buffer. The renderer can use it as hint for minimizing drawing area for the
+ // next frame.
+ base::Optional<gfx::Rect> frame_buffer_damage_area;
+
// Used only on macOS, for coordinating IOSurface reuse with the system
// WindowServer.
gpu::TextureInUseResponses texture_in_use_responses;