draw: fix robust ubo size calc
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 26 Apr 2023 19:37:31 +0000 (15:37 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Apr 2023 19:48:48 +0000 (19:48 +0000)
commit79b3828e829821d87ba5141f9bff10643afefb84
treeaefddb29edaf0209363e0c63546471489b7bdf29
parent08ffa8e0d28316d810caf548d7dfefb73107b9c2
draw: fix robust ubo size calc

if the size of the constant buffer + stride overflows UINT32_MAX,
DIV_ROUND_UP will return 0, which is, in some sense, extremely robust,
but for general functionality it's not actually very robust

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22720>
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c