Commit 027f0c38 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Remove Host->device availability barrier.

vkQueueSubmit already performs this operation, so this barrier was unnecessary. The only place this is necessary is when the GPU is expected to receive updates from the CPU post-submit. ContextVk::synchronizeCpuGpuTime is the only such use-case in ANGLE. Bug: angleproject:4897 Change-Id: I7297fbd65d3faabd949dddb6bcaa181053a83193 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372631Reviewed-by: 's avatarCharlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 78304b47
......@@ -372,7 +372,6 @@ angle::Result BufferVk::unmapImpl(ContextVk *contextVk)
if (!mShadowBuffer.valid())
{
mBuffer->unmap(contextVk->getRenderer());
mBuffer->onExternalWrite(VK_ACCESS_HOST_WRITE_BIT);
}
else
{
......@@ -483,7 +482,6 @@ angle::Result BufferVk::directUpdate(ContextVk *contextVk,
memcpy(mapPointer, data, size);
mBuffer->unmap(contextVk->getRenderer());
ASSERT(mBuffer->isCoherent());
mBuffer->onExternalWrite(VK_ACCESS_HOST_WRITE_BIT);
return angle::Result::Continue;
}
......@@ -505,7 +503,6 @@ angle::Result BufferVk::stagedUpdate(ContextVk *contextVk,
memcpy(mapPointer, data, size);
ASSERT(!stagingBuffer->isCoherent());
ANGLE_TRY(stagingBuffer->flush(contextVk));
stagingBuffer->getCurrentBuffer()->onExternalWrite(VK_ACCESS_HOST_WRITE_BIT);
// Enqueue a copy command on the GPU.
VkBufferCopy copyRegion = {stagingBufferOffset, offset, size};
......
......@@ -105,8 +105,6 @@ angle::Result OverlayVk::createFont(ContextVk *contextVk)
ANGLE_TRY(fontDataBuffer.get().flush(renderer, 0, fontDataBuffer.get().getSize()));
fontDataBuffer.get().unmap(renderer);
fontDataBuffer.get().onExternalWrite(VK_ACCESS_HOST_WRITE_BIT);
// Create the font image.
ANGLE_TRY(
mFontImage.init(contextVk, gl::TextureType::_2D,
......@@ -172,8 +170,6 @@ angle::Result OverlayVk::cullWidgets(ContextVk *contextVk)
ANGLE_TRY(enabledWidgetsBuffer.get().flush(renderer, 0, enabledWidgetsBuffer.get().getSize()));
enabledWidgetsBuffer.get().unmap(renderer);
enabledWidgetsBuffer.get().onExternalWrite(VK_ACCESS_HOST_WRITE_BIT);
// Allocate mCulledWidget and its view.
VkExtent3D culledWidgetsExtent = {
UnsignedCeilDivide(mPresentImageExtent.width, mSubgroupSize[0]),
......
......@@ -751,15 +751,6 @@ class BufferHelper final : public Resource
bool isMapped() const { return mMappedMemory != nullptr; }
// Set write access mask when the buffer is modified externally, e.g. by host. There is no
// graph resource to create a dependency to.
void onExternalWrite(VkAccessFlags writeAccessType)
{
ASSERT(writeAccessType == VK_ACCESS_HOST_WRITE_BIT);
mCurrentWriteAccess |= writeAccessType;
mCurrentWriteStages |= VK_PIPELINE_STAGE_HOST_BIT;
}
// Also implicitly sets up the correct barriers.
angle::Result copyFromBuffer(ContextVk *contextVk,
BufferHelper *srcBuffer,
......
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