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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc

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/service/gles2_cmd_decoder_unittest_programs.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
index 199117236f0cd6f380a9f13c21644d93c4038541..f5ef1d278755a0d6991b24eef482e4fc684a5aa3 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -1347,6 +1347,18 @@ TEST_P(GLES2DecoderWithShaderTest, GetUniformLocationInvalidArgs) {
EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
}
+TEST_P(GLES2DecoderWithShaderTest, UniformBlockBindingValidArgs) {
+ EXPECT_CALL(*gl_, UniformBlockBinding(kServiceProgramId, 2, 3));
+ SpecializedSetup<cmds::UniformBlockBinding, 0>(true);
+ cmds::UniformBlockBinding cmd;
+ cmd.Init(client_program_id_, 2, 3);
+ decoder_->set_unsafe_es3_apis_enabled(true);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ decoder_->set_unsafe_es3_apis_enabled(false);
+ EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
+}
+
TEST_P(GLES2DecoderWithShaderTest, BindUniformLocationCHROMIUMBucket) {
const uint32 kBucketId = 123;
const GLint kLocation = 2;

Powered by Google App Engine
This is Rietveld 408576698