• Home
  • Raw
  • Download

Lines Matching refs:regs

489     } regs;  member
772 if (tx->num_scratch >= ARRAY_SIZE(tx->regs.t)) { in tx_scratch()
774 return tx->regs.t[0]; in tx_scratch()
776 if (ureg_dst_is_undef(tx->regs.t[tx->num_scratch])) in tx_scratch()
777 tx->regs.t[tx->num_scratch] = ureg_DECL_local_temporary(tx->ureg); in tx_scratch()
778 return tx->regs.t[tx->num_scratch++]; in tx_scratch()
804 tx->regs.r = REALLOC(tx->regs.r, in tx_temp_alloc()
805 k * sizeof(tx->regs.r[0]), in tx_temp_alloc()
806 n * sizeof(tx->regs.r[0])); in tx_temp_alloc()
808 tx->regs.r[k] = ureg_dst_undef(); in tx_temp_alloc()
811 if (ureg_dst_is_undef(tx->regs.r[idx])) in tx_temp_alloc()
812 tx->regs.r[idx] = ureg_DECL_temporary(tx->ureg); in tx_temp_alloc()
819 if (ureg_dst_is_undef(tx->regs.address)) in tx_addr_alloc()
820 tx->regs.address = ureg_DECL_address(tx->ureg); in tx_addr_alloc()
821 if (ureg_dst_is_undef(tx->regs.a0)) in tx_addr_alloc()
822 tx->regs.a0 = ureg_DECL_temporary(tx->ureg); in tx_addr_alloc()
898 assert(idx >= 0 && idx < ARRAY_SIZE(tx->regs.vT)); in tx_texcoord_alloc()
899 if (ureg_src_is_undef(tx->regs.vT[idx])) in tx_texcoord_alloc()
900 tx->regs.vT[idx] = ureg_DECL_fs_input(tx->ureg, tx->texcoord_sn, idx, in tx_texcoord_alloc()
935 if (ureg_dst_is_undef(tx->regs.rL[l])) { in tx_get_loopctr()
937 tx->regs.rL[l] = ureg_DECL_local_temporary(tx->ureg); in tx_get_loopctr()
943 return tx->regs.rL[l]; in tx_get_loopctr()
955 return ureg_scalar(ureg_src(tx->regs.rL[loop_level]), TGSI_SWIZZLE_Y); in tx_get_loopal()
1019 src = ureg_src(tx->regs.r[param->idx]); in tx_src_param()
1027 assert(!ureg_dst_is_undef(tx->regs.a0)); in tx_src_param()
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()
1034 src = ureg_src(tx->regs.address); in tx_src_param()
1038 src = ureg_src(tx->regs.tS[param->idx]); in tx_src_param()
1041 src = tx->regs.vT[param->idx]; in tx_src_param()
1068 if (ureg_src_is_undef(tx->regs.v_consecutive)) { in tx_src_param()
1070 tx->regs.v_consecutive = ureg_src(ureg_DECL_array_temporary(ureg, 10, 0)); in tx_src_param()
1072 if (!ureg_src_is_undef(tx->regs.v[i])) 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()
1078 src = ureg_src_array_offset(tx->regs.v_consecutive, param->idx); in tx_src_param()
1080 assert(param->idx < ARRAY_SIZE(tx->regs.v)); in tx_src_param()
1081 src = tx->regs.v[param->idx]; in tx_src_param()
1089 if (ureg_dst_is_undef(tx->regs.predicate)) { in tx_src_param()
1092 tx->regs.predicate = ureg_DECL_temporary(tx->ureg); in tx_src_param()
1094 src = ureg_src(tx->regs.predicate); in tx_src_param()
1134 if (ureg_dst_is_undef(tx->regs.address)) 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()
1140 src = ureg_src(tx->regs.address); in tx_src_param()
1145 if (ureg_src_is_undef(tx->regs.vPos)) in tx_src_param()
1146 tx->regs.vPos = nine_get_position_input(tx); in tx_src_param()
1150 ureg_ADD(ureg, wpos, tx->regs.vPos, in tx_src_param()
1154 src = tx->regs.vPos; in tx_src_param()
1158 if (ureg_src_is_undef(tx->regs.vFace)) { in tx_src_param()
1161 tx->regs.vFace = in tx_src_param()
1165 ureg_UCMP(ureg, tmp, ureg_scalar(tx->regs.vFace, TGSI_SWIZZLE_X), in tx_src_param()
1167 tx->regs.vFace = ureg_src(tmp); in tx_src_param()
1169 tx->regs.vFace = ureg_DECL_fs_input(ureg, in tx_src_param()
1173 tx->regs.vFace = ureg_scalar(tx->regs.vFace, TGSI_SWIZZLE_X); in tx_src_param()
1175 src = tx->regs.vFace; in tx_src_param()
1293 dst = tx->regs.r[param->idx]; in _tx_dst_param()
1299 if (ureg_dst_is_undef(tx->regs.tS[param->idx])) in _tx_dst_param()
1300 tx->regs.tS[param->idx] = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1301 dst = tx->regs.tS[param->idx]; in _tx_dst_param()
1305 dst = ureg_dst(tx->regs.vT[param->idx]); in _tx_dst_param()
1308 dst = tx->regs.a0; in _tx_dst_param()
1315 if (ureg_dst_is_undef(tx->regs.oPos)) in _tx_dst_param()
1316 tx->regs.oPos = in _tx_dst_param()
1318 dst = tx->regs.oPos; in _tx_dst_param()
1321 if (ureg_dst_is_undef(tx->regs.oFog)) in _tx_dst_param()
1322 tx->regs.oFog = in _tx_dst_param()
1324 dst = tx->regs.oFog; in _tx_dst_param()
1327 if (ureg_dst_is_undef(tx->regs.oPts)) in _tx_dst_param()
1328 tx->regs.oPts = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1329 dst = tx->regs.oPts; in _tx_dst_param()
1343 assert(param->idx < ARRAY_SIZE(tx->regs.o)); in _tx_dst_param()
1344 dst = tx->regs.o[param->idx]; in _tx_dst_param()
1352 if (ureg_dst_is_undef(tx->regs.oCol[param->idx])) { in _tx_dst_param()
1355 tx->regs.oCol[0] = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1357 tx->regs.oCol[param->idx] = in _tx_dst_param()
1361 dst = tx->regs.oCol[param->idx]; in _tx_dst_param()
1367 if (ureg_dst_is_undef(tx->regs.oDepth)) in _tx_dst_param()
1368 tx->regs.oDepth = in _tx_dst_param()
1371 dst = tx->regs.oDepth; /* XXX: must write .z component */ in _tx_dst_param()
1374 if (ureg_dst_is_undef(tx->regs.predicate)) in _tx_dst_param()
1375 tx->regs.predicate = ureg_DECL_temporary(tx->ureg); in _tx_dst_param()
1376 dst = tx->regs.predicate; in _tx_dst_param()
1394 tx->regs.predicate_dst = dst; in _tx_dst_param()
1395 dst = tx->regs.predicate_tmp; in _tx_dst_param()
1405 tx->regs.tdst = ureg_writemask(tx_scratch(tx), param->mask); in tx_dst_param()
1406 return tx->regs.tdst; 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()
1445 assert(param->idx < ARRAY_SIZE(tx->regs.v)); in tx_dst_param_as_src()
1446 src = tx->regs.v[param->idx]; in tx_dst_param_as_src()
2291 assert(sem.reg.idx < ARRAY_SIZE(tx->regs.o)); in DECL_SPECIAL()
2292 … assert(ureg_dst_is_undef(tx->regs.o[sem.reg.idx]) && "Nine doesn't support yet packing"); in DECL_SPECIAL()
2293 tx->regs.o[sem.reg.idx] = ureg_DECL_output_masked( in DECL_SPECIAL()
2297 tx->regs.oPos_out = tx->regs.o[sem.reg.idx]; in DECL_SPECIAL()
2298 tx->regs.o[sem.reg.idx] = ureg_DECL_temporary(ureg); in DECL_SPECIAL()
2299 tx->regs.oPos = tx->regs.o[sem.reg.idx]; in DECL_SPECIAL()
2303 tx->regs.o[sem.reg.idx] = ureg_DECL_temporary(ureg); in DECL_SPECIAL()
2304 tx->regs.oPts = tx->regs.o[sem.reg.idx]; in DECL_SPECIAL()
2311 assert(sem.reg.idx < ARRAY_SIZE(tx->regs.v)); in DECL_SPECIAL()
2312 … assert(ureg_src_is_undef(tx->regs.v[sem.reg.idx]) && "Nine doesn't support yet packing"); in DECL_SPECIAL()
2322 tx->regs.v[sem.reg.idx] = nine_get_position_input(tx); in DECL_SPECIAL()
2330 tx->regs.v[sem.reg.idx] = ureg_DECL_fs_input_centroid( in DECL_SPECIAL()
2501 ureg_MOV(ureg, ureg_writemask(ureg_saturate(dst), TGSI_WRITEMASK_XYZ), tx->regs.vT[s]); in DECL_SPECIAL()
2528 reg = tx->regs.vT[tx->insn.dst[0].idx]; in DECL_SPECIAL()
2581 apply_ps1x_projection(tx, texcoord, tx->regs.vT[m], m); in DECL_SPECIAL()
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()
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()
2758 ureg_DP3(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), tx->regs.vT[m], src); in DECL_SPECIAL()
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()
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()
2811 ureg_DP3(ureg, dst, tx->regs.vT[m], src); in DECL_SPECIAL()
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()
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()
2884 r5 = tx->regs.r[5]; 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()
2999 src[0] = tx->regs.vT[s]; in DECL_SPECIAL()
3524 if (ureg_dst_is_undef(tx->regs.predicate_tmp)) { in sm1_parse_instruction()
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()
3542 ureg_src(tx->regs.predicate_tmp), in sm1_parse_instruction()
3543 ureg_src(tx->regs.predicate_dst)); in sm1_parse_instruction()
3593 for (i = 0; i < ARRAY_SIZE(tx->regs.rL); ++i) { in tx_ctor()
3594 tx->regs.rL[i] = ureg_dst_undef(); in tx_ctor()
3596 tx->regs.address = ureg_dst_undef(); in tx_ctor()
3597 tx->regs.a0 = ureg_dst_undef(); in tx_ctor()
3598 tx->regs.p = ureg_dst_undef(); in tx_ctor()
3599 tx->regs.oDepth = ureg_dst_undef(); in tx_ctor()
3600 tx->regs.vPos = ureg_src_undef(); in tx_ctor()
3601 tx->regs.vFace = ureg_src_undef(); in tx_ctor()
3602 for (i = 0; i < ARRAY_SIZE(tx->regs.o); ++i) in tx_ctor()
3603 tx->regs.o[i] = ureg_dst_undef(); in tx_ctor()
3604 for (i = 0; i < ARRAY_SIZE(tx->regs.oCol); ++i) in tx_ctor()
3605 tx->regs.oCol[i] = ureg_dst_undef(); in tx_ctor()
3606 for (i = 0; i < ARRAY_SIZE(tx->regs.vC); ++i) in tx_ctor()
3607 tx->regs.vC[i] = ureg_src_undef(); in tx_ctor()
3608 for (i = 0; i < ARRAY_SIZE(tx->regs.vT); ++i) in tx_ctor()
3609 tx->regs.vT[i] = ureg_src_undef(); in tx_ctor()
3662 tx->regs.oPos = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_POSITION, 0); in tx_ctor()
3709 FREE(tx->regs.r); in tx_dtor()
3730 ureg_MOV(ureg, ureg_writemask(tx->regs.oPos_out, TGSI_WRITEMASK_XYZ), ureg_src(tx->regs.oPos)); in shader_add_vs_viewport_transform()
3801 shader_add_ps_fog_stage(tx, ureg_src(tx->regs.r[0])); in parse_shader()
3803 shader_add_ps_fog_stage(tx, ureg_src(tx->regs.oCol[0])); in parse_shader()
3807 if (IS_VS && tx->version.major < 3 && ureg_dst_is_undef(tx->regs.oFog) && info->fog_enable) { in parse_shader()
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()
3815 if (IS_VS && !ureg_dst_is_undef(tx->regs.oPts)) { 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()
4005 FREE(tx->regs.r); in nine_translate_shader()