diff options
author | egdaniel <egdaniel@google.com> | 2016-04-27 11:31:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-27 11:31:59 -0700 |
commit | c355bc8dd117291b63ee7b7b39ec37a0e768eec5 (patch) | |
tree | 2b0a3f621f353d13742d6060011d2e6788901744 /src | |
parent | 900c36779610dc65c42a5004ee3693fd70961ba4 (diff) |
Add work around for vulkan copies on the 5X
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1923963002
Review-Url: https://codereview.chromium.org/1923963002
Diffstat (limited to 'src')
-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 02bd3f2c31..71d3028850 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -1262,7 +1262,10 @@ void GrVkGpu::copySurfaceAsCopyImage(GrSurface* dst, copyRegion.srcOffset = { srcVkRect.fLeft, srcVkRect.fTop, 0 }; copyRegion.dstSubresource = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1 }; copyRegion.dstOffset = { dstPoint.fX, dstY, 0 }; - copyRegion.extent = { (uint32_t)srcVkRect.width(), (uint32_t)srcVkRect.height(), 0 }; + // The depth value of the extent is ignored according the vulkan spec for 2D images. However, on + // at least the nexus 5X it seems to be checking it. Thus as a working around we must have the + // depth value be 1. + copyRegion.extent = { (uint32_t)srcVkRect.width(), (uint32_t)srcVkRect.height(), 1 }; fCurrentCmdBuffer->copyImage(this, srcImage, |