Lines Matching refs:tail
712 /* This is the second step in the recursion. We've found the tail and made a
717 deref_foreach_leaf_build_recur(nir_deref_var *deref, nir_deref *tail,
726 assert(tail->child == NULL);
727 switch (glsl_get_base_type(tail->type)) {
738 if (glsl_type_is_vector_or_scalar(tail->type))
744 tmp.arr.deref.type = glsl_get_array_element(tail->type);
747 tail->child = &tmp.arr.deref;
749 length = glsl_get_length(tail->type);
760 tail->child = &tmp.str.deref;
762 length = glsl_get_length(tail->type);
765 tmp.str.deref.type = glsl_get_struct_field(tail->type, i);
785 deref_foreach_leaf_copy_recur(nir_deref_var *deref, nir_deref *tail,
793 if (tail->child) {
794 switch (tail->child->deref_type) {
796 c.arr = *nir_deref_as_array(tail->child);
797 tail->child = &c.arr.deref;
801 c.str = *nir_deref_as_struct(tail->child);
802 tail->child = &c.str.deref;
813 return deref_foreach_leaf_build_recur(deref, tail, cb, state);
843 const nir_deref *tail = &deref->deref;
845 while (tail->child) {
846 switch (tail->child->deref_type) {
848 nir_deref_array *arr = nir_deref_as_array(tail->child);
850 if (glsl_type_is_matrix(tail->type)) {
860 constant = constant->elements[nir_deref_as_struct(tail->child)->index];
868 tail = tail->child;
871 unsigned bit_size = glsl_get_bit_size(tail->type);
873 nir_load_const_instr_create(shader, glsl_get_vector_elements(tail->type),
876 switch (glsl_get_base_type(tail->type)) {