GBE: optimize read_image to avoid get sampler info dynamically.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 21 Feb 2014 04:50:55 +0000 (12:50 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Mon, 24 Feb 2014 06:58:09 +0000 (14:58 +0800)
commit35936076f07b8ebc7f5b90e54b345ace01150be2
treed678b2a790256f833bbdfc7c8ae75e020b34e612
parent3713d5e8f517eb9468fad0a8fc9102c451e7d72e
GBE: optimize read_image to avoid get sampler info dynamically.

Most of time, the user is using a const sampler value in the kernel
directly. Thus we don't need to get the sampler value through a function
call. And this way, the compiler front end could do much better optimization
than using the dynamic get sampler information. For the luxmark's
median/simple case, this patch could get about 30-45% performance gain.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/ocl_stdlib.tmpl.h
src/cl_kernel.c