r600g/sb: Don't read junk after EOP
authorGlenn Kennard <glenn.kennard@gmail.com>
Thu, 27 Aug 2015 17:04:16 +0000 (19:04 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Aug 2015 02:32:32 +0000 (12:32 +1000)
commita830225adbb77073272961df409885cca6b861ee
tree5496dae3d3a49ee8e776f35264f18bf28ba3b1f4
parent36f1999a87258603b6720d55e6020d5d24c215c9
r600g/sb: Don't read junk after EOP

Shaders that contain instruction data after an instruction with EOP could end
up parsing that as an instruction, leading to various crashes and asserts in
SB as it gets very confused if it sees for instance a loop start instruction
jumping off to some random point.

Add a couple of asserts, and print EOP bit if set in old asm printer.

Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
src/gallium/drivers/r600/sb/sb_bc_parser.cpp