mesa/st: add support for dynamic ubo selection

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>