OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 31 Aug 2015 12:16:22 +0000 (13:16 +0100)
commit9db5c2ca2ea8f4172611337db1cc81f19aab443e
tree3e514bc941e5ac13715f5f5f20969170120bfa4e
parent08c41221d7102106d0b70a6399e2270919458077
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>
(cherry picked from commit a830225adbb77073272961df409885cca6b861ee)
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