From b848cf085a031ec791291dda9c62c0fca8a82119 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 --- 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 acaaf8c165..de62adb402 100755 --- a/hipamd/vdi/hip_texture.cpp +++ b/hipamd/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);