egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "GrOptDrawState.h" |
| 9 | |
| 10 | #include "GrDrawState.h" |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 11 | #include "GrDrawTargetCaps.h" |
joshualitt | 4973d9d | 2014-11-08 09:24:25 -0800 | [diff] [blame] | 12 | #include "GrGpu.h" |
egdaniel | b6cbc38 | 2014-11-13 11:00:34 -0800 | [diff] [blame] | 13 | #include "GrProcOptInfo.h" |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 14 | #include "GrXferProcessor.h" |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 15 | |
egdaniel | 170f90b | 2014-09-16 12:54:40 -0700 | [diff] [blame] | 16 | GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 17 | const GrDrawTargetCaps& caps, |
joshualitt | 54e0c12 | 2014-11-19 09:38:51 -0800 | [diff] [blame] | 18 | const ScissorState& scissorState, |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 19 | const GrDeviceCoordTexture* dstCopy, |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 20 | GrGpu::DrawType drawType) |
| 21 | : fFinalized(false) { |
| 22 | fDrawType = drawType; |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 23 | |
| 24 | const GrProcOptInfo& colorPOI = drawState.colorProcInfo(); |
| 25 | const GrProcOptInfo& coveragePOI = drawState.coverageProcInfo(); |
| 26 | |
| 27 | fColor = colorPOI.inputColorToEffectiveStage(); |
| 28 | fCoverage = drawState.getCoverage(); |
| 29 | |
| 30 | // Create XferProcessor from DS's XPFactory |
| 31 | SkAutoTUnref<GrXferProcessor> xferProcessor( |
| 32 | drawState.getXPFactory()->createXferProcessor(colorPOI, coveragePOI)); |
| 33 | |
| 34 | GrXferProcessor::OptFlags optFlags; |
| 35 | if (xferProcessor) { |
| 36 | fXferProcessor.reset(xferProcessor.get()); |
| 37 | |
| 38 | optFlags = xferProcessor->getOptimizations(colorPOI, |
| 39 | coveragePOI, |
| 40 | drawState.isCoverageDrawing(), |
| 41 | drawState.isColorWriteDisabled(), |
| 42 | drawState.getStencil().doesWrite(), |
| 43 | &fColor, |
| 44 | &fCoverage); |
| 45 | } |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 46 | |
| 47 | // When path rendering the stencil settings are not always set on the draw state |
| 48 | // so we must check the draw type. In cases where we will skip drawing we simply return a |
| 49 | // null GrOptDrawState. |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 50 | if (!xferProcessor || ((GrXferProcessor::kSkipDraw_OptFlag & optFlags) && |
| 51 | GrGpu::kStencilPath_DrawType != drawType)) { |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 52 | // Set the fields that don't default init and return. The lack of a render target will |
| 53 | // indicate that this can be skipped. |
| 54 | fFlags = 0; |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 55 | fDrawFace = GrDrawState::kInvalid_DrawFace; |
| 56 | fSrcBlend = kZero_GrBlendCoeff; |
| 57 | fDstBlend = kZero_GrBlendCoeff; |
| 58 | fBlendConstant = 0x0; |
| 59 | fViewMatrix.reset(); |
| 60 | return; |
| 61 | } |
| 62 | |
| 63 | fRenderTarget.reset(drawState.fRenderTarget.get()); |
| 64 | SkASSERT(fRenderTarget); |
joshualitt | 54e0c12 | 2014-11-19 09:38:51 -0800 | [diff] [blame] | 65 | fScissorState = scissorState; |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 66 | fViewMatrix = drawState.getViewMatrix(); |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 67 | fStencilSettings = drawState.getStencil(); |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 68 | fDrawFace = drawState.getDrawFace(); |
joshualitt | 9176e2c | 2014-11-20 07:28:52 -0800 | [diff] [blame] | 69 | // TODO move this out of optDrawState |
| 70 | if (dstCopy) { |
| 71 | fDstCopy = *dstCopy; |
| 72 | } |
| 73 | |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 74 | fFlags = 0; |
| 75 | if (drawState.isHWAntialias()) { |
| 76 | fFlags |= kHWAA_Flag; |
| 77 | } |
| 78 | if (drawState.isColorWriteDisabled()) { |
| 79 | fFlags |= kDisableColorWrite_Flag; |
| 80 | } |
| 81 | if (drawState.isDither()) { |
| 82 | fFlags |= kDither_Flag; |
| 83 | } |
| 84 | |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 85 | fDescInfo.fHasVertexColor = drawState.hasGeometryProcessor() && |
| 86 | drawState.getGeometryProcessor()->hasVertexColor(); |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 87 | |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 88 | fDescInfo.fHasVertexCoverage = drawState.hasGeometryProcessor() && |
| 89 | drawState.getGeometryProcessor()->hasVertexCoverage(); |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 90 | |
| 91 | bool hasLocalCoords = drawState.hasGeometryProcessor() && |
| 92 | drawState.getGeometryProcessor()->hasLocalCoords(); |
egdaniel | 9cf45bf | 2014-10-08 06:49:10 -0700 | [diff] [blame] | 93 | |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 94 | int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 95 | fDescInfo.fInputColorIsUsed = colorPOI.inputColorIsUsed(); |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 96 | if (colorPOI.removeVertexAttrib()) { |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 97 | fDescInfo.fHasVertexColor = false; |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | // TODO: Once we can handle single or four channel input into coverage stages then we can use |
| 101 | // drawState's coverageProcInfo (like color above) to set this initial information. |
| 102 | int firstCoverageStageIdx = 0; |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 103 | fDescInfo.fInputCoverageIsUsed = true; |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 104 | |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 105 | |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 106 | GrXferProcessor::BlendInfo blendInfo; |
| 107 | fXferProcessor->getBlendInfo(&blendInfo); |
| 108 | fSrcBlend = blendInfo.fSrcBlend; |
| 109 | fDstBlend = blendInfo.fDstBlend; |
| 110 | fBlendConstant = blendInfo.fBlendConstant; |
| 111 | |
| 112 | this->adjustProgramFromOptimizations(drawState, optFlags, colorPOI, coveragePOI, |
| 113 | &firstColorStageIdx, &firstCoverageStageIdx); |
| 114 | |
| 115 | fDescInfo.fRequiresLocalCoordAttrib = hasLocalCoords; |
egdaniel | 9cf45bf | 2014-10-08 06:49:10 -0700 | [diff] [blame] | 116 | |
| 117 | // Copy GeometryProcesssor from DS or ODS |
joshualitt | 5478d42 | 2014-11-14 16:00:38 -0800 | [diff] [blame] | 118 | SkASSERT(GrGpu::IsPathRenderingDrawType(drawType) || |
| 119 | GrGpu::kStencilPath_DrawType || |
| 120 | drawState.hasGeometryProcessor()); |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 121 | fGeometryProcessor.reset(drawState.getGeometryProcessor()); |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 122 | |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 123 | // Copy Stages from DS to ODS |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 124 | for (int i = firstColorStageIdx; i < drawState.numColorStages(); ++i) { |
| 125 | SkNEW_APPEND_TO_TARRAY(&fFragmentStages, |
| 126 | GrPendingFragmentStage, |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 127 | (drawState.fColorStages[i], hasLocalCoords)); |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 128 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 129 | |
egdaniel | d9aa218 | 2014-10-09 13:47:05 -0700 | [diff] [blame] | 130 | fNumColorStages = fFragmentStages.count(); |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 131 | for (int i = firstCoverageStageIdx; i < drawState.numCoverageStages(); ++i) { |
| 132 | SkNEW_APPEND_TO_TARRAY(&fFragmentStages, |
| 133 | GrPendingFragmentStage, |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 134 | (drawState.fCoverageStages[i], hasLocalCoords)); |
egdaniel | 9cf45bf | 2014-10-08 06:49:10 -0700 | [diff] [blame] | 135 | } |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 136 | |
joshualitt | 87f48d9 | 2014-12-04 10:41:40 -0800 | [diff] [blame] | 137 | // let the GP init the batch tracker |
| 138 | if (drawState.hasGeometryProcessor()) { |
| 139 | GrGeometryProcessor::InitBT init; |
| 140 | init.fOutputColor = fDescInfo.fInputColorIsUsed; |
| 141 | init.fOutputCoverage = fDescInfo.fInputCoverageIsUsed; |
| 142 | init.fColor = this->getColor(); |
| 143 | init.fCoverage = this->getCoverage(); |
| 144 | fGeometryProcessor->initBatchTracker(&fBatchTracker, init); |
| 145 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 146 | |
| 147 | this->setOutputStateInfo(drawState, optFlags, caps); |
joshualitt | 87f48d9 | 2014-12-04 10:41:40 -0800 | [diff] [blame] | 148 | } |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 149 | |
egdaniel | 9cf45bf | 2014-10-08 06:49:10 -0700 | [diff] [blame] | 150 | void GrOptDrawState::setOutputStateInfo(const GrDrawState& ds, |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 151 | GrXferProcessor::OptFlags optFlags, |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 152 | const GrDrawTargetCaps& caps) { |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 153 | // Set this default and then possibly change our mind if there is coverage. |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 154 | fDescInfo.fPrimaryOutputType = GrProgramDesc::kModulate_PrimaryOutputType; |
| 155 | fDescInfo.fSecondaryOutputType = GrProgramDesc::kNone_SecondaryOutputType; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 156 | |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 157 | // Determine whether we should use dual source blending or shader code to keep coverage |
| 158 | // separate from color. |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 159 | bool keepCoverageSeparate = !(optFlags & GrXferProcessor::kSetCoverageDrawing_OptFlag); |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 160 | if (keepCoverageSeparate && !ds.hasSolidCoverage()) { |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 161 | if (caps.dualSourceBlendingSupport()) { |
| 162 | if (kZero_GrBlendCoeff == fDstBlend) { |
| 163 | // write the coverage value to second color |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 164 | fDescInfo.fSecondaryOutputType = GrProgramDesc::kCoverage_SecondaryOutputType; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 165 | fDstBlend = (GrBlendCoeff)GrGpu::kIS2C_GrBlendCoeff; |
| 166 | } else if (kSA_GrBlendCoeff == fDstBlend) { |
| 167 | // SA dst coeff becomes 1-(1-SA)*coverage when dst is partially covered. |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 168 | fDescInfo.fSecondaryOutputType = GrProgramDesc::kCoverageISA_SecondaryOutputType; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 169 | fDstBlend = (GrBlendCoeff)GrGpu::kIS2C_GrBlendCoeff; |
| 170 | } else if (kSC_GrBlendCoeff == fDstBlend) { |
| 171 | // SA dst coeff becomes 1-(1-SA)*coverage when dst is partially covered. |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 172 | fDescInfo.fSecondaryOutputType = GrProgramDesc::kCoverageISC_SecondaryOutputType; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 173 | fDstBlend = (GrBlendCoeff)GrGpu::kIS2C_GrBlendCoeff; |
| 174 | } |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 175 | } else if (fDescInfo.fReadsDst && |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 176 | kOne_GrBlendCoeff == fSrcBlend && |
| 177 | kZero_GrBlendCoeff == fDstBlend) { |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 178 | fDescInfo.fPrimaryOutputType = GrProgramDesc::kCombineWithDst_PrimaryOutputType; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 179 | } |
| 180 | } |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 181 | } |
| 182 | |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 183 | void GrOptDrawState::adjustProgramFromOptimizations(const GrDrawState& ds, |
| 184 | GrXferProcessor::OptFlags flags, |
| 185 | const GrProcOptInfo& colorPOI, |
| 186 | const GrProcOptInfo& coveragePOI, |
| 187 | int* firstColorStageIdx, |
| 188 | int* firstCoverageStageIdx) { |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 189 | fDescInfo.fReadsDst = false; |
| 190 | fDescInfo.fReadsFragPosition = false; |
egdaniel | a7dc0a8 | 2014-09-17 08:25:05 -0700 | [diff] [blame] | 191 | |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 192 | if (flags & GrXferProcessor::kClearColorStages_OptFlag) { |
| 193 | fDescInfo.fInputColorIsUsed = true; |
| 194 | *firstColorStageIdx = ds.numColorStages(); |
| 195 | fDescInfo.fHasVertexColor = false; |
| 196 | } else { |
| 197 | fDescInfo.fReadsDst = colorPOI.readsDst(); |
| 198 | fDescInfo.fReadsFragPosition = colorPOI.readsFragPosition(); |
egdaniel | a7dc0a8 | 2014-09-17 08:25:05 -0700 | [diff] [blame] | 199 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 200 | |
| 201 | if (flags & GrXferProcessor::kClearCoverageStages_OptFlag) { |
| 202 | fDescInfo.fInputCoverageIsUsed = true; |
| 203 | *firstCoverageStageIdx = ds.numCoverageStages(); |
| 204 | fDescInfo.fHasVertexCoverage = false; |
| 205 | } else { |
| 206 | if (coveragePOI.readsDst()) { |
| 207 | fDescInfo.fReadsDst = true; |
| 208 | } |
| 209 | if (coveragePOI.readsFragPosition()) { |
| 210 | fDescInfo.fReadsFragPosition = true; |
| 211 | } |
egdaniel | a7dc0a8 | 2014-09-17 08:25:05 -0700 | [diff] [blame] | 212 | } |
| 213 | } |
| 214 | |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 215 | void GrOptDrawState::finalize(GrGpu* gpu) { |
| 216 | gpu->buildProgramDesc(*this, fDescInfo, fDrawType, &fDesc); |
| 217 | fFinalized = true; |
| 218 | } |
| 219 | |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 220 | //////////////////////////////////////////////////////////////////////////////// |
| 221 | |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 222 | bool GrOptDrawState::operator== (const GrOptDrawState& that) const { |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 223 | if (fDescInfo != that.fDescInfo) { |
joshualitt | f78c60c | 2014-12-04 06:01:45 -0800 | [diff] [blame] | 224 | return false; |
| 225 | } |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 226 | |
| 227 | if (!fDescInfo.fHasVertexColor && this->fColor != that.fColor) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 228 | return false; |
| 229 | } |
| 230 | |
| 231 | if (this->getRenderTarget() != that.getRenderTarget() || |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 232 | this->fFragmentStages.count() != that.fFragmentStages.count() || |
| 233 | this->fNumColorStages != that.fNumColorStages || |
joshualitt | 54e0c12 | 2014-11-19 09:38:51 -0800 | [diff] [blame] | 234 | this->fScissorState != that.fScissorState || |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 235 | !this->fViewMatrix.cheapEqualTo(that.fViewMatrix) || |
| 236 | this->fSrcBlend != that.fSrcBlend || |
| 237 | this->fDstBlend != that.fDstBlend || |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 238 | this->fDrawType != that.fDrawType || |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 239 | this->fBlendConstant != that.fBlendConstant || |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 240 | this->fFlags != that.fFlags || |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 241 | this->fStencilSettings != that.fStencilSettings || |
joshualitt | 9176e2c | 2014-11-20 07:28:52 -0800 | [diff] [blame] | 242 | this->fDrawFace != that.fDrawFace || |
| 243 | this->fDstCopy.texture() != that.fDstCopy.texture()) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 244 | return false; |
| 245 | } |
| 246 | |
joshualitt | dafa4d0 | 2014-12-04 08:59:10 -0800 | [diff] [blame] | 247 | if (!fDescInfo.fHasVertexCoverage && this->fCoverage != that.fCoverage) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 248 | return false; |
| 249 | } |
| 250 | |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 251 | if (this->hasGeometryProcessor()) { |
| 252 | if (!that.hasGeometryProcessor()) { |
| 253 | return false; |
joshualitt | a5305a1 | 2014-10-10 17:47:00 -0700 | [diff] [blame] | 254 | } else if (!this->getGeometryProcessor()->isEqual(*that.getGeometryProcessor())) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 255 | return false; |
| 256 | } |
| 257 | } else if (that.hasGeometryProcessor()) { |
| 258 | return false; |
| 259 | } |
| 260 | |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 261 | // The program desc comparison should have already assured that the stage counts match. |
| 262 | SkASSERT(this->numFragmentStages() == that.numFragmentStages()); |
egdaniel | d9aa218 | 2014-10-09 13:47:05 -0700 | [diff] [blame] | 263 | for (int i = 0; i < this->numFragmentStages(); i++) { |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 264 | |
| 265 | if (this->getFragmentStage(i) != that.getFragmentStage(i)) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 266 | return false; |
| 267 | } |
| 268 | } |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 269 | return true; |
| 270 | } |
| 271 | |