From c355bc8dd117291b63ee7b7b39ec37a0e768eec5 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Wed, 27 Apr 2016 11:31:59 -0700 Subject: 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 --- src/gpu/vk/GrVkGpu.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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, -- cgit v1.2.3