[Mesa-dev] [PATCH] glsl: Try vectorizing when seeing a repeated assignment to a channel.
Matt Turner
mattst88 at gmail.com
Tue Apr 8 17:59:57 PDT 2014
On Tue, Apr 8, 2014 at 5:40 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> When considering assignment expressions like:
>
> v.x += u.x;
> v.x += u.x;
>
> the vectorizer would incorrectly keep going, attempting to find more
> instructions to vectorize. It would overwrite the saved assignment
> to point at the second one, and increment channels a second time,
> resulting in try_vectorize thinking the expression was a vec2 instead of
> a float.
>
> Instead, if we see a repeated assignment to a channel, just try to
> vectorize everything we've found so far. This clears the saved state
> so it will start over.
>
> Fixes Piglit's repeated-channel-assignments.vert.
>
> Cc: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list