r300: fix variables detection for paired ALU and TEX instructions in different branches
TEX instrutions can't write xyz and w to separate registers so we need to create variables from them first, otherwise we can create two variables from ALU writing the same register xyz and w in other branch (this usually works when TEX is not present as the xyz and w can read/write from different registers). This fixes regalloc because the variables are later used as a graph nodes. The variable order should not matter but it slightly does (leading to approx 0.3% shader-db temps increase as compared to previous state), so just sort the variables list afterwards to be as close to the previous behavior as possible and prevent the regression. CC: mesa-stable Closes: mesa/mesa#6936 Signed-off-by:Pavel Ondračka <pavel.ondracka@gmail.com> Reviewed-by:
Filip Gawin <filip@gawin.net> Part-of: <mesa/mesa!17987>