i965: Don't use the head sentinel as an fs_inst in Gen4 workaround code.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Jun 2014 09:59:21 +0000 (02:59 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Jun 2014 23:38:27 +0000 (16:38 -0700)
commitecc78eab119ac8fa3df380a80bc94975e986523c
tree08268fabd28102b4ff288c1a5bd80c0f7be138d2
parentfc19c4aaf17a43c88d789ca9b7f7b2fe0c6f27a1
i965: Don't use the head sentinel as an fs_inst in Gen4 workaround code.

When walking backwards, we want to stop at the head sentinel, which is
where scan_inst->prev->prev == NULL, not scan_inst->prev == NULL.

Fixes random crashes, as well as valgrind errors.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/drivers/dri/i965/brw_fs.cpp