util: use c11 alignas instead of rolling our own
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 8 Jun 2022 08:07:15 +0000 (10:07 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 14 Jun 2022 15:08:37 +0000 (15:08 +0000)
commite3bc78b8e398348bc1993b1c713b8917bd4d53d9
tree31180f44901e936c93c4dc26607ad7c29882ae9a
parent2c430445079a7ab53c922e7adf57aaab6e477e39
util: use c11 alignas instead of rolling our own

Due to how alignas is defined, it itsn't allowed to use it on a struct,
it needs to be used on the first member instead. So move the declaration
in those cases.

This still leaves the ALIGN16 macro using compiler-specific directives,
because it's a lot of work to untangle the above. This probably deserves
its own MR.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908>
src/util/macros.h
src/util/ralloc.c
src/util/sparse_array.h
src/util/u_cpu_detect.c