diff options
author | Kenneth Graunke <[email protected]> | 2012-02-14 12:43:22 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-02-15 11:44:37 -0800 |
commit | 4b274068204c7f0bacaa4639f24feb433353b861 (patch) | |
tree | c3802d0968807d17bef47482742cb4937e045767 /src/gallium/auxiliary/postprocess/postprocess.h | |
parent | 8ab02b511882857a09fceed0e93bf4a0b25c17b2 (diff) |
i965/fs: Take # of components into account in try_rewrite_rhs_to_dst.
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).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44333
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/postprocess/postprocess.h')
0 files changed, 0 insertions, 0 deletions