mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Avoid processing already processed tick
To avoid overly ticking, we only want to tick when: 1. the last submitted serial has moved beyond the completed serial 2. or the completed serial has not reached the future command serial added by the trackers (MapRequestTracker, FenceSignalTracker, ErrorScopeTracker). Bug: dawn:400 Change-Id: Ie7c65acc332846ac1a27f9a18f230149d96d2189 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19062 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Natasha Lee <natlee@microsoft.com>
This commit is contained in:
committed by
Commit Bot service account
parent
62b08f845f
commit
783cd5a79c
@@ -153,12 +153,6 @@ namespace dawn_native { namespace opengl {
|
||||
}
|
||||
|
||||
MaybeError Device::TickImpl() {
|
||||
CheckPassedSerials();
|
||||
if (GetCompletedCommandSerial() == GetLastSubmittedCommandSerial()) {
|
||||
// If there's no GPU work in flight we still need to artificially increment the serial
|
||||
// so that CPU operations waiting on GPU completion can know they don't have to wait.
|
||||
ArtificiallyIncrementSerials();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -200,11 +194,6 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
void Device::ShutDownImpl() {
|
||||
ASSERT(GetState() == State::Disconnected);
|
||||
|
||||
// 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).
|
||||
AssumeCommandsComplete();
|
||||
}
|
||||
|
||||
MaybeError Device::WaitForIdleForDestruction() {
|
||||
@@ -213,8 +202,6 @@ namespace dawn_native { namespace opengl {
|
||||
ASSERT(mFencesInFlight.empty());
|
||||
Tick();
|
||||
|
||||
// Force all operations to look as if they were completed
|
||||
AssumeCommandsComplete();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user