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

Side by Side Diff: src/gpu/gl/GrGLShaderVar.h

Issue 659443007: Support GLSL es 3.00 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nvpr fix 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
« no previous file with comments | « src/gpu/gl/GrGLSL.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 #ifndef GrGLShaderVar_DEFINED 8 #ifndef GrGLShaderVar_DEFINED
9 #define GrGLShaderVar_DEFINED 9 #define GrGLShaderVar_DEFINED
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 /** 152 /**
153 * Write a declaration of this variable to out. 153 * Write a declaration of this variable to out.
154 */ 154 */
155 void appendDecl(const GrGLContextInfo& ctxInfo, SkString* out) const { 155 void appendDecl(const GrGLContextInfo& ctxInfo, SkString* out) const {
156 if (kUpperLeft_Origin == fOrigin) { 156 if (kUpperLeft_Origin == fOrigin) {
157 // this is the only place where we specify a layout modifier. If we use other layout 157 // this is the only place where we specify a layout modifier. If we use other layout
158 // modifiers in the future then they should be placed in a list. 158 // modifiers in the future then they should be placed in a list.
159 out->append("layout(origin_upper_left) "); 159 out->append("layout(origin_upper_left) ");
160 } 160 }
161 if (this->getTypeModifier() != kNone_TypeModifier) { 161 if (this->getTypeModifier() != kNone_TypeModifier) {
162 out->append(TypeModifierString(this->getTypeModifier(), 162 out->append(TypeModifierString(this->getTypeModifier(), ctxInfo.glslG eneration()));
163 ctxInfo.glslGeneration()));
164 out->append(" "); 163 out->append(" ");
165 } 164 }
166 out->append(PrecisionString(fPrecision, ctxInfo.standard())); 165 out->append(PrecisionString(fPrecision, ctxInfo.standard()));
167 GrSLType effectiveType = this->getType(); 166 GrSLType effectiveType = this->getType();
168 if (this->isArray()) { 167 if (this->isArray()) {
169 if (this->isUnsizedArray()) { 168 if (this->isUnsizedArray()) {
170 out->appendf("%s %s[]", 169 out->appendf("%s %s[]",
171 GrGLSLTypeString(effectiveType), 170 GrGLSLTypeString(effectiveType),
172 this->getName().c_str()); 171 this->getName().c_str());
173 } else { 172 } else {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 243
245 Origin fOrigin; 244 Origin fOrigin;
246 /// Work around driver bugs on some hardware that don't correctly 245 /// Work around driver bugs on some hardware that don't correctly
247 /// support uniform float [] 246 /// support uniform float []
248 bool fUseUniformFloatArrays; 247 bool fUseUniformFloatArrays;
249 248
250 typedef GrShaderVar INHERITED; 249 typedef GrShaderVar INHERITED;
251 }; 250 };
252 251
253 #endif 252 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLSL.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698