diff options
author | Timothy Arceri <[email protected]> | 2017-11-17 14:27:27 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-12-04 09:10:30 +1100 |
commit | 2a35021bc61632562e34448249c80887a0d7ac3c (patch) | |
tree | 1669528b68e16c9430fa5a21282e218664634163 /src | |
parent | 9530b786d2fcd4750ad61fc57c90bf398f0d98c5 (diff) |
nir: fix support for scalar arrays in nir_lower_io_types()
This was just recreating the same vector type we alreay had and
hitting an assert for scalars.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_lower_io_types.c | 10 |
1 files 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 d31082e543e..795bbd80d5d 100644 --- a/src/compiler/nir/nir_lower_io_types.c +++ b/src/compiler/nir/nir_lower_io_types.c @@ -54,15 +54,11 @@ get_new_var(struct lower_io_types_state *state, nir_variable *var, } /* 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; |