i965: Assert that the scratch spaces are in range.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 10 Jun 2016 01:13:26 +0000 (18:13 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 12 Jun 2016 07:40:15 +0000 (00:40 -0700)
commit1db37ebecf5af55215ace3801f8dbb8b10c5305e
treebd8a8b4d38fb33c8215ce3a332a4c93448f88854
parenta42a93dc123163f84058f3886e5ce1b02b9856f5
i965: Assert that the scratch spaces are in range.

I don't know that anything actually guarantees this, but if we exceed
the limits, we may end up overflowing and trashing random buffers that
happen to be nearby in the VMA space, leading to rendering corruption,
hangs, or worse.

We should really fix this properly.  However, the pitfall has existed
for ages, so for now we should at least detect it.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp