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.ves...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to