From db4bcda1bf1b4a00e80504f761a5c06ca4764b44 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 --- hipamd/vdi/hip_texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/vdi/hip_texture.cpp b/hipamd/vdi/hip_texture.cpp index 94026c8e33..acaaf8c165 100755 --- a/hipamd/vdi/hip_texture.cpp +++ b/hipamd/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;