bug fix for glsl identity string
authorjoshualitt <joshualitt@chromium.org>
Fri, 17 Oct 2014 17:54:04 +0000 (10:54 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 17 Oct 2014 17:54:04 +0000 (10:54 -0700)
BUG=skia:

Review URL: https://codereview.chromium.org/659313004

src/gpu/gl/GrGLSL.cpp

index 34c805e21fcada65618a8874c9bffc9ee4cf083f..d388d9120a1d3fc43891ba47a50f2f4221ddb432 100644 (file)
@@ -76,7 +76,11 @@ const char* GrGetGLSLVersionDecl(const GrGLContextInfo& info) {
                 return "#version 300 es\n";
             } else {
                 SkASSERT(kGL_GrGLStandard == info.standard());
-                return "#version 330 compatibility\n";
+                if (info.caps()->isCoreProfile()) {
+                    return "#version 330\n";
+                } else {
+                    return "#version 330 compatibility\n";
+                }
             }
         case k310es_GrGLSLGeneration:
             SkASSERT(kGLES_GrGLStandard == info.standard());