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

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

Issue 1872663002: Enable TexStorage on Desktop GL lower than 4.2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/service/gles2_cmd_decoder_unittest.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 5c1e0486816feeb7011b7bfeb78894f2afa7d528..2d034c3d5b6926a266221d71784e9f0c811969df 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -1339,6 +1339,7 @@ TEST_P(GLES2DecoderManualInitTest, MemoryTrackerBufferData) {
TEST_P(GLES2DecoderManualInitTest, ImmutableCopyTexImage2D) {
const GLenum kTarget = GL_TEXTURE_2D;
const GLint kLevel = 0;
+ const GLint kLevels = 2;
const GLenum kInternalFormat = GL_RGBA;
const GLenum kSizedInternalFormat = GL_RGBA8;
const GLsizei kWidth = 4;
@@ -1349,8 +1350,9 @@ TEST_P(GLES2DecoderManualInitTest, ImmutableCopyTexImage2D) {
init.has_alpha = true;
init.request_alpha = true;
init.bind_generates_resource = true;
+ init.gl_version = "OpenGL ES 2.0"; // To avoid TexStorage emulation.
InitDecoder(init);
- DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
+ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId);
// CopyTexImage2D will call arbitrary amount of GetErrors.
EXPECT_CALL(*gl_, GetError())
@@ -1364,7 +1366,7 @@ TEST_P(GLES2DecoderManualInitTest, ImmutableCopyTexImage2D) {
EXPECT_CALL(*gl_,
TexStorage2DEXT(
- kTarget, kLevel, kSizedInternalFormat, kWidth, kHeight))
+ kTarget, kLevels, kSizedInternalFormat, kWidth, kHeight))
.Times(1);
CopyTexImage2D copy_cmd;
copy_cmd.Init(kTarget, kLevel, kInternalFormat, 0, 0, kWidth, kHeight);
@@ -1372,7 +1374,7 @@ TEST_P(GLES2DecoderManualInitTest, ImmutableCopyTexImage2D) {
EXPECT_EQ(GL_NO_ERROR, GetGLError());
TexStorage2DEXT storage_cmd;
- storage_cmd.Init(kTarget, kLevel, kSizedInternalFormat, kWidth, kHeight);
+ storage_cmd.Init(kTarget, kLevels, kSizedInternalFormat, kWidth, kHeight);
EXPECT_EQ(error::kNoError, ExecuteCmd(storage_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698