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>
/* also account for UBO addresses: */
packets += 1;
- size += 2 * shader->const_state.num_ubos;
+ size += 2 * align(shader->const_state.num_ubos, 2);
unsigned sizedwords = (4 * packets) + size;
shader->ubo_state.cmdstream_size = sizedwords * 4;