On Sun, 12 Feb 2012 23:29:14 -0800, Kenneth Graunke <[email protected]> wrote: > Commit dc7f449d1ac53a66e6efb56ccf2a5953418a26ca introduced a new method > for avoiding MOVs: try to rewrite the destination of the instruction > that produced the RHS so it writes into the LHS. > > Unfortunately, this is not safe for texturing operations, as they > return a set of four contiguous registers. Consider the following: > > SEND g7 ... > MOV g15 g7 > ADD g8 1.0 > > Upon seeing the MOV, we would rewrite the SEND to write to g15 (and > implicitly g16, g17, and g18), causing the next instruction that > references g8 to read garbage. > > The VS does not need texturing workarounds because sampler results fit > in a single register in SIMD4x2 mode.
I'm not following something. I don't see how last_rhs_inst->is_tex(), but this code somehow sees a MOV. Could you paste some annotated WM before/after code? I am slightly worried that this code could get confused by the MOV sequence of texture swizzling -- that src.equals(last_rhs_inst->dst), but the instruction in question isn't filling the entirety of that virtual GRF.
pgp0HkY6oYt00.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
