i965: Don't emit bad packets when no VBs are referenced.
authorEric Anholt <eric@anholt.net>
Thu, 30 Jul 2009 20:40:29 +0000 (13:40 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 4 Aug 2009 00:19:03 +0000 (17:19 -0700)
commitd1fbfd0f962347e4153db3852292d44de5aea863
tree3a4c579b557d00bcf78abfef13ff652f22e9d53d
parent9b9cb30d128fc5f1ba77287696ecd508e640efde
i965: Don't emit bad packets when no VBs are referenced.

It appears that sometimes Mesa (and I suppose a VS could as well) emits
a program which references no vertex data, and thus we end up with
nr_enabled == 0 even though some VBs are enabled.  We'd end up emitting
VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs.

Bug #22945 (wine with an uncompiled VS)
src/mesa/drivers/dri/i965/brw_draw_upload.c