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

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

Issue 1902453002: Revert of Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (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 <GLES3/gl3.h> 8 #include <GLES3/gl3.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 public: 92 public:
93 static const GLsizei kWidth = 100; 93 static const GLsizei kWidth = 100;
94 static const GLsizei kHeight = 100; 94 static const GLsizei kHeight = 100;
95 EXTBlendFuncExtendedDrawTest() : program_(0) {} 95 EXTBlendFuncExtendedDrawTest() : program_(0) {}
96 96
97 protected: 97 protected:
98 void SetUp() override { 98 void SetUp() override {
99 GLManager::Options options; 99 GLManager::Options options;
100 options.size = gfx::Size(kWidth, kHeight); 100 options.size = gfx::Size(kWidth, kHeight);
101 options.force_shader_name_hashing = GetParam(); 101 options.force_shader_name_hashing = GetParam();
102 gl_.Initialize(options); 102 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
103 gl_.InitializeWithCommandLine(options, &command_line);
103 } 104 }
104 105
105 bool IsApplicable() const { 106 bool IsApplicable() const {
106 return GLTestHelper::HasExtension("GL_EXT_blend_func_extended"); 107 return GLTestHelper::HasExtension("GL_EXT_blend_func_extended");
107 } 108 }
108 109
109 virtual const char* GetVertexShader() { 110 virtual const char* GetVertexShader() {
110 // clang-format off 111 // clang-format off
111 static const char* kVertexShader = 112 static const char* kVertexShader =
112 SHADER( 113 SHADER(
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 240
240 class EXTBlendFuncExtendedES3DrawTest : public EXTBlendFuncExtendedDrawTest { 241 class EXTBlendFuncExtendedES3DrawTest : public EXTBlendFuncExtendedDrawTest {
241 protected: 242 protected:
242 void SetUp() override { 243 void SetUp() override {
243 GLManager::Options options; 244 GLManager::Options options;
244 options.size = gfx::Size(kWidth, kHeight); 245 options.size = gfx::Size(kWidth, kHeight);
245 options.context_type = gles2::CONTEXT_TYPE_OPENGLES3; 246 options.context_type = gles2::CONTEXT_TYPE_OPENGLES3;
246 options.force_shader_name_hashing = GetParam(); 247 options.force_shader_name_hashing = GetParam();
247 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess()); 248 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
248 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); 249 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
249 gl_.InitializeWithCommandLine(options, command_line); 250 gl_.InitializeWithCommandLine(options, &command_line);
250 } 251 }
251 bool IsApplicable() const { 252 bool IsApplicable() const {
252 return gl_.IsInitialized() && EXTBlendFuncExtendedDrawTest::IsApplicable(); 253 return gl_.IsInitialized() && EXTBlendFuncExtendedDrawTest::IsApplicable();
253 } 254 }
254 const char* GetVertexShader() override { 255 const char* GetVertexShader() override {
255 // clang-format off 256 // clang-format off
256 static const char* kVertexShader = 257 static const char* kVertexShader =
257 "#version 300 es\n" 258 "#version 300 es\n"
258 SHADER( 259 SHADER(
259 in vec4 position; 260 in vec4 position;
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 654
654 INSTANTIATE_TEST_CASE_P(TranslatorVariants, 655 INSTANTIATE_TEST_CASE_P(TranslatorVariants,
655 EXTBlendFuncExtendedDrawTest, 656 EXTBlendFuncExtendedDrawTest,
656 ::testing::Bool()); 657 ::testing::Bool());
657 658
658 INSTANTIATE_TEST_CASE_P(TranslatorVariants, 659 INSTANTIATE_TEST_CASE_P(TranslatorVariants,
659 EXTBlendFuncExtendedES3DrawTest, 660 EXTBlendFuncExtendedES3DrawTest,
660 ::testing::Bool()); 661 ::testing::Bool());
661 662
662 } // namespace gpu 663 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698