Vulkan: Implement Buffer updates.
This allows the app to update Buffer data while the data is in use
by the GPU. For instance, uploading new vertex attribute data after
a draw call.
It introduces a StagingBuffer helper class, similar to StagingImage.
These classes are somewhat temporary and could be redesigned.
BUG=angleproject:2200
Change-Id: If8634b1411779b16c2bd22cce18a5f37ed958d1c
Reviewed-on: https://chromium-review.googlesource.com/756959
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index d6de9c5..1ec979b 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -824,4 +824,14 @@
}
}
+bool RendererVk::isResourceInUse(const ResourceVk &resource)
+{
+ return isSerialInUse(resource.getQueueSerial());
+}
+
+bool RendererVk::isSerialInUse(Serial serial)
+{
+ return serial > mLastCompletedQueueSerial;
+}
+
} // namespace rx