Lines Matching refs:qreg
43 static struct qreg
56 struct qreg **regs, in resize_qreg_array()
65 *regs = reralloc(c, *regs, struct qreg, *size); in resize_qreg_array()
92 static struct qreg
95 struct qreg indirect_offset = ntq_get_src(c, intr->src[0], 0); in indirect_uniform_load()
115 static struct qreg
122 struct qreg offset = ntq_get_src(c, intr->src[1], 0); in vc4_ubo_load()
160 static struct qreg *
163 struct qreg *qregs = ralloc_array(c->def_ht, struct qreg, in ntq_init_ssa_def()
186 struct qreg result) in ntq_store_dest()
199 struct qreg *qregs; in ntq_store_dest()
215 struct qreg *qregs = entry->data; in ntq_store_dest()
249 static struct qreg *
253 struct qreg *qregs = ntq_init_ssa_def(c, &dest->ssa); in ntq_get_dest()
267 static struct qreg
282 struct qreg *qregs = entry->data; in ntq_get_src()
286 static struct qreg
292 struct qreg r = ntq_get_src(c, instr->src[src].src, in ntq_get_alu_src()
301 static inline struct qreg
302 qir_SAT(struct vc4_compile *c, struct qreg val) in qir_SAT()
309 static struct qreg
310 ntq_rcp(struct vc4_compile *c, struct qreg x) in ntq_rcp()
312 struct qreg r = qir_RCP(c, x); in ntq_rcp()
322 static struct qreg
323 ntq_rsq(struct vc4_compile *c, struct qreg x) in ntq_rsq()
325 struct qreg r = qir_RSQ(c, x); in ntq_rsq()
338 static struct qreg
339 ntq_umul(struct vc4_compile *c, struct qreg src0, struct qreg src1) in ntq_umul()
341 struct qreg src0_hi = qir_SHR(c, src0, in ntq_umul()
343 struct qreg src1_hi = qir_SHR(c, src1, in ntq_umul()
346 struct qreg hilo = qir_MUL24(c, src0_hi, src1); in ntq_umul()
347 struct qreg lohi = qir_MUL24(c, src0, src1_hi); in ntq_umul()
348 struct qreg lolo = qir_MUL24(c, src0, src1); in ntq_umul()
355 static struct qreg
356 ntq_scale_depth_texture(struct vc4_compile *c, struct qreg src) in ntq_scale_depth_texture()
358 struct qreg depthf = qir_ITOF(c, qir_SHR(c, src, in ntq_scale_depth_texture()
384 struct qreg addr; in ntq_emit_txf()
398 struct qreg tex = qir_TEX_RESULT(c); in ntq_emit_txf()
403 struct qreg scaled = ntq_scale_depth_texture(c, tex); in ntq_emit_txf()
416 struct qreg s, t, r, lod, compare; in ntq_emit_tex()
468 struct qreg texture_u[] = { in ntq_emit_tex()
533 struct qreg tex = qir_TEX_RESULT(c); in ntq_emit_tex()
537 struct qreg *dest = ntq_get_dest(c, &instr->dest); in ntq_emit_tex()
539 struct qreg normalized = ntq_scale_depth_texture(c, tex); in ntq_emit_tex()
540 struct qreg depth_output; in ntq_emit_tex()
542 struct qreg u0 = qir_uniform_f(c, 0.0f); in ntq_emit_tex()
543 struct qreg u1 = qir_uniform_f(c, 1.0f); in ntq_emit_tex()
602 static struct qreg
603 ntq_ffract(struct vc4_compile *c, struct qreg src) in ntq_ffract()
605 struct qreg trunc = qir_ITOF(c, qir_FTOI(c, src)); in ntq_ffract()
606 struct qreg diff = qir_FSUB(c, src, trunc); in ntq_ffract()
619 static struct qreg
620 ntq_ffloor(struct vc4_compile *c, struct qreg src) in ntq_ffloor()
622 struct qreg result = qir_ITOF(c, qir_FTOI(c, src)); in ntq_ffloor()
640 static struct qreg
641 ntq_fceil(struct vc4_compile *c, struct qreg src) in ntq_fceil()
643 struct qreg result = qir_ITOF(c, qir_FTOI(c, src)); in ntq_fceil()
656 static struct qreg
657 ntq_shrink_sincos_input_range(struct vc4_compile *c, struct qreg x) in ntq_shrink_sincos_input_range()
667 struct qreg scaled_x = in ntq_shrink_sincos_input_range()
671 struct qreg x_frac = qir_FSUB(c, scaled_x, in ntq_shrink_sincos_input_range()
683 static struct qreg
684 ntq_fsin(struct vc4_compile *c, struct qreg src) in ntq_fsin()
694 struct qreg x = ntq_shrink_sincos_input_range(c, src); in ntq_fsin()
695 struct qreg x2 = qir_FMUL(c, x, x); in ntq_fsin()
696 struct qreg sum = qir_FMUL(c, x, qir_uniform_f(c, coeff[0])); in ntq_fsin()
708 static struct qreg
709 ntq_fcos(struct vc4_compile *c, struct qreg src) in ntq_fcos()
720 struct qreg x_frac = ntq_shrink_sincos_input_range(c, src); in ntq_fcos()
721 struct qreg sum = qir_uniform_f(c, coeff[0]); in ntq_fcos()
722 struct qreg x2 = qir_FMUL(c, x_frac, x_frac); in ntq_fcos()
723 struct qreg x = x2; /* Current x^2, x^4, or x^6 */ in ntq_fcos()
736 static struct qreg
737 ntq_fsign(struct vc4_compile *c, struct qreg src) in ntq_fsign()
739 struct qreg t = qir_get_temp(c); in ntq_fsign()
774 static struct qreg
779 struct qreg vary = { in emit_fragment_varying()
853 struct qreg result = qir_get_temp(c); in ntq_emit_pack_unorm_4x8()
873 struct qreg rep = ntq_get_src(c, in ntq_emit_pack_unorm_4x8()
882 struct qreg src; in ntq_emit_pack_unorm_4x8()
910 static struct qreg
911 ntq_emit_ibfe(struct vc4_compile *c, struct qreg base, struct qreg offset, in ntq_emit_ibfe()
912 struct qreg bits) in ntq_emit_ibfe()
927 static struct qreg
928 ntq_emit_ubfe(struct vc4_compile *c, struct qreg base, struct qreg offset, in ntq_emit_ubfe()
929 struct qreg bits) in ntq_emit_ubfe()
949 ntq_emit_comparison(struct vc4_compile *c, struct qreg *dest, in ntq_emit_comparison()
981 struct qreg src0 = ntq_get_alu_src(c, compare_instr, 0); in ntq_emit_comparison()
982 struct qreg src1 = ntq_get_alu_src(c, compare_instr, 1); in ntq_emit_comparison()
1023 static struct qreg ntq_emit_bcsel(struct vc4_compile *c, nir_alu_instr *instr, in ntq_emit_bcsel()
1024 struct qreg *src) in ntq_emit_bcsel()
1035 struct qreg dest; in ntq_emit_bcsel()
1044 static struct qreg
1045 ntq_fddx(struct vc4_compile *c, struct qreg src) in ntq_fddx()
1053 struct qreg from_left = qir_ROT_MUL(c, src, 1); in ntq_fddx()
1054 struct qreg from_right = qir_ROT_MUL(c, src, 15); in ntq_fddx()
1065 static struct qreg
1066 ntq_fddy(struct vc4_compile *c, struct qreg src) in ntq_fddy()
1071 struct qreg from_bottom = qir_ROT_MUL(c, src, 2); in ntq_fddy()
1072 struct qreg from_top = qir_ROT_MUL(c, src, 14); in ntq_fddy()
1097 struct qreg srcs[4]; in ntq_emit_alu()
1113 struct qreg src = ntq_get_src(c, instr->src[0].src, in ntq_emit_alu()
1124 struct qreg src[nir_op_infos[instr->op].num_inputs]; in ntq_emit_alu()
1129 struct qreg result; in ntq_emit_alu()
1340 struct qreg color; in emit_frag_end()
1394 emit_scaled_viewport_write(struct vc4_compile *c, struct qreg rcp_w) in emit_scaled_viewport_write()
1396 struct qreg packed = qir_get_temp(c); in emit_scaled_viewport_write()
1399 struct qreg scale = in emit_scaled_viewport_write()
1402 struct qreg packed_chan = packed; in emit_scaled_viewport_write()
1417 emit_zs_write(struct vc4_compile *c, struct qreg rcp_w) in emit_zs_write()
1419 struct qreg zscale = qir_uniform(c, QUNIFORM_VIEWPORT_Z_SCALE, 0); in emit_zs_write()
1420 struct qreg zoffset = qir_uniform(c, QUNIFORM_VIEWPORT_Z_OFFSET, 0); in emit_zs_write()
1430 emit_rcp_wc_write(struct vc4_compile *c, struct qreg rcp_w) in emit_rcp_wc_write()
1438 struct qreg point_size; in emit_point_size_write()
1472 struct qreg rcp_w = ntq_rcp(c, c->outputs[c->output_position_index + 3]); in emit_vert_end()
1507 struct qreg rcp_w = ntq_rcp(c, c->outputs[c->output_position_index + 3]); in emit_coord_end()
1673 struct qreg *qregs = ralloc_array(c->def_ht, struct qreg, in ntq_setup_registers()
1687 struct qreg *qregs = ntq_init_ssa_def(c, &instr->def); in ntq_emit_load_const()
1697 struct qreg *qregs = ntq_init_ssa_def(c, &instr->def); in ntq_emit_ssa_undef()
1863 struct qreg cond = ntq_get_src(c, instr->src[0], 0); in ntq_emit_intrinsic()