95ee0ba41f
In some cases when switching shader programs, mesa does not switch the currently set pipe_constant_buffer, which keeps pointing to the one previously set. If the two shader programs have a different number of uniforms, the size of the constant buffer may be different and this needs to be considered while generating the next draw command. This patch fixes the uniform buffer creation in the lima vertex shader command to avoid an out of bounds memcpy due to a previously set pipe_constant_buffer. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6701>