Finally fix the bfs bug, and add texture mem to bfs reshuffling.