From c46937d1cfa3b354b680e35401803af309d8b2b2 Mon Sep 17 00:00:00 2001 From: Vlad Sytchenko Date: Thu, 30 Apr 2020 16:38:56 -0400 Subject: [PATCH] Fix invalid check in hipTexRefGetAddressMode() This resolves https://github.com/ROCm-Developer-Tools/HIP/issues/2048. Change-Id: Iba3653b011434a450a5c3ce10cfd4aa39d318527 [ROCm/hip commit: dcd466773b660dd2a9c85b766a9a25cdf2a4147d] --- 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 acaaf8c165..de62adb402 100755 --- a/projects/hip/vdi/hip_texture.cpp +++ b/projects/hip/vdi/hip_texture.cpp @@ -728,7 +728,7 @@ hipError_t hipTexRefGetAddressMode(hipTextureAddressMode* pam, } // Currently, the only valid value for dim are 0 and 1. - if ((dim != 0) || (dim != 1)) { + if ((dim != 0) && (dim != 1)) { DevLogPrintfError("Currently only 2 dimensions (0,1) are valid," "dim : %d \n", dim); HIP_RETURN(hipErrorInvalidValue);