GBE/runtime: fixup broken 1d array image support.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 18 Jun 2014 02:10:07 +0000 (10:10 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 20 Jun 2014 07:53:28 +0000 (15:53 +0800)
commit0aa3d33e0da27a3772964aecd72556f0770f63fb
treecbc2d79f007a986e5f1bff55e8b630e11e8cdb06
parent5745447ce9b56504aeb95e2bf03b93c4d3a9d5dc
GBE/runtime: fixup broken 1d array image support.

As sample LD message doesn't support array index, we have
to create a 2D array surface with the same buffer object.
Thus one 1D array image will have two surfaces binded to it
one is the index and the second is 128 + index.

And then at kernel side, we will access the corresponding
2D array surface when the LD message is required otherwise
will access the origin 1D array surface.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
backend/src/backend/gen_insn_selection.cpp
backend/src/ir/instruction.cpp
backend/src/ocl_stdlib.tmpl.h
src/cl_api.c
src/cl_command_queue.c
src/cl_device_id.c
src/cl_device_id.h
src/cl_gt_device.h
src/cl_mem.c
src/intel/intel_gpgpu.c