Vedran Miletić <ved...@miletic.net> writes: > On 06/04/2016 04:27 AM, Francisco Jerez wrote: >> Serge Martin <edb+m...@sigluy.net> writes: >> >>> 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. >>> >> Is there any guarantee that the alloc size of the type will match what >> the CL API expects? (which is the only thing arg_api_size is used for >> IIRC) Isn't it fully dependent on the data layout which is pretty much >> up to the target? >> > > It is dependent on the target. The issue is that right now we get the > struct size wrongly, as we round it here to the next power of two, store > that in scalar arg object, and later compare that rounded value to > sizeof(struct_arg_type) which user has passed via the API. > I know, but using the target data layout-dependent alloc size of the type as API-visible size seems pretty bogus too -- Unless we set as requirement on all targets that their data alignment rules should match the CL API's exactly, which I don't think is the case right now but doesn't sound like a completely crazy idea to me.
> Regards, > Vedran > > -- > Vedran Miletić > vedran.miletic.net
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev