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

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

Issue 2315773002: Correctly limit glTexStorage*(GL_TEXTURE_RECTANGLE_ARB, ...) to 1 mip level (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | 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_textures.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index e9cdbda35423e91c20d0d3e0fcc75ebc77182c32..ac7858d0019291e625fc7b385f9fae7379fb3b4d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -4095,6 +4095,20 @@ TEST_P(GLES2DecoderManualInitTest, GetNoCompressedTextureFormats) {
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
+TEST_P(GLES2DecoderManualInitTest, TexStorageInvalidLevels) {
+ InitState init;
+ init.gl_version = "OpenGL 4.2";
+ init.extensions = "GL_ARB_texture_rectangle GL_ARB_texture_storage";
+ init.bind_generates_resource = true;
+ InitDecoder(init);
+ DoBindTexture(GL_TEXTURE_RECTANGLE_ARB, client_texture_id_,
+ kServiceTextureId);
+ TexStorage2DEXT cmd;
+ cmd.Init(GL_TEXTURE_RECTANGLE_ARB, 2, GL_RGBA8, 4, 4);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
+}
+
TEST_P(GLES3DecoderTest, TexStorage3DValidArgs) {
DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId);
EXPECT_CALL(*gl_, TexStorage3D(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6))
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698