From 390565d4b70571e3e7b22deee3317fd78664dbc6 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 [ROCm/clr commit: 8f85d89812e3a44ecbd23ff4dc013595f2c2824a] --- projects/clr/hipamd/rocclr/hip_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/rocclr/hip_memory.cpp b/projects/clr/hipamd/rocclr/hip_memory.cpp index af4e368d2f..ab3518e9b3 100755 --- a/projects/clr/hipamd/rocclr/hip_memory.cpp +++ b/projects/clr/hipamd/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; }