summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_nir_builder.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-19 11:15:32 -0700
committerJason Ekstrand <[email protected]>2015-10-19 14:14:21 -0700
commit958fc04dc51a2561c8598f42df59e3d9139e56a7 (patch)
treeb6acf05aa073e97ae8e58647bf05c2c3e816f041 /src/vulkan/anv_nir_builder.h
parent995d9c4ac7fb046e01196cec308ebe10002a28da (diff)
parentde862f03accb12b044ced60cb98f47a055457223 (diff)
Merge remote-tracking branch 'mesa-public/master' into vulkan
Diffstat (limited to 'src/vulkan/anv_nir_builder.h')
-rw-r--r--src/vulkan/anv_nir_builder.h46
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, &copy->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;
-}