SWDEV-351054 - Move validation for w & h to hipMemAllocPitch.
Change-Id: Ia624fc99e797baf88dc029d7e36bb80df1bd7d12
[ROCm/clr commit: e5dff9a140]
Este cometimento está contido em:
cometido por
Jaydeepkumar Patel
ascendente
981281199d
cometimento
5053dbe40e
@@ -753,9 +753,6 @@ hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t heigh
|
||||
hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height) {
|
||||
HIP_INIT_API(hipMallocPitch, ptr, pitch, width, height);
|
||||
CHECK_STREAM_CAPTURE_SUPPORTED();
|
||||
if (width == 0 || height == 0) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
HIP_RETURN(ihipMallocPitch(ptr, pitch, width, height, 1), (ptr != nullptr)? *ptr : nullptr);
|
||||
}
|
||||
|
||||
@@ -2876,6 +2873,9 @@ hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInB
|
||||
size_t height, unsigned int elementSizeBytes) {
|
||||
HIP_INIT_API(hipMemAllocPitch, dptr, pitch, widthInBytes, height, elementSizeBytes);
|
||||
CHECK_STREAM_CAPTURE_SUPPORTED();
|
||||
if (widthInBytes == 0 || height == 0) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
if (elementSizeBytes != 4 && elementSizeBytes != 8 && elementSizeBytes != 16) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador