OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrVkPipelineState.h" | 8 #include "GrVkPipelineState.h" |
9 | 9 |
10 #include "GrPipeline.h" | 10 #include "GrPipeline.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 this->freeTempResources(gpu); | 191 this->freeTempResources(gpu); |
192 | 192 |
193 this->setRenderTargetState(pipeline); | 193 this->setRenderTargetState(pipeline); |
194 | 194 |
195 SkSTArray<8, const GrTextureAccess*> textureBindings; | 195 SkSTArray<8, const GrTextureAccess*> textureBindings; |
196 | 196 |
197 fGeometryProcessor->setData(fDataManager, primProc, | 197 fGeometryProcessor->setData(fDataManager, primProc, |
198 GrFragmentProcessor::CoordTransformIter(pipeline )); | 198 GrFragmentProcessor::CoordTransformIter(pipeline )); |
199 append_texture_bindings(primProc, &textureBindings); | 199 append_texture_bindings(primProc, &textureBindings); |
200 | 200 |
201 for (int i = 0; i < fFragmentProcessors.count(); ++i) { | 201 GrFragmentProcessor::Iter iter(pipeline); |
202 const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i); | 202 GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.begin(), |
203 fFragmentProcessors[i]->setData(fDataManager, processor); | 203 fFragmentProcessors.count()); |
204 append_texture_bindings(processor, &textureBindings); | 204 const GrFragmentProcessor* fp = iter.next(); |
205 GrGLSLFragmentProcessor* glslFP = glslIter.next(); | |
206 while (fp && glslFP) { | |
207 glslFP->setData(fDataManager, *fp); | |
208 append_texture_bindings(*fp, &textureBindings); | |
209 fp = iter.next(), glslFP = glslIter.next(); | |
robertphillips
2016/09/26 13:27:23
here too ...
| |
205 } | 210 } |
211 SkASSERT(!fp && !glslFP); | |
206 | 212 |
207 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); | 213 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); |
208 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); | 214 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); |
209 | 215 |
210 // Get new descriptor sets | 216 // Get new descriptor sets |
211 if (fNumSamplers) { | 217 if (fNumSamplers) { |
212 if (fSamplerDescriptorSet) { | 218 if (fSamplerDescriptorSet) { |
213 fSamplerDescriptorSet->recycle(gpu); | 219 fSamplerDescriptorSet->recycle(gpu); |
214 } | 220 } |
215 fSamplerDescriptorSet = gpu->resourceProvider().getSamplerDescriptorSet( fSamplerDSHandle); | 221 fSamplerDescriptorSet = gpu->resourceProvider().getSamplerDescriptorSet( fSamplerDSHandle); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
500 | 506 |
501 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); | 507 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); |
502 b.add32((int32_t)pipeline.getDrawFace()); | 508 b.add32((int32_t)pipeline.getDrawFace()); |
503 | 509 |
504 b.add32(get_blend_info_key(pipeline)); | 510 b.add32(get_blend_info_key(pipeline)); |
505 | 511 |
506 b.add32(primitiveType); | 512 b.add32(primitiveType); |
507 | 513 |
508 return true; | 514 return true; |
509 } | 515 } |
OLD | NEW |