commit | 2c67af98538a60979f1653220cb6f2ad3ada46ab | [log] [tgz] |
---|---|---|
author | Loko Kung <lokokung@google.com> | Thu Nov 11 00:39:22 2021 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Nov 11 00:39:22 2021 +0000 |
tree | b6ee687c901f8fc069968b7c9ce07ab3d7d68526 | |
parent | 6b6262dde0f0e7b9fe463d0d3fbe29c1858c88cd [diff] [blame] |
Adds destruction handling for "simple objects" in device.destroy Simple objects are defined as per https://dawn-review.googlesource.com/c/dawn/+/65864 and include: - BindGroups - ComputePipelines - PipelineLayouts - RenderPipelines - Samplers - ShaderModules - SwapChains Bug: dawn:628 Change-Id: I4ad74a2c4a223cf45acdbe6bdd0ec74332c9a14a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67740 Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/src/dawn_native/opengl/BindGroupGL.cpp b/src/dawn_native/opengl/BindGroupGL.cpp index c726f29..0a43de2 100644 --- a/src/dawn_native/opengl/BindGroupGL.cpp +++ b/src/dawn_native/opengl/BindGroupGL.cpp
@@ -50,7 +50,9 @@ : BindGroupBase(this, device, descriptor) { } - BindGroup::~BindGroup() { + BindGroup::~BindGroup() = default; + + void BindGroup::DestroyApiObjectImpl() { ToBackend(GetLayout())->DeallocateBindGroup(this); }