Skip to content

util: Add and use functions to calculate min and max int for a size

Ian Romanick requested to merge idr/mesa:review/u_math_intmin into main

Many places need to know the maximum or minimum possible value for a given size integer... so everyone just open-codes their favorite version. There is some potential to hit either undefined or implementation-defined behavior, so having one version that Just Works seems beneficial.

Merge request reports