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

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

Issue 1949303003: Improve indexed gl state related GL commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tex
Patch Set: fix a DCHECK failure Created 4 years, 7 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.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 9fe38a5c2d157881c989249a517e89ca4ece4b97..f57f875cb06c2bd34a943a6f891837355532fb01 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -1558,6 +1558,36 @@ TEST_P(GLES3DecoderTest, GenTransformFeedbacksImmediateInvalidArgs) {
ExecuteImmediateCmd(*cmd, sizeof(&client_transformfeedback_id_)));
}
+TEST_P(GLES3DecoderTest, GetIntegeri_vValidArgs) {
+ EXPECT_CALL(*gl_, GetIntegeri_v(_, _, _)).Times(0);
+ typedef cmds::GetIntegeri_v::Result Result;
+ Result* result = static_cast<Result*>(shared_memory_address_);
+ result->size = 0;
+ cmds::GetIntegeri_v cmd;
+ cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, 2, shared_memory_id_,
+ shared_memory_offset_);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(
+ GL_TRANSFORM_FEEDBACK_BUFFER_BINDING),
+ result->GetNumResults());
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
+TEST_P(GLES3DecoderTest, GetInteger64i_vValidArgs) {
+ EXPECT_CALL(*gl_, GetInteger64i_v(_, _, _)).Times(0);
+ typedef cmds::GetInteger64i_v::Result Result;
+ Result* result = static_cast<Result*>(shared_memory_address_);
+ result->size = 0;
+ cmds::GetInteger64i_v cmd;
+ cmd.Init(GL_UNIFORM_BUFFER_SIZE, 2, shared_memory_id_,
+ shared_memory_offset_);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(
+ GL_UNIFORM_BUFFER_SIZE),
+ result->GetNumResults());
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
// Test that processing with 0 entries does nothing.
TEST_P(GLES2DecoderDoCommandsTest, DoCommandsOneOfZero) {
int num_processed = -1;

Powered by Google App Engine
This is Rietveld 408576698