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

Side by Side Diff: src/gpu/glsl/GrGLSLVarying.cpp

Issue 1709153002: Add more specialized fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make MSVC happy Created 4 years, 10 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/glsl/GrGLSLPrimitiveProcessor.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 2015 Google Inc. 2 * Copyright 2015 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 "glsl/GrGLSLVarying.h" 8 #include "glsl/GrGLSLVarying.h"
9 9
10 #include "glsl/GrGLSLProgramBuilder.h" 10 #include "glsl/GrGLSLProgramBuilder.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 fVertexInputs.push_back(var); 90 fVertexInputs.push_back(var);
91 } 91 }
92 92
93 void GrGLSLVaryingHandler::setNoPerspective() { 93 void GrGLSLVaryingHandler::setNoPerspective() {
94 const GrGLSLCaps& caps = *fProgramBuilder->glslCaps(); 94 const GrGLSLCaps& caps = *fProgramBuilder->glslCaps();
95 if (!caps.noperspectiveInterpolationSupport()) { 95 if (!caps.noperspectiveInterpolationSupport()) {
96 return; 96 return;
97 } 97 }
98 if (const char* extension = caps.noperspectiveInterpolationExtensionString() ) { 98 if (const char* extension = caps.noperspectiveInterpolationExtensionString() ) {
99 int bit = 1 << GrGLSLFragmentShaderBuilder::kNoPerspectiveInterpolation_ GLSLPrivateFeature; 99 int bit = 1 << GrGLSLFragmentBuilder::kNoPerspectiveInterpolation_GLSLPr ivateFeature;
100 fProgramBuilder->fVS.addFeature(bit, extension); 100 fProgramBuilder->fVS.addFeature(bit, extension);
101 if (fProgramBuilder->primitiveProcessor().willUseGeoShader()) { 101 if (fProgramBuilder->primitiveProcessor().willUseGeoShader()) {
102 fProgramBuilder->fGS.addFeature(bit, extension); 102 fProgramBuilder->fGS.addFeature(bit, extension);
103 } 103 }
104 fProgramBuilder->fFS.addFeature(bit, extension); 104 fProgramBuilder->fFS.addFeature(bit, extension);
105 } 105 }
106 fDefaultInterpolationModifier = "noperspective"; 106 fDefaultInterpolationModifier = "noperspective";
107 } 107 }
108 108
109 void GrGLSLVaryingHandler::finalize() { 109 void GrGLSLVaryingHandler::finalize() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 void GrGLSLVaryingHandler::getFragDecls(SkString* inputDecls, SkString* outputDe cls) const { 153 void GrGLSLVaryingHandler::getFragDecls(SkString* inputDecls, SkString* outputDe cls) const {
154 // We should not have any outputs in the fragment shader when using version 1.10 154 // We should not have any outputs in the fragment shader when using version 1.10
155 SkASSERT(k110_GrGLSLGeneration != fProgramBuilder->glslCaps()->generation() || 155 SkASSERT(k110_GrGLSLGeneration != fProgramBuilder->glslCaps()->generation() ||
156 fFragOutputs.empty()); 156 fFragOutputs.empty());
157 this->appendDecls(fFragInputs, inputDecls); 157 this->appendDecls(fFragInputs, inputDecls);
158 this->appendDecls(fFragOutputs, outputDecls); 158 this->appendDecls(fFragOutputs, outputDecls);
159 } 159 }
160 160
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698