GBE: fixup/refine a bug for image1D array's extra binding index handling.
authorZhigang Gong <zhigang.gong@intel.com>
Thu, 4 Sep 2014 00:01:25 +0000 (08:01 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Thu, 4 Sep 2014 03:53:04 +0000 (11:53 +0800)
commit9ce75d4de41e8359f411ce5ab3dbd2cd363364b2
tree96e63bf32d8826d6de3402373fccdb7674399ea8
parent56d2cf2e02b6933478f080548f6960751ff18741
GBE: fixup/refine a bug for image1D array's extra binding index handling.

Due to hardware limitation on Gen7/Gen75 when sampling a
surface with clamp address mode and nearest filter mode
on a integer image1Darray type surface, we have to bind
one buffer to to bti. The previous implementation hard
coded it to 128 + original index and when check whether
it is such type bti in driver layer, assume the bti reserved
is 3 which is wrong now.

This patch fixed those hard coded functions and use the
macros defined in the program.h.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_insn_selection.cpp
backend/src/backend/program.h
backend/src/llvm/llvm_gen_backend.cpp
src/cl_command_queue.c
src/intel/intel_gpgpu.c