Index: src/gpu/GrProcOptInfo.cpp |
diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp |
index 18a32020d4539154ca9d993ea98698ea05f3c35f..a84ac2e17fb45dcfb2a9f556b2a628dd68bcf53f 100644 |
--- a/src/gpu/GrProcOptInfo.cpp |
+++ b/src/gpu/GrProcOptInfo.cpp |
@@ -7,8 +7,9 @@ |
#include "GrProcOptInfo.h" |
-#include "GrGeometryProcessor.h" |
+#include "GrFragmentProcessor.h" |
#include "GrFragmentStage.h" |
+#include "GrGeometryProcessor.h" |
void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, |
int stageCount, |
@@ -22,6 +23,7 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, |
fInputColor = startColor; |
fRemoveVertexAttrib = false; |
fReadsDst = false; |
+ fReadsFragPosition = false; |
if (areCoverageStages && gp) { |
gp->computeInvariantOutput(&fInOut); |
@@ -31,17 +33,22 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, |
const GrFragmentProcessor* processor = stages[i].getProcessor(); |
fInOut.resetWillUseInputColor(); |
processor->computeInvariantOutput(&fInOut); |
- #ifdef SK_DEBUG |
+#ifdef SK_DEBUG |
fInOut.validate(); |
- #endif |
+#endif |
if (!fInOut.willUseInputColor()) { |
fFirstEffectStageIndex = i; |
fInputColorIsUsed = false; |
- fReadsDst = false; // Reset this since we don't care if previous stages read dst |
+ // Reset these since we don't care if previous stages read these values |
+ fReadsDst = false; |
+ fReadsFragPosition = false; |
} |
if (processor->willReadDstColor()) { |
fReadsDst = true; |
} |
+ if (processor->willReadFragmentPosition()) { |
+ fReadsFragPosition = true; |
+ } |
if (kRGBA_GrColorComponentFlags == fInOut.validFlags()) { |
fFirstEffectStageIndex = i + 1; |
fInputColor = fInOut.color(); |
@@ -50,7 +57,10 @@ void GrProcOptInfo::calcWithInitialValues(const GrFragmentStage* stages, |
// Since we are clearing all previous color stages we are in a state where we have found |
// zero stages that don't multiply the inputColor. |
fInOut.resetNonMulStageFound(); |
- fReadsDst = false; // Reset this since we don't care if previous stages read dst |
+ // Reset these since we don't care if previous stages read these values |
+ fReadsDst = false; |
+ fReadsFragPosition = false; |
} |
} |
} |
+ |