On Thursday 09 June 2016 00:47:27 Serge Martin wrote: > This fix getting the size of a struct arg. vec3 types still work ok. > Only buit-in args need to have power of two alignment, getTypeAllocSize > reports the correct size.
Mmmmm. I forgot to put V2 and to fix the commit message s/getTypeAllocSize reports the correct size// > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp > b/src/gallium/state_trackers/clover/llvm/invocation.cpp index > 03487d6..9af51539 100644 > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp > @@ -472,7 +472,8 @@ namespace { > // aligned to the next larger power of two". We need this > // alignment for three element vectors, which have > // non-power-of-2 store size. > - const unsigned arg_api_size = > util_next_power_of_two(arg_store_size); + const unsigned > arg_api_size = arg_type->isStructTy() ? > + arg_store_size : util_next_power_of_two(arg_store_size); > > llvm::Type *target_type = arg_type->isIntegerTy() ? > TD.getSmallestLegalIntType(mod->getContext(), arg_store_size > * 8) _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev