diff options
author | Jason Ekstrand <[email protected]> | 2015-05-01 11:28:01 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-08-31 16:58:20 -0700 |
commit | 112c607216ae53ad19380970988309a96d5a1fd8 (patch) | |
tree | 8884ea66fdbc6cc14b76a36643419fd7b33b084e | |
parent | 4fa1366392ef3c9779ffe265bd6c39bd483249de (diff) |
nir/spirv: Actaully add variables to the funciton or shader
-rw-r--r-- | src/glsl/nir/spirv_to_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index a71119fe524..61514c1d469 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -497,6 +497,12 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, vtn_value(b, w[4], vtn_value_type_constant)->constant; } + if (var->data.mode == nir_var_local) { + exec_list_push_tail(&b->impl->locals, &var->node); + } else { + exec_list_push_tail(&b->shader->globals, &var->node); + } + val->deref = nir_deref_var_create(b->shader, var); vtn_foreach_decoration(b, val, var_decoration_cb, var); |