freedreno/gmem: rework gmem layout algo