mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-18 04:23:36 +00:00
mResourcePtr is not necessary because mResource already contains a pointer to the resource mResourcePtr is initialized in the constructor that takes an ID3D12Resource but mResource is not. This causes memory corruption when the caller releases the resource out from under the object. Texture::DestroyImpl was releasing mResource but leaving mResourcePtr pointing to freed memory Bug: dawn:62 Change-Id: Ib68786fc041e57dbf184c09c9afe4b9d8fa3241f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8500 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>