GBE/Runtime: Optimize Sample/TypedWrite instruction.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Mon, 13 May 2013 03:16:06 +0000 (11:16 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 15 May 2013 09:09:51 +0000 (17:09 +0800)
commit80bc513a8c8fd210a74eadc8608c77a600c3099a
tree7eb239657837ef302bf98726ecb1c1f8f7a7c253
parent1cf3e5161e892b08aef2f6189259581572e5dba2
GBE/Runtime: Optimize Sample/TypedWrite instruction.

This commit does two major things as below:
1. Allocate image surface at compile time, and add new gbe interfaces to let runtime know
how many image surfaces we have, and the image allocation informations. Thus the runtime
library know how to bind those image surfaces.

2. As now for both image and sampler, at compile time, we know the eaxct binding table
index. We no longer need to get those index from the input argument(curbe) and prepare
the desc to the architecture register. We can use imm as the desc thus we can save
4 out of 4 instructions for SampleInstruction and save 2 out of 12 instructions for
the TypedWriteInstruction.

This patch is also a major prepartion for the get_image_width/height/... functions.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Lv, Meng <meng.lv@intel.com>
23 files changed:
backend/src/CMakeLists.txt
backend/src/backend/gen_context.cpp
backend/src/backend/gen_encoder.cpp
backend/src/backend/gen_encoder.hpp
backend/src/backend/gen_insn_selection.cpp
backend/src/backend/program.cpp
backend/src/backend/program.h
backend/src/backend/program.hpp
backend/src/ir/function.cpp
backend/src/ir/function.hpp
backend/src/ir/image.cpp [new file with mode: 0644]
backend/src/ir/image.hpp [new file with mode: 0644]
backend/src/ir/instruction.hpp
backend/src/ir/sampler.cpp
backend/src/llvm/llvm_gen_backend.cpp
src/cl_command_queue.c
src/cl_command_queue.h
src/cl_command_queue_gen7.c
src/cl_driver.h
src/cl_kernel.c
src/cl_kernel.h
src/intel/intel_driver.c
src/intel/intel_gpgpu.c