Lines Matching refs:vpv
212 delete_vp_variant(struct st_context *st, struct st_vp_variant *vpv) in delete_vp_variant() argument
214 if (vpv->driver_shader) in delete_vp_variant()
215 cso_delete_vertex_shader(st->cso_context, vpv->driver_shader); in delete_vp_variant()
217 if (vpv->draw_shader) in delete_vp_variant()
218 draw_delete_vertex_shader( st->draw, vpv->draw_shader ); in delete_vp_variant()
220 if (((vpv->tgsi.type == PIPE_SHADER_IR_TGSI)) && vpv->tgsi.tokens) in delete_vp_variant()
221 ureg_free_tokens(vpv->tgsi.tokens); in delete_vp_variant()
223 free( vpv ); in delete_vp_variant()
235 struct st_vp_variant *vpv; in st_release_vp_variants() local
237 for (vpv = stvp->variants; vpv; ) { in st_release_vp_variants()
238 struct st_vp_variant *next = vpv->next; in st_release_vp_variants()
239 delete_vp_variant(st, vpv); in st_release_vp_variants()
240 vpv = next; in st_release_vp_variants()
553 struct st_vp_variant *vpv = CALLOC_STRUCT(st_vp_variant); in st_create_vp_variant() local
556 vpv->key = *key; in st_create_vp_variant()
557 vpv->tgsi.stream_output = stvp->tgsi.stream_output; in st_create_vp_variant()
558 vpv->num_inputs = stvp->num_inputs; in st_create_vp_variant()
561 vpv->tgsi.type = PIPE_SHADER_IR_NIR; in st_create_vp_variant()
562 vpv->tgsi.ir.nir = nir_shader_clone(NULL, stvp->tgsi.ir.nir); in st_create_vp_variant()
564 NIR_PASS_V(vpv->tgsi.ir.nir, nir_lower_clamp_color_outputs); in st_create_vp_variant()
566 NIR_PASS_V(vpv->tgsi.ir.nir, nir_lower_passthrough_edgeflags); in st_create_vp_variant()
567 vpv->num_inputs++; in st_create_vp_variant()
571 vpv->tgsi.ir.nir); in st_create_vp_variant()
573 vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->tgsi); in st_create_vp_variant()
575 vpv->tgsi.ir.nir = NULL; in st_create_vp_variant()
576 return vpv; in st_create_vp_variant()
579 vpv->tgsi.tokens = tgsi_dup_tokens(stvp->tgsi.tokens); in st_create_vp_variant()
588 tokens = tgsi_emulate(vpv->tgsi.tokens, flags); in st_create_vp_variant()
591 tgsi_free_tokens(vpv->tgsi.tokens); in st_create_vp_variant()
592 vpv->tgsi.tokens = tokens; in st_create_vp_variant()
595 vpv->num_inputs++; in st_create_vp_variant()
601 tgsi_dump(vpv->tgsi.tokens, 0); in st_create_vp_variant()
605 vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->tgsi); in st_create_vp_variant()
606 return vpv; in st_create_vp_variant()
618 struct st_vp_variant *vpv; in st_get_vp_variant() local
621 for (vpv = stvp->variants; vpv; vpv = vpv->next) { in st_get_vp_variant()
622 if (memcmp(&vpv->key, key, sizeof(*key)) == 0) { in st_get_vp_variant()
627 if (!vpv) { in st_get_vp_variant()
629 vpv = st_create_vp_variant(st, stvp, key); in st_get_vp_variant()
630 if (vpv) { in st_get_vp_variant()
632 vpv->next = stvp->variants; in st_get_vp_variant()
633 stvp->variants = vpv; in st_get_vp_variant()
637 return vpv; in st_get_vp_variant()
1734 struct st_vp_variant *vpv, **prevPtr = &stvp->variants; in destroy_program_variants() local
1736 for (vpv = stvp->variants; vpv; ) { in destroy_program_variants()
1737 struct st_vp_variant *next = vpv->next; in destroy_program_variants()
1738 if (vpv->key.st == st) { in destroy_program_variants()
1742 delete_vp_variant(st, vpv); in destroy_program_variants()
1745 prevPtr = &vpv->next; in destroy_program_variants()
1747 vpv = next; in destroy_program_variants()