diff options
author | Greg Daniel <egdaniel@google.com> | 2018-06-21 13:55:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-21 18:25:57 +0000 |
commit | 1ba1bfc818d19943530f44a829ba242da727c9b7 (patch) | |
tree | 5b0328208ed13f23b91a52b2a2d079428926ae2e /src/gpu/vk | |
parent | 84b522ceb105f0d2fc65adca9fdc8cd1f03a0e46 (diff) |
Fix vulkan copy resolve.
Bug: skia:
Change-Id: I4ea72e05ddf307f1fff042fa5f5ddda019129566
Reviewed-on: https://skia-review.googlesource.com/136243
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkGpu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index 1d89566d9c..ba1f7caf2d 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -446,7 +446,6 @@ void GrVkGpu::resolveImage(GrSurface* dst, GrVkRenderTarget* src, const SkIRect& SkASSERT(dst->asTexture()); dstImage = static_cast<GrVkTexture*>(dst->asTexture()); } - SkASSERT(1 == dstImage->mipLevels()); dstImage->setImageLayout(this, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_ACCESS_TRANSFER_WRITE_BIT, @@ -1646,6 +1645,7 @@ void GrVkGpu::copySurfaceAsBlit(GrSurface* dst, GrSurfaceOrigin dstOrigin, &blitRegion, VK_FILTER_NEAREST); // We never scale so any filter works here + dstRect = SkIRect::MakeXYWH(dstPoint.fX, dstPoint.fY, srcRect.width(), srcRect.height()); this->didWriteToSurface(dst, dstOrigin, &dstRect); } @@ -1662,6 +1662,9 @@ void GrVkGpu::copySurfaceAsResolve(GrSurface* dst, GrSurfaceOrigin dstOrigin, Gr dstPoint.fY = dst->height() - dstPoint.fY - srcRect.height(); } this->resolveImage(dst, srcRT, srcRect, dstPoint); + SkIRect dstRect = SkIRect::MakeXYWH(origDstPoint.fX, origDstPoint.fY, + srcRect.width(), srcRect.height()); + this->didWriteToSurface(dst, dstOrigin, &dstRect); } bool GrVkGpu::onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin, |