mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-03 03:35:59 +00:00
Device: Mark all commands as completed on device loss
Previously device loss would produce an assert when shutting down where the frontend though not all commands where finished. Bug: chromium:1242195 Change-Id: I90fe626b6930859b3fd98b660882fb11b6a9ff8c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62542 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
parent
2aee6eef7f
commit
21940df81b
@ -265,7 +265,8 @@ namespace dawn_native {
|
|||||||
void DeviceBase::HandleError(InternalErrorType type, const char* message) {
|
void DeviceBase::HandleError(InternalErrorType type, const char* message) {
|
||||||
if (type == InternalErrorType::DeviceLost) {
|
if (type == InternalErrorType::DeviceLost) {
|
||||||
// A real device lost happened. Set the state to disconnected as the device cannot be
|
// A real device lost happened. Set the state to disconnected as the device cannot be
|
||||||
// used.
|
// used. Also tags all commands as completed since the device stopped running.
|
||||||
|
AssumeCommandsComplete();
|
||||||
mState = State::Disconnected;
|
mState = State::Disconnected;
|
||||||
} else if (type == InternalErrorType::Internal) {
|
} else if (type == InternalErrorType::Internal) {
|
||||||
// If we receive an internal error, assume the backend can't recover and proceed with
|
// If we receive an internal error, assume the backend can't recover and proceed with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user