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

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

Issue 863253002: Update from https://crrev.com/312600 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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_test_autogen.h
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 319ce6e94484c06aed678720071bd4ebbdadba1a..7f1e9917d70ed933feafc4eeb3daa8daec61f437 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -675,6 +675,16 @@ TEST_F(GLES2FormatTest, DeleteSamplersImmediate) {
// TODO(gman): Check that ids were inserted;
}
+TEST_F(GLES2FormatTest, DeleteSync) {
+ cmds::DeleteSync& cmd = *GetBufferAs<cmds::DeleteSync>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteSync::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.sync);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, DeleteShader) {
cmds::DeleteShader& cmd = *GetBufferAs<cmds::DeleteShader>();
void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11));
@@ -832,6 +842,15 @@ TEST_F(GLES2FormatTest, EnableVertexAttribArray) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, FenceSync) {
+ cmds::FenceSync& cmd = *GetBufferAs<cmds::FenceSync>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<uint32_t>(11));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::FenceSync::kCmdId), cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<uint32_t>(11), cmd.client_id);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, Finish) {
cmds::Finish& cmd = *GetBufferAs<cmds::Finish>();
void* next_cmd = cmd.Set(&cmd);
@@ -1607,6 +1626,19 @@ TEST_F(GLES2FormatTest, IsShader) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, IsSync) {
+ cmds::IsSync& cmd = *GetBufferAs<cmds::IsSync>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32_t>(12),
+ static_cast<uint32_t>(13));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::IsSync::kCmdId), cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.sync);
+ EXPECT_EQ(static_cast<uint32_t>(12), cmd.result_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(13), cmd.result_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, IsTexture) {
cmds::IsTexture& cmd = *GetBufferAs<cmds::IsTexture>();
void* next_cmd =
@@ -1875,7 +1907,7 @@ TEST_F(GLES2FormatTest, ShaderSourceBucket) {
cmd.header.command);
EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
EXPECT_EQ(static_cast<GLuint>(11), cmd.shader);
- EXPECT_EQ(static_cast<uint32_t>(12), cmd.data_bucket_id);
+ EXPECT_EQ(static_cast<uint32_t>(12), cmd.str_bucket_id);
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}

Powered by Google App Engine
This is Rietveld 408576698