P4 to Git Change 1972329 by cpaquot@cpaquot-ocl-lc-lnx on 2019/07/23 15:16:26
SWDEV-197168 - [HIP] handle width or height or src or dst being 0 Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#63 edit
This commit is contained in:
@@ -851,6 +851,13 @@ hipError_t ihipMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch
|
||||
amd::Memory* srcMemory = getMemoryObject(src, sOrigin[0]);
|
||||
amd::Memory* dstMemory = getMemoryObject(dst, dOrigin[0]);
|
||||
|
||||
if (src_slice_pitch == 0 ||
|
||||
dst_slice_pitch == 0 ||
|
||||
dst == nullptr ||
|
||||
src == nullptr) {
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
if (!srcRect.create(sOrigin, region, spitch, src_slice_pitch) ||
|
||||
!dstRect.create(dOrigin, region, dpitch, dst_slice_pitch)) {
|
||||
return hipErrorInvalidValue;
|
||||
|
||||
Reference in New Issue
Block a user