diff options
author | marha <marha@users.sourceforge.net> | 2015-03-05 22:17:40 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-03-05 22:17:40 +0100 |
commit | 8574eba804031f6b19713f0b02952280730bf62e (patch) | |
tree | 9afa4d6fe299d43ab7e580dc08a5547120274561 /mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c | |
parent | eef70231353a6103f47fcae88a6e89e765e5cd47 (diff) | |
download | vcxsrv-8574eba804031f6b19713f0b02952280730bf62e.tar.gz vcxsrv-8574eba804031f6b19713f0b02952280730bf62e.tar.bz2 vcxsrv-8574eba804031f6b19713f0b02952280730bf62e.zip |
fontconfig mesa git update 5 Mar 2015
Diffstat (limited to 'mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c')
-rw-r--r-- | mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c b/mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c index 8af753029..9e9a418e3 100644 --- a/mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c +++ b/mesalib/src/glsl/nir/nir_lower_vars_to_ssa.c @@ -26,6 +26,8 @@ */ #include "nir.h" +#include "nir_vla.h" + struct deref_node { struct deref_node *parent; @@ -899,8 +901,8 @@ rename_variables_block(nir_block *block, struct lower_variables_state *state) static void insert_phi_nodes(struct lower_variables_state *state) { - unsigned work[state->impl->num_blocks]; - unsigned has_already[state->impl->num_blocks]; + NIR_VLA_ZERO(unsigned, work, state->impl->num_blocks); + NIR_VLA_ZERO(unsigned, has_already, state->impl->num_blocks); /* * Since the work flags already prevent us from inserting a node that has @@ -910,10 +912,7 @@ insert_phi_nodes(struct lower_variables_state *state) * function. So all we need to handle W is an array and a pointer to the * next element to be inserted and the next element to be removed. */ - nir_block *W[state->impl->num_blocks]; - - memset(work, 0, sizeof work); - memset(has_already, 0, sizeof has_already); + NIR_VLA(nir_block *, W, state->impl->num_blocks); unsigned w_start, w_end; unsigned iter_count = 0; |