mesa: use gl_buffer_index in a few places