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

Side by Side Diff: gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Issue 1146633002: Update target of texStorage2D for ES 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update gl_tests Created 5 years, 7 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 | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | no next file » | 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 7
8 #include "gpu/command_buffer/tests/gl_manager.h" 8 #include "gpu/command_buffer/tests/gl_manager.h"
9 #include "gpu/command_buffer/tests/gl_test_utils.h" 9 #include "gpu/command_buffer/tests/gl_test_utils.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 glTexSubImage2D(GL_TEXTURE_2D, 2, 0, 0, 1, 1, 109 glTexSubImage2D(GL_TEXTURE_2D, 2, 0, 0, 1, 1,
110 GL_RGBA, GL_UNSIGNED_BYTE, source_pixels); 110 GL_RGBA, GL_UNSIGNED_BYTE, source_pixels);
111 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); 111 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
112 } 112 }
113 113
114 TEST_F(TextureStorageTest, BadTarget) { 114 TEST_F(TextureStorageTest, BadTarget) {
115 if (!extension_available_) 115 if (!extension_available_)
116 return; 116 return;
117 117
118 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 118 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
119 glTexStorage2DEXT(GL_TEXTURE_CUBE_MAP, 1, GL_RGBA8_OES, 4, 4); 119 glTexStorage2DEXT(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 1, GL_RGBA8_OES, 4, 4);
120 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), glGetError()); 120 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), glGetError());
121 } 121 }
122 122
123 TEST_F(TextureStorageTest, InvalidId) { 123 TEST_F(TextureStorageTest, InvalidId) {
124 if (!extension_available_) 124 if (!extension_available_)
125 return; 125 return;
126 126
127 glDeleteTextures(1, &tex_); 127 glDeleteTextures(1, &tex_);
128 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 128 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
129 glTexStorage2DEXT(GL_TEXTURE_2D, 1, GL_RGBA8_OES, 4, 4); 129 glTexStorage2DEXT(GL_TEXTURE_2D, 1, GL_RGBA8_OES, 4, 4);
(...skipping 19 matching lines...) Expand all
149 GL_RGBA, 149 GL_RGBA,
150 GL_UNSIGNED_BYTE, 150 GL_UNSIGNED_BYTE,
151 NULL); 151 NULL);
152 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); 152 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
153 } 153 }
154 154
155 } // namespace gpu 155 } // namespace gpu
156 156
157 157
158 158
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698