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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2146603005: Fix CopyTexImage2D when using unsized internal formats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // All Tests should have read all their GLErrors before getting here. 544 // All Tests should have read all their GLErrors before getting here.
545 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 545 EXPECT_EQ(GL_NO_ERROR, GetGLError());
546 if (!decoder_->WasContextLost()) { 546 if (!decoder_->WasContextLost()) {
547 EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation(); 547 EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation();
548 if (group_->feature_info()->feature_flags().native_vertex_array_object) { 548 if (group_->feature_info()->feature_flags().native_vertex_array_object) {
549 EXPECT_CALL(*gl_, 549 EXPECT_CALL(*gl_,
550 DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId))) 550 DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId)))
551 .Times(1) 551 .Times(1)
552 .RetiresOnSaturation(); 552 .RetiresOnSaturation();
553 } 553 }
554 if (group_->feature_info()->IsES3Capable()) { 554 if (group_->feature_info()->IsES3Enabled()) {
555 // fake default transform feedback. 555 // fake default transform feedback.
556 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _)) 556 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _))
557 .Times(1) 557 .Times(1)
558 .RetiresOnSaturation(); 558 .RetiresOnSaturation();
559 } 559 }
560 if (group_->feature_info()->gl_version_info().IsAtLeastGL(4, 0) || 560 if (group_->feature_info()->gl_version_info().IsAtLeastGL(4, 0) ||
561 group_->feature_info()->gl_version_info().IsAtLeastGLES(3, 0)) { 561 group_->feature_info()->gl_version_info().IsAtLeastGLES(3, 0)) {
562 // |client_transformfeedback_id_| 562 // |client_transformfeedback_id_|
563 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _)) 563 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _))
564 .Times(1) 564 .Times(1)
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 .RetiresOnSaturation(); 1392 .RetiresOnSaturation();
1393 } 1393 }
1394 EXPECT_CALL(*gl_, GetError()) 1394 EXPECT_CALL(*gl_, GetError())
1395 .WillOnce(Return(error)) 1395 .WillOnce(Return(error))
1396 .RetiresOnSaturation(); 1396 .RetiresOnSaturation();
1397 cmds::FramebufferRenderbuffer cmd; 1397 cmds::FramebufferRenderbuffer cmd;
1398 cmd.Init(target, attachment, renderbuffer_target, renderbuffer_client_id); 1398 cmd.Init(target, attachment, renderbuffer_target, renderbuffer_client_id);
1399 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1399 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1400 } 1400 }
1401 1401
1402 GLenum GLES2DecoderTestBase::DoCheckFramebufferStatus(GLenum target) {
1403 auto* result = static_cast<cmds::CheckFramebufferStatus::Result*>(
1404 shared_memory_address_);
1405 *result = 0;
1406 cmds::CheckFramebufferStatus cmd;
1407 cmd.Init(GL_FRAMEBUFFER, shared_memory_id_, shared_memory_offset_);
1408 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1409 return *result;
1410 }
1411
1402 void GLES2DecoderTestBase::DoVertexAttribPointer( 1412 void GLES2DecoderTestBase::DoVertexAttribPointer(
1403 GLuint index, GLint size, GLenum type, GLsizei stride, GLuint offset) { 1413 GLuint index, GLint size, GLenum type, GLsizei stride, GLuint offset) {
1404 EXPECT_CALL(*gl_, 1414 EXPECT_CALL(*gl_,
1405 VertexAttribPointer(index, size, type, GL_FALSE, stride, 1415 VertexAttribPointer(index, size, type, GL_FALSE, stride,
1406 BufferOffset(offset))) 1416 BufferOffset(offset)))
1407 .Times(1) 1417 .Times(1)
1408 .RetiresOnSaturation(); 1418 .RetiresOnSaturation();
1409 cmds::VertexAttribPointer cmd; 1419 cmds::VertexAttribPointer cmd;
1410 cmd.Init(index, size, GL_FLOAT, GL_FALSE, stride, offset); 1420 cmd.Init(index, size, GL_FLOAT, GL_FALSE, stride, offset);
1411 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1421 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 SetupDefaultProgram(); 2089 SetupDefaultProgram();
2080 } 2090 }
2081 2091
2082 // Include the auto-generated part of this file. We split this because it means 2092 // Include the auto-generated part of this file. We split this because it means
2083 // we can easily edit the non-auto generated parts right here in this file 2093 // we can easily edit the non-auto generated parts right here in this file
2084 // instead of having to edit some template or the code generator. 2094 // instead of having to edit some template or the code generator.
2085 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2095 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2086 2096
2087 } // namespace gles2 2097 } // namespace gles2
2088 } // namespace gpu 2098 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698