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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 append_texture_bindings(primProc, &textureBindings); | 199 append_texture_bindings(primProc, &textureBindings); |
200 | 200 |
201 GrFragmentProcessor::Iter iter(pipeline); | 201 GrFragmentProcessor::Iter iter(pipeline); |
202 GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.begin(), | 202 GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.begin(), |
203 fFragmentProcessors.count()); | 203 fFragmentProcessors.count()); |
204 const GrFragmentProcessor* fp = iter.next(); | 204 const GrFragmentProcessor* fp = iter.next(); |
205 GrGLSLFragmentProcessor* glslFP = glslIter.next(); | 205 GrGLSLFragmentProcessor* glslFP = glslIter.next(); |
206 while (fp && glslFP) { | 206 while (fp && glslFP) { |
207 glslFP->setData(fDataManager, *fp); | 207 glslFP->setData(fDataManager, *fp); |
208 append_texture_bindings(*fp, &textureBindings); | 208 append_texture_bindings(*fp, &textureBindings); |
209 fp = iter.next(), glslFP = glslIter.next(); | 209 fp = iter.next(); |
| 210 glslFP = glslIter.next(); |
210 } | 211 } |
211 SkASSERT(!fp && !glslFP); | 212 SkASSERT(!fp && !glslFP); |
212 | 213 |
213 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); | 214 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); |
214 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); | 215 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); |
215 | 216 |
216 // Get new descriptor sets | 217 // Get new descriptor sets |
217 if (fNumSamplers) { | 218 if (fNumSamplers) { |
218 if (fSamplerDescriptorSet) { | 219 if (fSamplerDescriptorSet) { |
219 fSamplerDescriptorSet->recycle(gpu); | 220 fSamplerDescriptorSet->recycle(gpu); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 507 |
507 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); | 508 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); |
508 b.add32((int32_t)pipeline.getDrawFace()); | 509 b.add32((int32_t)pipeline.getDrawFace()); |
509 | 510 |
510 b.add32(get_blend_info_key(pipeline)); | 511 b.add32(get_blend_info_key(pipeline)); |
511 | 512 |
512 b.add32(primitiveType); | 513 b.add32(primitiveType); |
513 | 514 |
514 return true; | 515 return true; |
515 } | 516 } |
OLD | NEW |