diff options
author | Francisco Jerez <[email protected]> | 2016-02-26 17:42:27 -0800 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2016-03-06 12:22:40 -0800 |
commit | 3dd0441f6cbcceb42effea2219d835082c2e2725 (patch) | |
tree | f1cfe0ec3e0b0b1d5650db1fed7eb2878b475ee7 /src/mesa/main/transformfeedback.c | |
parent | c70b7c80e3e1dea150ece96e02ef3d364284812d (diff) |
i965/vec4: Propagate swizzles correctly during copy propagation.
This simplifies the code that iterates over the per-component values
found in the matching copy_entry struct and checks whether the
register regions that were copied to each component are similar enough
to be treated as a single (reswizzled) value which can be propagated
into the current instruction.
Aside from being scattered between opt_copy_propagation(),
try_copy_propagate(), and try_constant_propagate(), what I found
terribly confusing about the preexisting logic was that
opt_copy_propagation() tried to reorder the array of values according
to the swizzle of the instruction source, which meant one would have
had to invert the reordering applied at the top level in order to find
out which component to take from each value (we were just taking the
i-th component from the i-th value, which is not correct in general).
The saturate mask was also being swizzled incorrectly.
This consolidates the logic for matching multiple components of a
copy_entry into a single function which returns the result as a
regular src_reg on success, as if the copy had been performed with a
single MOV instruction copying all components of the src_reg into the
destination.
Fixes several ARB_vertex_program MOV test-cases from:
https://cgit.freedesktop.org/~kwg/piglit/log/?h=arb_program
Acked-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main/transformfeedback.c')
0 files changed, 0 insertions, 0 deletions