nir[i] = nir_shader_clone(NULL, nir[i]);
}
+ NIR_PASS_V(nir[i], nir_lower_deref_instrs, ~0);
+
if (first != last) {
nir_variable_mode mask = 0;
assert(exec_list_length(&nir->functions) == 1);
struct exec_node *node = exec_list_get_head(&nir->functions);
entry_point = exec_node_data(nir_function, node, node);
-
- NIR_PASS_V(nir, nir_lower_deref_instrs, ~0);
} else {
uint32_t *spirv = (uint32_t *) module->data;
assert(module->size % 4 == 0);
assert(exec_list_length(&nir->functions) == 1);
entry_point->name = ralloc_strdup(entry_point, "main");
- NIR_PASS_V(nir, nir_lower_deref_instrs, ~0);
-
/* Make sure we lower constant initializers on output variables so that
* nir_remove_dead_variables below sees the corresponding stores
*/
nir_shader *nir = st_glsl_to_nir(st, prog, shader_program, shader->Stage);
- nir_lower_deref_instrs(nir, (nir_lower_deref_flags)~0);
-
set_st_program(prog, shader_program, nir);
prog->nir = nir;
}
mask = (nir_variable_mode)(mask | nir_var_shader_out);
nir_shader *nir = shader->Program->nir;
+ NIR_PASS_V(nir, nir_lower_deref_instrs, (nir_lower_deref_flags)~0);
NIR_PASS_V(nir, nir_lower_io_to_scalar_early, mask);
st_nir_opts(nir, is_scalar[i]);
}