exec_list_push_tail(&shader->shared, &var->node);
break;
+ case nir_var_mem_global:
+ assert(!"nir_shader_add_variable cannot be used for global memory");
+ break;
+
case nir_var_system_value:
exec_list_push_tail(&shader->system_values, &var->node);
break;
nir_var_system_value = (1 << 6),
nir_var_mem_ssbo = (1 << 7),
nir_var_mem_shared = (1 << 8),
+ nir_var_mem_global = (1 << 9),
nir_var_all = ~0,
} nir_variable_mode;
return "ssbo";
case nir_var_mem_shared:
return "shared";
+ case nir_var_mem_global:
+ return "global";
case nir_var_shader_temp:
return want_local_global_mode ? "shader_temp" : "";
case nir_var_function_temp:
vtn_variable_mode_ssbo,
vtn_variable_mode_push_constant,
vtn_variable_mode_workgroup,
+ vtn_variable_mode_cross_workgroup,
vtn_variable_mode_input,
vtn_variable_mode_output,
};
nir_mode = nir_var_uniform;
break;
case SpvStorageClassCrossWorkgroup:
+ mode = vtn_variable_mode_cross_workgroup;
+ nir_mode = nir_var_mem_global;
+ break;
case SpvStorageClassGeneric:
default:
vtn_fail("Unhandled variable storage class");
case vtn_variable_mode_ubo:
case vtn_variable_mode_ssbo:
case vtn_variable_mode_push_constant:
+ case vtn_variable_mode_cross_workgroup:
/* These don't need actual variables. */
break;
}