Lines Matching refs:tgsi
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()
245 if ((stvp->tgsi.type == PIPE_SHADER_IR_TGSI) && stvp->tgsi.tokens) { in st_release_vp_variants()
246 tgsi_free_tokens(stvp->tgsi.tokens); in st_release_vp_variants()
247 stvp->tgsi.tokens = NULL; in st_release_vp_variants()
282 if ((stfp->tgsi.type == PIPE_SHADER_IR_TGSI) && stfp->tgsi.tokens) { in st_release_fp_variants()
283 ureg_free_tokens(stfp->tgsi.tokens); in st_release_fp_variants()
284 stfp->tgsi.tokens = NULL; in st_release_fp_variants()
326 struct pipe_shader_state *tgsi) in st_release_basic_variants() argument
338 if (tgsi->tokens) { in st_release_basic_variants()
339 ureg_free_tokens(tgsi->tokens); in st_release_basic_variants()
340 tgsi->tokens = NULL; in st_release_basic_variants()
362 if (stcp->tgsi.prog) { in st_release_cp_variants()
363 switch (stcp->tgsi.ir_type) { in st_release_cp_variants()
365 ureg_free_tokens(stcp->tgsi.prog); in st_release_cp_variants()
366 stcp->tgsi.prog = NULL; in st_release_cp_variants()
374 stcp->tgsi.prog = NULL; in st_release_cp_variants()
466 &stvp->tgsi.stream_output); in st_translate_vertex_program()
510 &stvp->tgsi.stream_output); in st_translate_vertex_program()
537 stvp->tgsi.tokens = ureg_get_tokens(ureg, &stvp->num_tgsi_tokens); in st_translate_vertex_program()
545 return stvp->tgsi.tokens != NULL; in st_translate_vertex_program()
557 vpv->tgsi.stream_output = stvp->tgsi.stream_output; in st_create_vp_variant()
560 if (stvp->tgsi.type == PIPE_SHADER_IR_NIR) { 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()
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()
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()
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()
994 stfp->tgsi.tokens = ureg_get_tokens(ureg, &stfp->num_tgsi_tokens); in st_translate_fragment_program()
1002 return stfp->tgsi.tokens != NULL; in st_translate_fragment_program()
1012 struct pipe_shader_state tgsi = {0}; in st_create_fp_variant() local
1024 if (stfp->tgsi.type == PIPE_SHADER_IR_NIR) { in st_create_fp_variant()
1025 tgsi.type = PIPE_SHADER_IR_NIR; in st_create_fp_variant()
1026 tgsi.ir.nir = nir_shader_clone(NULL, stfp->tgsi.ir.nir); in st_create_fp_variant()
1029 NIR_PASS_V(tgsi.ir.nir, nir_lower_clamp_color_outputs); in st_create_fp_variant()
1032 nir_shader *shader = tgsi.ir.nir; in st_create_fp_variant()
1047 NIR_PASS_V(tgsi.ir.nir, nir_lower_bitmap, &options); in st_create_fp_variant()
1080 NIR_PASS_V(tgsi.ir.nir, nir_lower_drawpixels, &options); in st_create_fp_variant()
1087 NIR_PASS_V(tgsi.ir.nir, nir_lower_tex, &options); in st_create_fp_variant()
1090 st_finalize_nir(st, &stfp->Base, stfp->shader_program, tgsi.ir.nir); in st_create_fp_variant()
1094 NIR_PASS_V(tgsi.ir.nir, st_nir_lower_tex_src_plane, in st_create_fp_variant()
1100 variant->driver_shader = pipe->create_fs_state(pipe, &tgsi); in st_create_fp_variant()
1106 tgsi.tokens = stfp->tgsi.tokens; in st_create_fp_variant()
1112 const struct tgsi_token *tokens = st_fixup_atifs(tgsi.tokens, key); in st_create_fp_variant()
1115 tgsi.tokens = tokens; in st_create_fp_variant()
1127 tokens = tgsi_emulate(tgsi.tokens, flags); in st_create_fp_variant()
1130 if (tgsi.tokens != stfp->tgsi.tokens) in st_create_fp_variant()
1131 tgsi_free_tokens(tgsi.tokens); in st_create_fp_variant()
1132 tgsi.tokens = tokens; in st_create_fp_variant()
1143 tokens = st_get_bitmap_shader(tgsi.tokens, in st_create_fp_variant()
1151 if (tgsi.tokens != stfp->tgsi.tokens) in st_create_fp_variant()
1152 tgsi_free_tokens(tgsi.tokens); in st_create_fp_variant()
1153 tgsi.tokens = tokens; in st_create_fp_variant()
1180 tokens = st_get_drawpix_shader(tgsi.tokens, in st_create_fp_variant()
1189 if (tgsi.tokens != stfp->tgsi.tokens) in st_create_fp_variant()
1190 tgsi_free_tokens(tgsi.tokens); in st_create_fp_variant()
1191 tgsi.tokens = tokens; in st_create_fp_variant()
1202 tokens = st_tgsi_lower_yuv(tgsi.tokens, in st_create_fp_variant()
1207 if (tgsi.tokens != stfp->tgsi.tokens) in st_create_fp_variant()
1208 tgsi_free_tokens(tgsi.tokens); in st_create_fp_variant()
1209 tgsi.tokens = tokens; in st_create_fp_variant()
1216 tgsi_dump(tgsi.tokens, 0); in st_create_fp_variant()
1221 variant->driver_shader = pipe->create_fs_state(pipe, &tgsi); in st_create_fp_variant()
1224 if (tgsi.tokens != stfp->tgsi.tokens) in st_create_fp_variant()
1225 tgsi_free_tokens(tgsi.tokens); in st_create_fp_variant()
1404 stcp->tgsi.prog = out_state->tokens; in st_translate_program_common()
1474 st_translate_program_stream_output(&stgp->Base, &stgp->tgsi.stream_output); in st_translate_geometry_program()
1492 PIPE_SHADER_GEOMETRY, &stgp->tgsi); in st_translate_geometry_program()
1511 struct pipe_shader_state tgsi = {0}; in st_get_basic_variant() local
1527 if (prog->tgsi.type == PIPE_SHADER_IR_NIR) { in st_get_basic_variant()
1528 tgsi.type = PIPE_SHADER_IR_NIR; in st_get_basic_variant()
1529 tgsi.ir.nir = nir_shader_clone(NULL, prog->tgsi.ir.nir); in st_get_basic_variant()
1531 tgsi.ir.nir); in st_get_basic_variant()
1532 tgsi.stream_output = prog->tgsi.stream_output; in st_get_basic_variant()
1534 tgsi = prog->tgsi; in st_get_basic_variant()
1538 v->driver_shader = pipe->create_tcs_state(pipe, &tgsi); in st_get_basic_variant()
1541 v->driver_shader = pipe->create_tes_state(pipe, &tgsi); in st_get_basic_variant()
1544 v->driver_shader = pipe->create_gs_state(pipe, &tgsi); in st_get_basic_variant()
1585 PIPE_SHADER_TESS_CTRL, &sttcp->tgsi); in st_translate_tessctrl_program()
1604 st_translate_program_stream_output(&sttep->Base, &sttep->tgsi.stream_output); in st_translate_tesseval_program()
1633 ureg, PIPE_SHADER_TESS_EVAL, &sttep->tgsi); in st_translate_tesseval_program()
1654 (struct nir_shader *) stcp->tgsi.prog); in st_translate_compute_program()
1666 stcp->tgsi.ir_type = PIPE_SHADER_IR_TGSI; in st_translate_compute_program()
1667 stcp->tgsi.req_local_mem = stcp->Base.info.cs.shared_size; in st_translate_compute_program()
1668 stcp->tgsi.req_private_mem = 0; in st_translate_compute_program()
1669 stcp->tgsi.req_input_mem = 0; in st_translate_compute_program()
1682 struct pipe_compute_state *tgsi, in st_get_cp_variant() argument
1704 struct pipe_compute_state cs = *tgsi; in st_get_cp_variant()
1705 if (tgsi->ir_type == PIPE_SHADER_IR_NIR) in st_get_cp_variant()
1706 cs.prog = nir_shader_clone(NULL, tgsi->prog); in st_get_cp_variant()
1895 tgsi_dump(stv->tgsi.tokens, 0); in st_print_current_vertex_program()
1949 st_get_cp_variant(st, &p->tgsi, &p->variants); in st_precompile_shader_variant()