Commit 5e631c5f by Charlie Lao Committed by Angle LUCI CQ

Vulkan: Disable shadowBuffers feature

For PixelUnpack, if the feature is enabled, it always create a shadow CPU mapped memory. Then when mapBuffer is called, it let user write to the shadow memory. At unmapBuffer time, it memcpy the shadow buffer data to context's staging buffer and then issue a vkCmdCopyBuffer from context staging buffer to the PixelUnpack buffer. This involves too many data copies. The proper way to do it is simply make sure to create the buffer as CPU map-able and let user directly write to it. If we find cases that CPU waiting for GPU to finish is causing performance issues, there are two ways to improve/fix it: 1)Add event at end of each renderpass or FBO so that we know if GPU access is finished or not without have to wait for entire frame to finish rendering. 2) Create multiple buffers and ping-pong between them, at least there will be no VkCmdCopyBuffer call involved like shadow buffers do. But we will leave that to future time when we find such need. Bug: angleproject:5986 Change-Id: Ib8300e46e779d20533c1f7f81624de0ce003788b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2909758 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 05baaa37
...@@ -2352,7 +2352,7 @@ void RendererVk::initFeatures(DisplayVk *displayVk, ...@@ -2352,7 +2352,7 @@ void RendererVk::initFeatures(DisplayVk *displayVk,
// that can cause OOM and timeouts. // that can cause OOM and timeouts.
ANGLE_FEATURE_CONDITION(&mFeatures, allocateNonZeroMemory, false); ANGLE_FEATURE_CONDITION(&mFeatures, allocateNonZeroMemory, false);
ANGLE_FEATURE_CONDITION(&mFeatures, shadowBuffers, true); ANGLE_FEATURE_CONDITION(&mFeatures, shadowBuffers, false);
ANGLE_FEATURE_CONDITION(&mFeatures, persistentlyMappedBuffers, true); ANGLE_FEATURE_CONDITION(&mFeatures, persistentlyMappedBuffers, true);
......
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