diff options
Diffstat (limited to 'src/gpu/vk/GrVkRenderTarget.cpp')
-rw-r--r-- | src/gpu/vk/GrVkRenderTarget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkRenderTarget.cpp b/src/gpu/vk/GrVkRenderTarget.cpp index 2a745ed51c..99b6b7632c 100644 --- a/src/gpu/vk/GrVkRenderTarget.cpp +++ b/src/gpu/vk/GrVkRenderTarget.cpp @@ -348,8 +348,12 @@ GrBackendObject GrVkRenderTarget::getRenderTargetHandle() const { } GrBackendRenderTarget GrVkRenderTarget::getBackendRenderTarget() const { + int numStencilBits = 0; + if (GrStencilAttachment* stencil = this->renderTargetPriv().getStencilAttachment()) { + numStencilBits = stencil->bits(); + } return GrBackendRenderTarget(this->width(), this->height(), this->numColorSamples(), - this->numStencilSamples(), fInfo); + numStencilBits, fInfo); } const GrVkResource* GrVkRenderTarget::stencilImageResource() const { |