SWDEV-409815 - Fix image view cache issue

Add a view bit to avoid original resource destruction when parent
dependency doesn't exist with the image view cache

Change-Id: I8277afd575af8f29951c5d1a9f7d94d784251657
This commit is contained in:
German Andryeyev
2023-07-14 15:05:19 -04:00
والد f136a576f5
کامیت b49e8e78e1
3فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
@@ -1443,8 +1443,8 @@ void Image::destroy() {
hsa_status_t status = hsa_ext_image_destroy(dev().getBackendDevice(), hsaImageObject_);
assert(status == HSA_STATUS_SUCCESS);
}
if (owner()->parent() != nullptr) {
// Don't destroy memory if it's a view. Parent will destroy the original allocation.
if ((owner()->parent() != nullptr) || owner()->ImageView()) {
return;
}