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

Unified Diff: gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc

Issue 1283303002: gpu: FBO must be incomplete if the attached texture is not cube complete. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Depend on https://codereview.chromium.org/1299683002 Created 5 years, 4 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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.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/tests/gl_cube_map_texture_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc b/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
index 2f052ac4e9fbf88d39afc691e3ffe2558e73f87b..37b4f0ed80d2417201dd798c131f731194491f6e 100644
--- a/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
+++ b/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
@@ -125,14 +125,16 @@ TEST_P(GLCubeMapTextureTest, ReadPixelsFromIncompleteFBO) {
// TODO(dshwang): remove the workaround when it's fixed. crbug.com/518889
EXPECT_TRUE(glGetError() == GL_NO_ERROR);
+ // FBO is incomplete because the texture is not cube complete.
+ EXPECT_NE(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE),
+ glCheckFramebufferStatus(GL_FRAMEBUFFER));
+
GLsizei size = width_ * width_ * 4;
scoped_ptr<uint8[]> pixels(new uint8[size]);
// ANGLE crashes on glReadPixels() from incomplete FBO.
glReadPixels(0, 0, width_, width_, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get());
- // According to spec, above glReadPixels() should fail and glGetError()
- // should report an error, but some drivers are fine to bind incomplete cube
- // map texture to FBO.
- glGetError();
+ EXPECT_EQ(static_cast<GLenum>(GL_INVALID_FRAMEBUFFER_OPERATION),
+ glGetError());
}
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698