[Beignet] [PATCH 1/2] runtime: fix a slice pitch calculation bug.
Zhigang Gong
zhigang.gong at intel.com
Fri Jun 20 00:47:03 PDT 2014
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
src/cl_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cl_mem.c b/src/cl_mem.c
index bf0e416..a1d3b25 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -640,7 +640,7 @@ _cl_mem_new_image(cl_context ctx,
size_t min_pitch = bpp * w;
if (data && pitch == 0)
pitch = min_pitch;
- size_t min_slice_pitch = min_pitch * h;
+ size_t min_slice_pitch = pitch * h;
if (data && slice_pitch == 0)
slice_pitch = min_slice_pitch;
if (UNLIKELY(w > ctx->device->image3d_max_width)) DO_IMAGE_ERROR;
--
1.8.3.2
More information about the Beignet
mailing list