OLD | NEW |
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 "GrGLShaderStringBuilder.h" | 9 #include "GrGLShaderStringBuilder.h" |
10 #include "GrGLProgramBuilder.h" | 10 #include "GrGLProgramBuilder.h" |
(...skipping 328 matching lines...) Loading... |
339 // ES 3.00 requires custom color output but doesn't support bindFragDataLoca
tion | 339 // ES 3.00 requires custom color output but doesn't support bindFragDataLoca
tion |
340 if (fHasCustomColorOutput && | 340 if (fHasCustomColorOutput && |
341 kGLES_GrGLStandard != fProgramBuilder->gpu()->ctxInfo().standard()) { | 341 kGLES_GrGLStandard != fProgramBuilder->gpu()->ctxInfo().standard()) { |
342 GL_CALL(BindFragDataLocation(programID, 0, declared_color_output_name())
); | 342 GL_CALL(BindFragDataLocation(programID, 0, declared_color_output_name())
); |
343 } | 343 } |
344 if (fHasSecondaryOutput) { | 344 if (fHasSecondaryOutput) { |
345 GL_CALL(BindFragDataLocationIndexed(programID, 0, 1, dual_source_output_
name())); | 345 GL_CALL(BindFragDataLocationIndexed(programID, 0, 1, dual_source_output_
name())); |
346 } | 346 } |
347 } | 347 } |
348 | 348 |
349 void GrGLFragmentShaderBuilder::addVarying(GrSLType type, | 349 void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrGLShaderVar::Precis
ion fsPrec) { |
350 const char* name, | 350 v->fFsIn = v->fVsOut; |
351 const char** fsInName, | 351 if (v->fGsOut) { |
352 GrGLShaderVar::Precision fsPrecision) { | 352 v->fFsIn = v->fGsOut; |
353 fInputs.push_back().set(type, GrGLShaderVar::kVaryingIn_TypeModifier, name,
fsPrecision); | |
354 if (fsInName) { | |
355 *fsInName = name; | |
356 } | 353 } |
| 354 fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v-
>fFsIn, fsPrec); |
357 } | 355 } |
OLD | NEW |