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

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

Issue 2570823002: Reland [Command buffer]: Generate INVALID_OPERATION if designated attachments in read fb miss image (Closed)
Patch Set: suppress the webgl 2 expectation Created 4 years 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
index 65c8c28ba01748f31e876f52459202144d605041..3a0e0bec146a2e0e9e96c8b597dc2533ebe34ffb 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -3961,21 +3961,18 @@ TEST_P(GLES3DecoderTest, BlitFramebufferDisabledReadBuffer) {
1.0f, // depth
false, // scissor test
0, 0, 128, 64);
- EXPECT_CALL(*gl_, BlitFramebufferEXT(0, 0, _, _, 0, 0, _, _,
- GL_COLOR_BUFFER_BIT, GL_LINEAR))
- .Times(1)
- .RetiresOnSaturation();
BlitFramebufferCHROMIUM cmd;
cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_COLOR_BUFFER_BIT, GL_LINEAR);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ // Generate INVALID_OPERATION because of missing read buffer image.
+ EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
}
}
TEST_P(GLES3DecoderTest, BlitFramebufferMissingDepthOrStencil) {
// Run BlitFramebufferCHROMIUM with depth or stencil bits, from/to a read/draw
- // framebuffer that doesn't have depth/stencil. The bits should be silently
- // ignored.
+ // framebuffer that doesn't have depth/stencil. It should generate
+ // INVALID_OPERATION.
DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_,
kServiceRenderbufferId);
DoRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8,
@@ -4023,16 +4020,13 @@ TEST_P(GLES3DecoderTest, BlitFramebufferMissingDepthOrStencil) {
EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER))
.WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, BlitFramebufferEXT(0, 0, 1, 1, 0, 0, 1, 1,
- _, _))
- .Times(0);
BlitFramebufferCHROMIUM cmd;
cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_STENCIL_BUFFER_BIT, GL_NEAREST);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
}
// Switch FBOs and try the same.
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698