static void
emit_output_copies_impl(struct lower_io_state *state, nir_function_impl *impl)
{
- if (state->shader->stage == MESA_SHADER_GEOMETRY) {
+ if (state->shader->info.stage == MESA_SHADER_GEOMETRY) {
/* For geometry shaders, we have to emit the output copies right
* before each EmitVertex call.
*/
/* Reparent the name to the new variable */
ralloc_steal(nvar, nvar->name);
- /* Reparent the constant initializer (if any) */
- ralloc_steal(nvar, nvar->constant_initializer);
+ assert(nvar->constant_initializer == NULL);
/* Give the original a new name with @<mode>-temp appended */
const char *mode = (temp->data.mode == nir_var_shader_in) ? "in" : "out";
temp->data.mode = nir_var_global;
temp->data.read_only = false;
temp->data.fb_fetch_output = false;
- temp->constant_initializer = NULL;
+ temp->data.compact = false;
return nvar;
}
void
-nir_lower_io_to_temporaries(nir_shader *shader, nir_function *entrypoint,
+nir_lower_io_to_temporaries(nir_shader *shader, nir_function_impl *entrypoint,
bool outputs, bool inputs)
{
struct lower_io_state state;
- if (shader->stage == MESA_SHADER_TESS_CTRL)
+ if (shader->info.stage == MESA_SHADER_TESS_CTRL)
return;
state.shader = shader;
- state.entrypoint = entrypoint->impl;
+ state.entrypoint = entrypoint;
if (inputs)
exec_list_move_nodes_to(&shader->inputs, &state.old_inputs);