Vulkan: consider VK_ERROR_OUT_OF_HOST_MEMORY an OOM error

Bug: dawn:450
Change-Id: I89095a23a5bf7e17553b6945f79347ba31d732c6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23480
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng 2020-06-19 07:30:13 +00:00 committed by Commit Bot service account
parent 581c407cd2
commit 693e88ae85
1 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,8 @@ namespace dawn_native { namespace vulkan {
std::string message = std::string(context) + " failed with " + VkResultAsString(result); std::string message = std::string(context) + " failed with " + VkResultAsString(result);
if (result == VK_ERROR_OUT_OF_DEVICE_MEMORY || result == VK_FAKE_DEVICE_OOM_FOR_TESTING) { if (result == VK_ERROR_OUT_OF_DEVICE_MEMORY || result == VK_ERROR_OUT_OF_HOST_MEMORY ||
result == VK_FAKE_DEVICE_OOM_FOR_TESTING) {
return DAWN_OUT_OF_MEMORY_ERROR(message); return DAWN_OUT_OF_MEMORY_ERROR(message);
} else if (result == VK_ERROR_DEVICE_LOST) { } else if (result == VK_ERROR_DEVICE_LOST) {
return DAWN_DEVICE_LOST_ERROR(message); return DAWN_DEVICE_LOST_ERROR(message);