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>
diff --git a/src/dawn_native/d3d12/D3D12Error.cpp b/src/dawn_native/d3d12/D3D12Error.cpp
index f92b93a..d91d479 100644
--- a/src/dawn_native/d3d12/D3D12Error.cpp
+++ b/src/dawn_native/d3d12/D3D12Error.cpp
@@ -23,7 +23,12 @@
         }
 
         std::string message = std::string(context) + " failed with " + std::to_string(result);
-        return DAWN_INTERNAL_ERROR(message);
+
+        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) {