vc4: Fix math with a condition flag set.
authorEric Anholt <eric@anholt.net>
Wed, 8 Mar 2017 20:07:16 +0000 (12:07 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 8 Mar 2017 21:44:17 +0000 (13:44 -0800)
commit19f571ba6d2c216e419b75737574919be0120830
tree44ef254b3812f30c2ed7c218521f82d25fe95326
parent615f6653b02829187bb8ddb38b12c34cb2976ef3
vc4: Fix math with a condition flag set.

Math results land in r4, regardless of the condition.  To implement them,
we just need to ensure that the results are moved out of r4 (as often
happens anyway, the values is live across another math instruction), so
that we can attach the condition to the MOV.

Fixes dEQP-GLES2.functional.shaders.random.all_features.fragment.93 and a
couple others, that were assertion failing that their conditions hadn't
been handled during the QIR->QPU stage.
src/gallium/drivers/vc4/vc4_qpu_emit.c
src/gallium/drivers/vc4/vc4_register_allocate.c