Lines Matching refs:file
24 /** @file brw_fs.cpp
26 * This file drives the GLSL IR -> LIR translation, contains the
67 assert(dst.file != IMM && dst.file != UNIFORM);
74 switch (dst.file) {
87 unreachable("Invalid destination register file");
232 return src[1].file == VGRF;
235 return src[0].file == VGRF;
238 return src[0].file == VGRF;
407 if (src[i].file == VGRF && (src[i].stride == 0 ||
496 this->file = BAD_FILE;
504 if (this->file == IMM &&
529 switch (file) {
544 unreachable("Invalid register file");
550 const unsigned stride = ((file != ARF && file != FIXED_GRF) ? this->stride :
655 if (src[i].file == BAD_FILE)
674 assert(src[FB_WRITE_LOGICAL_SRC_COMPONENTS].file == IMM);
697 assert(src[TEX_LOGICAL_SRC_COORD_COMPONENTS].file == IMM &&
698 src[TEX_LOGICAL_SRC_GRAD_COMPONENTS].file == IMM);
722 assert(src[SURFACE_LOGICAL_SRC_IMM_DIMS].file == IMM);
734 assert(src[SURFACE_LOGICAL_SRC_IMM_DIMS].file == IMM &&
735 src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
748 assert(src[2].file == IMM);
752 assert(src[2].file == IMM);
763 assert(src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
767 assert(src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
777 assert(src[2].file == IMM);
783 assert(src[2].file == IMM);
804 assert(src[2].file == IMM);
822 assert(src[SURFACE_LOGICAL_SRC_IMM_DIMS].file == IMM &&
823 src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
828 assert(src[SURFACE_LOGICAL_SRC_IMM_DIMS].file == IMM &&
829 src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
834 assert(src[SURFACE_LOGICAL_SRC_IMM_DIMS].file == IMM &&
835 src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
853 assert(src[SURFACE_LOGICAL_SRC_IMM_DIMS].file == IMM &&
854 src[SURFACE_LOGICAL_SRC_IMM_ARG].file == IMM);
869 unsigned(src[URB_LOGICAL_SRC_PER_SLOT_OFFSETS].file != BAD_FILE) -
870 unsigned(src[URB_LOGICAL_SRC_CHANNEL_MASK].file != BAD_FILE);
895 return src[0].file == BAD_FILE ? 0 : 2 * REG_SIZE;
935 assert(src[2].file == IMM);
941 if (is_tex() && arg == 0 && src[0].file == VGRF)
946 switch (src[arg].file) {
1006 if (r.file == ARF) {
1102 return src[0].file == BAD_FILE ? 0 : 2;
1124 fs_reg::fs_reg(enum brw_reg_file file, int nr)
1127 this->file = file;
1130 this->stride = (file == UNIFORM ? 0 : 1);
1133 fs_reg::fs_reg(enum brw_reg_file file, int nr, enum brw_reg_type type)
1136 this->file = file;
1139 this->stride = (file == UNIFORM ? 0 : 1);
1451 if (nir_system_values[SYSTEM_VALUE_SAMPLE_ID].file == BAD_FILE)
1660 /* Map the offsets in the UNIFORM file to fixed HW regs. */
1663 if (inst->src[i].file == UNIFORM) {
1980 if (inst->src[i].file == ATTR) {
2016 if (inst->src[i].file == ATTR) {
2065 /* Rewrite all ATTR file references to the hw grf that they land in. */
2076 /* Rewrite all ATTR file references to HW_REGs. */
2091 /* Rewrite all ATTR file references to HW_REGs. */
2108 /* Rewrite all ATTR file references to GRFs. */
2130 /* Compact the register file so we eliminate dead vgrfs. This
2157 if (inst->dst.file == VGRF) {
2164 if (inst->src[i].file == VGRF) {
2178 assert(inst->dst.file == VGRF);
2184 if (inst->dst.file == VGRF) {
2190 if (inst->src[i].file == VGRF) {
2251 assert(inst->dst.file == VGRF);
2270 if (inst->dst.file == VGRF) {
2284 if (inst->src[i].file != VGRF)
2331 if (inst->dst.file == VGRF)
2335 if (inst->src[i].file == VGRF)
2360 if (inst->dst.file == VGRF)
2364 if (inst->src[i].file == VGRF)
2374 if (delta_xy[i].file == VGRF) {
2378 delta_xy[i].file = BAD_FILE;
2407 * Assign UNIFORM file registers to either push constants or pull constants.
2453 assert(src.file == UNIFORM);
2474 * Replace UNIFORM register file access with either UNIFORM_PULL_CONSTANT_LOAD
2487 if (inst->src[i].file != UNIFORM)
2508 inst->src[i].file = VGRF;
2515 inst->src[0].file == UNIFORM) {
2583 if (inst->src[0].file != IMM)
2608 if (inst->src[1].file != IMM)
2633 if (inst->src[1].file != IMM)
2644 if (inst->src[0].file == IMM) {
2712 } else if (inst->saturate && inst->src[1].file == IMM) {
2770 } else if (inst->src[1].file == IMM) {
2794 } else if (inst->src[1].file == IMM) {
2809 if (inst->src[0].file == IMM) {
2914 assert(send->src[2].file == VGRF);
2923 if (lp->dst.file != send->src[2].file || lp->dst.nr != send->src[2].nr)
2932 if (lp->src[i].file == BAD_FILE)
2935 if (lp->src[0].file != lp->src[i].file ||
2988 if (inst->src[i].file == VGRF &&
2999 inst->dst.file == VGRF &&
3009 } else if (inst->dst.file == VGRF &&
3022 if (delta_xy[i].file == VGRF && remap[delta_xy[i].nr] != ~0u) {
3118 inst->dst.file != MRF || inst->src[0].file != VGRF ||
3259 scan_inst->dst.file = MRF;
3403 assert(mov->src[0].file == FIXED_GRF);
3432 inst->dst.file == MRF) {
3448 if (inst->dst.file == MRF) {
3472 inst->dst.file == MRF &&
3473 inst->src[0].file != ARF &&
3516 assert(inst->src[0].file == BRW_IMMEDIATE_VALUE);
3540 if (inst->src[i].file == VGRF || inst->src[i].file == FIXED_GRF) {
3607 if (scan_inst->dst.file == VGRF) {
3673 if (scan_inst->dst.file == VGRF &&
3702 if (inst->mlen != 0 && inst->dst.file == VGRF) {
3738 assert(offset_B.file == IMM);
3760 if (surface.file == IMM) {
3822 assert(inst->dst.file == MRF || inst->dst.file == VGRF);
3827 if (dst.file == MRF)
3842 if (inst->src[i].file != BAD_FILE)
3850 if (inst->dst.file == MRF && (inst->dst.nr & BRW_MRF_COMPR4) &&
3871 if (inst->src[i].file != BAD_FILE) {
3905 if (inst->src[i].file != BAD_FILE) {
3927 if (inst->src[1].file == IMM &&
4001 if (orig_dst.is_null() || orig_dst.file == MRF ||
4034 if (inst->src[1].file == IMM) {
4164 if (mul->src[1].file == IMM) {
4260 (inst->src[1].file == IMM && !isnan(inst->src[1].f))) {
4439 assert(sample_mask.file == ARF &&
4626 if (inst->src[i].file == FIXED_GRF && (inst->src[i].nr & 1) &&
4879 assert(inst->src[0].file == BAD_FILE || inst->exec_size <= 16);
4981 inst->src[FB_WRITE_LOGICAL_SRC_SRC_DEPTH].file == BAD_FILE ||
4984 return (inst->src[FB_WRITE_LOGICAL_SRC_COLOR1].file != BAD_FILE ?
5017 return inst->src[TEX_LOGICAL_SRC_SHADOW_C].file == BAD_FILE ? 16 : 8;
5107 inst->src[i].file == BAD_FILE);
5397 * follows in the register file:
5612 FILE *file = stderr;
5614 file = fopen(name, "w");
5615 if (!file)
5616 file = stderr;
5624 fprintf(file, "{%3d} %4d: ", rp.regs_live_at_ip[ip], ip);
5625 dump_instruction(inst, file);
5628 fprintf(file, "Maximum %3d registers live at once.\n", max_pressure);
5632 fprintf(file, "%4d: ", ip++);
5633 dump_instruction(inst, file);
5637 if (file != stderr) {
5638 fclose(file);
5649 fs_visitor::dump_instruction(const backend_instruction *be_inst, FILE *file) const
5654 fprintf(file, "(%cf%d.%d) ",
5660 fprintf(file, "%s", brw_instruction_name(&compiler->isa, inst->opcode));
5662 fprintf(file, ".sat");
5664 fprintf(file, "%s", conditional_modifier[inst->conditional_mod]);
5670 fprintf(file, ".f%d.%d", inst->flag_subreg / 2,
5674 fprintf(file, "(%d) ", inst->exec_size);
5677 fprintf(file, "(mlen: %d) ", inst->mlen);
5681 fprintf(file, "(ex_mlen: %d) ", inst->ex_mlen);
5685 fprintf(file, "(EOT) ");
5688 switch (inst->dst.file) {
5690 fprintf(file, "vgrf%d", inst->dst.nr);
5693 fprintf(file, "g%d", inst->dst.nr);
5696 fprintf(file, "m%d", inst->dst.nr);
5699 fprintf(file, "(null)");
5702 fprintf(file, "***u%d***", inst->dst.nr);
5705 fprintf(file, "***attr%d***", inst->dst.nr);
5710 fprintf(file, "null");
5713 fprintf(file, "a0.%d", inst->dst.subnr);
5716 fprintf(file, "acc%d", inst->dst.subnr);
5719 fprintf(file, "f%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
5722 fprintf(file, "arf%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
5731 (inst->dst.file == VGRF &&
5733 const unsigned reg_size = (inst->dst.file == UNIFORM ? 4 : REG_SIZE);
5734 fprintf(file, "+%d.%d", inst->dst.offset / reg_size,
5739 fprintf(file, "<%u>", inst->dst.stride);
5740 fprintf(file, ":%s, ", brw_reg_type_to_letters(inst->dst.type));
5744 fprintf(file, "-");
5746 fprintf(file, "|");
5747 switch (inst->src[i].file) {
5749 fprintf(file, "vgrf%d", inst->src[i].nr);
5752 fprintf(file, "g%d", inst->src[i].nr);
5755 fprintf(file, "***m%d***", inst->src[i].nr);
5758 fprintf(file, "attr%d", inst->src[i].nr);
5761 fprintf(file, "u%d", inst->src[i].nr);
5764 fprintf(file, "(null)");
5769 fprintf(file, "%-ghf", _mesa_half_to_float(inst->src[i].ud & 0xffff));
5772 fprintf(file, "%-gf", inst->src[i].f);
5775 fprintf(file, "%fdf", inst->src[i].df);
5779 fprintf(file, "%dd", inst->src[i].d);
5783 fprintf(file, "%uu", inst->src[i].ud);
5786 fprintf(file, "%" PRId64 "q", inst->src[i].d64);
5789 fprintf(file, "%" PRIu64 "uq", inst->src[i].u64);
5792 fprintf(file, "[%-gF, %-gF, %-gF, %-gF]",
5800 fprintf(file, "%08x%s", inst->src[i].ud,
5804 fprintf(file, "???");
5811 fprintf(file, "null");
5814 fprintf(file, "a0.%d", inst->src[i].subnr);
5817 fprintf(file, "acc%d", inst->src[i].subnr);
5820 fprintf(file, "f%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr);
5823 fprintf(file, "arf%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr);
5830 (inst->src[i].file == VGRF &&
5832 const unsigned reg_size = (inst->src[i].file == UNIFORM ? 4 : REG_SIZE);
5833 fprintf(file, "+%d.%d", inst->src[i].offset / reg_size,
5838 fprintf(file, "|");
5840 if (inst->src[i].file != IMM) {
5842 if (inst->src[i].file == ARF || inst->src[i].file == FIXED_GRF) {
5849 fprintf(file, "<%u>", stride);
5851 fprintf(file, ":%s", brw_reg_type_to_letters(inst->src[i].type));
5854 if (i < inst->sources - 1 && inst->src[i + 1].file != BAD_FILE)
5855 fprintf(file, ", ");
5858 fprintf(file, " ");
5861 fprintf(file, "NoMask ");
5864 fprintf(file, "group%d ", inst->group);
5866 fprintf(file, "\n");
6286 return inst->dst.file == BAD_FILE;
7385 * Pre-gfx6, the register file of the EUs was shared between threads,