[Mesa-dev] [PATCH 2/2] i965/fs: Take # of components into account in try_rewrite_rhs_to_dst.

Eric Anholt eric at anholt.net
Wed Feb 15 11:32:49 PST 2012

On Tue, 14 Feb 2012 12:43:22 -0800, Kenneth Graunke <kenneth at whitecape.org> 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 swizzled texturing operations, as
> they return a set of four contiguous registers.  Consider the following:
> (assign (x)
>         (var_ref vec_ctor_x)
>         (swiz x (tex vec4 (var_ref m_sampY) (var_ref m_cordY) 0 1 ())))
> In this case, the source and destination registers are equal, since
> reg_offset is 0 for both.  Yet, this is only a partial move: the texture
> operation generates four registers, and the LHS only covers one.
> Fixes color distortion in XBMC when using GLSL shaders.
> NOTE: This is a candidate for the 8.0 branch (with the previous commit).

Nice!  Series is

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120215/b2248731/attachment.pgp>

More information about the mesa-dev mailing list