From 1d47bac0fc529bf723f1c407e103254d8af2f718 Mon Sep 17 00:00:00 2001 From: Loko Kung Date: Wed, 1 Dec 2021 19:32:00 +0000 Subject: [PATCH] Moves remaining logic in BindGroup dtor into Destroy. Bug: dawn:628 Change-Id: I2e6a403c89e450efc952c91a2d497b99aa60c298 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71244 Commit-Queue: Loko Kung Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng --- src/dawn_native/BindGroup.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dawn_native/BindGroup.cpp b/src/dawn_native/BindGroup.cpp index d81ffc084d..b5dfd79057 100644 --- a/src/dawn_native/BindGroup.cpp +++ b/src/dawn_native/BindGroup.cpp @@ -399,7 +399,9 @@ namespace dawn_native { TrackInDevice(); } - BindGroupBase::~BindGroupBase() { + BindGroupBase::~BindGroupBase() = default; + + void BindGroupBase::DestroyImpl() { if (mLayout != nullptr) { ASSERT(!IsError()); for (BindingIndex i{0}; i < mLayout->GetBindingCount(); ++i) { @@ -408,9 +410,6 @@ namespace dawn_native { } } - void BindGroupBase::DestroyImpl() { - } - void BindGroupBase::DeleteThis() { // Add another ref to the layout so that if this is the last ref, the layout // is destroyed after the bind group. The bind group is slab-allocated inside