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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.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, 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 DisallowedFeatures())); 236 DisallowedFeatures()));
237 237
238 if (init.context_type == CONTEXT_TYPE_WEBGL2 || 238 if (init.context_type == CONTEXT_TYPE_WEBGL2 ||
239 init.context_type == CONTEXT_TYPE_OPENGLES3) { 239 init.context_type == CONTEXT_TYPE_OPENGLES3) {
240 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) 240 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _))
241 .WillOnce(SetArgumentPointee<1>(kMaxColorAttachments)) 241 .WillOnce(SetArgumentPointee<1>(kMaxColorAttachments))
242 .RetiresOnSaturation(); 242 .RetiresOnSaturation();
243 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) 243 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _))
244 .WillOnce(SetArgumentPointee<1>(kMaxDrawBuffers)) 244 .WillOnce(SetArgumentPointee<1>(kMaxDrawBuffers))
245 .RetiresOnSaturation(); 245 .RetiresOnSaturation();
246
247 EXPECT_CALL(*gl_, GenTransformFeedbacks(1, _))
248 .WillOnce(SetArgumentPointee<1>(kServiceDefaultTransformFeedbackId))
249 .RetiresOnSaturation();
250 EXPECT_CALL(*gl_, BindTransformFeedback(GL_TRANSFORM_FEEDBACK,
251 kServiceDefaultTransformFeedbackId))
252 .Times(1)
253 .RetiresOnSaturation();
246 } 254 }
247 255
248 if (group_->feature_info()->feature_flags().native_vertex_array_object) { 256 if (group_->feature_info()->feature_flags().native_vertex_array_object) {
249 EXPECT_CALL(*gl_, GenVertexArraysOES(1, _)) 257 EXPECT_CALL(*gl_, GenVertexArraysOES(1, _))
250 .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId)) 258 .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId))
251 .RetiresOnSaturation(); 259 .RetiresOnSaturation();
252 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation(); 260 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation();
253 } 261 }
254 262
255 if (group_->feature_info()->workarounds().init_vertex_attributes) 263 if (group_->feature_info()->workarounds().init_vertex_attributes)
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // All Tests should have read all their GLErrors before getting here. 523 // All Tests should have read all their GLErrors before getting here.
516 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 524 EXPECT_EQ(GL_NO_ERROR, GetGLError());
517 if (!decoder_->WasContextLost()) { 525 if (!decoder_->WasContextLost()) {
518 EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation(); 526 EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation();
519 if (group_->feature_info()->feature_flags().native_vertex_array_object) { 527 if (group_->feature_info()->feature_flags().native_vertex_array_object) {
520 EXPECT_CALL(*gl_, 528 EXPECT_CALL(*gl_,
521 DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId))) 529 DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId)))
522 .Times(1) 530 .Times(1)
523 .RetiresOnSaturation(); 531 .RetiresOnSaturation();
524 } 532 }
533 if (group_->feature_info()->IsES3Capable()) {
534 // fake default transform feedback.
535 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _))
536 .Times(1)
537 .RetiresOnSaturation();
538 }
539 if (group_->feature_info()->gl_version_info().IsAtLeastGL(4, 0) ||
540 group_->feature_info()->gl_version_info().IsAtLeastGLES(3, 0)) {
541 // |client_transformfeedback_id_|
542 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _))
543 .Times(1)
544 .RetiresOnSaturation();
545 }
525 } 546 }
526 547
527 decoder_->EndDecoding(); 548 decoder_->EndDecoding();
528 decoder_->Destroy(!decoder_->WasContextLost()); 549 decoder_->Destroy(!decoder_->WasContextLost());
529 decoder_.reset(); 550 decoder_.reset();
530 group_->Destroy(mock_decoder_.get(), false); 551 group_->Destroy(mock_decoder_.get(), false);
531 engine_.reset(); 552 engine_.reset();
532 ::gfx::MockGLInterface::SetGLInterface(NULL); 553 ::gfx::MockGLInterface::SetGLInterface(NULL);
533 gl_.reset(); 554 gl_.reset();
534 gfx::ClearGLBindings(); 555 gfx::ClearGLBindings();
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 const GLuint GLES2DecoderTestBase::kServiceFramebufferId; 1494 const GLuint GLES2DecoderTestBase::kServiceFramebufferId;
1474 const GLuint GLES2DecoderTestBase::kServiceRenderbufferId; 1495 const GLuint GLES2DecoderTestBase::kServiceRenderbufferId;
1475 const GLuint GLES2DecoderTestBase::kServiceSamplerId; 1496 const GLuint GLES2DecoderTestBase::kServiceSamplerId;
1476 const GLuint GLES2DecoderTestBase::kServiceTextureId; 1497 const GLuint GLES2DecoderTestBase::kServiceTextureId;
1477 const GLuint GLES2DecoderTestBase::kServiceProgramId; 1498 const GLuint GLES2DecoderTestBase::kServiceProgramId;
1478 const GLuint GLES2DecoderTestBase::kServiceShaderId; 1499 const GLuint GLES2DecoderTestBase::kServiceShaderId;
1479 const GLuint GLES2DecoderTestBase::kServiceElementBufferId; 1500 const GLuint GLES2DecoderTestBase::kServiceElementBufferId;
1480 const GLuint GLES2DecoderTestBase::kServiceQueryId; 1501 const GLuint GLES2DecoderTestBase::kServiceQueryId;
1481 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId; 1502 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId;
1482 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId; 1503 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId;
1504 const GLuint GLES2DecoderTestBase::kServiceDefaultTransformFeedbackId;
1483 const GLuint GLES2DecoderTestBase::kServiceSyncId; 1505 const GLuint GLES2DecoderTestBase::kServiceSyncId;
1484 1506
1485 const int32_t GLES2DecoderTestBase::kSharedMemoryId; 1507 const int32_t GLES2DecoderTestBase::kSharedMemoryId;
1486 const size_t GLES2DecoderTestBase::kSharedBufferSize; 1508 const size_t GLES2DecoderTestBase::kSharedBufferSize;
1487 const uint32_t GLES2DecoderTestBase::kSharedMemoryOffset; 1509 const uint32_t GLES2DecoderTestBase::kSharedMemoryOffset;
1488 const int32_t GLES2DecoderTestBase::kInvalidSharedMemoryId; 1510 const int32_t GLES2DecoderTestBase::kInvalidSharedMemoryId;
1489 const uint32_t GLES2DecoderTestBase::kInvalidSharedMemoryOffset; 1511 const uint32_t GLES2DecoderTestBase::kInvalidSharedMemoryOffset;
1490 const uint32_t GLES2DecoderTestBase::kInitialResult; 1512 const uint32_t GLES2DecoderTestBase::kInitialResult;
1491 const uint8_t GLES2DecoderTestBase::kInitialMemoryValue; 1513 const uint8_t GLES2DecoderTestBase::kInitialMemoryValue;
1492 1514
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 SetupDefaultProgram(); 2054 SetupDefaultProgram();
2033 } 2055 }
2034 2056
2035 // Include the auto-generated part of this file. We split this because it means 2057 // Include the auto-generated part of this file. We split this because it means
2036 // we can easily edit the non-auto generated parts right here in this file 2058 // we can easily edit the non-auto generated parts right here in this file
2037 // instead of having to edit some template or the code generator. 2059 // instead of having to edit some template or the code generator.
2038 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2060 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2039 2061
2040 } // namespace gles2 2062 } // namespace gles2
2041 } // namespace gpu 2063 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698