29 switch (interpolation) {
31 case Interpolation::kInterpolated:
33 case Interpolation::kCanBeFlat:
36 case Interpolation::kMustBeFlat:
50 v.
fType = varying->fType;
66 this->addAttribute(attr.asShaderVar());
69 this->addAttribute(attr.asShaderVar());
73void GrGLSLVaryingHandler::addAttribute(
const GrShaderVar& var) {
77 if (attr.getName().equals(var.
getName())) {
94 fDefaultInterpolationModifier =
"noperspective";
99 const char* modifier = v.fIsFlat ?
"flat" : fDefaultInterpolationModifier;
105 const char* fsIn = v.fVsOut.
c_str();
113void GrGLSLVaryingHandler::appendDecls(
const VarArray&
vars,
SkString*
out)
const {
static bool use_flat_interpolation(GrGLSLVaryingHandler::Interpolation interpolation, const GrShaderCaps &shaderCaps)
#define SK_ABORT(message,...)
static constexpr bool SkSLTypeIsFloatType(SkSLType type)
SkString nameVariable(char prefix, const char *name, bool mangle=true)
const GrShaderCaps * shaderCaps() const
GrGLSLFragmentShaderBuilder fFS
bool addFeature(uint32_t featureBit, const char *extensionName)
@ kNoPerspectiveInterpolation_GLSLPrivateFeature
void codeAppendf(const char format[],...) SK_PRINTF_LIKE(2
void emitAttributes(const GrGeometryProcessor &)
void addPassThroughAttribute(const GrShaderVar &vsVar, const char *output, Interpolation=Interpolation::kInterpolated)
void getVertexDecls(SkString *inputDecls, SkString *outputDecls) const
void getFragDecls(SkString *inputDecls, SkString *outputDecls) const
GrGLSLProgramBuilder * fProgramBuilder
virtual void onFinalize()=0
void addVarying(const char *name, GrGLSLVarying *varying, Interpolation=Interpolation::kInterpolated)
bool isInVertexShader() const
const char * vsOut() const
bool isInFragmentShader() const
const char * fsIn() const
const AttributeSet & vertexAttributes() const
const AttributeSet & instanceAttributes() const
const char * c_str() const
TypeModifier getTypeModifier() const
const SkString & getName() const
const char * c_str() const
T & emplace_back(Args &&... args)
DEF_SWITCHES_START aot vmservice shared library name
GrShaderFlags fVisibility
bool fPreferFlatInterpolation
const char * noperspectiveInterpolationExtensionString() const
bool fFlatInterpolationSupport
bool fNoPerspectiveInterpolationSupport
SkSL::GLSLGeneration fGLSLGeneration