aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProgramDesc.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-12-15 14:16:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-15 14:16:27 -0800
commit9b98932adaceb7ad0a617ade16616923f6bffe84 (patch)
treec9a7a19ca9555e3284d67b01ad1ad448a963ad17 /src/gpu/GrProgramDesc.h
parentbc3d0de755c4164563d136fc6b28fc186d275db7 (diff)
This change will ultimately pull uniform color, and to a much lesser degree uniform coverage, into GPs. There are still some loose ends because drawstate has the ability to override the GP, but fixing these cleanly will have to wait until we have deferred geometry in place and can make attribute / uniform decisions on the fly.
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r--src/gpu/GrProgramDesc.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 022bbc3d44..8e255275b6 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -54,16 +54,6 @@ public:
return memcmp(a.asKey(), b.asKey(), a.keyLength() & ~0x3) < 0;
}
-
- // Specifies where the initial color comes from before the stages are applied.
- enum ColorInput {
- kAllOnes_ColorInput,
- kAttribute_ColorInput,
- kUniform_ColorInput,
-
- kColorInputCnt
- };
-
struct KeyHeader {
uint8_t fDstReadKey; // set by GrGLShaderBuilder if there
// are effects that must read the dst.
@@ -72,19 +62,10 @@ public:
// effects that read the fragment position.
// Otherwise, 0.
- ColorInput fColorInput : 8;
- ColorInput fCoverageInput : 8;
-
- SkBool8 fHasGeometryProcessor;
int8_t fColorEffectCnt;
int8_t fCoverageEffectCnt;
};
-
- bool hasGeometryProcessor() const {
- return SkToBool(this->header().fHasGeometryProcessor);
- }
-
int numColorEffects() const {
return this->header().fColorEffectCnt;
}
@@ -101,31 +82,17 @@ public:
// A struct to communicate descriptor information to the program descriptor builder
struct DescInfo {
bool operator==(const DescInfo& that) const {
- return fHasVertexColor == that.fHasVertexColor &&
- fHasVertexCoverage == that.fHasVertexCoverage &&
- fInputColorIsUsed == that.fInputColorIsUsed &&
- fInputCoverageIsUsed == that.fInputCoverageIsUsed &&
- fReadsDst == that.fReadsDst &&
+ return fReadsDst == that.fReadsDst &&
fReadsFragPosition == that.fReadsFragPosition &&
fRequiresLocalCoordAttrib == that.fRequiresLocalCoordAttrib;
}
bool operator!=(const DescInfo& that) const { return !(*this == that); };
- // 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.
- bool fInputColorIsUsed;
- bool fInputCoverageIsUsed;
// These flags give aggregated info on the processor stages that are used when building
// programs.
bool fReadsDst;
bool fReadsFragPosition;
bool fRequiresLocalCoordAttrib;
-
};
private: