diff options
author | 2016-11-01 08:55:55 -0700 | |
---|---|---|
committer | 2016-11-01 08:55:55 -0700 | |
commit | c633abbb342e3af0e56382e8cb7e7d9fed71e237 (patch) | |
tree | fe933b42146870a18aae2d892d67f45243460aa8 /src/gpu/vk/GrVkPipelineState.cpp | |
parent | 7bb9301b161fce4cccee0cb43661b9f65d71dabb (diff) |
Remove GrStencilSettings from GrPipeline
Updates the GrPipeline to have user stencil settings instead of actual
settings. This allows us to further defer creating and attaching a
stencil buffer.
This change is a partial step. The ultimate goal is to attach the
stencil buffer and create the stencil settings during render target
flush, but for the sake of keeping this CL smaller, we create the
stencil settings right before use for now.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468653002
Review-Url: https://codereview.chromium.org/2468653002
Diffstat (limited to 'src/gpu/vk/GrVkPipelineState.cpp')
-rw-r--r-- | src/gpu/vk/GrVkPipelineState.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp index 71ce831d65..abb95f644f 100644 --- a/src/gpu/vk/GrVkPipelineState.cpp +++ b/src/gpu/vk/GrVkPipelineState.cpp @@ -492,6 +492,7 @@ uint32_t get_blend_info_key(const GrPipeline& pipeline) { bool GrVkPipelineState::Desc::Build(Desc* desc, const GrPrimitiveProcessor& primProc, const GrPipeline& pipeline, + const GrStencilSettings& stencil, GrPrimitiveType primitiveType, const GrGLSLCaps& caps) { if (!INHERITED::Build(desc, primProc, primitiveType == kPoints_GrPrimitiveType, pipeline, @@ -503,7 +504,7 @@ bool GrVkPipelineState::Desc::Build(Desc* desc, GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget(); vkRT->simpleRenderPass()->genKey(&b); - pipeline.getStencil().genKey(&b); + stencil.genKey(&b); SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); b.add32((int32_t)pipeline.getDrawFace()); |