r300/compiler: fix buffer underflow when setting SEM_WAIT on last instruction
authorMarek Olšák <maraeo@gmail.com>
Wed, 4 Jan 2012 04:18:58 +0000 (05:18 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 5 Jan 2012 17:29:11 +0000 (18:29 +0100)
commitc77efc6bb63f7ff3f1ddf500e57beff5b317b9b1
treefabf8a62a35d5618c35164abbc87a1aff5bbb062
parentc2cc630f2896175ff0f368d9199acbe24afb7e75
r300/compiler: fix buffer underflow when setting SEM_WAIT on last instruction

Do it after we check whether inst_end != -1.
Also move the code structure at the beginning of r300_fragment_shader_code
to detect underflows easily with valgrind.
src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
src/gallium/drivers/r300/r300_fs.h