On Monday, July 2, 2018 7:59:31 AM PDT Jason Ekstrand wrote: > v2 (Jason Ekstrand): > - Rename y to pot_align (Brian) > - Also use ALIGN_POT in build_id.c and slab.c (Brian) > > Cc: Brian Paul <bri...@vmware.com> > Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> > --- > src/util/build_id.c | 7 +++---- > src/util/macros.h | 3 +++ > src/util/ralloc.c | 2 -- > src/util/slab.c | 6 ++---- > 4 files changed, 8 insertions(+), 10 deletions(-)
I like moving these to src/util/macros.h. I think the ALIGN_POT name is a bit strange though, we normally just call that ALIGN. For example, src/mesa/main/macros.h defines functions (not macros!) called ALIGN (requires power-of-two) and ALIGN_NPOT. Gallium's src/gallium/auxiliary/util/u_math.h defines align(), align64(), and util_align_npot() functions as well. That said, if you rename it, you'll probably conflict with main/macros.h and have to clean that up too, and then you get into functions vs macros and...I'm not sure I want to make you do that today. :(
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev