[Mesa-dev] r300/compiler: Fix scheduling of TEX instructions.

Tom Stellard tstellar at gmail.com
Sun Jul 4 14:27:25 PDT 2010


This is another attempt at fixing the TEX scheduling bug in the pair scheduler.
The problem was that this group of texture instructions was being emitted in 6
separate TEX blocks:

10: TEX temp[13].xyz, temp[12].xy__, 2D[0];
11: TEX temp[12].xyz, temp[11].xy__, 2D[0];
12: TEX temp[11].xyz, temp[10].xy__, 2D[0];
13: TEX temp[10].xyz, temp[9].xy__, 2D[0];
14: TEX temp[9].xyz, temp[8].xy__, 2D[0];
15: TEX temp[8].xyz, temp[7].xy__, 2D[0];

This was happening because the scheduler thought that #11 had to wait
for #10 and #12 had to wait for #11 and so on.  This is correct for
regular instructions, but not for TEX instructions.  Since all source
registers in a TEX block are read from before any of the destination
registers are written to, there should not be any dependencies between
these instructions.  They should all be emitted in the same block.

-Tom


More information about the mesa-dev mailing list