[Mesa-dev] [PATCH V2] util/disk_cache: support caches for multiple architectures

Grazvydas Ignotas notasas at gmail.com
Sat Mar 4 15:57:19 UTC 2017


On Sat, Mar 4, 2017 at 4:44 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 3 March 2017 at 23:37, Timothy Arceri <tarceri at itsqueeze.com> wrote:
>>
>> I'm tempted to just push this:
>> https://patchwork.freedesktop.org/patch/141891/
>>
>> And worry about issues later if that's not good enough.
>>
> Can we use anything like the following and polish later ? We already
> use __ILP32__ in mesa so we can assume the compiler is sane.
> This has the benefit of a) no build system glue, b) no special casing
> for arches - 64bit ppc/sparc/others anyone ?
>
> const char *
> get_arch_bitness_string(void)
> {
>     if (sizeof(void *) == 4)
> #ifdef __ILP32__
>         return "ilp-32";
> #else
>         return "32";
> #endif
>     if (sizeof(void *) == 8)
>         return "64"
>
>     # paranoia check which will be dropped by the optimiser
>     assert(!"unknown_arch");
>     return "unknown_arch";
> }

Yeah it's exactly what I was trying to suggest, so naturally I vote
for this solution.

GraÅžvydas


More information about the mesa-dev mailing list