Lines Matching refs:qreg
109 struct qreg **regs, in resize_qreg_array()
118 *regs = reralloc(c, *regs, struct qreg, *size); in resize_qreg_array()
360 struct qreg tmud = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_TMUD); in emit_tmu_general_store_writes()
376 struct qreg data = ntq_get_src(c, instr->src[0], i); in emit_tmu_general_store_writes()
416 struct qreg tmud = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_TMUD); in emit_tmu_general_atomic_writes()
418 struct qreg data = ntq_get_src(c, instr->src[1 + has_index], 0); in emit_tmu_general_atomic_writes()
449 struct qreg base_offset, in emit_tmu_general_address_write()
465 struct qreg tmua; in emit_tmu_general_address_write()
473 struct qreg offset = base_offset; in emit_tmu_general_address_write()
478 struct qreg data = ntq_get_src(c, instr->src[offset_src], 0); in emit_tmu_general_address_write()
560 struct qreg base_offset; in ntq_emit_tmu_general()
721 static struct qreg *
724 struct qreg *qregs = ralloc_array(c->def_ht, struct qreg, in ntq_init_ssa_def()
767 struct qreg result) in ntq_store_dest()
783 struct qreg *qregs; in ntq_store_dest()
799 struct qreg *qregs = entry->data; in ntq_store_dest()
847 struct qreg
871 struct qreg *qregs = entry->data; in ntq_get_src()
875 static struct qreg
881 struct qreg r = ntq_get_src(c, instr->src[src].src, in ntq_get_alu_src()
890 static struct qreg
891 ntq_minify(struct v3d_compile *c, struct qreg size, struct qreg level) in ntq_minify()
903 struct qreg lod = c->undef; in ntq_emit_txs()
916 struct qreg size = vir_uniform(c, contents, unit); in ntq_emit_txs()
974 static struct qreg
975 ntq_fsincos(struct v3d_compile *c, struct qreg src, bool is_cos) in ntq_fsincos()
977 struct qreg input = vir_FMUL(c, src, vir_uniform_f(c, 1.0f / M_PI)); in ntq_fsincos()
981 struct qreg periods = vir_FROUND(c, input); in ntq_fsincos()
982 struct qreg sin_output = vir_SIN(c, vir_FSUB(c, input, periods)); in ntq_fsincos()
988 static struct qreg
989 ntq_fsign(struct v3d_compile *c, struct qreg src) in ntq_fsign()
991 struct qreg t = vir_get_temp(c); in ntq_fsign()
1010 static struct qreg
1012 struct qreg vary, struct qreg w, struct qreg r5) in emit_smooth_varying()
1017 static struct qreg
1019 struct qreg vary, struct qreg r5) in emit_noperspective_varying()
1024 static struct qreg
1026 struct qreg vary, struct qreg r5) in emit_flat_varying()
1032 static struct qreg
1036 struct qreg r3 = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_R3); in emit_fragment_varying()
1037 struct qreg r5 = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_R5); in emit_fragment_varying()
1040 struct qreg vary; in emit_fragment_varying()
1075 struct qreg result; in emit_fragment_varying()
1162 struct qreg src0 = ntq_get_alu_src(c, compare_instr, 0); in ntq_emit_comparison()
1163 struct qreg src1; in ntq_emit_comparison()
1167 struct qreg nop = vir_nop_reg(); in ntq_emit_comparison()
1259 struct qreg qsrc = ntq_get_src(c, src, 0); in ntq_emit_bool_to_cond()
1279 static struct qreg
1282 struct qreg result = in ntq_emit_cond_to_bool()
1291 static struct qreg
1294 struct qreg result = in ntq_emit_cond_to_int()
1303 static struct qreg
1304 f2f16_rtz(struct v3d_compile *c, struct qreg f32) in f2f16_rtz()
1322 struct qreg tmp; in f2f16_rtz()
1324 struct qreg result = vir_get_temp(c); in f2f16_rtz()
1326 struct qreg mantissa32 = vir_AND(c, f32, vir_uniform_ui(c, 0x007fffff)); in f2f16_rtz()
1329 struct qreg sign = vir_AND(c, vir_SHR(c, f32, vir_uniform_ui(c, 16)), in f2f16_rtz()
1333 struct qreg exp32 = vir_AND(c, vir_SHR(c, f32, vir_uniform_ui(c, 23)), in f2f16_rtz()
1335 struct qreg exp16 = vir_ADD(c, exp32, vir_uniform_ui(c, -127 + 15)); in f2f16_rtz()
1394 static struct qreg
1396 struct qreg value, in sign_extend()
1402 struct qreg tmp = vir_MOV(c, value); in sign_extend()
1435 struct qreg srcs[4]; in ntq_emit_alu()
1446 struct qreg src[nir_op_infos[instr->op].num_inputs]; in ntq_emit_alu()
1451 struct qreg result; in ntq_emit_alu()
1535 struct qreg tmp = vir_AND(c, src[0], in ntq_emit_alu()
1588 struct qreg tmp = vir_AND(c, src[0], in ntq_emit_alu()
1778 struct qreg tmp = vir_FMOV(c, src[0]); in ntq_emit_alu()
1784 struct qreg abs_src = vir_FMOV(c, src[0]); in ntq_emit_alu()
1786 struct qreg threshold = vir_uniform_f(c, ldexpf(1.0, -14)); in ntq_emit_alu()
1791 struct qreg zero = in ntq_emit_alu()
1846 struct qreg tlb_reg = vir_magic_reg(V3D_QPU_WADDR_TLB); in vir_emit_tlb_color_write()
1847 struct qreg tlbu_reg = vir_magic_reg(V3D_QPU_WADDR_TLBU); in vir_emit_tlb_color_write()
1891 struct qreg *color = c->msaa_per_sample_output ? in vir_emit_tlb_color_write()
1895 struct qreg r = color[0]; in vir_emit_tlb_color_write()
1896 struct qreg g = color[1]; in vir_emit_tlb_color_write()
1897 struct qreg b = color[2]; in vir_emit_tlb_color_write()
1898 struct qreg a = color[3]; in vir_emit_tlb_color_write()
1959 struct qreg *color = &c->outputs[var->data.driver_location * 4]; in emit_frag_end()
1967 struct qreg tlbu_reg = vir_magic_reg(V3D_QPU_WADDR_TLBU); in emit_frag_end()
2056 struct qreg val, in vir_VPM_WRITE_indirect()
2057 struct qreg vpm_index, in vir_VPM_WRITE_indirect()
2068 vir_VPM_WRITE(struct v3d_compile *c, struct qreg val, uint32_t vpm_index) in vir_VPM_WRITE()
2217 static struct qreg
2223 struct qreg vpm = vir_reg(QFILE_VPM, vpm_index); in ntq_emit_vpm_read()
2499 struct qreg *qregs = ralloc_array(c->def_ht, struct qreg, in ntq_setup_registers()
2517 struct qreg *qregs = ntq_init_ssa_def(c, &instr->def); in ntq_emit_load_const()
2587 struct qreg *color_reads_for_sample = in vir_emit_tlb_color_read()
2634 struct qreg r, g, b, a; in vir_emit_tlb_color_read()
2646 struct qreg rg = conf != 0xffffffff && i == 0 ? in vir_emit_tlb_color_read()
2657 struct qreg ba = vir_TLB_COLOR_READ(c); in vir_emit_tlb_color_read()
2667 struct qreg *color_reads = in vir_emit_tlb_color_read()
2824 struct qreg vpm_offset = vir_uniform_ui(c, index++); in ntq_emit_load_input()
2831 struct qreg input = c->inputs[offset * 4 + comp]; in ntq_emit_load_input()
2880 struct qreg offset = ntq_get_src(c, instr->src[1], 0); in emit_store_output_gs()
2896 struct qreg val = ntq_get_src(c, instr->src[0], 0); in emit_store_output_gs()
2923 struct qreg val = ntq_get_src(c, instr->src[0], 0); in emit_store_output_vs()
2929 struct qreg offset = vir_ADD(c, in emit_store_output_vs()
2955 ntq_get_sample_offset(struct v3d_compile *c, struct qreg sample_idx, in ntq_get_sample_offset()
2956 struct qreg *sx, struct qreg *sy) in ntq_get_sample_offset()
2960 struct qreg offset_x = in ntq_get_sample_offset()
2971 struct qreg offset_y = in ntq_get_sample_offset()
2984 struct qreg *out_x, in ntq_get_barycentric_centroid()
2985 struct qreg *out_y) in ntq_get_barycentric_centroid()
2987 struct qreg sample_mask; in ntq_get_barycentric_centroid()
2993 struct qreg i0 = vir_uniform_ui(c, 0); in ntq_get_barycentric_centroid()
2994 struct qreg i1 = vir_uniform_ui(c, 1); in ntq_get_barycentric_centroid()
2995 struct qreg i2 = vir_uniform_ui(c, 2); in ntq_get_barycentric_centroid()
2996 struct qreg i3 = vir_uniform_ui(c, 3); in ntq_get_barycentric_centroid()
2997 struct qreg i4 = vir_uniform_ui(c, 4); in ntq_get_barycentric_centroid()
2998 struct qreg i8 = vir_uniform_ui(c, 8); in ntq_get_barycentric_centroid()
3001 struct qreg F = vir_uniform_ui(c, 0); in ntq_get_barycentric_centroid()
3002 struct qreg T = vir_uniform_ui(c, ~0); in ntq_get_barycentric_centroid()
3003 struct qreg s0 = vir_XOR(c, vir_AND(c, sample_mask, i1), i1); in ntq_get_barycentric_centroid()
3006 struct qreg s1 = vir_XOR(c, vir_AND(c, sample_mask, i2), i2); in ntq_get_barycentric_centroid()
3009 struct qreg s2 = vir_XOR(c, vir_AND(c, sample_mask, i4), i4); in ntq_get_barycentric_centroid()
3012 struct qreg s3 = vir_XOR(c, vir_AND(c, sample_mask, i8), i8); in ntq_get_barycentric_centroid()
3017 struct qreg sample_idx = i3; in ntq_get_barycentric_centroid()
3026 struct qreg offset_x, offset_y; in ntq_get_barycentric_centroid()
3032 struct qreg s0_and_s3 = vir_AND(c, s0, s3); in ntq_get_barycentric_centroid()
3033 struct qreg s1_and_s2 = vir_AND(c, s1, s2); in ntq_get_barycentric_centroid()
3035 struct qreg use_center = vir_XOR(c, sample_mask, vir_uniform_ui(c, 0)); in ntq_get_barycentric_centroid()
3041 struct qreg zero = vir_uniform_f(c, 0.0f); in ntq_get_barycentric_centroid()
3050 static struct qreg
3052 struct qreg p, in ntq_emit_load_interpolated_input()
3053 struct qreg C, in ntq_emit_load_interpolated_input()
3054 struct qreg offset_x, in ntq_emit_load_interpolated_input()
3055 struct qreg offset_y, in ntq_emit_load_interpolated_input()
3061 struct qreg sample_offset_x = in ntq_emit_load_interpolated_input()
3063 struct qreg sample_offset_y = in ntq_emit_load_interpolated_input()
3066 struct qreg scaleX = in ntq_emit_load_interpolated_input()
3069 struct qreg scaleY = in ntq_emit_load_interpolated_input()
3073 struct qreg pInterp = in ntq_emit_load_interpolated_input()
3080 struct qreg w = c->payload_w; in ntq_emit_load_interpolated_input()
3081 struct qreg wInterp = in ntq_emit_load_interpolated_input()
3089 emit_ldunifa(struct v3d_compile *c, struct qreg *result) in emit_ldunifa()
3201 struct qreg base_offset = !is_ssbo ? in ntq_emit_load_unifa()
3206 struct qreg unifa = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_UNIFA); in ntq_emit_load_unifa()
3225 struct qreg data; in ntq_emit_load_unifa()
3255 struct qreg tmp; in ntq_emit_load_unifa()
3276 static inline struct qreg
3468 struct qreg qdest = ntq_emit_cond_to_bool(c, V3D_QPU_COND_IFA); in ntq_emit_intrinsic()
3603 struct qreg x = vir_AND(c, c->cs_payload[0], in ntq_emit_intrinsic()
3606 struct qreg y = vir_SHR(c, c->cs_payload[0], in ntq_emit_intrinsic()
3609 struct qreg z = vir_AND(c, c->cs_payload[1], in ntq_emit_intrinsic()
3639 struct qreg lii = emit_load_local_invocation_index(c); in ntq_emit_intrinsic()
3676 struct qreg col = ntq_get_src(c, instr->src[0], 0); in ntq_emit_intrinsic()
3678 struct qreg row = vir_uniform_ui(c, row_idx++); in ntq_emit_intrinsic()
3740 struct qreg offset_x, offset_y; in ntq_emit_intrinsic()
3741 struct qreg sample_idx = ntq_get_src(c, instr->src[0], 0); in ntq_emit_intrinsic()
3750 struct qreg offset_x = in ntq_emit_intrinsic()
3752 struct qreg offset_y = in ntq_emit_intrinsic()
3763 struct qreg offset_x, offset_y; in ntq_emit_intrinsic()
3793 struct qreg p = c->interp[input_idx].vp; in ntq_emit_intrinsic()
3794 struct qreg C = c->interp[input_idx].C; in ntq_emit_intrinsic()
3797 struct qreg offset_x = ntq_get_src(c, instr->src[0], 0); in ntq_emit_intrinsic()
3798 struct qreg offset_y = ntq_get_src(c, instr->src[0], 1); in ntq_emit_intrinsic()
3800 struct qreg result = in ntq_emit_intrinsic()
3820 struct qreg first = vir_FLAFIRST(c); in ntq_emit_intrinsic()
3826 struct qreg result = ntq_emit_cond_to_bool(c, V3D_QPU_COND_IFA); in ntq_emit_intrinsic()
4392 struct qreg wg_in_mem = vir_SHR(c, c->cs_payload[1], in nir_to_vir()
4403 struct qreg shared_per_wg = in nir_to_vir()