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

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 1201623003: fix for calling bindFragDataLocation on OpenGL 2.1 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/GrGLCaps.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "GrGLFragmentShaderBuilder.h" 8 #include "GrGLFragmentShaderBuilder.h"
9 #include "GrGLProgramBuilder.h" 9 #include "GrGLProgramBuilder.h"
10 #include "../GrGLGpu.h" 10 #include "../GrGLGpu.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kFragment_Visibility , 257 fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kFragment_Visibility ,
258 &this->uniforms()); 258 &this->uniforms());
259 this->appendDecls(fInputs, &this->inputs()); 259 this->appendDecls(fInputs, &this->inputs());
260 // We shouldn't have declared outputs on 1.10 260 // We shouldn't have declared outputs on 1.10
261 SkASSERT(k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()) ; 261 SkASSERT(k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()) ;
262 this->appendDecls(fOutputs, &this->outputs()); 262 this->appendDecls(fOutputs, &this->outputs());
263 return this->finalize(programId, GR_GL_FRAGMENT_SHADER, shaderIds); 263 return this->finalize(programId, GR_GL_FRAGMENT_SHADER, shaderIds);
264 } 264 }
265 265
266 void GrGLFragmentShaderBuilder::bindFragmentShaderLocations(GrGLuint programID) { 266 void GrGLFragmentShaderBuilder::bindFragmentShaderLocations(GrGLuint programID) {
267 // ES 3.00 requires custom color output but doesn't support bindFragDataLoca tion 267 if (fHasCustomColorOutput && fProgramBuilder->gpu()->glCaps().bindFragDataLo cationSupport()) {
268 if (fHasCustomColorOutput &&
269 kGLES_GrGLStandard != fProgramBuilder->gpu()->ctxInfo().standard()) {
270 GL_CALL(BindFragDataLocation(programID, 0, declared_color_output_name()) ); 268 GL_CALL(BindFragDataLocation(programID, 0, declared_color_output_name()) );
271 } 269 }
272 if (fHasSecondaryOutput) { 270 if (fHasSecondaryOutput) {
273 GL_CALL(BindFragDataLocationIndexed(programID, 0, 1, dual_source_output_ name())); 271 GL_CALL(BindFragDataLocationIndexed(programID, 0, 1, dual_source_output_ name()));
274 } 272 }
275 } 273 }
276 274
277 void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrSLPrecision fsPrec) { 275 void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrSLPrecision fsPrec) {
278 v->fFsIn = v->fVsOut; 276 v->fFsIn = v->fVsOut;
279 if (v->fGsOut) { 277 if (v->fGsOut) {
280 v->fFsIn = v->fGsOut; 278 v->fFsIn = v->fGsOut;
281 } 279 }
282 fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v- >fFsIn, fsPrec); 280 fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v- >fFsIn, fsPrec);
283 } 281 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698