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

Unified Diff: gpu/command_buffer/service/shader_translator.cc

Issue 1054883004: Revert of Use the desktop GL core profile on Linux when ES3 support is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/shader_translator.cc
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index bc8b1fa63eff6f989c7213e82f99ea0a86785e69..b4a94fc9d7befc12cba4affab7f5fc624199503a 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -117,20 +117,19 @@
g_translator_initializer.Get();
- ShShaderOutput shader_output = SH_ESSL_OUTPUT;
- switch (glsl_implementation_type) {
- case kGlsl:
+ ShShaderOutput shader_output;
+ if (glsl_implementation_type == kGlslES) {
+ shader_output = SH_ESSL_OUTPUT;
+ } else {
+ // TODO(kbr): clean up the tests of shader_spec and
+ // gfx::GetGLImplementation(). crbug.com/471960
+ if (shader_spec == SH_WEBGL2_SPEC ||
+ gfx::GetGLImplementation() ==
+ gfx::kGLImplementationDesktopGLCoreProfile) {
+ shader_output = SH_GLSL_CORE_OUTPUT;
+ } else {
shader_output = SH_GLSL_COMPATIBILITY_OUTPUT;
- break;
- case kGlslCoreProfile:
- shader_output = SH_GLSL_CORE_OUTPUT;
- break;
- case kGlslES:
- // Handled in initialization above.
- break;
- default:
- NOTREACHED();
- break;
+ }
}
{
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698