diff options
author | Guo Yejun <yejun.guo@intel.com> | 2014-05-07 03:34:37 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-05-09 10:34:19 +0800 |
commit | 6f7e6852e8924d428affe8874d658eb2809663a5 (patch) | |
tree | cb93ac6e00e7e0a1c23b613e61f96c429367006d /backend/src/ir | |
parent | 93793d420baf63279baea3bd1a39cea25fea440f (diff) |
do not serialize zero image/sampler info into binary
if there is no image/sampler used in kernel source, it is not
necessary to serialize the zero image/sampler info into kernel binary.
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Diffstat (limited to 'backend/src/ir')
-rw-r--r-- | backend/src/ir/image.hpp | 3 | ||||
-rw-r--r-- | backend/src/ir/sampler.hpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/backend/src/ir/image.hpp b/backend/src/ir/image.hpp index cf388d42..a79e0a34 100644 --- a/backend/src/ir/image.hpp +++ b/backend/src/ir/image.hpp @@ -61,6 +61,9 @@ namespace ir { void operator = (const ImageSet& other) { regMap.insert(other.regMap.begin(), other.regMap.end()); } + + bool empty() const { return regMap.empty(); } + ImageSet(const ImageSet& other) : regMap(other.regMap.begin(), other.regMap.end()) { } ImageSet() {} ~ImageSet(); diff --git a/backend/src/ir/sampler.hpp b/backend/src/ir/sampler.hpp index dd1f3b61..2b51ce38 100644 --- a/backend/src/ir/sampler.hpp +++ b/backend/src/ir/sampler.hpp @@ -56,6 +56,8 @@ namespace ir { samplerMap.insert(other.samplerMap.begin(), other.samplerMap.end()); } + bool empty() const { return samplerMap.empty(); } + SamplerSet(const SamplerSet& other) : samplerMap(other.samplerMap.begin(), other.samplerMap.end()) { } SamplerSet() {} |