From a5d9f56befa03a792af75fc7ccaa37f7bbbea43d Mon Sep 17 00:00:00 2001 From: Anusha Godavarthy Surya Date: Wed, 9 Oct 2019 16:26:06 +0530 Subject: [PATCH] Fix undefine ref to hipUbindTexture for texture types --- hipamd/src/hip_texture.cpp | 7 +++---- hipamd/tests/src/texture/hipNormalizedFloatValueTex.cpp | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hipamd/src/hip_texture.cpp b/hipamd/src/hip_texture.cpp index 6d4ef24673..8820878fc0 100644 --- a/hipamd/src/hip_texture.cpp +++ b/hipamd/src/hip_texture.cpp @@ -634,16 +634,15 @@ hipError_t hipBindTextureToMipmappedArray(textureReference* tex, return ihipLogStatus(hip_status); } -hipError_t ihipUnbindTextureImpl(TlsData *tls, const hipTextureObject_t& textureObject) { +hipError_t ihipUnbindTextureImpl(const hipTextureObject_t& textureObject) { hipError_t hip_status = hipSuccess; - + TlsData* tls=tls_get_ptr(); auto ctx = ihipGetTlsDefaultCtx(); if (ctx) { hc::accelerator acc = ctx->getDevice()->_acc; auto device = ctx->getWriteableDevice(); hsa_agent_t* agent = static_cast(acc.get_hsa_agent()); - hipTexture* pTexture = textureHash[textureObject]; if (pTexture != nullptr) { hsa_ext_image_destroy(*agent, pTexture->image); @@ -659,7 +658,7 @@ hipError_t ihipUnbindTextureImpl(TlsData *tls, const hipTextureObject_t& texture hipError_t hipUnbindTexture(const textureReference* tex) { HIP_INIT_API(hipUnbindTexture, tex); hipError_t hip_status = hipSuccess; - hip_status = ihipUnbindTextureImpl(tls, tex->textureObject); + hip_status = ihipUnbindTextureImpl(tex->textureObject); return ihipLogStatus(hip_status); } diff --git a/hipamd/tests/src/texture/hipNormalizedFloatValueTex.cpp b/hipamd/tests/src/texture/hipNormalizedFloatValueTex.cpp index e519605157..fd2e8ccf0f 100644 --- a/hipamd/tests/src/texture/hipNormalizedFloatValueTex.cpp +++ b/hipamd/tests/src/texture/hipNormalizedFloatValueTex.cpp @@ -91,6 +91,7 @@ bool textureTest(enum hipArray_Format texFormat) } hipFree(dData); hipFree(dOutputData); + hipUnbindTexture(textureNormalizedVal_1D); delete [] hOutputData; return testResult; }