st/glsl_to_tgsi: disable on-the-fly peephole for 64-bit operations
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 7 Oct 2016 14:15:30 +0000 (16:15 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 12 Oct 2016 16:50:10 +0000 (18:50 +0200)
commit63193b9cdeca4f5d0e91f90c0926a1565f6b0415
tree2c84ba15ce3c004dab4ade2fa8acb2a1751da81c
parentf5f3cadca3809952288e3726ed5fde22090dc61d
st/glsl_to_tgsi: disable on-the-fly peephole for 64-bit operations

This optimization is incorrect with 64-bit operations, because the
channel-splitting logic in emit_asm ends up being applied twice to
the source operands.

A lucky coincidence of how the writemask test works resulted in this
optimization basically never being applied anyway. As far as I can tell,
the only case where it would (incorrectly) have been applied is something
like

    dvec2 d;
    float x = (float)d.y;

which nobody seems to have ever done. But the moral equivalent does occur
in one of the component layout piglit test.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp