draw: fix incorrect vertex size computation in LLVM drawing code
authorBrian Paul <brianp@vmware.com>
Mon, 20 Jan 2014 18:57:20 +0000 (10:57 -0800)
committerBrian Paul <brianp@vmware.com>
Mon, 20 Jan 2014 18:57:20 +0000 (10:57 -0800)
commitad814d04ca5d579538885a595331b5b27caefd2a
treef664a0b389d670611c3a37b3263ab87b460c30b1
parent3a4255148b85d7f92b9485a03861ce1562787de6
draw: fix incorrect vertex size computation in LLVM drawing code

We were calling draw_total_vs_outputs() too early.  The call to
draw_pt_emit_prepare() could result in the vertex size changing.
So call draw_total_vs_outputs() after draw_pt_emit_prepare().

This fix would seem to be needed for the non-LLVM code as well,
but it's not obvious.  Instead, I added an assertion there to
try to catch this problem if it were to occur there.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72926
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c