• Home
  • Raw
  • Download

Lines Matching refs:ureg

440     struct ureg_program *ureg;  member
714 tx->lconstf[n].reg = ureg_imm4f(tx->ureg, f[0], f[1], f[2], f[3]); in tx_set_lconstf()
740 ureg_imm4i(tx->ureg, i[0], i[1], i[2], i[3]) : in tx_set_lconsti()
741 ureg_imm4f(tx->ureg, i[0], i[1], i[2], i[3]); in tx_set_lconsti()
765 ureg_imm1u(tx->ureg, b ? 0xffffffff : 0) : in tx_set_lconstb()
766 ureg_imm1f(tx->ureg, b ? 1.0f : 0.0f); in tx_set_lconstb()
777 tx->regs.t[tx->num_scratch] = ureg_DECL_local_temporary(tx->ureg); in tx_scratch()
812 tx->regs.r[idx] = ureg_DECL_temporary(tx->ureg); in tx_temp_alloc()
820 tx->regs.address = ureg_DECL_address(tx->ureg); in tx_addr_alloc()
822 tx->regs.a0 = ureg_DECL_temporary(tx->ureg); in tx_addr_alloc()
831 struct ureg_src src_tg4[3] = {src0, ureg_imm1f(tx->ureg, 0.f), src1}; in TEX_if_fetch4()
839 ureg_tex_insn(tx->ureg, TGSI_OPCODE_TG4, &tmp, 1, target, TGSI_RETURN_TYPE_FLOAT, in TEX_if_fetch4()
841 ureg_MOV(tx->ureg, dst, ureg_swizzle(ureg_src(tmp), NINE_SWIZZLE4(Z, X, Y, W))); in TEX_if_fetch4()
862 ureg_MOV(tx->ureg, dst, src); in apply_ps1x_projection()
865 ureg_RCP(tx->ureg, tmp, ureg_scalar(src, dim-1)); in apply_ps1x_projection()
866 ureg_MUL(tx->ureg, dst, tx_src_scalar(tmp), src); in apply_ps1x_projection()
884 ureg_TEX(tx->ureg, dst, target, src0, src1); in TEX_with_ps1x_projection()
886 ureg_TXP(tx->ureg, dst, target, src0, src1); in TEX_with_ps1x_projection()
890 ureg_TEX(tx->ureg, dst, target, ureg_src(tmp), src1); in TEX_with_ps1x_projection()
900 tx->regs.vT[idx] = ureg_DECL_fs_input(tx->ureg, tx->texcoord_sn, idx, in tx_texcoord_alloc()
919 ureg_fixup_label(tx->ureg, tx->loop_labels[tx->loop_depth], in tx_endloop()
920 ureg_get_instruction_number(tx->ureg)); in tx_endloop()
937 tx->regs.rL[l] = ureg_DECL_local_temporary(tx->ureg); in tx_get_loopctr()
983 ureg_fixup_label(tx->ureg, tx->cond_labels[tx->cond_depth], in tx_endcond()
984 ureg_get_instruction_number(tx->ureg)); in tx_endcond()
996 struct ureg_program *ureg = tx->ureg; in nine_get_position_input() local
999 return ureg_DECL_system_value(ureg, TGSI_SEMANTIC_POSITION, 0); in nine_get_position_input()
1001 return ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_POSITION, in nine_get_position_input()
1008 struct ureg_program *ureg = tx->ureg; in tx_src_param() local
1031 ureg_ARL(ureg, tx->regs.address, ureg_src(tx->regs.a0)); in tx_src_param()
1033 ureg_ARR(ureg, tx->regs.address, ureg_src(tx->regs.a0)); in tx_src_param()
1051 ureg, TGSI_SEMANTIC_COLOR, param->idx, in tx_src_param()
1070 tx->regs.v_consecutive = ureg_src(ureg_DECL_array_temporary(ureg, 10, 0)); in tx_src_param()
1073 … ureg_MOV(ureg, ureg_dst_array_offset(ureg_dst(tx->regs.v_consecutive), i), tx->regs.v[i]); in tx_src_param()
1075 …ureg_MOV(ureg, ureg_dst_array_offset(ureg_dst(tx->regs.v_consecutive), i), ureg_imm4f(ureg, 0.0f, … in tx_src_param()
1092 tx->regs.predicate = ureg_DECL_temporary(tx->ureg); in tx_src_param()
1099 src = ureg_DECL_sampler(ureg, param->idx); in tx_src_param()
1112 ureg_MIN(ureg, tmp, src, ureg_imm1f(ureg, 1.0f)); in tx_src_param()
1113 ureg_MAX(ureg, tmp, ureg_src(tmp), ureg_imm1f(ureg, -1.0f)); in tx_src_param()
1122 src = ureg_imm1f(ureg, 0.0f); in tx_src_param()
1135 tx->regs.address = ureg_DECL_address(ureg); in tx_src_param()
1137 ureg_ARR(ureg, tx->regs.address, tx_get_loopal(tx)); in tx_src_param()
1139 ureg_UARL(ureg, tx->regs.address, tx_get_loopal(tx)); in tx_src_param()
1150 ureg_ADD(ureg, wpos, tx->regs.vPos, in tx_src_param()
1151 ureg_imm4f(ureg, -0.5f, -0.5f, 0.0f, 0.0f)); in tx_src_param()
1160 tmp = ureg_DECL_temporary(ureg); in tx_src_param()
1162 ureg_DECL_system_value(ureg, TGSI_SEMANTIC_FACE, 0); in tx_src_param()
1165 ureg_UCMP(ureg, tmp, ureg_scalar(tx->regs.vFace, TGSI_SWIZZLE_X), in tx_src_param()
1166 ureg_imm1f(ureg, 1), ureg_imm1f(ureg, -1)); in tx_src_param()
1169 tx->regs.vFace = ureg_DECL_fs_input(ureg, in tx_src_param()
1192 … ureg_RCP(ureg, ureg_writemask(tmp, NINED3DSP_WRITEMASK_3), ureg_scalar(src, TGSI_SWIZZLE_W)); in tx_src_param()
1193 ureg_MUL(ureg, tmp, src, ureg_swizzle(ureg_src(tmp), NINE_SWIZZLE4(W,W,W,W))); in tx_src_param()
1199 … ureg_RCP(ureg, ureg_writemask(tmp, NINED3DSP_WRITEMASK_2), ureg_scalar(src, TGSI_SWIZZLE_Z)); in tx_src_param()
1200 ureg_MUL(ureg, tmp, src, ureg_swizzle(ureg_src(tmp), NINE_SWIZZLE4(Z,Z,Z,Z))); in tx_src_param()
1226 ureg_ADD(ureg, tmp, src, ureg_imm1f(ureg, -0.5f)); in tx_src_param()
1231 ureg_ADD(ureg, tmp, ureg_imm1f(ureg, 0.5f), ureg_negate(src)); in tx_src_param()
1237 ureg_NOT(ureg, tmp, src); in tx_src_param()
1242 ureg_ADD(ureg, tmp, ureg_imm1f(ureg, 1.0f), ureg_negate(src)); in tx_src_param()
1248 ureg_ADD(ureg, tmp, ureg_imm1f(ureg, 1.0f), ureg_negate(src)); in tx_src_param()
1257 ureg_MAD(ureg, tmp, src, ureg_imm1f(ureg, 2.0f), ureg_imm1f(ureg, -1.0f)); in tx_src_param()
1262 ureg_MAD(ureg, tmp, src, ureg_imm1f(ureg, -2.0f), ureg_imm1f(ureg, 1.0f)); in tx_src_param()
1267 ureg_ADD(ureg, tmp, src, src); in tx_src_param()
1272 ureg_ADD(ureg, tmp, src, src); in tx_src_param()
1300 tx->regs.tS[param->idx] = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1317 ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_POSITION, 0); in _tx_dst_param()
1323 ureg_saturate(ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_GENERIC, 16)); in _tx_dst_param()
1328 tx->regs.oPts = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1340 dst = ureg_DECL_output(tx->ureg, tx->texcoord_sn, param->idx); in _tx_dst_param()
1355 tx->regs.oCol[0] = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1358 ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_COLOR, param->idx); in _tx_dst_param()
1369 ureg_DECL_output_masked(tx->ureg, TGSI_SEMANTIC_POSITION, 0, in _tx_dst_param()
1375 tx->regs.predicate = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1428 ureg_MUL(tx->ureg, rdst, ureg_src(tx->regs.tdst), ureg_imm1f(tx->ureg, f)); in tx_apply_dst0_modifiers()
1477 struct ureg_program *ureg = tx->ureg; in NineTranslateInstruction_Mkxn() local
1500 ureg_DP3(ureg, ureg_writemask(dst, m), src[0], src[1]); in NineTranslateInstruction_Mkxn()
1503 ureg_DP4(ureg, ureg_writemask(dst, m), src[0], src[1]); in NineTranslateInstruction_Mkxn()
1656 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1661 ureg_ADD(ureg, dst, src0, ureg_negate(src1)); in DECL_SPECIAL()
1667 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1671 ureg_MOV(ureg, dst, ureg_abs(src)); in DECL_SPECIAL()
1677 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1682 ureg_MUL(ureg, ureg_writemask(dst, TGSI_WRITEMASK_XYZ), in DECL_SPECIAL()
1687 ureg_MAD(ureg, ureg_writemask(dst, TGSI_WRITEMASK_XYZ), in DECL_SPECIAL()
1693 ureg_MOV(ureg, ureg_writemask(dst, TGSI_WRITEMASK_W), in DECL_SPECIAL()
1694 ureg_imm1f(ureg, 1)); in DECL_SPECIAL()
1725 ureg_CMP(tx->ureg, tx_dst_param(tx, &tx->insn.dst[0]), in DECL_SPECIAL()
1745 ureg_MOV(tx->ureg, in DECL_SPECIAL()
1756 ureg_SGT(tx->ureg, cgt, cnd, ureg_imm1f(tx->ureg, 0.5f)); in DECL_SPECIAL()
1758 ureg_CMP(tx->ureg, dst, ureg_negate(ureg_src(cgt)), in DECL_SPECIAL()
1767 ureg_CAL(tx->ureg, &tx->inst_labels[tx->insn.src[0].idx]); in DECL_SPECIAL()
1773 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1777 ureg_IF(ureg, src, tx_cond(tx)); in DECL_SPECIAL()
1779 ureg_UIF(ureg, src, tx_cond(tx)); in DECL_SPECIAL()
1780 ureg_CAL(ureg, &tx->inst_labels[tx->insn.src[0].idx]); in DECL_SPECIAL()
1782 ureg_ENDIF(ureg); in DECL_SPECIAL()
1788 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1800 ureg_MOV(ureg, ctr, src); in DECL_SPECIAL()
1801 ureg_BGNLOOP(tx->ureg, label); in DECL_SPECIAL()
1811 ureg_SGE(ureg, tmp, ureg_imm1f(ureg, 0.5f), ctrx); in DECL_SPECIAL()
1812 ureg_IF(ureg, tx_src_scalar(tmp), tx_cond(tx)); in DECL_SPECIAL()
1815 ureg_ISGE(ureg, tmp, ureg_imm1i(ureg, 0), ctrx); in DECL_SPECIAL()
1816 ureg_UIF(ureg, tx_src_scalar(tmp), tx_cond(tx)); in DECL_SPECIAL()
1818 ureg_BRK(ureg); in DECL_SPECIAL()
1820 ureg_ENDIF(ureg); in DECL_SPECIAL()
1831 ureg_RET(tx->ureg); in DECL_SPECIAL()
1838 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1851 ureg_ADD(ureg, dst_ctrx, src_ctr, ureg_imm1f(ureg, -1.0f)); in DECL_SPECIAL()
1852 ureg_ADD(ureg, dst_al, src_ctr, al_counter); in DECL_SPECIAL()
1854 ureg_UADD(ureg, dst_ctrx, src_ctr, ureg_imm1i(ureg, -1)); in DECL_SPECIAL()
1855 ureg_UADD(ureg, dst_al, src_ctr, al_counter); in DECL_SPECIAL()
1857 ureg_ENDLOOP(tx->ureg, tx_endloop(tx)); in DECL_SPECIAL()
1871 tx->inst_labels[n] = ureg_get_instruction_number(tx->ureg); in DECL_SPECIAL()
1877 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1886 ureg_MOV(ureg, tmp, src); in DECL_SPECIAL()
1889 ureg_COS(ureg, ureg_writemask(dst, TGSI_WRITEMASK_X), in DECL_SPECIAL()
1891 ureg_SIN(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Y), in DECL_SPECIAL()
1898 ureg_SSG(tx->ureg, in DECL_SPECIAL()
1906 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1921 ureg_MOV(ureg, ctr, rep); in DECL_SPECIAL()
1922 ureg_BGNLOOP(ureg, label); in DECL_SPECIAL()
1931 ureg_SGE(ureg, tmp, ureg_imm1f(ureg, 0.5f), ctrx); in DECL_SPECIAL()
1932 ureg_IF(ureg, tx_src_scalar(tmp), tx_cond(tx)); in DECL_SPECIAL()
1935 ureg_ISGE(ureg, tmp, ureg_imm1i(ureg, 0), ctrx); in DECL_SPECIAL()
1936 ureg_UIF(ureg, tx_src_scalar(tmp), tx_cond(tx)); in DECL_SPECIAL()
1938 ureg_BRK(ureg); in DECL_SPECIAL()
1940 ureg_ENDIF(ureg); in DECL_SPECIAL()
1947 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
1954 ureg_ADD(ureg, dst_ctrx, src_ctr, ureg_imm1f(ureg, -1.0f)); in DECL_SPECIAL()
1956 ureg_UADD(ureg, dst_ctrx, src_ctr, ureg_imm1i(ureg, -1)); in DECL_SPECIAL()
1958 ureg_ENDLOOP(tx->ureg, tx_endloop(tx)); in DECL_SPECIAL()
1965 ureg_ENDIF(tx->ureg); in DECL_SPECIAL()
1974 ureg_UIF(tx->ureg, src, tx_cond(tx)); in DECL_SPECIAL()
1976 ureg_IF(tx->ureg, src, tx_cond(tx)); in DECL_SPECIAL()
2004 ureg_insn(tx->ureg, cmp_op, &tmp, 1, src, 2, 0); in DECL_SPECIAL()
2005 ureg_IF(tx->ureg, ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), tx_cond(tx)); in DECL_SPECIAL()
2011 ureg_ELSE(tx->ureg, tx_elsecond(tx)); in DECL_SPECIAL()
2022 ureg_insn(tx->ureg, cmp_op, &tmp, 1, src, 2, 0); in DECL_SPECIAL()
2023 ureg_IF(tx->ureg, ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), tx_cond(tx)); in DECL_SPECIAL()
2024 ureg_BRK(tx->ureg); in DECL_SPECIAL()
2026 ureg_ENDIF(tx->ureg); in DECL_SPECIAL()
2242 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2268 ureg_DECL_sampler(ureg, sem.reg.idx); in DECL_SPECIAL()
2280 ureg_DECL_vs_input(ureg, sem.reg.idx); in DECL_SPECIAL()
2294 ureg, tgsi.Name, tgsi.Index, sem.reg.mask, 0, 1); in DECL_SPECIAL()
2298 tx->regs.o[sem.reg.idx] = ureg_DECL_temporary(ureg); in DECL_SPECIAL()
2303 tx->regs.o[sem.reg.idx] = ureg_DECL_temporary(ureg); in DECL_SPECIAL()
2331 ureg, tgsi.Name, tgsi.Index, in DECL_SPECIAL()
2338 ureg_DECL_output_masked(ureg, tgsi.Name, tgsi.Index, sem.reg.mask, in DECL_SPECIAL()
2370 ureg_POW(tx->ureg, dst, ureg_abs(src[0]), src[1]); in DECL_SPECIAL()
2405 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2409 ureg_RCP(ureg, tmp, src); in DECL_SPECIAL()
2412 ureg_MIN(ureg, tmp, ureg_imm1f(ureg, FLT_MAX/2.f), ureg_src(tmp)); in DECL_SPECIAL()
2413 ureg_MAX(ureg, dst, ureg_imm1f(ureg, -FLT_MAX/2.f), ureg_src(tmp)); in DECL_SPECIAL()
2420 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2424 ureg_RSQ(ureg, tmp, ureg_abs(src)); in DECL_SPECIAL()
2426 ureg_MIN(ureg, dst, ureg_imm1f(ureg, FLT_MAX), ureg_src(tmp)); in DECL_SPECIAL()
2432 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2436 ureg_LG2(ureg, tmp, ureg_abs(src)); in DECL_SPECIAL()
2438 ureg_MOV(ureg, dst, tx_src_scalar(tmp)); in DECL_SPECIAL()
2440 ureg_MAX(ureg, dst, ureg_imm1f(ureg, -FLT_MAX), tx_src_scalar(tmp)); in DECL_SPECIAL()
2447 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2451 ureg_LIT(ureg, tmp, src); in DECL_SPECIAL()
2455 ureg_CMP(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Z), in DECL_SPECIAL()
2457 ureg_src(tmp), ureg_imm1f(ureg, 0.0f)); in DECL_SPECIAL()
2458 ureg_MOV(ureg, ureg_writemask(dst, TGSI_WRITEMASK_XYW), ureg_src(tmp)); in DECL_SPECIAL()
2464 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2469 ureg_DP3(ureg, tmp, src, src); in DECL_SPECIAL()
2470 ureg_RSQ(ureg, tmp, nrm); in DECL_SPECIAL()
2472 ureg_MIN(ureg, tmp, ureg_imm1f(ureg, FLT_MAX), nrm); in DECL_SPECIAL()
2473 ureg_MUL(ureg, dst, src, nrm); in DECL_SPECIAL()
2488 ureg_DP2(tx->ureg, tmp, src[0], src[1]); in DECL_SPECIAL()
2489 ureg_ADD(tx->ureg, dst, src[2], dp2); in DECL_SPECIAL()
2496 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2501 ureg_MOV(ureg, ureg_writemask(ureg_saturate(dst), TGSI_WRITEMASK_XYZ), tx->regs.vT[s]); in DECL_SPECIAL()
2502 ureg_MOV(ureg, ureg_writemask(dst, TGSI_WRITEMASK_W), ureg_imm1f(tx->ureg, 1.0f)); in DECL_SPECIAL()
2509 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2515 ureg_MOV(ureg, dst, src); in DECL_SPECIAL()
2532 ureg_KILL_IF(tx->ureg, reg); in DECL_SPECIAL()
2539 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2549 sample = ureg_DECL_sampler(ureg, m); in DECL_SPECIAL()
2584 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), m00, in DECL_SPECIAL()
2587 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), m10, in DECL_SPECIAL()
2592 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), m01, in DECL_SPECIAL()
2595 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), m11, in DECL_SPECIAL()
2602 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m), ureg_src(tmp), sample); in DECL_SPECIAL()
2605 ureg_TEX(ureg, tmp, ps1x_sampler_type(tx->info, m), ureg_src(tmp), sample); in DECL_SPECIAL()
2606 ureg_MAD(ureg, tmp2, NINE_APPLY_SWIZZLE(src, Z), in DECL_SPECIAL()
2608 ureg_MUL(ureg, dst, ureg_src(tmp), ureg_src(tmp2)); in DECL_SPECIAL()
2618 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2626 sample = ureg_DECL_sampler(ureg, m); in DECL_SPECIAL()
2628 …ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m), ureg_swizzle(src, NINE_SWIZZLE4(W,X,X,X)), sam… in DECL_SPECIAL()
2635 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2643 sample = ureg_DECL_sampler(ureg, m); in DECL_SPECIAL()
2645 …ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m), ureg_swizzle(src, NINE_SWIZZLE4(Y,Z,Z,Z)), sam… in DECL_SPECIAL()
2657 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2669 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_X), tx->regs.vT[m], src); in DECL_SPECIAL()
2670 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Y), tx->regs.vT[m+1], src); in DECL_SPECIAL()
2672 sample = ureg_DECL_sampler(ureg, m + 1); in DECL_SPECIAL()
2674 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m + 1), ureg_src(dst), sample); in DECL_SPECIAL()
2686 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2700 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_X), tx->regs.vT[m], src); in DECL_SPECIAL()
2701 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Y), tx->regs.vT[m+1], src); in DECL_SPECIAL()
2702 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Z), tx->regs.vT[m+2], src); in DECL_SPECIAL()
2704 sample = ureg_DECL_sampler(ureg, m + 2); in DECL_SPECIAL()
2711 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_src(dst), ureg_src(dst)); in DECL_SPECIAL()
2712 … ureg_RCP(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X)); in DECL_SPECIAL()
2714 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_src(dst), E); in DECL_SPECIAL()
2716 …ureg_MUL(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), … in DECL_SPECIAL()
2718 …ureg_MUL(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), … in DECL_SPECIAL()
2719 ureg_MUL(ureg, tmp, ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), ureg_src(dst)); in DECL_SPECIAL()
2721 ureg_ADD(ureg, tmp, ureg_src(tmp), ureg_negate(E)); in DECL_SPECIAL()
2722 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m + 2), ureg_src(tmp), sample); in DECL_SPECIAL()
2729 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2737 sample = ureg_DECL_sampler(ureg, m); in DECL_SPECIAL()
2739 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m), src, sample); in DECL_SPECIAL()
2746 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2758 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), tx->regs.vT[m], src); in DECL_SPECIAL()
2759 ureg_MOV(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_YZ), ureg_imm1f(ureg, 0.0f)); in DECL_SPECIAL()
2761 sample = ureg_DECL_sampler(ureg, m); in DECL_SPECIAL()
2763 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m), ureg_src(tmp), sample); in DECL_SPECIAL()
2770 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2783 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), tx->regs.vT[m], src); in DECL_SPECIAL()
2784 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), tx->regs.vT[m+1], src); in DECL_SPECIAL()
2786 … ureg_RCP(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Z), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y)); in DECL_SPECIAL()
2788 …ureg_MUL(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), … in DECL_SPECIAL()
2790 …ureg_CMP(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_negate(ureg_abs(ureg_scalar(ureg_src(tm… in DECL_SPECIAL()
2791 ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), ureg_imm1f(ureg, 1.0f)); in DECL_SPECIAL()
2793 tx->regs.oDepth = ureg_DECL_output_masked(ureg, TGSI_SEMANTIC_POSITION, 0, in DECL_SPECIAL()
2795 ureg_MOV(ureg, tx->regs.oDepth, ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X)); in DECL_SPECIAL()
2802 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2811 ureg_DP3(ureg, dst, tx->regs.vT[m], src); in DECL_SPECIAL()
2818 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2831 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_X), tx->regs.vT[m], src); in DECL_SPECIAL()
2832 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Y), tx->regs.vT[m+1], src); in DECL_SPECIAL()
2833 ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Z), tx->regs.vT[m+2], src); in DECL_SPECIAL()
2837 ureg_MOV(ureg, ureg_writemask(dst, TGSI_WRITEMASK_W), ureg_imm1f(ureg, 1.0f)); in DECL_SPECIAL()
2840 sample = ureg_DECL_sampler(ureg, m + 2); in DECL_SPECIAL()
2842 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m + 2), ureg_src(dst), sample); in DECL_SPECIAL()
2845 sample = ureg_DECL_sampler(ureg, m + 2); in DECL_SPECIAL()
2849 … ureg_MOV(ureg, ureg_writemask(E, TGSI_WRITEMASK_X), ureg_scalar(tx->regs.vT[m], TGSI_SWIZZLE_W)); in DECL_SPECIAL()
2850 …ureg_MOV(ureg, ureg_writemask(E, TGSI_WRITEMASK_Y), ureg_scalar(tx->regs.vT[m+1], TGSI_SWIZZLE_W)); in DECL_SPECIAL()
2851 …ureg_MOV(ureg, ureg_writemask(E, TGSI_WRITEMASK_Z), ureg_scalar(tx->regs.vT[m+2], TGSI_SWIZZLE_W)); in DECL_SPECIAL()
2855 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_src(dst), ureg_src(dst)); in DECL_SPECIAL()
2856 … ureg_RCP(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X)); in DECL_SPECIAL()
2858 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_src(dst), ureg_src(E)); in DECL_SPECIAL()
2860 …ureg_MUL(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), … in DECL_SPECIAL()
2862 …ureg_MUL(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), … in DECL_SPECIAL()
2863 ureg_MUL(ureg, tmp, ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), ureg_src(dst)); in DECL_SPECIAL()
2865 ureg_ADD(ureg, tmp, ureg_src(tmp), ureg_negate(ureg_src(E))); in DECL_SPECIAL()
2866 ureg_TEX(ureg, dst, ps1x_sampler_type(tx->info, m + 2), ureg_src(tmp), sample); in DECL_SPECIAL()
2876 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2888 ureg_RCP(ureg, ureg_writemask(r5, TGSI_WRITEMASK_Z), r5g); in DECL_SPECIAL()
2889 …ureg_MUL(ureg, ureg_writemask(r5, TGSI_WRITEMASK_X), r5r, ureg_scalar(ureg_src(r5), TGSI_SWIZZLE_Z… in DECL_SPECIAL()
2891 ureg_CMP(ureg, ureg_writemask(r5, TGSI_WRITEMASK_X), ureg_negate(ureg_abs(r5g)), in DECL_SPECIAL()
2892 r5r, ureg_imm1f(ureg, 1.0f)); in DECL_SPECIAL()
2894 tx->regs.oDepth = ureg_DECL_output_masked(ureg, TGSI_SEMANTIC_POSITION, 0, in DECL_SPECIAL()
2896 ureg_MOV(ureg, tx->regs.oDepth, r5r); in DECL_SPECIAL()
2903 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2923 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), m00, in DECL_SPECIAL()
2926 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), m10, in DECL_SPECIAL()
2930 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), m01, in DECL_SPECIAL()
2933 ureg_MAD(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_Y), m11, in DECL_SPECIAL()
2935 ureg_MOV(ureg, ureg_writemask(dst, TGSI_WRITEMASK_XY), ureg_src(tmp)); in DECL_SPECIAL()
2944 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2960 ureg_TEX(ureg, dst, target, src[0], src[1]); in DECL_SPECIAL()
2963 ureg_TXP(ureg, dst, target, src[0], src[1]); in DECL_SPECIAL()
2966 ureg_TXB(ureg, dst, target, src[0], src[1]); in DECL_SPECIAL()
2977 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
2984 ureg_TEX(ureg, dst, t, src, ureg_DECL_sampler(ureg, s)); in DECL_SPECIAL()
2991 struct ureg_program *ureg = tx->ureg; in DECL_SPECIAL() local
3000 src[1] = ureg_DECL_sampler(ureg, s); in DECL_SPECIAL()
3025 ureg_TXD(tx->ureg, dst, target, src[0], src[2], src[3], src[1]); in DECL_SPECIAL()
3044 ureg_TXL(tx->ureg, dst, target, src[0], src[1]); in DECL_SPECIAL()
3056 ureg_insn(tx->ureg, cmp_op, &dst, 1, src, 2, 0); in DECL_SPECIAL()
3063 ureg_IF(tx->ureg, src, tx_cond(tx)); in DECL_SPECIAL()
3064 ureg_BRK(tx->ureg); in DECL_SPECIAL()
3066 ureg_ENDIF(tx->ureg); in DECL_SPECIAL()
3235 ureg_insn(tx->ureg, tx->insn.info->opcode, in NineTranslateInstruction_Generic()
3525 tx->regs.predicate_tmp = ureg_DECL_temporary(tx->ureg); in sm1_parse_instruction()
3526 tx->regs.predicate_dst = ureg_DECL_temporary(tx->ureg); in sm1_parse_instruction()
3540 ureg_CMP(tx->ureg, tx->regs.predicate_dst, in sm1_parse_instruction()
3619 tx->ureg = ureg_create(info->type); in tx_ctor()
3620 if (!tx->ureg) { in tx_ctor()
3662 tx->regs.oPos = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_POSITION, 0); in tx_ctor()
3664 ureg_property(tx->ureg, TGSI_PROPERTY_FS_COORD_ORIGIN, TGSI_FS_COORD_ORIGIN_UPPER_LEFT); in tx_ctor()
3666 … ureg_property(tx->ureg, TGSI_PROPERTY_FS_COORD_PIXEL_CENTER, TGSI_FS_COORD_PIXEL_CENTER_INTEGER); in tx_ctor()
3671 ureg_property(tx->ureg, TGSI_PROPERTY_LEGACY_MATH_RULES, 1); in tx_ctor()
3718 struct ureg_program *ureg = tx->ureg; in shader_add_vs_viewport_transform() local
3730 ureg_MOV(ureg, ureg_writemask(tx->regs.oPos_out, TGSI_WRITEMASK_XYZ), ureg_src(tx->regs.oPos)); in shader_add_vs_viewport_transform()
3736 struct ureg_program *ureg = tx->ureg; in shader_add_ps_fog_stage() local
3737 struct ureg_dst oCol0 = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0); in shader_add_ps_fog_stage()
3743 ureg_MOV(ureg, oCol0, src_col); in shader_add_ps_fog_stage()
3750 ureg_RCP(ureg, depth, ureg_scalar(nine_get_position_input(tx), TGSI_SWIZZLE_W)); in shader_add_ps_fog_stage()
3751 … ureg_MUL(ureg, depth, ureg_src(depth), ureg_scalar(nine_get_position_input(tx), TGSI_SWIZZLE_Z)); in shader_add_ps_fog_stage()
3761 ureg_ADD(ureg, fog_factor, fog_end, ureg_negate(ureg_src(depth))); in shader_add_ps_fog_stage()
3762 ureg_MUL(ureg, ureg_saturate(fog_factor), tx_src_scalar(fog_factor), fog_coeff); in shader_add_ps_fog_stage()
3765 ureg_MUL(ureg, fog_factor, ureg_src(depth), fog_density); in shader_add_ps_fog_stage()
3766 ureg_MUL(ureg, fog_factor, tx_src_scalar(fog_factor), ureg_imm1f(ureg, -1.442695f)); in shader_add_ps_fog_stage()
3767 ureg_EX2(ureg, fog_factor, tx_src_scalar(fog_factor)); in shader_add_ps_fog_stage()
3770 ureg_MUL(ureg, fog_factor, ureg_src(depth), fog_density); in shader_add_ps_fog_stage()
3771 ureg_MUL(ureg, fog_factor, tx_src_scalar(fog_factor), tx_src_scalar(fog_factor)); in shader_add_ps_fog_stage()
3772 ureg_MUL(ureg, fog_factor, tx_src_scalar(fog_factor), ureg_imm1f(ureg, -1.442695f)); in shader_add_ps_fog_stage()
3773 ureg_EX2(ureg, fog_factor, tx_src_scalar(fog_factor)); in shader_add_ps_fog_stage()
3775 fog_vs = ureg_scalar(ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_GENERIC, 16, in shader_add_ps_fog_stage()
3778 ureg_MOV(ureg, fog_factor, fog_vs); in shader_add_ps_fog_stage()
3781 ureg_LRP(ureg, ureg_writemask(oCol0, TGSI_WRITEMASK_XYZ), in shader_add_ps_fog_stage()
3783 ureg_MOV(ureg, ureg_writemask(oCol0, TGSI_WRITEMASK_W), src_col); in shader_add_ps_fog_stage()
3808 tx->regs.oFog = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_GENERIC, 16); in parse_shader()
3809 … ureg_MOV(tx->ureg, ureg_writemask(tx->regs.oFog, TGSI_WRITEMASK_X), ureg_imm1f(tx->ureg, 0.0f)); in parse_shader()
3813 ureg_property(tx->ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, TRUE); in parse_shader()
3816 struct ureg_dst oPts = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_PSIZE, 0); in parse_shader()
3817 …ureg_MAX(tx->ureg, tx->regs.oPts, ureg_src(tx->regs.oPts), ureg_imm1f(tx->ureg, info->point_size_m… in parse_shader()
3818 … ureg_MIN(tx->ureg, oPts, ureg_src(tx->regs.oPts), ureg_imm1f(tx->ureg, info->point_size_max)); in parse_shader()
3825 ureg_END(tx->ureg); in parse_shader()
3881 nine_ureg_create_shader(struct ureg_program *ureg, in nine_ureg_create_shader() argument
3889 tgsi_tokens = ureg_finalize(ureg); in nine_ureg_create_shader()
3988 ureg_destroy(tx->ureg); in nine_translate_shader()
4000 ureg_destroy(tx->ureg); in nine_translate_shader()
4129 ureg_DECL_constant2D(tx->ureg, 0, tx->num_slots-1, 0); in nine_translate_shader()
4131 ureg_DECL_constant2D(tx->ureg, 0, 4095, 0); in nine_translate_shader()
4132 ureg_DECL_constant2D(tx->ureg, 0, 4095, 1); in nine_translate_shader()
4133 ureg_DECL_constant2D(tx->ureg, 0, 2047, 2); in nine_translate_shader()
4134 ureg_DECL_constant2D(tx->ureg, 0, 511, 3); in nine_translate_shader()
4138 ureg_DECL_constant2D(tx->ureg, 0, 2, 4); /* Viewport data */ in nine_translate_shader()
4141 const struct tgsi_token *toks = ureg_get_tokens(tx->ureg, NULL); in nine_translate_shader()
4151 info->cso = nine_create_shader_with_so_and_destroy(tx->ureg, pipe, &(info->so)); in nine_translate_shader()
4153 info->cso = nine_create_shader_with_so_and_destroy(tx->ureg, pipe, NULL); in nine_translate_shader()