runtime: fix image1d buffer allocation.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 20 Jun 2014 07:45:34 +0000 (15:45 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 20 Jun 2014 08:50:51 +0000 (16:50 +0800)
commit1842d1718906709bb8c77eded8b611066c11c388
treef6223d7c011d3459f2ea8d192eb1f87e33c7d382
parent89690e783af0a9a2ed8fcb69305022425ea8d7bf
runtime: fix image1d buffer allocation.

Per bspec, a image should has a at least 2 line vertical alignment,
thus we can't simply attach a buffer to a 1d image surface which has the same size.
We have to create a new image, and copy the buffer data to this new image.
And replace all the buffer object's reference to this image.

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