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

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

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 49c108c622c0c6a04b421fddc718a8caae88780c..244351268a1434e4e1048c0a05a40f323ded42c9 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -3218,6 +3218,23 @@ TEST_F(GLES2FormatTest, CopyTextureCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, CopyCompressedTextureCHROMIUM) {
+ cmds::CopyCompressedTextureCHROMIUM& cmd =
+ *GetBufferAs<cmds::CopyCompressedTextureCHROMIUM>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11),
+ static_cast<GLenum>(12), static_cast<GLenum>(13),
+ static_cast<GLenum>(14), static_cast<GLenum>(15));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::CopyCompressedTextureCHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
+ EXPECT_EQ(static_cast<GLenum>(12), cmd.source_id);
+ EXPECT_EQ(static_cast<GLenum>(13), cmd.dest_id);
+ EXPECT_EQ(static_cast<GLenum>(14), cmd.internalformat);
+ EXPECT_EQ(static_cast<GLenum>(15), cmd.dest_type);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, DrawArraysInstancedANGLE) {
cmds::DrawArraysInstancedANGLE& cmd =
*GetBufferAs<cmds::DrawArraysInstancedANGLE>();
@@ -3738,6 +3755,64 @@ TEST_F(GLES2FormatTest, AsyncTexImage2DCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, AsyncCompressedTexSubImage2DCHROMIUM) {
+ cmds::AsyncCompressedTexSubImage2DCHROMIUM& cmd =
+ *GetBufferAs<cmds::AsyncCompressedTexSubImage2DCHROMIUM>();
+ void* next_cmd = cmd.Set(
+ &cmd, static_cast<GLenum>(11), static_cast<GLint>(12),
+ static_cast<GLint>(13), static_cast<GLint>(14), static_cast<GLsizei>(15),
+ static_cast<GLsizei>(16), static_cast<GLenum>(17),
+ static_cast<GLsizei>(18), static_cast<uint32_t>(19),
+ static_cast<uint32_t>(20), static_cast<uint32_t>(21),
+ static_cast<uint32_t>(22), static_cast<uint32_t>(23));
+ EXPECT_EQ(
+ static_cast<uint32_t>(cmds::AsyncCompressedTexSubImage2DCHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
+ EXPECT_EQ(static_cast<GLint>(12), cmd.level);
+ EXPECT_EQ(static_cast<GLint>(13), cmd.xoffset);
+ EXPECT_EQ(static_cast<GLint>(14), cmd.yoffset);
+ EXPECT_EQ(static_cast<GLsizei>(15), cmd.width);
+ EXPECT_EQ(static_cast<GLsizei>(16), cmd.height);
+ EXPECT_EQ(static_cast<GLenum>(17), cmd.format);
+ EXPECT_EQ(static_cast<GLsizei>(18), cmd.imagesize);
+ EXPECT_EQ(static_cast<uint32_t>(19), cmd.data_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(20), cmd.data_shm_offset);
+ EXPECT_EQ(static_cast<uint32_t>(21), cmd.async_upload_token);
+ EXPECT_EQ(static_cast<uint32_t>(22), cmd.sync_data_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(23), cmd.sync_data_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, AsyncCompressedTexImage2DCHROMIUM) {
+ cmds::AsyncCompressedTexImage2DCHROMIUM& cmd =
+ *GetBufferAs<cmds::AsyncCompressedTexImage2DCHROMIUM>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12),
+ static_cast<GLint>(13), static_cast<GLsizei>(14),
+ static_cast<GLsizei>(15), static_cast<GLsizei>(16),
+ static_cast<uint32_t>(17), static_cast<uint32_t>(18),
+ static_cast<uint32_t>(19), static_cast<uint32_t>(20),
+ static_cast<uint32_t>(21));
+ EXPECT_EQ(
+ static_cast<uint32_t>(cmds::AsyncCompressedTexImage2DCHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
+ EXPECT_EQ(static_cast<GLint>(12), cmd.level);
+ EXPECT_EQ(static_cast<GLint>(13), cmd.internalformat);
+ EXPECT_EQ(static_cast<GLsizei>(14), cmd.width);
+ EXPECT_EQ(static_cast<GLsizei>(15), cmd.height);
+ EXPECT_EQ(static_cast<GLsizei>(16), cmd.imagesize);
+ EXPECT_EQ(static_cast<uint32_t>(17), cmd.pixels_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(18), cmd.pixels_shm_offset);
+ EXPECT_EQ(static_cast<uint32_t>(19), cmd.async_upload_token);
+ EXPECT_EQ(static_cast<uint32_t>(20), cmd.sync_data_shm_id);
+ EXPECT_EQ(static_cast<uint32_t>(21), cmd.sync_data_shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, WaitAsyncTexImage2DCHROMIUM) {
cmds::WaitAsyncTexImage2DCHROMIUM& cmd =
*GetBufferAs<cmds::WaitAsyncTexImage2DCHROMIUM>();
« 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