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

Side by Side 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 unified diff | Download patch
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 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "gpu/command_buffer/tests/gl_manager.h" 9 #include "gpu/command_buffer/tests/gl_manager.h"
10 #include "gpu/command_buffer/tests/gl_test_utils.h" 10 #include "gpu/command_buffer/tests/gl_test_utils.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 0, 149 0,
150 GL_RGBA, 150 GL_RGBA,
151 4, 4, 151 4, 4,
152 0, 152 0,
153 GL_RGBA, 153 GL_RGBA,
154 GL_UNSIGNED_BYTE, 154 GL_UNSIGNED_BYTE,
155 NULL); 155 NULL);
156 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); 156 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
157 } 157 }
158 158
159 TEST_F(TextureStorageTest, InternalFormatBleedingToTexImage) {
160 if (!extension_available_)
161 return;
162
163 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
164 // The context is ES2 context.
165 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8_OES, 4, 4, 0, GL_RGBA,
166 GL_UNSIGNED_BYTE, nullptr);
167 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), glGetError());
168 }
169
159 } // namespace gpu 170 } // namespace gpu
160 171
161 172
162 173
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698