r300/compiler: Fix scheduler bug causing texture corruption
authorTom Stellard <tstellar@gmail.com>
Sun, 23 Oct 2011 01:30:46 +0000 (18:30 -0700)
committerTom Stellard <tstellar@gmail.com>
Fri, 28 Oct 2011 00:35:31 +0000 (20:35 -0400)
commit17a1c0cb0d9e04607c1726d04ef23485979dfc98
treeaa4994233b3c2716d7d1517b65f135686cd2e6dd
parent5aa96286e7e1a5380673eb75e8653616b48751fd
r300/compiler: Fix scheduler bug causing texture corruption

We weren't setting TEX_SEM_WAIT on instructions that read the value of a
TEX instruction and also wrote the same register as the TEX instruction.

This is the sequence we were miscompiling:

1: TEX temp[0], input[2].xy__, 2D[0]
...
16: src0.xyz = temp[22], src1.xyz = temp[0], src2.xyz = temp[19]
      MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx

https://bugs.freedesktop.org/show_bug.cgi?id=42090
src/gallium/drivers/r300/compiler/radeon_pair_schedule.c