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

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

Issue 859043005: Add Sync related APIs to GPU command buffer: Part I (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make win bots happy 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 4dc51762b02ba80c17b32e536cc41ea62f528c63..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 =
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_autogen.h ('k') | gpu/command_buffer/common/gles2_cmd_ids_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698