diff options
author | marha <marha@users.sourceforge.net> | 2015-04-30 23:26:47 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-04-30 23:29:47 +0200 |
commit | 055e5645a789d2822d3c4e5a3bc81ff6a969ff31 (patch) | |
tree | 8a923f19c3586f9341114be6c81784ab9018aef8 /mesalib/src/glsl/nir/nir_lower_var_copies.c | |
parent | 0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (diff) | |
parent | a71d524ecad48837e0124a03124bc05f59a48be7 (diff) | |
download | vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.gz vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.bz2 vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/nir/nir_lower_var_copies.c')
-rw-r--r-- | mesalib/src/glsl/nir/nir_lower_var_copies.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/mesalib/src/glsl/nir/nir_lower_var_copies.c b/mesalib/src/glsl/nir/nir_lower_var_copies.c index 58389a7c7..21672901f 100644 --- a/mesalib/src/glsl/nir/nir_lower_var_copies.c +++ b/mesalib/src/glsl/nir/nir_lower_var_copies.c @@ -64,26 +64,6 @@ get_deref_tail(nir_deref *deref) return deref; } -static int -type_get_length(const struct glsl_type *type) -{ - switch (glsl_get_base_type(type)) { - case GLSL_TYPE_STRUCT: - case GLSL_TYPE_ARRAY: - return glsl_get_length(type); - case GLSL_TYPE_FLOAT: - case GLSL_TYPE_INT: - case GLSL_TYPE_UINT: - case GLSL_TYPE_BOOL: - if (glsl_type_is_matrix(type)) - return glsl_get_matrix_columns(type); - else - return glsl_get_vector_elements(type); - default: - unreachable("Invalid deref base type"); - } -} - /* This function recursively walks the given deref chain and replaces the * given copy instruction with an equivalent sequence load/store * operations. @@ -121,9 +101,9 @@ emit_copy_load_store(nir_intrinsic_instr *copy_instr, nir_deref_array *src_arr = nir_deref_as_array(src_arr_parent->child); nir_deref_array *dest_arr = nir_deref_as_array(dest_arr_parent->child); - unsigned length = type_get_length(src_arr_parent->type); + unsigned length = glsl_get_length(src_arr_parent->type); /* The wildcards should represent the same number of elements */ - assert(length == type_get_length(dest_arr_parent->type)); + assert(length == glsl_get_length(dest_arr_parent->type)); assert(length > 0); /* Walk over all of the elements that this wildcard refers to and |