replace IROUND with util functions
authorDylan Baker <dylan@pnwbakers.com>
Mon, 10 Sep 2018 17:22:42 +0000 (10:22 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 21 Apr 2020 18:09:03 +0000 (11:09 -0700)
commit53c36dfcfe3eb3749a53267f054870280afb0d71
tree7d178170b8324ce2ec4fed64e66a146c173edf97
parentdf3ce8fb77e718ee4371fe7ca9f4a7c889319efb
replace IROUND with util functions

This adds two new util functions to rounding.h, _mesa_iroundf and
mesa_lround, which are just wrappers around roundf and round, that cast
to int and long int respectively. This is possible since mesa recently
dropped support for VC2013, since 2015 and 2017 support roundf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
12 files changed:
src/mesa/main/drawpix.c
src/mesa/main/eval.c
src/mesa/main/get.c
src/mesa/main/light.c
src/mesa/main/pixel.c
src/mesa/main/pixelstore.c
src/mesa/main/samplerobj.c
src/mesa/main/texparam.c
src/mesa/swrast/s_blit.c
src/mesa/swrast/s_context.h
src/util/imports.h
src/util/rounding.h