[Mesa-dev] [PATCH] i965/vec4: fix record clearing in copy propagation

Eric Anholt eric at anholt.net
Mon Apr 7 11:52:43 PDT 2014


Chia-I Wu <olvaffe at gmail.com> writes:

> From: Chia-I Wu <olv at lunarg.com>
>
> Given
>
>   mov vgrf7, vgrf9.xyxz
>   add vgrf9.xyz, vgrf4.xyzw, vgrf5.xyzw
>   add vgrf10.x, vgrf6.xyzw, vgrf7.wwww
>
> the last instruction would be wrongly changed to
>
>   add vgrf10.x, vgrf6.xyzw, vgrf9.zzzz
>
> during copy propagation.
>
> The issue is that when deciding if a record should be cleared, the old code
> checked for
>
>   inst->dst.writemask & (1 << ch)
>
> instead of
>
>   inst->dst.writemask & (1 << BRW_GET_SWZ(src->swizzle, ch))
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76749
> Signed-off-by: Chia-I Wu <olv at lunarg.com>
> Cc: Jordan Justen <jljusten at gmail.com>
> Cc: Matt Turner <mattst88 at gmail.com>

Reviewed-by: Eric Anholt <eric at anholt.net>

I've just sent a patch for adding a unit test of copy propagation -- it
would be nice to see an additional test on top of that for this bug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140407/6cb12453/attachment.sig>


More information about the mesa-dev mailing list