clang will align the vec3 load into vec4. we have to do it in frontend. Signed-off-by: Ruiling Song <ruiling.s...@intel.com> --- backend/src/ocl_stdlib.tmpl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h index 76395fa..e3ac632 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) \ -- 1.7.9.5 _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet