SWDEV-541478 - return hipSuccess for hipTexObjectCreate TypePitch2D with zero width or height (#712)

Этот коммит содержится в:
Todd tiantuo Li
2025-09-19 20:48:01 -07:00
коммит произвёл GitHub
родитель 2e93b9f6cb
Коммит 7137c7f3d8
+5
Просмотреть файл
@@ -1491,6 +1491,11 @@ hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject, const HIP_RESOURCE
HIP_RETURN(hipErrorInvalidValue);
}
if (static_cast<hipResourceType>(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);