[Mesa-dev] [PATCH 02/14] nir: fix support for scalar arrays in nir_lower_io_types()
Timothy Arceri
tarceri at itsqueeze.com
Tue Nov 21 03:37:23 UTC 2017
This was just recreating the same vector type we alreay had and
hitting an assert for scalars.
---
src/compiler/nir/nir_lower_io_types.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/compiler/nir/nir_lower_io_types.c b/src/compiler/nir/nir_lower_io_types.c
index d31082e543..795bbd80d5 100644
--- a/src/compiler/nir/nir_lower_io_types.c
+++ b/src/compiler/nir/nir_lower_io_types.c
@@ -47,29 +47,25 @@ get_new_var(struct lower_io_types_state *state, nir_variable *var,
assert(var->data.mode == nir_var_shader_out);
list = &state->new_outs;
}
nir_foreach_variable(nvar, list) {
if (nvar->data.location == (var->data.location + off))
return nvar;
}
/* doesn't already exist, so we need to create a new one: */
- /* TODO figure out if scalar vs vec, and if float/int/uint/(double?)
- * do we need to fixup interpolation mode for int vs float components
- * of a struct, etc..
+ /* TODO figure out if we need to fixup interpolation mode for int vs float
+ * components of a struct, etc..
*/
- const struct glsl_type *ntype =
- glsl_vector_type(glsl_get_base_type(deref_type),
- glsl_get_vector_elements(deref_type));
nir_variable *nvar = nir_variable_create(state->shader, var->data.mode,
- ntype, NULL);
+ deref_type, NULL);
nvar->name = ralloc_asprintf(nvar, "%s@%u", var->name, off);
nvar->data = var->data;
nvar->data.location += off;
/* nir_variable_create is too clever for its own good: */
exec_node_remove(&nvar->node);
exec_node_self_link(&nvar->node); /* no delinit() :-( */
exec_list_push_tail(list, &nvar->node);
--
2.14.3
More information about the mesa-dev
mailing list