From 87e901fcdc64398fc9dea5de7ac8bff03b928d63 Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 27 Sep 2019 15:39:51 -0400 Subject: [PATCH] P4 to Git Change 2005676 by kjayapra@0_HIPWS_LNX1_ROCM on 2019/09/27 15:33:19 SWDEV-145570 - Accomadating Texture Header changes. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#18 edit --- hipamd/api/hip/hip_texture.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hipamd/api/hip/hip_texture.cpp b/hipamd/api/hip/hip_texture.cpp index a8f642c400..c5fd87e9f6 100644 --- a/hipamd/api/hip/hip_texture.cpp +++ b/hipamd/api/hip/hip_texture.cpp @@ -585,12 +585,12 @@ hipError_t hipTexRefSetAddressMode(textureReference* tex, int dim, hipTextureAdd HIP_RETURN(hipSuccess); } -hipError_t hipTexRefGetArray(hipArray* array, textureReference tex) { +hipError_t hipTexRefGetArray(hipArray_t* array, textureReference tex) { HIP_INIT_API(array, &tex); hip::TextureObject* texture = nullptr; - if (array == nullptr) { + if ((array == nullptr) || (*array == nullptr)) { HIP_RETURN(hipErrorInvalidImage); } @@ -603,7 +603,7 @@ hipError_t hipTexRefGetArray(hipArray* array, textureReference tex) { HIP_RETURN(hipErrorUnknown); } - *array = *(texture->resDesc.res.array.array); + **array = *(texture->resDesc.res.array.array); HIP_RETURN(hipSuccess); }