SWDEV-374398 - Pitch should not be less than width for both src and dst.

Change-Id: Ib8fa8e3bd0c655f3de213b3798d369ba866b2f01


[ROCm/clr commit: c4003ef62a]
Cette révision appartient à :
Jaydeep Patel
2022-12-21 18:07:00 +00:00
révisé par Jaydeepkumar Patel
Parent b534cb32d2
révision 376f515547
+5
Voir le fichier
@@ -2496,6 +2496,11 @@ hipError_t ihipMemcpy3D_validate(const hipMemcpy3DParms* p) {
(hip::getElementSize(p->dstArray) != hip::getElementSize(p->dstArray))) {
return hipErrorInvalidValue;
}
// Pitch should not be less than width for both src and dst.
if (p->srcPtr.pitch < p->srcPtr.xsize || p->dstPtr.pitch < p->dstPtr.xsize) {
return hipErrorInvalidPitchValue;
}
return hipSuccess;
}