Eagerly destroy CommandBuffer commands after submission

Command buffers hold references to all encoded objects. Freeing them
eagerly significantly reduces the amount memory held before the JS GC
clears the command buffers.

Bug: dawn:262, dawn:372
Change-Id: I68dfa973f980fba8d94611ed1de3c593bdb91a63
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26562
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Enrico Galli
2020-08-13 20:25:39 +00:00
committed by Commit Bot service account
parent f7905c3cb5
commit 76d9e34bbc
20 changed files with 203 additions and 129 deletions

View File

@@ -188,7 +188,8 @@ namespace dawn_native {
}
}
}
commands->DataWasDestroyed();
commands->MakeEmptyAsDataWasDestroyed();
}
void SkipCommand(CommandIterator* commands, Command type) {