diff options
author | Ruiling Song <ruiling.song@intel.com> | 2014-03-07 13:48:46 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-03-10 14:52:47 +0800 |
commit | f81e9424806095d1e25116830eeeea9c818d183c (patch) | |
tree | 0085f6fdac80042625b513d12ea20369c85f07c4 /backend | |
parent | 3a7bfa1300913115879c3ca6486fc5df3d1a3a20 (diff) |
GBE: make vload3 only read 3 elements.
clang will align the vec3 load into vec4. we have to do it in frontend.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'backend')
-rwxr-xr-x | backend/src/ocl_stdlib.tmpl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h index 76395fae..e3ac6324 100755 --- a/backend/src/ocl_stdlib.tmpl.h +++ b/backend/src/ocl_stdlib.tmpl.h @@ -3854,12 +3854,12 @@ INLINE_OVERLOADABLE void vstore3(TYPE##3 v, size_t offset, SPACE TYPE *p) {\ *(p + 3 * offset + 2) = v.s2; \ } \ INLINE_OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p) { \ - return *(SPACE TYPE##3 *) (p + 3 * offset); \ + return (TYPE##3)(*(p + 3 * offset), *(p+ 3 * offset + 1), *(p + 3 * offset + 2));\ } #define DECL_UNTYPED_RDV3_SPACE(TYPE, SPACE) \ INLINE_OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p) { \ - return *(SPACE TYPE##3 *) (p + 3 * offset); \ + return (TYPE##3)(*(p + 3 * offset), *(p+ 3 * offset + 1), *(p + 3 * offset + 2));\ } #define DECL_UNTYPED_RW_ALL_SPACE(TYPE, SPACE) \ |