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

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

Issue 1301053002: gpu: introduce DISABLE_TEXTURE_STORAGE workaround for mesa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply < 10.6 Created 5 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 | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/config/gpu_driver_bug_list_json.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 <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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 GLuint fbo_; 44 GLuint fbo_;
45 bool extension_available_; 45 bool extension_available_;
46 }; 46 };
47 47
48 TEST_F(TextureStorageTest, CorrectPixels) { 48 TEST_F(TextureStorageTest, CorrectPixels) {
49 if (!extension_available_) 49 if (!extension_available_)
50 return; 50 return;
51 51
52 glTexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGBA8_OES, 2, 2); 52 glTexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGBA8_OES, 2, 2);
53 53
54 // Mesa dirvers crash without rebinding to FBO. It's why
55 // DISABLE_TEXTURE_STORAGE workaround is introduced. crbug.com/521904
56 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
57 tex_, 0);
58
54 uint8 source_pixels[16] = { 59 uint8 source_pixels[16] = {
55 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4 60 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4
56 }; 61 };
57 glTexSubImage2D(GL_TEXTURE_2D, 62 glTexSubImage2D(GL_TEXTURE_2D,
58 0, 63 0,
59 0, 0, 64 0, 0,
60 2, 2, 65 2, 2,
61 GL_RGBA, GL_UNSIGNED_BYTE, 66 GL_RGBA, GL_UNSIGNED_BYTE,
62 source_pixels); 67 source_pixels);
63 EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 2, 2, 0, source_pixels)); 68 EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 2, 2, 0, source_pixels));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 GL_RGBA, 154 GL_RGBA,
150 GL_UNSIGNED_BYTE, 155 GL_UNSIGNED_BYTE,
151 NULL); 156 NULL);
152 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); 157 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
153 } 158 }
154 159
155 } // namespace gpu 160 } // namespace gpu
156 161
157 162
158 163
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698