OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "gpu/command_buffer/service/shader_translator.h" | 5 #include "gpu/command_buffer/service/shader_translator.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 | 7 |
8 namespace gpu { | 8 namespace gpu { |
9 namespace gles2 { | 9 namespace gles2 { |
10 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 SH_FRAGMENT_SHADER, SH_GLES2_SPEC, &resources, | 238 SH_FRAGMENT_SHADER, SH_GLES2_SPEC, &resources, |
239 ShaderTranslatorInterface::kGlsl, | 239 ShaderTranslatorInterface::kGlsl, |
240 static_cast<ShCompileOptions>(0))); | 240 static_cast<ShCompileOptions>(0))); |
241 resources.EXT_draw_buffers = 1; | 241 resources.EXT_draw_buffers = 1; |
242 ASSERT_TRUE(translator_3->Init( | 242 ASSERT_TRUE(translator_3->Init( |
243 SH_VERTEX_SHADER, SH_GLES2_SPEC, &resources, | 243 SH_VERTEX_SHADER, SH_GLES2_SPEC, &resources, |
244 ShaderTranslatorInterface::kGlsl, | 244 ShaderTranslatorInterface::kGlsl, |
245 SH_EMULATE_BUILT_IN_FUNCTIONS)); | 245 SH_EMULATE_BUILT_IN_FUNCTIONS)); |
246 | 246 |
247 std::string options_1( | 247 std::string options_1( |
248 translator_1->GetStringForOptionsThatWouldEffectCompilation()); | 248 translator_1->GetStringForOptionsThatWouldAffectCompilation()); |
249 std::string options_2( | 249 std::string options_2( |
250 translator_1->GetStringForOptionsThatWouldEffectCompilation()); | 250 translator_1->GetStringForOptionsThatWouldAffectCompilation()); |
251 std::string options_3( | 251 std::string options_3( |
252 translator_2->GetStringForOptionsThatWouldEffectCompilation()); | 252 translator_2->GetStringForOptionsThatWouldAffectCompilation()); |
253 std::string options_4( | 253 std::string options_4( |
254 translator_3->GetStringForOptionsThatWouldEffectCompilation()); | 254 translator_3->GetStringForOptionsThatWouldAffectCompilation()); |
255 | 255 |
256 EXPECT_EQ(options_1, options_2); | 256 EXPECT_EQ(options_1, options_2); |
257 EXPECT_NE(options_1, options_3); | 257 EXPECT_NE(options_1, options_3); |
258 EXPECT_NE(options_1, options_4); | 258 EXPECT_NE(options_1, options_4); |
259 EXPECT_NE(options_3, options_4); | 259 EXPECT_NE(options_3, options_4); |
260 } | 260 } |
261 | 261 |
262 } // namespace gles2 | 262 } // namespace gles2 |
263 } // namespace gpu | 263 } // namespace gpu |
264 | 264 |
OLD | NEW |