From f34408abb4162654f30e09cd44cb9b97e29ddd0f Mon Sep 17 00:00:00 2001 From: Michael LIAO Date: Wed, 29 Apr 2020 12:20:42 -0400 Subject: [PATCH] [vdi] Skip null texture object in `hipDestroyTextureObject`. - To match both CUDA and HCC runtime behavior. Change-Id: I072b006dd554e17f8341f391d33bf6224a125a7e [ROCm/hip commit: cbe90236399ad6c0c604058419a50976e7254284] --- projects/hip/vdi/hip_texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip/vdi/hip_texture.cpp b/projects/hip/vdi/hip_texture.cpp index 94026c8e33..acaaf8c165 100755 --- a/projects/hip/vdi/hip_texture.cpp +++ b/projects/hip/vdi/hip_texture.cpp @@ -312,7 +312,7 @@ hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject, hipError_t ihipDestroyTextureObject(hipTextureObject_t texObject) { if (texObject == nullptr) { - return hipErrorInvalidValue; + return hipSuccess; } const hipResourceType type = texObject->resDesc.resType;