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

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

Issue 2165873002: Validate UniformBlocks being backed by sufficient data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bug Created 4 years, 5 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 f10a200e41feb2aa590700d84d406a691cf4306e..4686867c8630d57dc6e796af0f31871fcd104de1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -2197,16 +2197,20 @@ TEST_P(GLES2DecoderWithShaderTest, GetUniformLocationInvalidArgs) {
EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
}
-TEST_P(GLES2DecoderWithShaderTest, UniformBlockBindingValidArgs) {
- EXPECT_CALL(*gl_, UniformBlockBinding(kServiceProgramId, 2, 3));
+TEST_P(GLES3DecoderWithESSL3ShaderTest, Basic) {
+ // Make sure the setup is correct for ES3.
+ EXPECT_TRUE(decoder_->unsafe_es3_apis_enabled());
+ EXPECT_TRUE(feature_info()->validators()->texture_bind_target.IsValid(
+ GL_TEXTURE_3D));
+}
+
+TEST_P(GLES3DecoderWithESSL3ShaderTest, UniformBlockBindingValidArgs) {
+ EXPECT_CALL(*gl_, UniformBlockBinding(kServiceProgramId, 1, 3));
SpecializedSetup<cmds::UniformBlockBinding, 0>(true);
cmds::UniformBlockBinding cmd;
- cmd.Init(client_program_id_, 2, 3);
- decoder_->set_unsafe_es3_apis_enabled(true);
+ cmd.Init(client_program_id_, 1, 3);
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) {

Powered by Google App Engine
This is Rietveld 408576698