/* For all other shader types, we need to do the copies right before
* the jumps to the end block.
*/
- struct set_entry *block_entry;
set_foreach(impl->end_block->predecessors, block_entry) {
struct nir_block *block = (void *)block_entry->key;
b.cursor = nir_after_block_before_jump(block);
/* Give the original a new name with @<mode>-temp appended */
const char *mode = (temp->data.mode == nir_var_shader_in) ? "in" : "out";
temp->name = ralloc_asprintf(var, "%s@%s-temp", mode, nvar->name);
- temp->data.mode = nir_var_global;
+ temp->data.mode = nir_var_shader_temp;
temp->data.read_only = false;
temp->data.fb_fetch_output = false;
temp->data.compact = false;