Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: src/gpu/vk/GrVkGpu.cpp

Issue 2363773006: Add command buffer submits before copy calls in vulkan. (Closed)
Patch Set: change submit check to a cap Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkCommandBuffer.h ('k') | src/gpu/vk/GrVkVaryingHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkGpu.cpp
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index a72b51734049ef907edaf61b8e5990adf5240974..c14321937fe9004ab044b607d95aa0fc4ecc8e6b 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -380,6 +380,10 @@ void GrVkGpu::resolveImage(GrVkRenderTarget* dst, GrVkRenderTarget* src, const S
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 @@ void GrVkGpu::generateMipmap(GrVkTexture* tex) {
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 @@ bool GrVkGpu::onCopySurface(GrSurface* dst,
return true;
}
+ if (this->vkCaps().mustSubmitCommandsBeforeCopyOp()) {
+ this->submitCommandBuffer(GrVkGpu::kSkip_SyncQueue);
+ }
+
if (fCopyManager.copySurfaceAsDraw(this, dst, src, srcRect, dstPoint)) {
return true;
}
« no previous file with comments | « src/gpu/vk/GrVkCommandBuffer.h ('k') | src/gpu/vk/GrVkVaryingHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698