From 4561a207ddb42d03ebc9765b43bdd9ee16564952 Mon Sep 17 00:00:00 2001 From: Tao Sang Date: Thu, 12 May 2022 12:06:03 -0400 Subject: [PATCH] SWDEV-319818 - Revert change on hipResourceViewDesc Revert part of http://gerrit-git.amd.com/c/compute/ec/hipamd/+/675588 Change-Id: Iee9dac9f8c50aa9b6a12ca9d8fd792a51973b8cd --- hipamd/src/hip_texture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hipamd/src/hip_texture.cpp b/hipamd/src/hip_texture.cpp index 6fbc087141..34e9787300 100644 --- a/hipamd/src/hip_texture.cpp +++ b/hipamd/src/hip_texture.cpp @@ -88,7 +88,9 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject, return hipErrorInvalidValue; } - if (pResViewDesc != nullptr && pResDesc->resType == hipResourceTypeLinear) { + // pResViewDesc can only be specified if the type of resource is a HIP array or a HIP mipmapped array. + if ((pResViewDesc != nullptr) && + ((pResDesc->resType != hipResourceTypeArray) && (pResDesc->resType != hipResourceTypeMipmappedArray))) { return hipErrorInvalidValue; }