Add command buffer submits before copy calls in vulkan.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2363773006
Committed: https://skia.googlesource.com/skia/+/25661bac7722860b7589c5b01ec404531d941456
Review-Url: https://codereview.chromium.org/2363773006
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index a72b517..c143219 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -380,6 +380,10 @@
SkASSERT(dst);
SkASSERT(src && src->numColorSamples() > 1 && src->msaaImage());
+ if (this->vkCaps().mustSubmitCommandsBeforeCopyOp()) {
+ this->submitCommandBuffer(GrVkGpu::kSkip_SyncQueue);
+ }
+
// Flip rect if necessary
SkIRect srcVkRect = srcRect;
int32_t dstY = dstPoint.fY;
@@ -843,6 +847,10 @@
return;
}
+ if (this->vkCaps().mustSubmitCommandsBeforeCopyOp()) {
+ this->submitCommandBuffer(kSkip_SyncQueue);
+ }
+
// We may need to resolve the texture first if it is also a render target
GrVkRenderTarget* texRT = static_cast<GrVkRenderTarget*>(tex->asRenderTarget());
if (texRT) {
@@ -1577,6 +1585,10 @@
return true;
}
+ if (this->vkCaps().mustSubmitCommandsBeforeCopyOp()) {
+ this->submitCommandBuffer(GrVkGpu::kSkip_SyncQueue);
+ }
+
if (fCopyManager.copySurfaceAsDraw(this, dst, src, srcRect, dstPoint)) {
return true;
}