mesa/main: handle double uniform matrices properly