aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProgramDesc.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2014-12-10 15:03:00 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-10 15:03:01 -0800
commit294738268d3a9317282224f03063eb38ad19717c (patch)
treef1ee4a937e358b50c33ce21dcda3ab59fe28b1a3 /src/gpu/GrProgramDesc.h
parent5f9ba17a02df1380730015764e1550b04bf84ebc (diff)
Revert of Create xfer processor backend. (patchset #6 id:100001 of https://codereview.chromium.org/764643004/)
Reason for revert: CL breaks windows DM Original issue's description: > Create xfer processor backend. > > This includes: > -Having an actual XP stage at the end of the gl pipeline. > -All Blending work is handled by XP until actually setting GL blend states > -GLPrograms test to test XP > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904 TBR=bsalomon@google.com,joshualitt@chromium.org,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/789343002
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r--src/gpu/GrProgramDesc.h41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 3d53842e43..a20b99f749 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -55,6 +55,36 @@ public:
}
+ ///////////////////////////////////////////////////////////////////////////
+ /// @name Stage Output Types
+ ////
+
+ enum PrimaryOutputType {
+ // Modulate color and coverage, write result as the color output.
+ kModulate_PrimaryOutputType,
+ // Combines the coverage, dst, and color as coverage * color + (1 - coverage) * dst. This
+ // can only be set if fDstReadKey is non-zero.
+ kCombineWithDst_PrimaryOutputType,
+
+ kPrimaryOutputTypeCnt,
+ };
+
+ enum SecondaryOutputType {
+ // There is no secondary output
+ kNone_SecondaryOutputType,
+ // Writes coverage as the secondary output. Only set if dual source blending is supported
+ // and primary output is kModulate.
+ kCoverage_SecondaryOutputType,
+ // Writes coverage * (1 - colorA) as the secondary output. Only set if dual source blending
+ // is supported and primary output is kModulate.
+ kCoverageISA_SecondaryOutputType,
+ // Writes coverage * (1 - colorRGBA) as the secondary output. Only set if dual source
+ // blending is supported and primary output is kModulate.
+ kCoverageISC_SecondaryOutputType,
+
+ kSecondaryOutputTypeCnt,
+ };
+
// Specifies where the initial color comes from before the stages are applied.
enum ColorInput {
kAllOnes_ColorInput,
@@ -75,6 +105,9 @@ public:
ColorInput fColorInput : 8;
ColorInput fCoverageInput : 8;
+ PrimaryOutputType fPrimaryOutputType : 8;
+ SecondaryOutputType fSecondaryOutputType : 8;
+
SkBool8 fHasGeometryProcessor;
int8_t fColorEffectCnt;
int8_t fCoverageEffectCnt;
@@ -107,7 +140,10 @@ public:
fInputCoverageIsUsed == that.fInputCoverageIsUsed &&
fReadsDst == that.fReadsDst &&
fReadsFragPosition == that.fReadsFragPosition &&
- fRequiresLocalCoordAttrib == that.fRequiresLocalCoordAttrib;
+ fRequiresLocalCoordAttrib == that.fRequiresLocalCoordAttrib &&
+ fPrimaryOutputType == that.fPrimaryOutputType &&
+ fSecondaryOutputType == that.fSecondaryOutputType;
+
}
bool operator!=(const DescInfo& that) const { return !(*this == that); };
// TODO when GPs control uniform / attribute handling of color / coverage, then we can
@@ -126,6 +162,9 @@ public:
bool fReadsFragPosition;
bool fRequiresLocalCoordAttrib;
+ // Fragment shader color outputs
+ GrProgramDesc::PrimaryOutputType fPrimaryOutputType : 8;
+ GrProgramDesc::SecondaryOutputType fSecondaryOutputType : 8;
};
private: