D3D12: Remove tempBuffers in ExecuteCommandList()

This patch clears mTempBuffers everytime after d3d12CommandList
is executed in CommandRecordingContext. Previously mTempBuffers
won't be cleaned up until device is destroyed, which will
consume lots of unnecessary GPU memory.

Bug: chromium:1161355
Change-Id: Ie03d43847ed56e7f2b4bfc5b0f8244dfd7012625
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94820
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Jiawei Shao 2022-06-28 00:28:35 +00:00 committed by Dawn LUCI CQ
parent 65d35f8e7d
commit 1a758d8ceb
1 changed files with 1 additions and 0 deletions

View File

@ -130,6 +130,7 @@ MaybeError CommandRecordingContext::ExecuteCommandList(Device* device) {
mIsOpen = false;
mSharedTextures.clear();
mHeapsPendingUsage.clear();
mTempBuffers.clear();
}
return {};
}