nir: Use alloca instead of variable length arrays.
authorJose Fonseca <jfonseca@vmware.com>
Thu, 26 Feb 2015 16:37:48 +0000 (16:37 +0000)
committerJose Fonseca <jfonseca@vmware.com>
Fri, 27 Feb 2015 14:30:36 +0000 (14:30 +0000)
commitf320ecf218ab24ef4883f918a9007b2a6cfdac5e
tree2548b93631d89800ac4bd7172a45d04d5b8cebff
parent84a1e3d61e6df449571e41426ec64b115fedc7c3
nir: Use alloca instead of variable length arrays.

This is to enable the code to build with -Werror=vla in the short term,
and enable the code to build with MSVC2013 soon after.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
include/c99_alloca.h [new file with mode: 0644]
src/glsl/nir/nir_from_ssa.c
src/glsl/nir/nir_live_variables.c
src/glsl/nir/nir_lower_vars_to_ssa.c