From e4a0212bbedf13bb30eed048896c015e355329a2 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
[ROCm/clr commit: edb288692d9f4733fba9348522a94b5f7055932b]
---
projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp b/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp
index b7b910f338..ba059ff2c0 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp
+++ b/projects/clr/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;
}