ShutDownBase, only tick frontend facilities if they have been created
Bug: chromium:1068886 Bug: chromium:1068887 Change-Id: Ifbec86d806a9e03a7cf029824349a6f94b9fe63c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19290 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
cd586a92e8
commit
e3f44e3cd6
|
@ -111,7 +111,6 @@ namespace dawn_native {
|
||||||
switch (mState) {
|
switch (mState) {
|
||||||
case State::BeingCreated:
|
case State::BeingCreated:
|
||||||
// The GPU timeline was never started so we don't have to wait.
|
// The GPU timeline was never started so we don't have to wait.
|
||||||
mState = State::Disconnected;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case State::Alive:
|
case State::Alive:
|
||||||
|
@ -119,7 +118,6 @@ namespace dawn_native {
|
||||||
// complete before proceeding with destruction.
|
// complete before proceeding with destruction.
|
||||||
// Assert that errors are device loss so that we can continue with destruction
|
// Assert that errors are device loss so that we can continue with destruction
|
||||||
AssertAndIgnoreDeviceLossError(WaitForIdleForDestruction());
|
AssertAndIgnoreDeviceLossError(WaitForIdleForDestruction());
|
||||||
mState = State::Disconnected;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case State::BeingDisconnected:
|
case State::BeingDisconnected:
|
||||||
|
@ -133,13 +131,20 @@ namespace dawn_native {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The GPU timeline is finished so all services can be freed immediately. They need to be
|
// Skip handling device facilities if they haven't even been created (or failed doing so)
|
||||||
// freed before ShutDownImpl() because they might relinquish resources that will be freed by
|
if (mState != State::BeingCreated) {
|
||||||
// backends in the ShutDownImpl() call.
|
// The GPU timeline is finished so all services can be freed immediately. They need to
|
||||||
// Still tick the ones that might have pending callbacks.
|
// be freed before ShutDownImpl() because they might relinquish resources that will be
|
||||||
|
// freed by backends in the ShutDownImpl() call. Still tick the ones that might have
|
||||||
|
// pending callbacks.
|
||||||
mErrorScopeTracker->Tick(GetCompletedCommandSerial());
|
mErrorScopeTracker->Tick(GetCompletedCommandSerial());
|
||||||
mErrorScopeTracker = nullptr;
|
|
||||||
mFenceSignalTracker->Tick(GetCompletedCommandSerial());
|
mFenceSignalTracker->Tick(GetCompletedCommandSerial());
|
||||||
|
}
|
||||||
|
|
||||||
|
// At this point GPU operations are always finished, so we are in the disconnected state.
|
||||||
|
mState = State::Disconnected;
|
||||||
|
|
||||||
|
mErrorScopeTracker = nullptr;
|
||||||
mFenceSignalTracker = nullptr;
|
mFenceSignalTracker = nullptr;
|
||||||
mDynamicUploader = nullptr;
|
mDynamicUploader = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue