dawn_wire: Add an API to reclaim reserved devices and textures

Dawn Wire has a way to reserve an ID and generation on the client side,
but if these reservations are never injected on the server, then
it will be impossible to reclaim the in-use ObjectIDs.

Bug: dawn:565
Change-Id: I751fce237c881e8cbdeaba18ad0ec1e124bd7ac2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38281
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Austin Eng
2021-01-22 00:25:05 +00:00
committed by Commit Bot service account
parent cef68bc8b7
commit 45ce1fda88
6 changed files with 74 additions and 0 deletions

View File

@@ -61,6 +61,9 @@ namespace dawn_wire {
ReservedTexture ReserveTexture(WGPUDevice device);
ReservedDevice ReserveDevice();
void ReclaimTextureReservation(const ReservedTexture& reservation);
void ReclaimDeviceReservation(const ReservedDevice& reservation);
// Disconnects the client.
// Commands allocated after this point will not be sent.
void Disconnect();