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

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

Issue 675193002: Revert of Added varying struct (Closed) Base URL: https://skia.googlesource.com/skia.git@gp_emit_struct
Patch Set: 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 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...) Expand 10 before | Expand all | Expand 10 after
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(GrGLVarying* v, GrGLShaderVar::Precis ion fsPrec) { 349 void GrGLFragmentShaderBuilder::addVarying(GrSLType type,
350 v->fFsIn = v->fVsOut; 350 const char* name,
351 if (v->fGsOut) { 351 const char** fsInName,
352 v->fFsIn = v->fGsOut; 352 GrGLShaderVar::Precision fsPrecision) {
353 fInputs.push_back().set(type, GrGLShaderVar::kVaryingIn_TypeModifier, name, fsPrecision);
354 if (fsInName) {
355 *fsInName = name;
353 } 356 }
354 fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v- >fFsIn, fsPrec);
355 } 357 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.h ('k') | src/gpu/gl/builders/GrGLGeometryShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698