Vulkan: Remove vk::ErrorOrResult.
The ErrorOrResult pattern doesn't help much. Removing it enables the
Error passing refactor in the Vulkan back-end.
Bug: angleproject:2713
Change-Id: I4e8277ad856c785bf22b4d37b7ae880b534ef005
Reviewed-on: https://chromium-review.googlesource.com/1128919
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/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 9421154..2e7d7d6 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -559,7 +559,7 @@
return vk::NoError();
}
-vk::ErrorOrResult<uint32_t> RendererVk::selectPresentQueueForSurface(VkSurfaceKHR surface)
+vk::Error RendererVk::selectPresentQueueForSurface(VkSurfaceKHR surface, uint32_t *presentQueueOut)
{
// We've already initialized a device, and can't re-create it unless it's never been used.
// TODO(jmadill): Handle the re-creation case if necessary.
@@ -572,7 +572,11 @@
ANGLE_VK_TRY(vkGetPhysicalDeviceSurfaceSupportKHR(mPhysicalDevice, mCurrentQueueFamilyIndex,
surface, &supportsPresent));
- return (supportsPresent == VK_TRUE);
+ if (supportsPresent == VK_TRUE)
+ {
+ *presentQueueOut = mCurrentQueueFamilyIndex;
+ return vk::NoError();
+ }
}
// Find a graphics and present queue.
@@ -598,7 +602,8 @@
ANGLE_VK_CHECK(newPresentQueue.valid(), VK_ERROR_INITIALIZATION_FAILED);
ANGLE_TRY(initializeDevice(newPresentQueue.value()));
- return newPresentQueue.value();
+ *presentQueueOut = newPresentQueue.value();
+ return vk::NoError();
}
std::string RendererVk::getVendorString() const