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

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

Issue 2117183006: gpu: Clarify sized texture format is available only if ES3 context or immutable texture is supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix oes-texture-float.html Created 4 years, 2 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/tests/gl_texture_storage_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
index f5d9a6141354c282673f9af4a0f015d4cfad8e51..7803bfba23087d44624bd9603fa4258ae9319c89 100644
--- a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
+++ b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
@@ -156,6 +156,17 @@ TEST_F(TextureStorageTest, CannotRedefine) {
EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
}
+TEST_F(TextureStorageTest, InternalFormatBleedingToTexImage) {
+ if (!extension_available_)
+ return;
+
+ EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
+ // The context is ES2 context.
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8_OES, 4, 4, 0, GL_RGBA,
+ GL_UNSIGNED_BYTE, nullptr);
+ EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), glGetError());
+}
+
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698