2
0

SWDEV-512044 - Fix logic error in texture size validation

Change-Id: I6aefcfed25b099c17bf0856d621081c0a5ce46c5
Este cometimento está contido em:
Pengda Xie
2025-01-28 15:49:14 -08:00
cometido por Pengda Xie
ascendente a8f309049d
cometimento ade704dd2f
+2 -2
Ver ficheiro
@@ -147,8 +147,8 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject,
if ((pResDesc->resType == hipResourceTypePitch2D) &&
((pResDesc->res.pitch2D.devPtr == nullptr) ||
(!amd::isMultipleOf(pResDesc->res.pitch2D.devPtr, info.imageBaseAddressAlignment_)) ||
(pResDesc->res.pitch2D.width >= info.image2DMaxWidth_) ||
(pResDesc->res.pitch2D.height >= info.image2DMaxHeight_) ||
(pResDesc->res.pitch2D.width > info.image2DMaxWidth_) ||
(pResDesc->res.pitch2D.height > info.image2DMaxHeight_) ||
(!amd::isMultipleOf(pResDesc->res.pitch2D.pitchInBytes, info.imagePitchAlignment_)))) {
// TODO check pitch limits.
return hipErrorInvalidValue;