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>
Fri, 4 Sep 2009 21:12:35 +0000 (14:12 -0700)
commit9eca0e5350377148976e0d1200f98bd20ac28197
tree82937915e2e8c4064973e596495f4c8b9bfffd2a
parent7e26bdb849b75f4aeb69cf8b1fdffbc461265490
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)
(cherry picked from commit d1fbfd0f962347e4153db3852292d44de5aea863)
src/mesa/drivers/dri/i965/brw_draw_upload.c