From 0ef5d51dc83f14dff63507e851ea6700a27230b6 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
[ROCm/hip commit: f208cb871a8018f8bee698691b06139ecc9de165]
---
projects/hip/api/hip/hip_texture.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/projects/hip/api/hip/hip_texture.cpp b/projects/hip/api/hip/hip_texture.cpp
index a8f642c400..c5fd87e9f6 100644
--- a/projects/hip/api/hip/hip_texture.cpp
+++ b/projects/hip/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);
}