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

Unified Diff: gpu/command_buffer/service/shader_translator.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/shader_translator_unittest.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 255caffc691d95efea9cb22c4cae85d0991ea263..8d89ec99fd674ab277a83dcd5380a42557435940 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -141,15 +141,15 @@ ShShaderOutput ShaderTranslator::GetShaderOutputLanguageForContext(
return SH_GLSL_330_CORE_OUTPUT;
} else if (context_version == 320) {
return SH_GLSL_150_CORE_OUTPUT;
Kimmo Kinnunen 2015/12/18 07:03:23 Would version 150 also have the same problem? htt
Ken Russell (switch to Gerrit) 2015/12/22 02:45:18 Looking more deeply, yes, it looks like this restr
- } else if (context_version == 310) {
- return SH_GLSL_140_OUTPUT;
- } else if (context_version == 300) {
- return SH_GLSL_130_OUTPUT;
}
- // Before OpenGL 3.0 we use compatibility profile. Also for future
- // specs between OpenGL 3.3 and OpenGL 4.0, at the time of writing,
- // we use compatibility profile.
+ // Before OpenGL 3.2 we use the compatibility profile. Shading
+ // language version 130 restricted how sampler arrays can be indexed
+ // in loops, which causes problems like crbug.com/550487 .
Kimmo Kinnunen 2015/12/18 07:03:23 Just verifying: so not using 130-150 would be a wo
Ken Russell (switch to Gerrit) 2015/12/22 02:45:18 OpenGL ES 2.0 / WebGL 1.0 require sampler arrays t
+ //
+ // Also for any future specs that might be introduced between OpenGL
+ // 3.3 and OpenGL 4.0, at the time of writing, we use the
+ // compatibility profile.
return SH_GLSL_COMPATIBILITY_OUTPUT;
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/shader_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698