aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkCaps.cpp
diff options
context:
space:
mode:
authorGravatar Eric Karl <ericrk@chromium.org>2017-04-03 14:49:05 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-04 17:26:38 +0000
commit744808823f635c863d7ca6b4eba652115c92ff85 (patch)
tree050a0e591c7dd355071a78daa6393d2f5f2f054f /src/gpu/vk/GrVkCaps.cpp
parent8b3f9e64ff6d505036f79aeffd98dea4b648cb46 (diff)
Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to copy from one src rect to a different dst rect. This change updates initDescForDstCopy and setupDstTexture to allocate larger textures if necessary and accomodate this flags requirements. Bug: 658277 Change-Id: If4489ac3192dcf6f9996494c63821279721d0a12 Reviewed-on: https://skia-review.googlesource.com/11141 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/vk/GrVkCaps.cpp')
-rw-r--r--src/gpu/vk/GrVkCaps.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index bf343a9ae9..bf7e5ad3ce 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -53,7 +53,12 @@ GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface*
this->init(contextOptions, vkInterface, physDev, featureFlags, extensionFlags);
}
-bool GrVkCaps::initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc) const {
+bool GrVkCaps::initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc,
+ bool* rectsMustMatch, bool* disallowSubrect) const {
+ // Vk doesn't use rectsMustMatch or disallowSubrect. Always return false.
+ *rectsMustMatch = false;
+ *disallowSubrect = false;
+
// We can always succeed here with either a CopyImage (none msaa src) or ResolveImage (msaa).
// For CopyImage we can make a simple texture, for ResolveImage we require the dst to be a
// render target as well.