freedreno/a3xx: fix gpu lockup in some piglit tests
authorRob Clark <robclark@freedesktop.org>
Wed, 4 Sep 2013 02:00:47 +0000 (22:00 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 14 Sep 2013 17:31:58 +0000 (13:31 -0400)
The varying-out config comes from the inputs of the frag shader (so that
we aren't exporting unneeded varyinges).  The varyings-count should come
from the frag shader as well, to avoid a discrepency in configuration
and resulting gpu lockup.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_program.c

index c6c51b11ee2278eda2e4485d302a022017c33b87..d84bbe9c36fad299bb42adf45f806a88d7463ba2 100644 (file)
@@ -273,7 +273,7 @@ fd3_program_emit(struct fd_ringbuffer *ring,
                        A3XX_SP_VS_CTRL_REG1_CONSTFOOTPRINT(MAX2(vsi->max_const, 0)));
        OUT_RING(ring, A3XX_SP_VS_PARAM_REG_POSREGID(vp->pos_regid) |
                        A3XX_SP_VS_PARAM_REG_PSIZEREGID(vp->psize_regid) |
-                       A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR(vp->outputs_count));
+                       A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR(fp->inputs_count));
 
        assert(vp->outputs_count >= fp->inputs_count);