mesa: replace some index_size multiplications and divisions with shifts