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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 4077 matching lines...) Expand 10 before | Expand all | Expand 10 after
4088 4088
4089 result->size = 0; 4089 result->size = 0;
4090 cmd.Init( 4090 cmd.Init(
4091 GL_COMPRESSED_TEXTURE_FORMATS, shared_memory_id_, shared_memory_offset_); 4091 GL_COMPRESSED_TEXTURE_FORMATS, shared_memory_id_, shared_memory_offset_);
4092 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 4092 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
4093 EXPECT_EQ(num_formats, result->GetNumResults()); 4093 EXPECT_EQ(num_formats, result->GetNumResults());
4094 4094
4095 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4095 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4096 } 4096 }
4097 4097
4098 TEST_P(GLES2DecoderManualInitTest, TexStorageInvalidLevels) {
4099 InitState init;
4100 init.gl_version = "OpenGL 4.2";
4101 init.extensions = "GL_ARB_texture_rectangle GL_ARB_texture_storage";
4102 init.bind_generates_resource = true;
4103 InitDecoder(init);
4104 DoBindTexture(GL_TEXTURE_RECTANGLE_ARB, client_texture_id_,
4105 kServiceTextureId);
4106 TexStorage2DEXT cmd;
4107 cmd.Init(GL_TEXTURE_RECTANGLE_ARB, 2, GL_RGBA8, 4, 4);
4108 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
4109 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
4110 }
4111
4098 TEST_P(GLES3DecoderTest, TexStorage3DValidArgs) { 4112 TEST_P(GLES3DecoderTest, TexStorage3DValidArgs) {
4099 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId); 4113 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId);
4100 EXPECT_CALL(*gl_, TexStorage3D(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6)) 4114 EXPECT_CALL(*gl_, TexStorage3D(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6))
4101 .Times(1) 4115 .Times(1)
4102 .RetiresOnSaturation(); 4116 .RetiresOnSaturation();
4103 TexStorage3D cmd; 4117 TexStorage3D cmd;
4104 cmd.Init(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6); 4118 cmd.Init(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6);
4105 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 4119 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
4106 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4120 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4107 } 4121 }
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4446 // TODO(gman): CompressedTexSubImage2DImmediate 4460 // TODO(gman): CompressedTexSubImage2DImmediate
4447 4461
4448 // TODO(gman): TexImage2D 4462 // TODO(gman): TexImage2D
4449 4463
4450 // TODO(gman): TexImage2DImmediate 4464 // TODO(gman): TexImage2DImmediate
4451 4465
4452 // TODO(gman): TexSubImage2DImmediate 4466 // TODO(gman): TexSubImage2DImmediate
4453 4467
4454 } // namespace gles2 4468 } // namespace gles2
4455 } // namespace gpu 4469 } // namespace gpu
OLDNEW
« 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