nv50: access only the available amount of constbuf
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 16 Jan 2014 15:37:53 +0000 (15:37 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 18 Jan 2014 19:17:09 +0000 (19:17 +0000)
commit12e744abbb9fd8cb07a12954aaa7127521d5af0a
tree478436038dab8f03645852fb446f4d8d44bb3c66
parentd606ca37eb20f18d8ac4727c68831fcecb2f7de4
nv50: access only the available amount of constbuf

The textures array is defined as a number of NV50_MAX_PIPE_CONSTBUFS
per shader stage. Currently the nv50 driver handles only 3 shader
stages, thus we wreck chaos when accessing array-out-of-bounds.

Cc: 9.1 9.2 10.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_context.c