Commit 5e33e647 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Optimize getIndexRange

This function was unconditionally calling finishImpl(). This is changed to finishToSerial() to only wait until the serial that actually used the buffer. Bug: angleproject:3072 Change-Id: Ida89bb119b4ba6420f12404b911af0e3b4583a51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993407 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 6b275406
...@@ -288,7 +288,7 @@ angle::Result BufferVk::getIndexRange(const gl::Context *context, ...@@ -288,7 +288,7 @@ angle::Result BufferVk::getIndexRange(const gl::Context *context,
ANGLE_TRACE_EVENT0("gpu.angle", "BufferVk::getIndexRange"); ANGLE_TRACE_EVENT0("gpu.angle", "BufferVk::getIndexRange");
// Needed before reading buffer or we could get stale data. // Needed before reading buffer or we could get stale data.
ANGLE_TRY(contextVk->finishImpl()); ANGLE_TRY(contextVk->finishToSerial(mBuffer.getLatestSerial()));
// TODO(jmadill): Consider keeping a shadow system memory copy in some cases. // TODO(jmadill): Consider keeping a shadow system memory copy in some cases.
ASSERT(mBuffer.valid()); ASSERT(mBuffer.valid());
......
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