vbo: Use alloca for _vbo_draw_indirect.
authorMathias Fröhlich <mathias.froehlich@web.de>
Wed, 28 Mar 2018 05:19:02 +0000 (07:19 +0200)
committerMathias Fröhlich <Mathias.Froehlich@gmx.net>
Sat, 31 Mar 2018 04:32:15 +0000 (06:32 +0200)
commit1da345e56932b71067c069270828680aeb38d6b5
tree863024f38e37439b00826e2f7e51db484209f946
parent3f1cd957d30ed77d8d18f37885de921247f5377d
vbo: Use alloca for _vbo_draw_indirect.

Avoid using malloc in the draw path of mesa.
Since the draw_count is a user api input, fall back to malloc if
the amount of consumed stack space may get too high.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/mesa/vbo/vbo_context.c