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

Side by Side Diff: src/gpu/gl/GrGLContext.cpp

Issue 659443007: Support GLSL es 3.00 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug war Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLContext.h" 8 #include "GrGLContext.h"
9 9
10 //////////////////////////////////////////////////////////////////////////////// 10 ////////////////////////////////////////////////////////////////////////////////
(...skipping 29 matching lines...) Expand all
40 if (GR_GL_INVALID_VER == fGLVersion) { 40 if (GR_GL_INVALID_VER == fGLVersion) {
41 return false; 41 return false;
42 } 42 }
43 43
44 if (!GrGetGLSLGeneration(interface, &fGLSLGeneration)) { 44 if (!GrGetGLSLGeneration(interface, &fGLSLGeneration)) {
45 return false; 45 return false;
46 } 46 }
47 47
48 fVendor = GrGLGetVendor(interface); 48 fVendor = GrGLGetVendor(interface);
49 49
50 /*
51 * Qualcomm drivers have a horrendous bug with some drives. Though t hey claim to
bsalomon 2014/10/16 01:41:34 drives->drivers last sentence needs a '.'
52 * support GLES 3.00, some perfectly valid GLSL300 shaders will only compile with
53 * #version 100, and will fail to compile with #version 300 es. In the long term, we
54 * need to lock this down to a specific driver version
55 */
56 if (kQualcomm_GrGLVendor == fVendor) {
57 fGLSLGeneration = k110_GrGLSLGeneration;
58 }
59
50 fRenderer = GrGLGetRendererFromString(renderer); 60 fRenderer = GrGLGetRendererFromString(renderer);
51 61
52 fIsMesa = GrGLIsMesaFromVersionString(ver); 62 fIsMesa = GrGLIsMesaFromVersionString(ver);
53 63
54 fIsChromium = GrGLIsChromiumFromRendererString(renderer); 64 fIsChromium = GrGLIsChromiumFromRendererString(renderer);
55 65
56 // This must occur before caps init. 66 // This must occur before caps init.
57 fInterface.reset(SkRef(interface)); 67 fInterface.reset(SkRef(interface));
58 68
59 return fGLCaps->init(*this, interface); 69 return fGLCaps->init(*this, interface);
60 } 70 }
61 } 71 }
62 return false; 72 return false;
63 } 73 }
64 74
65 bool GrGLContextInfo::isInitialized() const { return SkToBool(fInterface.get()); } 75 bool GrGLContextInfo::isInitialized() const { return SkToBool(fInterface.get()); }
66 76
67 void GrGLContextInfo::reset() { 77 void GrGLContextInfo::reset() {
68 fInterface.reset(NULL); 78 fInterface.reset(NULL);
69 fGLVersion = GR_GL_VER(0, 0); 79 fGLVersion = GR_GL_VER(0, 0);
70 fGLSLGeneration = static_cast<GrGLSLGeneration>(0); 80 fGLSLGeneration = static_cast<GrGLSLGeneration>(0);
71 fVendor = kOther_GrGLVendor; 81 fVendor = kOther_GrGLVendor;
72 fRenderer = kOther_GrGLRenderer; 82 fRenderer = kOther_GrGLRenderer;
73 fIsMesa = false; 83 fIsMesa = false;
74 fIsChromium = false; 84 fIsChromium = false;
75 fGLCaps->reset(); 85 fGLCaps->reset();
76 } 86 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLSL.h » ('j') | src/gpu/gl/GrGLSL.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698