diff options
author | Francisco Jerez <[email protected]> | 2013-07-21 01:14:54 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-07-22 23:09:34 +0200 |
commit | df530829f757a8968389427eb26f45a0d46623fa (patch) | |
tree | 2d4a27391420df49508c980a3c168c18d02e3cdc /src/gallium/state_trackers/clover/llvm | |
parent | f64c0ca692d3e8c78dd9ae1f015f58f1dfc1c760 (diff) |
clover: Respect kernel argument alignment restrictions.
Cc: [email protected]
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm')
-rw-r--r-- | src/gallium/state_trackers/clover/llvm/invocation.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index a50cf37dfcb..2c6c1d46882 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -317,6 +317,7 @@ namespace { TD.getSmallestLegalIntType(mod->getContext(), arg_size * 8) : arg_type; unsigned target_size = TD.getTypeStoreSize(target_type); + unsigned target_align = TD.getABITypeAlignment(target_type); if (llvm::isa<llvm::PointerType>(arg_type) && arg.hasByValAttr()) { arg_type = @@ -332,7 +333,7 @@ namespace { default: args.push_back( module::argument(module::argument::global, arg_size, - target_size, 0, + target_size, target_align, module::argument::zero_ext)); break; } @@ -347,7 +348,7 @@ namespace { args.push_back( module::argument(module::argument::scalar, arg_size, - target_size, 0, ext_type)); + target_size, target_align, ext_type)); } } |