i965: Assert that the offset in the VBO is below the VBO size.
authorEric Anholt <eric@anholt.net>
Tue, 4 Aug 2009 00:55:14 +0000 (17:55 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 Sep 2009 21:12:36 +0000 (14:12 -0700)
commit63b3fa2bcecc75a116ce651da435d205ccd43584
treed452cbbdf87a21ebaef183c0abc92df2971baf8d
parent217af32c2d6afab5e1907cc16fb4b6feb982abe7
i965: Assert that the offset in the VBO is below the VBO size.

This avoids sending a bad buffer address to the GPU due to programmer error,
and is permitted by the ARB_vbo spec.  Note that we still have the opportunity
to dereference past the end of the GPU, because we aren't clipping to a
correct _MaxElement, but that appears to be harder than it should be.  This
gets us the 90% solution.

Bug #19911.
(cherry picked from commit d7430d942f6c7950a92367aeb13b80cf76ccad78)
src/mesa/drivers/dri/i965/brw_draw_upload.c