From c149c88fa1d07e161c6e0b804df593cb5c60a8c6 Mon Sep 17 00:00:00 2001 From: agodavar Date: Tue, 9 Feb 2021 08:39:44 -0500 Subject: [PATCH] SWDEV-271096 - Handle depth zero in hipMalloc3D Change-Id: I0ef0cc825e20b3480e9e5476e09dde5f73cdd3ea --- rocclr/hip_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/hip_memory.cpp b/rocclr/hip_memory.cpp index af4e368d2f..ab3518e9b3 100755 --- a/rocclr/hip_memory.cpp +++ b/rocclr/hip_memory.cpp @@ -421,7 +421,7 @@ hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t heigh return hipErrorInvalidValue; } - if ((width == 0) || (height == 0)) { + if ((width == 0) || (height == 0) || (depth == 0)) { *ptr = nullptr; return hipSuccess; }