From edb288692d9f4733fba9348522a94b5f7055932b Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 11 Sep 2014 18:10:22 -0400 Subject: [PATCH] P4 to Git Change 1076147 by rili@rili_opencl_stg on 2014/09/11 17:44:11 EPR #405753 - Fixed incorrect value of slicePitch returned from clEnqueueMapimage for 1Darray. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#111 edit --- rocclr/runtime/device/gpu/gpumemory.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rocclr/runtime/device/gpu/gpumemory.cpp b/rocclr/runtime/device/gpu/gpumemory.cpp index b7b910f338..ba059ff2c0 100644 --- a/rocclr/runtime/device/gpu/gpumemory.cpp +++ b/rocclr/runtime/device/gpu/gpumemory.cpp @@ -1355,8 +1355,12 @@ Image::allocMapTarget( // Update the row and slice pitches value *rowPitch = region[0] * elementSize(); - slicePitchTmp = *rowPitch * region[1]; - + if (cal()->dimension_ == GSL_MOA_TEXTURE_1D_ARRAY) { + slicePitchTmp = *rowPitch ; + } + else { + slicePitchTmp = *rowPitch * region[1]; + } // Use start of the indirect buffer offset = 0; }