tgsi: fix SSE code emit for XPD
authorBrian Paul <brianp@vmware.com>
Thu, 7 Jan 2010 21:49:12 +0000 (14:49 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 7 Jan 2010 21:49:14 +0000 (14:49 -0700)
commit8647aa1d8d8ffce7ae3b00e7e277be635124acad
tree45be8c7837147db2dab8ef80c0bfa9953aa235ed
parent2b7a4b2c0e9b18ed985b0eda34723d53bc2a305b
tgsi: fix SSE code emit for XPD

Rearrange things so that the writes to the dest registers happen
after we've fetched/used all src registers.

The problematic instruction was:  XPD TEMP[2].xyz, TEMP[0], TEMP[2];
Note that the dst reg is also a src reg.

This fixes bad shading with progs/glsl/bump.c since Eric's changes to the
Mesa program optimizer in commit d6690ce15fb8c7c6abf1bc0d847c1d2da2c33904.
The optimizer rearranges some registers so we occasionally wind up with
something like the above.
src/gallium/auxiliary/tgsi/tgsi_sse2.c