Skip to content

util/macros: rework DIV_ROUND_UP macro

Christian Gmeiner requested to merge austriancoder/mesa:div_round_up into master

I came cross this possible change while doing code review. The reviewed code added its own div_round_up static inline function instead of reusing the current DIV_ROUND_UP.

Here is a nice blog posts which explains the math behind this change: https://medium.com/@arunistime/how-div-round-up-works-179f1a2113b5

Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com

Merge request reports