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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 key |= (blendInfo.fSrcBlend << kBlendWriteShift); | 485 key |= (blendInfo.fSrcBlend << kBlendWriteShift); |
486 key |= (blendInfo.fDstBlend << (kBlendWriteShift + kBlendCoeffShift)); | 486 key |= (blendInfo.fDstBlend << (kBlendWriteShift + kBlendCoeffShift)); |
487 key |= (blendInfo.fEquation << (kBlendWriteShift + 2 * kBlendCoeffShift)); | 487 key |= (blendInfo.fEquation << (kBlendWriteShift + 2 * kBlendCoeffShift)); |
488 | 488 |
489 return key; | 489 return key; |
490 } | 490 } |
491 | 491 |
492 bool GrVkPipelineState::Desc::Build(Desc* desc, | 492 bool GrVkPipelineState::Desc::Build(Desc* desc, |
493 const GrPrimitiveProcessor& primProc, | 493 const GrPrimitiveProcessor& primProc, |
494 const GrPipeline& pipeline, | 494 const GrPipeline& pipeline, |
| 495 const GrStencilSettings& stencil, |
495 GrPrimitiveType primitiveType, | 496 GrPrimitiveType primitiveType, |
496 const GrGLSLCaps& caps) { | 497 const GrGLSLCaps& caps) { |
497 if (!INHERITED::Build(desc, primProc, primitiveType == kPoints_GrPrimitiveTy
pe, pipeline, | 498 if (!INHERITED::Build(desc, primProc, primitiveType == kPoints_GrPrimitiveTy
pe, pipeline, |
498 caps)) { | 499 caps)) { |
499 return false; | 500 return false; |
500 } | 501 } |
501 | 502 |
502 GrProcessorKeyBuilder b(&desc->key()); | 503 GrProcessorKeyBuilder b(&desc->key()); |
503 GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget(); | 504 GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget(); |
504 vkRT->simpleRenderPass()->genKey(&b); | 505 vkRT->simpleRenderPass()->genKey(&b); |
505 | 506 |
506 pipeline.getStencil().genKey(&b); | 507 stencil.genKey(&b); |
507 | 508 |
508 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); | 509 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); |
509 b.add32((int32_t)pipeline.getDrawFace()); | 510 b.add32((int32_t)pipeline.getDrawFace()); |
510 | 511 |
511 b.add32(get_blend_info_key(pipeline)); | 512 b.add32(get_blend_info_key(pipeline)); |
512 | 513 |
513 b.add32(primitiveType); | 514 b.add32(primitiveType); |
514 | 515 |
515 return true; | 516 return true; |
516 } | 517 } |
OLD | NEW |