vc4: Compute the proper end address of the relocated command lists.
authorEric Anholt <eric@anholt.net>
Thu, 31 Jul 2014 19:46:13 +0000 (12:46 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 11 Aug 2014 21:45:30 +0000 (14:45 -0700)
commit771d86abd6c204cef82c5838b1ed20e4b8dbfa85
tree4ed0537fd3cc7f5c66f81a8507c7666ab13cddc5
parentc58f35393e9505ec8694b87579037f58df607865
vc4: Compute the proper end address of the relocated command lists.

render_cl_size/bin_cl_size includes relocations, while the hardware buffer
doesn't.  If you don't emit a HALT packet, the command parser continues
until the end register's value.  We can't allow executing unvalidated
buffer contents (and it's actually harmful in the render lists Mesa is
emitting, since VC4_PACKET_STORE_MS_TILE_BUFFER_AND_EOF doesn't trigger a
halt).
src/gallium/drivers/vc4/vc4_simulator.c
src/gallium/drivers/vc4/vc4_simulator_validate.c