summaryrefslogtreecommitdiff
path: root/backend/src/CMakeLists.txt
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2013-05-07 14:15:45 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-05-15 17:09:50 +0800
commit54bd6e4dc706d85f5df81e55126865f7d7ad383d (patch)
treec7d4e776695d6a598d4a6bd333edc97aaefa41d1 /backend/src/CMakeLists.txt
parent19e9c58f29362151d0f3900ca5a7b12bbce3e2c2 (diff)
GBE: refine the sampler implementation to comply with spec.
The previous implementation is to use a new address space pointer to represent a sampler. The reason is that there is no specified data type for sampler_t in LLVM front end thus we can't determine the sampler argument type if we use a normal interger to represnet the sampler. But that breaks the OCL spec, the spec allows the kernel to define and initialize sampler variables in kernel side. Now I use a little tricky way to fix this problem. First, I decide to use normal unsigned interger to represent sampler_t in kernel side. Then at compile time, I check read_imagexxx function's sampler arguments. If the argument is a constant value, then it should be a kernel side defined sampler, then I insert the sampler type into a global sampler set for the current kernel function. If the argument is not a constant value, then I will check whether it's a kernel argument, if it is, then I fix up the corresponding kernel arg type to SAMPLER there. To unify the kernel side defined sampler and kernel argument sampler, I add two new gbe API. To export all the kernel side defined sampler data and size to the runtime library. Then latter, the runtime library can use this information to append new sampler to the unified sampler buffer and bind all the sampler at one time. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: Lv, Meng <meng.lv@intel.com>
Diffstat (limited to 'backend/src/CMakeLists.txt')
-rw-r--r--backend/src/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
index ac7e1da0..04e758f8 100644
--- a/backend/src/CMakeLists.txt
+++ b/backend/src/CMakeLists.txt
@@ -61,6 +61,8 @@ else (GBE_USE_BLOB)
ir/unit.hpp
ir/constant.cpp
ir/constant.hpp
+ ir/sampler.cpp
+ ir/sampler.hpp
ir/instruction.cpp
ir/instruction.hpp
ir/liveness.cpp