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

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

Issue 2744663006: Fix skip EXTMultisampleCompatibilityTest.DrawAlphaOneAndResolve (Closed)
Patch Set: GPUInfo -> GPUTestBotConfig Created 3 years, 9 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/config/gpu_test_config.h » ('j') | gpu/config/gpu_test_config.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 <GLES2/gl2extchromium.h> 7 #include <GLES2/gl2extchromium.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // come from non-deterministic rendering. 188 // come from non-deterministic rendering.
189 EXPECT_EQ(0, memcmp(results[0].get(), results[2].get(), kResultSize)); 189 EXPECT_EQ(0, memcmp(results[0].get(), results[2].get(), kResultSize));
190 } 190 }
191 191
192 TEST_F(EXTMultisampleCompatibilityTest, DrawAlphaOneAndResolve) { 192 TEST_F(EXTMultisampleCompatibilityTest, DrawAlphaOneAndResolve) {
193 // Test that enabling GL_SAMPLE_ALPHA_TO_ONE_EXT affects rendering. 193 // Test that enabling GL_SAMPLE_ALPHA_TO_ONE_EXT affects rendering.
194 if (!IsApplicable()) { 194 if (!IsApplicable()) {
195 return; 195 return;
196 } 196 }
197 197
198 #if defined(OS_ANDROID)
199 // TODO: Figure out why this fails on NVIDIA Shield. crbug.com/700060. 198 // TODO: Figure out why this fails on NVIDIA Shield. crbug.com/700060.
200 std::string renderer(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); 199 gpu::GPUTestBotConfig bot_config;
201 std::string version(reinterpret_cast<const char*>(glGetString(GL_VERSION))); 200 gpu::GPUTestConfig config;
202 if (renderer.find("NVIDIA Tegra") != std::string::npos && 201 config.set_machine_model_name("sb_na_wf");
203 version.find("OpenGL ES 3.2 NVIDIA 361.00") != std::string::npos) 202 if (bot_config.LoadCurrentConfig(nullptr) && bot_config.Matches(config))
204 return; 203 return;
205 #endif
206 204
207 // SAMPLE_ALPHA_TO_ONE is specified to transform alpha values of 205 // SAMPLE_ALPHA_TO_ONE is specified to transform alpha values of
208 // covered samples to 1.0. In order to detect it, we use non-1.0 206 // covered samples to 1.0. In order to detect it, we use non-1.0
209 // alpha. 207 // alpha.
210 static const float kBlue[] = {0.0f, 0.0f, 1.0f, 0.5f}; 208 static const float kBlue[] = {0.0f, 0.0f, 1.0f, 0.5f};
211 static const float kGreen[] = {0.0f, 1.0f, 0.0f, 0.5f}; 209 static const float kGreen[] = {0.0f, 1.0f, 0.0f, 0.5f};
212 static const float kRed[] = {1.0f, 0.0f, 0.0f, 0.5f}; 210 static const float kRed[] = {1.0f, 0.0f, 0.0f, 0.5f};
213 211
214 // Different drivers seem to behave differently with respect to resulting 212 // Different drivers seem to behave differently with respect to resulting
215 // alpha value. These might be due to different MSAA sample counts causing 213 // alpha value. These might be due to different MSAA sample counts causing
(...skipping 29 matching lines...) Expand all
245 glDisable(GL_SAMPLE_ALPHA_TO_ONE_EXT); 243 glDisable(GL_SAMPLE_ALPHA_TO_ONE_EXT);
246 } 244 }
247 } 245 }
248 EXPECT_NE(0, memcmp(results[0].get(), results[1].get(), kResultSize)); 246 EXPECT_NE(0, memcmp(results[0].get(), results[1].get(), kResultSize));
249 // Verify that rendering is deterministic, so that the pass above does not 247 // Verify that rendering is deterministic, so that the pass above does not
250 // come from non-deterministic rendering. 248 // come from non-deterministic rendering.
251 EXPECT_EQ(0, memcmp(results[0].get(), results[2].get(), kResultSize)); 249 EXPECT_EQ(0, memcmp(results[0].get(), results[2].get(), kResultSize));
252 } 250 }
253 251
254 } // namespace gpu 252 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_test_config.h » ('j') | gpu/config/gpu_test_config.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698