[Mesa-dev] merging compiler.h, util/macros.h and p_compiler.h
Brian Paul
brianp at vmware.com
Fri Feb 27 17:12:45 PST 2015
These three files all define macros in the same vein and are useful
everywhere. I'd like to replace them with a common util/compiler.h
file. There's already some overlap in these files. Take a look at them
and let me know if there's any concerns.
I think a few things could be factored out into new files:
util/endian.h would have the CPU_TO_LE32(), LE32_TO_CPU,
MESA_BIG_ENDIAN, MESA_LITTLE_ENDIAN defines. These are used in only a
handful of source files.
On the gallium side, I'd keep p_compiler.h but it would just include
util/compiler.h and add a few simple things (like "#define INLINE
inline", PIPE_DEPRECATED, etc).
Also, in p_compiler.h there's some macros that aren't part of the
gallium interface that I think could be moved into
src/gallium/auxiliary/util/
* move PIPE_ALIGN_TYPE,VAR,STACK macros into new u_align_var.h
* move PIPE_READ_WRITE_BARRIER() into new u_barrier.h
Sound OK?
-Brian
PS: Anyone building on AIX? If not, there's a little AIX code in
compiler.h that could be tossed.
More information about the mesa-dev
mailing list