Return CL_IMAGE_FORMAT_NOT_SUPPORTED if image_format is not supported.
authorYang Rong <rong.r.yang@intel.com>
Wed, 28 May 2014 09:02:26 +0000 (17:02 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 28 May 2014 08:09:18 +0000 (16:09 +0800)
commitfd93252cfa7114759f53ba4e9119ce126181cbc4
tree5ed84a84453007999de271c2d9ca192e7707e23f
parent71f96a67578ce1ccb56e045b7913913073a5d42e
Return CL_IMAGE_FORMAT_NOT_SUPPORTED if image_format is not supported.

And move the function cl_image_byte_per_pixel call before cl_image_get_supported_fmt
to return correct error code when format invalid.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
src/cl_image.c
src/cl_mem.c
src/intel/intel_driver.c