cl/driver: fix the incorrect handling of 1D array.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 18 Jun 2014 02:01:15 +0000 (10:01 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 20 Jun 2014 07:53:03 +0000 (15:53 +0800)
commit74252fdc7b3e211bcbe22e4411f313e978f25def
tree43dfc19f6fc0dee03a168c9f05f59166fdd9e8f4
parent97da0110158ed127176cea18694b23ce8a9e608b
cl/driver: fix the incorrect handling of 1D array.

According to the bspec, the 1D array should be treated as a 3D like
surface which has height 1. So we need to make sure the depth is
the array_size. Thus the rt_view_extent's value should be always
the same as the depth.

According to the ocl spec, the 1D array firstly should be a 1D image rather
than a 2D image. Thus we should access different lines according to the
slice_pitch rather than the image_row_pitch.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
backend/src/ocl_stdlib.tmpl.h
src/cl_mem.c
src/intel/intel_gpgpu.c