From 4ec9d181e053a282ac7a07d62c55280edcd0aa63 Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 18 Oct 2019 14:10:57 -0400 Subject: [PATCH] P4 to Git Change 2016115 by cpaquot@cpaquot-ocl-lc-lnx on 2019/10/18 13:58:30 SWDEV-207366 - [HIP] 'hipErrorInvalidValue' (1011) with hipMemcpy3D We need to divide by sizeByte and not multiply the WidthInBytes to get pixel width Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#79 edit --- api/hip/hip_memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/hip/hip_memory.cpp b/api/hip/hip_memory.cpp index eeeacd0391..a2ae036d29 100644 --- a/api/hip/hip_memory.cpp +++ b/api/hip/hip_memory.cpp @@ -1134,8 +1134,8 @@ hipError_t hipMemcpy3D(const struct hipMemcpy3DParms* p) { } region[2] = p->Depth; region[1] = p->Height; - region[0] = p->WidthInBytes * byteSize; - srcOrigin[0] = p->srcXInBytes/byteSize; + region[0] = p->WidthInBytes / byteSize; + srcOrigin[0] = p->srcXInBytes / byteSize; srcOrigin[1] = p->srcY; srcOrigin[2] = p->srcZ; dstPitchInbytes = p->dstArray->width * byteSize;