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

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

Issue 169603002: Add initial support for NV_path_rendering extension to gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 years, 4 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 d19c9c6e340316fe56a11d04db8e9038e7298065..521128665ab4d5c8fa38701d4161265316501fec 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -3443,4 +3443,48 @@ TEST_F(GLES2FormatTest, ScheduleOverlayPlaneCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, MatrixLoadfCHROMIUMImmediate) {
+ const int kSomeBaseValueToTestWith = 51;
+ static GLfloat data[] = {
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 0),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 1),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 2),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 3),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 4),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 5),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 6),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 7),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 8),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 9),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 10),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 11),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 12),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 13),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 14),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 15),
+ };
+ cmds::MatrixLoadfCHROMIUMImmediate& cmd =
+ *GetBufferAs<cmds::MatrixLoadfCHROMIUMImmediate>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11), data);
+ EXPECT_EQ(static_cast<uint32_t>(cmds::MatrixLoadfCHROMIUMImmediate::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)),
+ cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.matrixMode);
+ CheckBytesWrittenMatchesExpectedSize(
+ next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
+ // TODO(gman): Check that data was inserted;
+}
+
+TEST_F(GLES2FormatTest, MatrixLoadIdentityCHROMIUM) {
+ cmds::MatrixLoadIdentityCHROMIUM& cmd =
+ *GetBufferAs<cmds::MatrixLoadIdentityCHROMIUM>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::MatrixLoadIdentityCHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.matrixMode);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
« 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