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

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

Issue 954183006: Add glDrawRangeElements to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 1d18fa86a6e477e88b1b982b9caf35924958a5ee..92ae3d44a7a11650e2c3f8b4845c6dfd5507daab 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -862,6 +862,24 @@ TEST_F(GLES2FormatTest, DrawElements) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, DrawRangeElements) {
+ cmds::DrawRangeElements& cmd = *GetBufferAs<cmds::DrawRangeElements>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12),
+ static_cast<GLuint>(13), static_cast<GLsizei>(14),
+ static_cast<GLenum>(15), static_cast<GLuint>(16));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::DrawRangeElements::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.mode);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.start);
+ EXPECT_EQ(static_cast<GLuint>(13), cmd.end);
+ EXPECT_EQ(static_cast<GLsizei>(14), cmd.count);
+ EXPECT_EQ(static_cast<GLenum>(15), cmd.type);
+ EXPECT_EQ(static_cast<GLuint>(16), cmd.index_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, Enable) {
cmds::Enable& cmd = *GetBufferAs<cmds::Enable>();
void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11));

Powered by Google App Engine
This is Rietveld 408576698