[Mesa-dev] [PATCH 1/1] clover: use getTypeAllocSize() for kernel arguments
Jan Vesely
jan.vesely at rutgers.edu
Wed Apr 23 08:43:41 PDT 2014
3 element vectors have the size of 4 element ones.
See Ch 6.1.5 of OCL 1.1+ specs
Thx Matt Arsenault for the hint
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
src/gallium/state_trackers/clover/llvm/invocation.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index a81bdf8..a2022b4 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -308,7 +308,7 @@ namespace {
#endif
llvm::Type *arg_type = arg.getType();
- unsigned arg_size = TD.getTypeStoreSize(arg_type);
+ unsigned arg_size = TD.getTypeAllocSize(arg_type);
llvm::Type *target_type = arg_type->isIntegerTy() ?
TD.getSmallestLegalIntType(mod->getContext(), arg_size * 8) :
--
1.9.0
More information about the mesa-dev
mailing list