vc4: Initialize undefined temporaries to 0.
authorEric Anholt <eric@anholt.net>
Thu, 9 Oct 2014 15:49:23 +0000 (17:49 +0200)
committerEric Anholt <eric@anholt.net>
Thu, 9 Oct 2014 19:47:06 +0000 (21:47 +0200)
commit5cfab07639c650e4e9bae063c72e08a27a5e209d
treed59405d6cd255e877c75971dde816488067e8d31
parent4ce11de4ae356375833cb403711f5af1ed681965
vc4: Initialize undefined temporaries to 0.

Under the simulator, reading registers before writing them triggers an
assertion failure.  c->undef gets treated as r0, which will usually be
written, but not if it's used in the first instruction.  We should
definitely not be aborting in this case, and return some sort of undefined
value instead.

Fixes glsl-user-varying-ff.
src/gallium/drivers/vc4/vc4_program.c