nir: add how_declared to nir_variable.data

Equivalent to the already existing how_declared at GLSL IR. The only
difference is that we are not adding all the declaration_type
available on GLSL, only the one that we will use on the short term. We
would add more mode if needed on the future.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Alejandro Piñeiro
2018-05-08 08:58:59 +02:00
parent be6f472b23
commit 5332d7582d
3 changed files with 26 additions and 1 deletions

View File

@@ -162,6 +162,7 @@ nir_variable_create(nir_shader *shader, nir_variable_mode mode,
var->name = ralloc_strdup(var, name);
var->type = type;
var->data.mode = mode;
var->data.how_declared = nir_var_declared_normally;
if ((mode == nir_var_shader_in &&
shader->info.stage != MESA_SHADER_VERTEX) ||