In Vulkan don't submit CB after resolve call unless we are preparing image for I/O
Bug: skia: Change-Id: I99c1d2ee1300f1f1757f7c44b3a839aba3091fee Reviewed-on: https://skia-review.googlesource.com/c/175259 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
a6e0c2b19c
commit
0a77f4352c
@ -287,7 +287,7 @@ bool GrVkCopyManager::copySurfaceAsDraw(GrVkGpu* gpu,
|
||||
|
||||
GrVkRenderTarget* texRT = static_cast<GrVkRenderTarget*>(srcTex->asRenderTarget());
|
||||
if (texRT) {
|
||||
gpu->onResolveRenderTarget(texRT);
|
||||
gpu->resolveRenderTargetNoFlush(texRT);
|
||||
}
|
||||
|
||||
// TODO: Make tighter bounds and then adjust bounds for origin and granularity if we see
|
||||
|
@ -1826,7 +1826,7 @@ bool GrVkGpu::onReadPixels(GrSurface* surface, int left, int top, int width, int
|
||||
case GrVkRenderTarget::kAutoResolves_ResolveType:
|
||||
break;
|
||||
case GrVkRenderTarget::kCanResolve_ResolveType:
|
||||
this->internalResolveRenderTarget(rt, false);
|
||||
this->resolveRenderTargetNoFlush(rt);
|
||||
break;
|
||||
default:
|
||||
SK_ABORT("Unknown resolve type");
|
||||
|
@ -119,7 +119,14 @@ public:
|
||||
|
||||
bool onRegenerateMipMapLevels(GrTexture* tex) override;
|
||||
|
||||
void resolveRenderTargetNoFlush(GrRenderTarget* target) {
|
||||
this->internalResolveRenderTarget(target, false);
|
||||
}
|
||||
|
||||
void onResolveRenderTarget(GrRenderTarget* target) override {
|
||||
// This resolve is called when we are preparing an msaa surface for external I/O. It is
|
||||
// called after flushing, so we need to make sure we submit the command buffer after doing
|
||||
// the resolve so that the resolve actually happens.
|
||||
this->internalResolveRenderTarget(target, true);
|
||||
}
|
||||
|
||||
|
@ -676,7 +676,7 @@ void GrVkGpuRTCommandBuffer::onDraw(const GrPrimitiveProcessor& primProc,
|
||||
// We may need to resolve the texture first if it is also a render target
|
||||
GrVkRenderTarget* texRT = static_cast<GrVkRenderTarget*>(vkTexture->asRenderTarget());
|
||||
if (texRT) {
|
||||
fGpu->onResolveRenderTarget(texRT);
|
||||
fGpu->resolveRenderTargetNoFlush(texRT);
|
||||
}
|
||||
|
||||
// Check if we need to regenerate any mip maps
|
||||
|
Loading…
Reference in New Issue
Block a user