[Mesa-dev] [PATCH 3/3] radeonsi: use #pragma pack to pack si_shader_key

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 22 16:03:16 UTC 2017


Hi Marek,

On 20 June 2017 at 19:00, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> sizeof(struct si_shader_key):
>   Before reverting the 2 commits: 120 bytes
>   After reverting the 2 commits: 128 bytes
>   With #pragma pack: 107 bytes
>
> I'm not sure if memcmp with a byte-aligned size is a good idea.

If you guys decide to go with this, please consider annotating the
individual structs.
Otherwise it's likely that one will add/remove a struct between the
pragma push/pop, causing some interesting and annoying to debug
issues.

-Emil


More information about the mesa-dev mailing list