radeonsi: fix an off-by-one error in the bounds check for max_vertices
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 6 Dec 2016 20:03:03 +0000 (21:03 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 12 Dec 2016 08:04:13 +0000 (09:04 +0100)
commit88509518b01d7c1d7436a790bf9be5cf3c41a528
tree460836033c01d0976b069ab0c4bb882d72688a66
parent7655bccce80c9690ecb850304d15238ef1e0d622
radeonsi: fix an off-by-one error in the bounds check for max_vertices

The spec actually says that calling EmitStreamVertex is undefined when
you exceed max_vertices. But we do need to avoid trampling over memory
outside the GSVS ring.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c