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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 key->reset(); | 480 key->reset(); |
481 key->push_back_n(kData_StateKeyOffset); | 481 key->push_back_n(kData_StateKeyOffset); |
482 | 482 |
483 GrProcessorKeyBuilder b(key); | 483 GrProcessorKeyBuilder b(key); |
484 | 484 |
485 GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget(); | 485 GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget(); |
486 vkRT->simpleRenderPass()->genKey(&b); | 486 vkRT->simpleRenderPass()->genKey(&b); |
487 | 487 |
488 pipeline.getStencil().genKey(&b); | 488 pipeline.getStencil().genKey(&b); |
489 | 489 |
490 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); | 490 SkASSERT(sizeof(GrPipelineBuilder::DrawFace) <= sizeof(uint32_t)); |
491 b.add32((int32_t)pipeline.getDrawFace()); | 491 b.add32(pipeline.getDrawFace()); |
492 | 492 |
493 b.add32(get_blend_info_key(pipeline)); | 493 b.add32(get_blend_info_key(pipeline)); |
494 | 494 |
495 b.add32(primitiveType); | 495 b.add32(primitiveType); |
496 | 496 |
497 // Set key length | 497 // Set key length |
498 int keyLength = key->count(); | 498 int keyLength = key->count(); |
499 SkASSERT(0 == (keyLength % 4)); | 499 SkASSERT(0 == (keyLength % 4)); |
500 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength); | 500 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength); |
501 } | 501 } |
OLD | NEW |