Index: src/gpu/vk/GrVkPipelineState.cpp |
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp |
index 73ff62ed98be7ef2d0b61f7a812c0fdd6fd6971b..48724c07bafde7e9625d13d78fb7ecaef27a40df 100644 |
--- a/src/gpu/vk/GrVkPipelineState.cpp |
+++ b/src/gpu/vk/GrVkPipelineState.cpp |
@@ -198,11 +198,17 @@ void GrVkPipelineState::setData(GrVkGpu* gpu, |
GrFragmentProcessor::CoordTransformIter(pipeline)); |
append_texture_bindings(primProc, &textureBindings); |
- for (int i = 0; i < fFragmentProcessors.count(); ++i) { |
- const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i); |
- fFragmentProcessors[i]->setData(fDataManager, processor); |
- append_texture_bindings(processor, &textureBindings); |
- } |
+ GrFragmentProcessor::Iter iter(pipeline); |
+ GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.begin(), |
+ fFragmentProcessors.count()); |
+ const GrFragmentProcessor* fp = iter.next(); |
+ GrGLSLFragmentProcessor* glslFP = glslIter.next(); |
+ while (fp && glslFP) { |
+ glslFP->setData(fDataManager, *fp); |
+ append_texture_bindings(*fp, &textureBindings); |
+ fp = iter.next(), glslFP = glslIter.next(); |
+ } |
+ SkASSERT(!fp && !glslFP); |
fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); |
append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); |