D3D12 Add check for DXGI_ERROR_DEVICE_REMOVED real device removed

Bug: dawn:269
Change-Id: I9a078efde0f0def29c9abfcc06d9f3ef2323cb55
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
This commit is contained in:
Natasha Lee 2020-04-01 20:09:16 +00:00 committed by Commit Bot service account
parent 373a3ff26e
commit 5b29904d76
1 changed files with 6 additions and 1 deletions

View File

@ -23,8 +23,13 @@ namespace dawn_native { namespace d3d12 {
}
std::string message = std::string(context) + " failed with " + std::to_string(result);
if (result == DXGI_ERROR_DEVICE_REMOVED) {
return DAWN_DEVICE_LOST_ERROR(message);
} else {
return DAWN_INTERNAL_ERROR(message);
}
}
MaybeError CheckOutOfMemoryHRESULT(HRESULT result, const char* context) {
if (result == E_OUTOFMEMORY) {