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

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

Issue 1922633002: Implement TransformFeedbackManager in GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_buffers.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
index ddfbec61614854bea995b138012a132127bd5aea..38f118eef8431b878115fd5a7ac3cda8607a1251 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
@@ -21,20 +21,17 @@ namespace {
} // namespace anonymous
-TEST_P(GLES2DecoderTest, BindBufferBaseValidArgs) {
+TEST_P(GLES3DecoderTest, BindBufferBaseValidArgs) {
EXPECT_CALL(
*gl_, BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kServiceBufferId));
SpecializedSetup<cmds::BindBufferBase, 0>(true);
cmds::BindBufferBase cmd;
cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, client_buffer_id_);
- 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(GLES2DecoderTest, BindBufferBaseValidArgsNewId) {
+TEST_P(GLES3DecoderTest, BindBufferBaseValidArgsNewId) {
EXPECT_CALL(*gl_,
BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewServiceId));
EXPECT_CALL(*gl_, GenBuffersARB(1, _))
@@ -42,12 +39,33 @@ TEST_P(GLES2DecoderTest, BindBufferBaseValidArgsNewId) {
SpecializedSetup<cmds::BindBufferBase, 0>(true);
cmds::BindBufferBase cmd;
cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId);
- decoder_->set_unsafe_es3_apis_enabled(true);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
EXPECT_TRUE(GetBuffer(kNewClientId) != NULL);
- decoder_->set_unsafe_es3_apis_enabled(false);
- EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
+}
+
+
+TEST_P(GLES3DecoderTest, BindBufferRangeValidArgs) {
+ EXPECT_CALL(*gl_, BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 2,
+ kServiceBufferId, 4, 4));
+ SpecializedSetup<cmds::BindBufferRange, 0>(true);
+ cmds::BindBufferRange cmd;
+ cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, client_buffer_id_, 4, 4);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
+TEST_P(GLES3DecoderTest, BindBufferRangeValidArgsNewId) {
+ EXPECT_CALL(*gl_, BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 2,
+ kNewServiceId, 4, 4));
+ EXPECT_CALL(*gl_, GenBuffersARB(1, _))
+ .WillOnce(SetArgPointee<1>(kNewServiceId));
+ SpecializedSetup<cmds::BindBufferRange, 0>(true);
+ cmds::BindBufferRange cmd;
+ cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId, 4, 4);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ EXPECT_TRUE(GetBuffer(kNewClientId) != NULL);
}
TEST_P(GLES2DecoderTest, MapBufferRangeUnmapBufferReadSucceeds) {

Powered by Google App Engine
This is Rietveld 408576698