Commit 3013f27c by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Fix missing visibility barrier for glReadPixels

glReadPixels uses a temporary buffer for readback and was missing an onBufferTransferWrite() call. Bug: angleproject:5669 Change-Id: I3c6daba176e332711fa1ab51e279526717486dd0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2717005Reviewed-by: 's avatarJie A Chen <jie.a.chen@intel.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 4a24786e
...@@ -6401,8 +6401,14 @@ angle::Result ImageHelper::readPixels(ContextVk *contextVk, ...@@ -6401,8 +6401,14 @@ angle::Result ImageHelper::readPixels(ContextVk *contextVk,
region.imageOffset = srcOffset; region.imageOffset = srcOffset;
region.imageSubresource = srcSubresource; region.imageSubresource = srcSubresource;
commandBuffer->copyImageToBuffer(src->getImage(), src->getCurrentLayout(), bufferHandle, 1, CommandBufferAccess readbackAccess;
&region); readbackAccess.onBufferTransferWrite(stagingBuffer->getCurrentBuffer());
CommandBuffer *readbackCommandBuffer;
ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(readbackAccess, &readbackCommandBuffer));
readbackCommandBuffer->copyImageToBuffer(src->getImage(), src->getCurrentLayout(), bufferHandle,
1, &region);
ANGLE_PERF_WARNING(contextVk->getDebug(), GL_DEBUG_SEVERITY_HIGH, ANGLE_PERF_WARNING(contextVk->getDebug(), GL_DEBUG_SEVERITY_HIGH,
"GPU stall due to ReadPixels"); "GPU stall due to ReadPixels");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment