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

Change-Id: Ib8fa8e3bd0c655f3de213b3798d369ba866b2f01
Tento commit je obsažen v:
Jaydeep Patel
2022-12-21 18:07:00 +00:00
odevzdal Jaydeepkumar Patel
rodič 707ca92a80
revize c4003ef62a
+5
Zobrazit soubor
@@ -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;
}