Remove the future serial

This adds 'HasScheduledCommands()', with which Dawn no longer needs the
future serial to tick and track the async tasks.

Bug: dawn:1413
Change-Id: Ide9ba69b796a46fa8bb70b002f4e2aeb1622bffd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98720
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
This commit is contained in:
jchen10
2022-10-29 03:28:20 +00:00
committed by Dawn LUCI CQ
parent d1910af8bf
commit 5722f2878d
18 changed files with 148 additions and 92 deletions

View File

@@ -446,6 +446,12 @@ MaybeError Device::WaitForIdleForDestruction() {
return {};
}
bool Device::HasPendingCommands() const {
// Technically we could have scheduled commands inside the GL driver that are waiting for a
// glFlush but we can't know for sure so we might as well pretend there are no commands.
return false;
}
uint32_t Device::GetOptimalBytesPerRowAlignment() const {
return 1;
}

View File

@@ -132,6 +132,7 @@ class Device final : public DeviceBase {
ResultOrError<ExecutionSerial> CheckAndUpdateCompletedSerials() override;
void DestroyImpl() override;
MaybeError WaitForIdleForDestruction() override;
bool HasPendingCommands() const override;
const OpenGLFunctions mGL;