Vulkan: Clean up Error usage.
* Adds a nodiscard to the Error class.
* Fixes the places where Error was discard.
* Uses more vk::Error instead of gl::Error.
This enables the Vulkan back-end Error refactoring.
Bug: angleproject:2713
Change-Id: I09606d965e8b7cfd341ad7fb95cf029b9d694ef4
Reviewed-on: https://chromium-review.googlesource.com/1128922
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
index 28b50bd..dd329e9 100644
--- a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
@@ -529,9 +529,9 @@
uint8_t *allocatedData = nullptr;
bool newBufferAllocated = false;
uint32_t expandedDataOffset = 0;
- mTranslatedByteIndexData.allocate(
+ ANGLE_TRY(mTranslatedByteIndexData.allocate(
renderer, static_cast<size_t>(bufferVk->getSize()) * 2, &allocatedData,
- &mCurrentElementArrayBufferHandle, &expandedDataOffset, &newBufferAllocated);
+ &mCurrentElementArrayBufferHandle, &expandedDataOffset, &newBufferAllocated));
mCurrentElementArrayBufferOffset = static_cast<VkDeviceSize>(expandedDataOffset);
// Expand the source into the destination
@@ -543,7 +543,7 @@
}
// Make sure our writes are available.
- mTranslatedByteIndexData.flush(renderer->getDevice());
+ ANGLE_TRY(mTranslatedByteIndexData.flush(renderer->getDevice()));
GLboolean result = false;
ANGLE_TRY(bufferVk->unmap(context, &result));