mesa/st: move st_pipe_format_to_mesa_format() call to where its used