diff options
Diffstat (limited to 'src/vulkan/anv_nir_builder.h')
-rw-r--r-- | src/vulkan/anv_nir_builder.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/vulkan/anv_nir_builder.h b/src/vulkan/anv_nir_builder.h index 299c8c1aad0..f26cb046a6b 100644 --- a/src/vulkan/anv_nir_builder.h +++ b/src/vulkan/anv_nir_builder.h @@ -54,49 +54,3 @@ nir_copy_var(nir_builder *build, nir_variable *dest, nir_variable *src) copy->variables[1] = nir_deref_var_create(copy, src); nir_builder_instr_insert(build, ©->instr); } - -static inline nir_variable * -nir_variable_create(nir_shader *shader, const char *name, - const struct glsl_type *type, nir_variable_mode mode) -{ - nir_variable *var = rzalloc(shader, nir_variable); - var->name = ralloc_strdup(var, name); - var->type = type; - var->data.mode = mode; - - if ((mode == nir_var_shader_in && shader->stage != MESA_SHADER_VERTEX) || - (mode == nir_var_shader_out && shader->stage != MESA_SHADER_FRAGMENT)) - var->data.interpolation = INTERP_QUALIFIER_SMOOTH; - - switch (var->data.mode) { - case nir_var_local: - assert(!"nir_variable_create cannot be used for local variables"); - break; - - case nir_var_global: - exec_list_push_tail(&shader->globals, &var->node); - break; - - case nir_var_shader_in: - exec_list_push_tail(&shader->inputs, &var->node); - break; - - case nir_var_shader_out: - exec_list_push_tail(&shader->outputs, &var->node); - break; - - case nir_var_uniform: - case nir_var_shader_storage: - exec_list_push_tail(&shader->uniforms, &var->node); - break; - - case nir_var_system_value: - exec_list_push_tail(&shader->system_values, &var->node); - break; - - default: - unreachable("not reached"); - } - - return var; -} |