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; }