| 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
)); |
| 198 append_texture_bindings(primProc, &textureBindings); | 199 append_texture_bindings(primProc, &textureBindings); |
| 199 | 200 |
| 200 for (int i = 0; i < fFragmentProcessors.count(); ++i) { | 201 for (int i = 0; i < fFragmentProcessors.count(); ++i) { |
| 201 const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i); | 202 const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i); |
| 202 fFragmentProcessors[i]->setData(fDataManager, processor); | 203 fFragmentProcessors[i]->setData(fDataManager, processor); |
| 203 fGeometryProcessor->setTransformData(primProc, fDataManager, i, | |
| 204 processor.coordTransforms()); | |
| 205 append_texture_bindings(processor, &textureBindings); | 204 append_texture_bindings(processor, &textureBindings); |
| 206 } | 205 } |
| 207 | 206 |
| 208 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); | 207 fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); |
| 209 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); | 208 append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); |
| 210 | 209 |
| 211 // Get new descriptor sets | 210 // Get new descriptor sets |
| 212 if (fNumSamplers) { | 211 if (fNumSamplers) { |
| 213 if (fSamplerDescriptorSet) { | 212 if (fSamplerDescriptorSet) { |
| 214 fSamplerDescriptorSet->recycle(gpu); | 213 fSamplerDescriptorSet->recycle(gpu); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 499 |
| 501 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); | 500 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); |
| 502 b.add32((int32_t)pipeline.getDrawFace()); | 501 b.add32((int32_t)pipeline.getDrawFace()); |
| 503 | 502 |
| 504 b.add32(get_blend_info_key(pipeline)); | 503 b.add32(get_blend_info_key(pipeline)); |
| 505 | 504 |
| 506 b.add32(primitiveType); | 505 b.add32(primitiveType); |
| 507 | 506 |
| 508 return true; | 507 return true; |
| 509 } | 508 } |
| OLD | NEW |