diff --git a/projects/clr/hipamd/src/hip_texture.cpp b/projects/clr/hipamd/src/hip_texture.cpp index e96d542397..7d2e12287b 100644 --- a/projects/clr/hipamd/src/hip_texture.cpp +++ b/projects/clr/hipamd/src/hip_texture.cpp @@ -1491,6 +1491,11 @@ hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject, const HIP_RESOURCE HIP_RETURN(hipErrorInvalidValue); } + if (static_cast(pResDesc->resType) == hipResourceTypePitch2D && + ((pResDesc->res.pitch2D.width == 0) || (pResDesc->res.pitch2D.height == 0))) { + HIP_RETURN(hipSuccess); + } + hipResourceDesc resDesc = hip::getResourceDesc(*pResDesc); hipTextureDesc texDesc = hip::getTextureDesc(*pTexDesc);