Lines Matching defs:tex
834 nir_tex_instr_add_src(nir_tex_instr *tex,
839 tex->num_srcs + 1);
841 for (unsigned i = 0; i < tex->num_srcs; i++) {
842 new_srcs[i].src_type = tex->src[i].src_type;
843 nir_instr_move_src(&tex->instr, &new_srcs[i].src,
844 &tex->src[i].src);
847 free(tex->src);
848 tex->src = new_srcs;
850 tex->src[tex->num_srcs].src_type = src_type;
851 nir_instr_rewrite_src(&tex->instr, &tex->src[tex->num_srcs].src, src);
852 tex->num_srcs++;
856 nir_tex_instr_remove_src(nir_tex_instr *tex, unsigned src_idx)
858 assert(src_idx < tex->num_srcs);
861 nir_instr_rewrite_src(&tex->instr, &tex->src[src_idx].src, NIR_SRC_INIT);
864 for (unsigned i = src_idx + 1; i < tex->num_srcs; i++) {
865 tex->src[i-1].src_type = tex->src[i].src_type;
866 nir_instr_move_src(&tex->instr, &tex->src[i-1].src, &tex->src[i].src);
868 tex->num_srcs--;
872 nir_tex_instr_has_explicit_tg4_offsets(nir_tex_instr *tex)
874 if (tex->op != nir_texop_tg4)
876 return memcmp(tex->tg4_offsets, default_tg4_offsets,
877 sizeof(tex->tg4_offsets)) != 0;