Index: src/gpu/GrPipeline.cpp |
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp |
index 906426caaaecc0699dd8d878ee2ccdfa9bdfd6dd..fc9f4eab12ecb1b4171bed990eca4f73841f0f10 100644 |
--- a/src/gpu/GrPipeline.cpp |
+++ b/src/gpu/GrPipeline.cpp |
@@ -112,13 +112,15 @@ void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin |
const GrProcOptInfo& coveragePOI, |
int* firstColorStageIdx, |
int* firstCoverageStageIdx) { |
- fReadsFragPosition = false; |
+ fReadsFragPosition = fXferProcessor->willReadFragmentPosition(); |
if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || |
(flags & GrXferProcessor::kOverrideColor_OptFlag)) { |
*firstColorStageIdx = pipelineBuilder.numColorFragmentStages(); |
} else { |
- fReadsFragPosition = colorPOI.readsFragPosition(); |
+ if (coveragePOI.readsFragPosition()) { |
+ fReadsFragPosition = true; |
+ } |
} |
if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) { |