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

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

Issue 906613005: Add glUniformBlockBinding to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uniform
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 6e238153953e957484da42fc95b01a1644fb3036..19163a5322afef426a3aaad8e78aecb4b667a5b1 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -2734,6 +2734,19 @@ TEST_F(GLES2FormatTest, Uniform4uivImmediate) {
// TODO(gman): Check that data was inserted;
}
+TEST_F(GLES2FormatTest, UniformBlockBinding) {
+ cmds::UniformBlockBinding& cmd = *GetBufferAs<cmds::UniformBlockBinding>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
+ static_cast<GLuint>(12), static_cast<GLuint>(13));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::UniformBlockBinding::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.program);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.index);
+ EXPECT_EQ(static_cast<GLuint>(13), cmd.binding);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, UniformMatrix2fvImmediate) {
const int kSomeBaseValueToTestWith = 51;
static GLfloat data[] = {

Powered by Google App Engine
This is Rietveld 408576698