util: fix util_is_vbo_upload_ratio_too_large
authorMarek Olšák <marek.olsak@amd.com>
Mon, 19 Dec 2022 06:17:13 +0000 (01:17 -0500)
committerEric Engestrom <eric@engestrom.ch>
Thu, 26 Jan 2023 15:40:34 +0000 (15:40 +0000)
commit01185dcd6098a129100120096e063b3384b29b96
tree80b47efb53dc4f1830f91d0a501ba9c6b2be1211
parent6c869d993aa3cde4a0fff52a62a7224a3db03fed
util: fix util_is_vbo_upload_ratio_too_large

It was wrong. For example, if the draw vertex count was 10 and the upload
vertex count was 150, u_vbuf wouldn't unroll the draw and would instead
memcpy 150 vertices. This fixes that case.

Fixes: 068a3bf0d7c - util: move and adjust the vertex upload heuristic equation from u_vbuf

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
(cherry picked from commit 4f6e7858762a38fd7f2e4ab568fc018b4b155f86)
.pick_status.json
src/util/u_math.h