| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 const GrPrimitiveProcessor& primProc, | 187 const GrPrimitiveProcessor& primProc, |
| 188 const GrPipeline& pipeline) { | 188 const GrPipeline& pipeline) { |
| 189 // This is here to protect against someone calling setData multiple times in
a row without | 189 // This is here to protect against someone calling setData multiple times in
a row without |
| 190 // freeing the tempData between calls. | 190 // freeing the tempData between calls. |
| 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
)); | |
| 199 append_texture_bindings(primProc, &textureBindings); | 198 append_texture_bindings(primProc, &textureBindings); |
| 200 | 199 |
| 201 for (int i = 0; i < fFragmentProcessors.count(); ++i) { | 200 for (int i = 0; i < fFragmentProcessors.count(); ++i) { |
| 202 const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i); | 201 const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i); |
| 203 fFragmentProcessors[i]->setData(fDataManager, processor); | 202 fFragmentProcessors[i]->setData(fDataManager, processor); |
| 203 fGeometryProcessor->setTransformData(primProc, fDataManager, i, |
| 204 processor.coordTransforms()); |
| 204 append_texture_bindings(processor, &textureBindings); | 205 append_texture_bindings(processor, &textureBindings); |
| 205 } | 206 } |
| 206 | 207 |
| 207 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); | 208 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); |
| 208 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); | 209 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); |
| 209 | 210 |
| 210 // Get new descriptor sets | 211 // Get new descriptor sets |
| 211 if (fNumSamplers) { | 212 if (fNumSamplers) { |
| 212 if (fSamplerDescriptorSet) { | 213 if (fSamplerDescriptorSet) { |
| 213 fSamplerDescriptorSet->recycle(gpu); | 214 fSamplerDescriptorSet->recycle(gpu); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 | 500 |
| 500 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); | 501 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); |
| 501 b.add32((int32_t)pipeline.getDrawFace()); | 502 b.add32((int32_t)pipeline.getDrawFace()); |
| 502 | 503 |
| 503 b.add32(get_blend_info_key(pipeline)); | 504 b.add32(get_blend_info_key(pipeline)); |
| 504 | 505 |
| 505 b.add32(primitiveType); | 506 b.add32(primitiveType); |
| 506 | 507 |
| 507 return true; | 508 return true; |
| 508 } | 509 } |
| OLD | NEW |