Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: src/gpu/vk/GrVkPipelineState.cpp

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.h ('k') | src/gpu/vk/GrVkPipelineStateBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.h ('k') | src/gpu/vk/GrVkPipelineStateBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698