Handle DeviceLost error

Handle DeviceLostCallback once DeviceLost error occurs.
Disallow any other commands or actions on device to happen after device
has been lost.

Bug: dawn:68
Change-Id: Icbbbadf278cae5e6213050d00439118789c863dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12801
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Natasha Lee
2020-01-15 19:02:13 +00:00
committed by Commit Bot service account
parent 0c66bcd13a
commit 0ecc48ecb7
18 changed files with 322 additions and 10 deletions

View File

@@ -162,6 +162,8 @@ namespace dawn_native { namespace opengl {
}
void Device::Destroy() {
ASSERT(mLossStatus != LossStatus::AlreadyLost);
// Some operations might have been started since the last submit and waiting
// on a serial that doesn't have a corresponding fence enqueued. Force all
// operations to look as if they were completed (because they were).