aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.h
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-02-19 18:37:11 -0800
committerMatt Turner <[email protected]>2014-02-21 22:51:32 -0800
commit98e2654880ef57617e82b6a75578d2ac5f2d6c6c (patch)
tree55da9fb322cdfb76a88f8b30857584f14a438168 /src/mesa/drivers/dri/i965/brw_fs.h
parent00c567e897f02e8680a8d628bbca2bb01e69a69b (diff)
i965: Mark brw_reg_type and register_file enums as PACKED.
The C99 spec says the type of an enum is implementation defined (but can be char, signed int, or unsigned int). gcc appears to always give enums four bytes, even when they can fit in less. It does so because this is what other compilers seem to do [0] and therefore to maintain ABI compatibility with them. gcc has an -fshort-enum flag that tells the compiler to use only as much space as needed for an enum. Adding __attribute__((__packed__)) to an enum definition has the same behavior, but on a per-enum basis. brw_reg_type and register_file are not part of the ABI, so we can safely mark them as PACKED so that they'll take only a byte, rather than four. [0] http://gcc.gnu.org/onlinedocs/gcc/Non-bugs.html#index-fshort-enums-3868 Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.h')
0 files changed, 0 insertions, 0 deletions