freedreno: Fix calculation of the const buffer cmdstream size.
authorEric Anholt <eric@anholt.net>
Fri, 17 Apr 2020 17:45:17 +0000 (10:45 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 22:10:10 +0000 (22:10 +0000)
commit69c8dfd49f565283f599b3be9af3f1327ea78803
treedda2876a1de9ed081ec5bbdf6b2c3cf1e55845d3
parent8b221e091427a749499179511d1c8438fd0dcd64
freedreno: Fix calculation of the const buffer cmdstream size.

The HW packet requires padding the number of pointers you emit, and we
would assertion fail about running out of buffer space if the number of
UBOs to be uploaded was odd.

Fixes: b4df115d3f3c ("freedreno/a6xx: pre-calculate userconst stateobj size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>
src/gallium/drivers/freedreno/a6xx/fd6_program.c