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

Side by Side Diff: gpu/command_buffer/service/shader_translator_unittest.cc

Issue 1540483002: Use GLSL version 100 for OpenGL context versions prior to 3.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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) 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 6
7 #include "gpu/command_buffer/service/shader_translator.h" 7 #include "gpu/command_buffer/service/shader_translator.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/gl/gl_version_info.h" 9 #include "ui/gl/gl_version_info.h"
10 10
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 KnownOpenGLContexts, 512 KnownOpenGLContexts,
513 ShaderTranslatorOutputVersionTest, 513 ShaderTranslatorOutputVersionTest,
514 testing::Values(make_gl_glsl_tuple("4.5", "#version 450\n"), 514 testing::Values(make_gl_glsl_tuple("4.5", "#version 450\n"),
515 make_gl_glsl_tuple("4.4", "#version 440\n"), 515 make_gl_glsl_tuple("4.4", "#version 440\n"),
516 make_gl_glsl_tuple("4.3", "#version 430\n"), 516 make_gl_glsl_tuple("4.3", "#version 430\n"),
517 make_gl_glsl_tuple("4.2", "#version 420\n"), 517 make_gl_glsl_tuple("4.2", "#version 420\n"),
518 make_gl_glsl_tuple("4.1", "#version 410\n"), 518 make_gl_glsl_tuple("4.1", "#version 410\n"),
519 make_gl_glsl_tuple("4.0", "#version 400\n"), 519 make_gl_glsl_tuple("4.0", "#version 400\n"),
520 make_gl_glsl_tuple("3.3", "#version 330\n"), 520 make_gl_glsl_tuple("3.3", "#version 330\n"),
521 make_gl_glsl_tuple("3.2", "#version 150\n"), 521 make_gl_glsl_tuple("3.2", "#version 150\n"),
522 make_gl_glsl_tuple("3.1", "#version 140\n"), 522 make_gl_glsl_tuple("3.1", ""),
523 make_gl_glsl_tuple("3.0", "#version 130\n"))); 523 make_gl_glsl_tuple("3.0", "")));
524 524
525 // Test data for the above test. Check that early OpenGL contexts get 525 // Test data for the above test. Check that early OpenGL contexts get
526 // GLSL compatibility profile shader, e.g. shader has no #version 526 // GLSL compatibility profile shader, e.g. shader has no #version
527 // directive. Also check that future version 3.3+ OpenGL contexts get 527 // directive. Also check that future version 3.3+ OpenGL contexts get
528 // similar shader. We do not expect that future 3.3+ specs contain 528 // similar shader. We do not expect that future 3.3+ specs contain
529 // the "all eariler GLSL versions" clause, since 3.3 did not contain 529 // the "all eariler GLSL versions" clause, since 3.3 did not contain
530 // it either. 530 // it either.
531 INSTANTIATE_TEST_CASE_P(OldOrUnknownOpenGLContexts, 531 INSTANTIATE_TEST_CASE_P(OldOrUnknownOpenGLContexts,
532 ShaderTranslatorOutputVersionTest, 532 ShaderTranslatorOutputVersionTest,
533 testing::Values(make_gl_glsl_tuple("3.4", ""), 533 testing::Values(make_gl_glsl_tuple("3.4", ""),
(...skipping 17 matching lines...) Expand all
551 ShaderTranslatorOutputVersionTest, 551 ShaderTranslatorOutputVersionTest,
552 testing::Values(make_gl_glsl_tuple("opengl es 2.0", ""), 552 testing::Values(make_gl_glsl_tuple("opengl es 2.0", ""),
553 make_gl_glsl_tuple("opengl es 3.0", ""), 553 make_gl_glsl_tuple("opengl es 3.0", ""),
554 make_gl_glsl_tuple("opengl es 3.1", ""), 554 make_gl_glsl_tuple("opengl es 3.1", ""),
555 make_gl_glsl_tuple("opengl es 3.2", 555 make_gl_glsl_tuple("opengl es 3.2",
556 ""))); 556 "")));
557 557
558 } // namespace gles2 558 } // namespace gles2
559 } // namespace gpu 559 } // namespace gpu
560 560
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698