SWDEV-351055 - changed isParent() to checking directly for parent's pointer. image should not be released for test types in Unit_hipMallocArray_happy

Change-Id: I8e4fae8c9188ee68c392237cb824a790ad7c9563


[ROCm/clr commit: d9f002c36f]
Цей коміт міститься в:
Jiabao Xie committed 2022-08-25 10:11:54 -04:00
1 джерело e960c639b7
коміт 2f90d3e296
1 file changed
+1 -1
+1 -1
Переглянути файл
@@ -342,7 +342,7 @@ hipError_t ihipDestroyTextureObject(hipTextureObject_t texObject) {
const hipResourceType type = texObject->resDesc.resType;
const bool isImageFromBuffer = (type == hipResourceTypeLinear) || (type == hipResourceTypePitch2D);
const bool isImageView = ((type == hipResourceTypeArray) || (type == hipResourceTypeMipmappedArray)) &&
!texObject->image->isParent();
texObject->image->parent() != nullptr;
// If the texture object was created from an array, then the array owns the image SRD.
// Otherwise, if the texture object is a view, or was created from a buffer, then it owns the image SRD.
if (isImageFromBuffer || isImageView) {