diff options
author | joshualitt <joshualitt@chromium.org> | 2014-12-03 06:24:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-03 06:24:10 -0800 |
commit | 2dd1ae016d7f297b433c3ea3a771ef8e01657c1f (patch) | |
tree | 96aa03d4b4b1802490cb5b769627b75f3de4a470 /src/gpu/GrProgramDesc.h | |
parent | 960fb50a1a7ac76fd51e22983812f26bfffa6d1e (diff) |
First step to moving vertex attributes to the geometryProcessor
BUG=skia:
Review URL: https://codereview.chromium.org/761563002
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r-- | src/gpu/GrProgramDesc.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h index 788842d7be..655254f892 100644 --- a/src/gpu/GrProgramDesc.h +++ b/src/gpu/GrProgramDesc.h @@ -111,11 +111,6 @@ public: PrimaryOutputType fPrimaryOutputType : 8; SecondaryOutputType fSecondaryOutputType : 8; - int8_t fPositionAttributeIndex; - int8_t fLocalCoordAttributeIndex; - int8_t fColorAttributeIndex; - int8_t fCoverageAttributeIndex; - SkBool8 fHasGeometryProcessor; int8_t fColorEffectCnt; int8_t fCoverageEffectCnt; @@ -141,29 +136,10 @@ public: // A struct to communicate descriptor information to the program descriptor builder struct DescInfo { - int positionAttributeIndex() const { - return fFixedFunctionVertexAttribIndices[kPosition_GrVertexAttribBinding]; - } - int localCoordAttributeIndex() const { - return fFixedFunctionVertexAttribIndices[kLocalCoord_GrVertexAttribBinding]; - } - int colorVertexAttributeIndex() const { - return fFixedFunctionVertexAttribIndices[kColor_GrVertexAttribBinding]; - } - int coverageVertexAttributeIndex() const { - return fFixedFunctionVertexAttribIndices[kCoverage_GrVertexAttribBinding]; - } - bool hasLocalCoordAttribute() const { - return -1 != fFixedFunctionVertexAttribIndices[kLocalCoord_GrVertexAttribBinding]; - } - bool hasColorVertexAttribute() const { - return -1 != fFixedFunctionVertexAttribIndices[kColor_GrVertexAttribBinding]; - } - bool hasCoverageVertexAttribute() const { - return -1 != fFixedFunctionVertexAttribIndices[kCoverage_GrVertexAttribBinding]; - } - - int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt]; + // TODO when GPs control uniform / attribute handling of color / coverage, then we can + // clean this up + bool fHasVertexColor; + bool fHasVertexCoverage; // These flags are needed to protect the code from creating an unused uniform color/coverage // which will cause shader compiler errors. |