Lines Matching refs:file
571 string(FILE *file, const char *string) in string() argument
573 fputs(string, file); in string()
612 control(FILE *file, const char *name, const char *const ctrl[], in control() argument
616 fprintf(file, "*** invalid %s value %d ", name, id); in control()
621 string(file, " "); in control()
622 string(file, ctrl[id]); in control()
630 print_opcode(FILE *file, const struct gen_device_info *devinfo, in print_opcode() argument
635 format(file, "*** invalid opcode value %d ", id); in print_opcode()
638 string(file, desc->name); in print_opcode()
643 reg(FILE *file, unsigned _reg_file, unsigned _reg_nr) in reg() argument
654 string(file, "null"); in reg()
657 format(file, "a%d", _reg_nr & 0x0f); in reg()
660 format(file, "acc%d", _reg_nr & 0x0f); in reg()
663 format(file, "f%d", _reg_nr & 0x0f); in reg()
666 format(file, "mask%d", _reg_nr & 0x0f); in reg()
669 format(file, "msd%d", _reg_nr & 0x0f); in reg()
672 format(file, "sr%d", _reg_nr & 0x0f); in reg()
675 format(file, "cr%d", _reg_nr & 0x0f); in reg()
678 format(file, "n%d", _reg_nr & 0x0f); in reg()
681 string(file, "ip"); in reg()
685 format(file, "tdr0"); in reg()
688 format(file, "tm%d", _reg_nr & 0x0f); in reg()
691 format(file, "ARF%d", _reg_nr); in reg()
695 err |= control(file, "src reg file", reg_file, _reg_file, NULL); in reg()
696 format(file, "%d", _reg_nr); in reg()
702 dest(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in dest() argument
710 err |= reg(file, brw_inst_dst_reg_file(devinfo, inst), in dest()
715 format(file, ".%"PRIu64, brw_inst_dst_da1_subreg_nr(devinfo, inst) / in dest()
717 string(file, "<"); in dest()
718 err |= control(file, "horiz stride", horiz_stride, in dest()
720 string(file, ">"); in dest()
721 string(file, brw_reg_type_to_letters(type)); in dest()
723 string(file, "g[a0"); in dest()
725 format(file, ".%"PRIu64, brw_inst_dst_ia_subreg_nr(devinfo, inst) / in dest()
728 format(file, " %d", brw_inst_dst_ia1_addr_imm(devinfo, inst)); in dest()
729 string(file, "]<"); in dest()
730 err |= control(file, "horiz stride", horiz_stride, in dest()
732 string(file, ">"); in dest()
733 string(file, brw_reg_type_to_letters(type)); in dest()
737 err |= reg(file, brw_inst_dst_reg_file(devinfo, inst), in dest()
742 format(file, ".%u", 16 / elem_size); in dest()
743 string(file, "<1>"); in dest()
744 err |= control(file, "writemask", writemask, in dest()
746 string(file, brw_reg_type_to_letters(type)); in dest()
749 string(file, "Indirect align16 address mode not supported"); in dest()
757 dest_3src(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in dest_3src() argument
772 err |= reg(file, reg_file, brw_inst_3src_dst_reg_nr(devinfo, inst)); in dest_3src()
786 format(file, ".%u", subreg_nr); in dest_3src()
787 string(file, "<1>"); in dest_3src()
790 err |= control(file, "writemask", writemask, in dest_3src()
793 string(file, brw_reg_type_to_letters(type)); in dest_3src()
799 src_align1_region(FILE *file, in src_align1_region() argument
804 string(file, "<"); in src_align1_region()
805 err |= control(file, "vert stride", vert_stride, _vert_stride, NULL); in src_align1_region()
806 string(file, ","); in src_align1_region()
807 err |= control(file, "width", width, _width, NULL); in src_align1_region()
808 string(file, ","); in src_align1_region()
809 err |= control(file, "horiz_stride", horiz_stride, _horiz_stride, NULL); in src_align1_region()
810 string(file, ">"); in src_align1_region()
815 src_da1(FILE *file, in src_da1() argument
826 err |= control(file, "bitnot", m_bitnot, _negate, NULL); in src_da1()
828 err |= control(file, "negate", m_negate, _negate, NULL); in src_da1()
830 err |= control(file, "abs", _abs, __abs, NULL); in src_da1()
832 err |= reg(file, _reg_file, reg_num); in src_da1()
837 format(file, ".%d", sub_reg_num / elem_size); /* use formal style like spec */ in src_da1()
839 src_align1_region(file, _vert_stride, _width, _horiz_stride); in src_da1()
840 string(file, brw_reg_type_to_letters(type)); in src_da1()
845 src_ia1(FILE *file, in src_ia1() argument
859 err |= control(file, "bitnot", m_bitnot, _negate, NULL); in src_ia1()
861 err |= control(file, "negate", m_negate, _negate, NULL); in src_ia1()
863 err |= control(file, "abs", _abs, __abs, NULL); in src_ia1()
865 string(file, "g[a0"); in src_ia1()
867 format(file, ".%d", _addr_subreg_nr); in src_ia1()
869 format(file, " %d", _addr_imm); in src_ia1()
870 string(file, "]"); in src_ia1()
871 src_align1_region(file, _vert_stride, _width, _horiz_stride); in src_ia1()
872 string(file, brw_reg_type_to_letters(type)); in src_ia1()
877 src_swizzle(FILE *file, unsigned swiz) in src_swizzle() argument
886 string(file, "."); in src_swizzle()
887 err |= control(file, "channel select", chan_sel, x, NULL); in src_swizzle()
889 string(file, "."); in src_swizzle()
890 err |= control(file, "channel select", chan_sel, x, NULL); in src_swizzle()
891 err |= control(file, "channel select", chan_sel, y, NULL); in src_swizzle()
892 err |= control(file, "channel select", chan_sel, z, NULL); in src_swizzle()
893 err |= control(file, "channel select", chan_sel, w, NULL); in src_swizzle()
899 src_da16(FILE *file, in src_da16() argument
914 err |= control(file, "bitnot", m_bitnot, _negate, NULL); in src_da16()
916 err |= control(file, "negate", m_negate, _negate, NULL); in src_da16()
918 err |= control(file, "abs", _abs, __abs, NULL); in src_da16()
920 err |= reg(file, _reg_file, _reg_nr); in src_da16()
928 format(file, ".%d", 16 / elem_size); in src_da16()
930 string(file, "<"); in src_da16()
931 err |= control(file, "vert stride", vert_stride, _vert_stride, NULL); in src_da16()
932 string(file, ">"); in src_da16()
933 err |= src_swizzle(file, BRW_SWIZZLE4(swz_x, swz_y, swz_z, swz_w)); in src_da16()
934 string(file, brw_reg_type_to_letters(type)); in src_da16()
1019 src0_3src(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in src0_3src() argument
1044 format(file, "%dW", imm_val); in src0_3src()
1046 format(file, "0x%04xUW", imm_val); in src0_3src()
1048 format(file, "%-gF", _mesa_half_to_float(imm_val)); in src0_3src()
1080 err |= control(file, "negate", m_negate, in src0_3src()
1082 err |= control(file, "abs", _abs, brw_inst_3src_src0_abs(devinfo, inst), NULL); in src0_3src()
1084 err |= reg(file, _file, reg_nr); in src0_3src()
1088 format(file, ".%d", subreg_nr); in src0_3src()
1089 src_align1_region(file, _vert_stride, _width, _horiz_stride); in src0_3src()
1091 err |= src_swizzle(file, brw_inst_3src_a16_src0_swizzle(devinfo, inst)); in src0_3src()
1092 string(file, brw_reg_type_to_letters(type)); in src0_3src()
1097 src1_3src(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in src1_3src() argument
1148 err |= control(file, "negate", m_negate, in src1_3src()
1150 err |= control(file, "abs", _abs, brw_inst_3src_src1_abs(devinfo, inst), NULL); in src1_3src()
1152 err |= reg(file, _file, reg_nr); in src1_3src()
1156 format(file, ".%d", subreg_nr); in src1_3src()
1157 src_align1_region(file, _vert_stride, _width, _horiz_stride); in src1_3src()
1159 err |= src_swizzle(file, brw_inst_3src_a16_src1_swizzle(devinfo, inst)); in src1_3src()
1160 string(file, brw_reg_type_to_letters(type)); in src1_3src()
1165 src2_3src(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in src2_3src() argument
1190 format(file, "%dW", imm_val); in src2_3src()
1192 format(file, "0x%04xUW", imm_val); in src2_3src()
1194 format(file, "%-gF", _mesa_half_to_float(imm_val)); in src2_3src()
1230 err |= control(file, "negate", m_negate, in src2_3src()
1232 err |= control(file, "abs", _abs, brw_inst_3src_src2_abs(devinfo, inst), NULL); in src2_3src()
1234 err |= reg(file, _file, reg_nr); in src2_3src()
1238 format(file, ".%d", subreg_nr); in src2_3src()
1239 src_align1_region(file, _vert_stride, _width, _horiz_stride); in src2_3src()
1241 err |= src_swizzle(file, brw_inst_3src_a16_src2_swizzle(devinfo, inst)); in src2_3src()
1242 string(file, brw_reg_type_to_letters(type)); in src2_3src()
1247 imm(FILE *file, const struct gen_device_info *devinfo, enum brw_reg_type type, in imm() argument
1252 format(file, "0x%016lxUQ", brw_inst_imm_uq(devinfo, inst)); in imm()
1255 format(file, "%ldQ", brw_inst_imm_uq(devinfo, inst)); in imm()
1258 format(file, "0x%08xUD", brw_inst_imm_ud(devinfo, inst)); in imm()
1261 format(file, "%dD", brw_inst_imm_d(devinfo, inst)); in imm()
1264 format(file, "0x%04xUW", (uint16_t) brw_inst_imm_ud(devinfo, inst)); in imm()
1267 format(file, "%dW", (int16_t) brw_inst_imm_d(devinfo, inst)); in imm()
1270 format(file, "0x%08xUV", brw_inst_imm_ud(devinfo, inst)); in imm()
1273 format(file, "[%-gF, %-gF, %-gF, %-gF]VF", in imm()
1280 format(file, "0x%08xV", brw_inst_imm_ud(devinfo, inst)); in imm()
1283 format(file, "%-gF", brw_inst_imm_f(devinfo, inst)); in imm()
1286 format(file, "%-gDF", brw_inst_imm_df(devinfo, inst)); in imm()
1289 string(file, "Half Float IMM"); in imm()
1293 format(file, "*** invalid immediate type %d ", type); in imm()
1299 src0(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in src0() argument
1302 return imm(file, devinfo, brw_inst_src0_type(devinfo, inst), inst); in src0()
1305 return src_da1(file, in src0()
1318 return src_ia1(file, in src0()
1333 return src_da16(file, in src0()
1348 string(file, "Indirect align16 address mode not supported"); in src0()
1355 src1(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in src1() argument
1358 return imm(file, devinfo, brw_inst_src1_type(devinfo, inst), inst); in src1()
1361 return src_da1(file, in src1()
1374 return src_ia1(file, in src1()
1389 return src_da16(file, in src1()
1404 string(file, "Indirect align16 address mode not supported"); in src1()
1411 qtr_ctrl(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) in qtr_ctrl() argument
1419 format(file, " %dN", qtr_ctl * 2 + nib_ctl + 1); in qtr_ctrl()
1423 string(file, " 1Q"); in qtr_ctrl()
1426 string(file, " 2Q"); in qtr_ctrl()
1429 string(file, " 3Q"); in qtr_ctrl()
1432 string(file, " 4Q"); in qtr_ctrl()
1437 string(file, " 1H"); in qtr_ctrl()
1439 string(file, " 2H"); in qtr_ctrl()
1457 brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo, in brw_disassemble_inst() argument
1467 string(file, "("); in brw_disassemble_inst()
1468 err |= control(file, "predicate inverse", pred_inv, in brw_disassemble_inst()
1470 format(file, "f%"PRIu64, devinfo->gen >= 7 ? brw_inst_flag_reg_nr(devinfo, inst) : 0); in brw_disassemble_inst()
1472 format(file, ".%"PRIu64, brw_inst_flag_subreg_nr(devinfo, inst)); in brw_disassemble_inst()
1474 err |= control(file, "predicate control align1", pred_ctrl_align1, in brw_disassemble_inst()
1477 err |= control(file, "predicate control align16", pred_ctrl_align16, in brw_disassemble_inst()
1480 string(file, ") "); in brw_disassemble_inst()
1483 err |= print_opcode(file, devinfo, opcode); in brw_disassemble_inst()
1484 err |= control(file, "saturate", saturate, brw_inst_saturate(devinfo, inst), in brw_disassemble_inst()
1487 err |= control(file, "debug control", debug_ctrl, in brw_disassemble_inst()
1491 string(file, " "); in brw_disassemble_inst()
1492 err |= control(file, "function", math_function, in brw_disassemble_inst()
1495 err |= control(file, "conditional modifier", conditional_modifier, in brw_disassemble_inst()
1506 format(file, ".f%"PRIu64, in brw_disassemble_inst()
1509 format(file, ".%"PRIu64, brw_inst_flag_subreg_nr(devinfo, inst)); in brw_disassemble_inst()
1514 string(file, "("); in brw_disassemble_inst()
1515 err |= control(file, "execution size", exec_size, in brw_disassemble_inst()
1517 string(file, ")"); in brw_disassemble_inst()
1521 format(file, " %"PRIu64, brw_inst_base_mrf(devinfo, inst)); in brw_disassemble_inst()
1525 pad(file, 16); in brw_disassemble_inst()
1526 format(file, "JIP: %d", brw_inst_jip(devinfo, inst)); in brw_disassemble_inst()
1527 pad(file, 32); in brw_disassemble_inst()
1528 format(file, "UIP: %d", brw_inst_uip(devinfo, inst)); in brw_disassemble_inst()
1530 pad(file, 16); in brw_disassemble_inst()
1532 format(file, "JIP: %d", brw_inst_jip(devinfo, inst)); in brw_disassemble_inst()
1534 format(file, "JIP: %d", brw_inst_gen6_jump_count(devinfo, inst)); in brw_disassemble_inst()
1539 pad(file, 16); in brw_disassemble_inst()
1540 format(file, "Jump: %d", brw_inst_gen4_jump_count(devinfo, inst)); in brw_disassemble_inst()
1541 pad(file, 32); in brw_disassemble_inst()
1542 format(file, "Pop: %"PRIu64, brw_inst_gen4_pop_count(devinfo, inst)); in brw_disassemble_inst()
1546 pad(file, 16); in brw_disassemble_inst()
1547 format(file, "Jump: %d", brw_inst_gen4_jump_count(devinfo, inst)); in brw_disassemble_inst()
1549 pad(file, 16); in brw_disassemble_inst()
1550 format(file, "Pop: %"PRIu64, brw_inst_gen4_pop_count(devinfo, inst)); in brw_disassemble_inst()
1552 pad(file, 16); in brw_disassemble_inst()
1553 err |= src1(file, devinfo, inst); in brw_disassemble_inst()
1555 pad(file, 16); in brw_disassemble_inst()
1556 err |= dest_3src(file, devinfo, inst); in brw_disassemble_inst()
1558 pad(file, 32); in brw_disassemble_inst()
1559 err |= src0_3src(file, devinfo, inst); in brw_disassemble_inst()
1561 pad(file, 48); in brw_disassemble_inst()
1562 err |= src1_3src(file, devinfo, inst); in brw_disassemble_inst()
1564 pad(file, 64); in brw_disassemble_inst()
1565 err |= src2_3src(file, devinfo, inst); in brw_disassemble_inst()
1568 pad(file, 16); in brw_disassemble_inst()
1569 err |= dest(file, devinfo, inst); in brw_disassemble_inst()
1573 pad(file, 32); in brw_disassemble_inst()
1574 err |= src0(file, devinfo, inst); in brw_disassemble_inst()
1578 pad(file, 48); in brw_disassemble_inst()
1579 err |= src1(file, devinfo, inst); in brw_disassemble_inst()
1588 pad(file, 48); in brw_disassemble_inst()
1589 err |= src1(file, devinfo, inst); in brw_disassemble_inst()
1592 newline(file); in brw_disassemble_inst()
1593 pad(file, 16); in brw_disassemble_inst()
1596 fprintf(file, " "); in brw_disassemble_inst()
1597 err |= control(file, "SFID", devinfo->gen >= 6 ? gen6_sfid : gen4_sfid, in brw_disassemble_inst()
1602 format(file, " indirect"); in brw_disassemble_inst()
1606 err |= control(file, "math function", math_function, in brw_disassemble_inst()
1608 err |= control(file, "math saturate", math_saturate, in brw_disassemble_inst()
1610 err |= control(file, "math signed", math_signed, in brw_disassemble_inst()
1612 err |= control(file, "math scalar", math_scalar, in brw_disassemble_inst()
1614 err |= control(file, "math precision", math_precision, in brw_disassemble_inst()
1619 err |= control(file, "sampler message", gen5_sampler_msg_type, in brw_disassemble_inst()
1621 err |= control(file, "sampler simd mode", gen5_sampler_simd_mode, in brw_disassemble_inst()
1623 format(file, " Surface = %"PRIu64" Sampler = %"PRIu64, in brw_disassemble_inst()
1627 format(file, " (%"PRIu64", %"PRIu64", %"PRIu64", ", in brw_disassemble_inst()
1632 err |= control(file, "sampler target format", in brw_disassemble_inst()
1636 string(file, ")"); in brw_disassemble_inst()
1643 format(file, " (%"PRIu64", %"PRIu64", %"PRIu64", %"PRIu64")", in brw_disassemble_inst()
1650 err |= control(file, "DP read message type", in brw_disassemble_inst()
1656 format(file, " MsgCtrl = 0x%"PRIx64, in brw_disassemble_inst()
1659 format(file, " Surface = %"PRIu64, brw_inst_binding_table_index(devinfo, inst)); in brw_disassemble_inst()
1667 err |= control(file, "DP rc message type", in brw_disassemble_inst()
1675 err |= control(file, "RT message type", m_rt_write_subtype, in brw_disassemble_inst()
1678 string(file, " Hi"); in brw_disassemble_inst()
1680 string(file, " LastRT"); in brw_disassemble_inst()
1682 string(file, " WriteCommit"); in brw_disassemble_inst()
1684 format(file, " MsgCtrl = 0x%"PRIx64, in brw_disassemble_inst()
1688 format(file, " Surface = %"PRIu64, brw_inst_binding_table_index(devinfo, inst)); in brw_disassemble_inst()
1695 format(file, " %"PRIu64, brw_inst_urb_global_offset(devinfo, inst)); in brw_disassemble_inst()
1699 err |= control(file, "urb opcode", in brw_disassemble_inst()
1706 string(file, " per-slot"); in brw_disassemble_inst()
1712 string(file, " masked"); in brw_disassemble_inst()
1714 err |= control(file, "urb swizzle", urb_swizzle, in brw_disassemble_inst()
1720 err |= control(file, "urb allocate", urb_allocate, in brw_disassemble_inst()
1722 err |= control(file, "urb used", urb_used, in brw_disassemble_inst()
1726 err |= control(file, "urb complete", urb_complete, in brw_disassemble_inst()
1735 format(file, " (%s)", in brw_disassemble_inst()
1741 format(file, " ("); in brw_disassemble_inst()
1743 err |= control(file, "DP DC0 message type", in brw_disassemble_inst()
1747 format(file, ", %"PRIu64", ", brw_inst_binding_table_index(devinfo, inst)); in brw_disassemble_inst()
1751 control(file, "atomic op", aop, in brw_disassemble_inst()
1755 format(file, "%"PRIu64, brw_inst_dp_msg_control(devinfo, inst)); in brw_disassemble_inst()
1757 format(file, ")"); in brw_disassemble_inst()
1764 format(file, " ("); in brw_disassemble_inst()
1768 err |= control(file, "DP DC1 message type", in brw_disassemble_inst()
1772 format(file, ", Surface = %"PRIu64", ", in brw_disassemble_inst()
1779 format(file, "SIMD%d,", (msg_ctrl & (1 << 4)) ? 8 : 16); in brw_disassemble_inst()
1784 control(file, "atomic op", aop, msg_ctrl & 0xf, &space); in brw_disassemble_inst()
1791 format(file, "SIMD%s, Mask = 0x%x", in brw_disassemble_inst()
1796 format(file, "0x%x", msg_ctrl); in brw_disassemble_inst()
1798 format(file, ")"); in brw_disassemble_inst()
1806 format(file, " (%s, %s, 0x%02"PRIx64")", in brw_disassemble_inst()
1815 format(file, "unsupported shared function ID %d", sfid); in brw_disassemble_inst()
1820 string(file, " "); in brw_disassemble_inst()
1821 format(file, "mlen %"PRIu64, brw_inst_mlen(devinfo, inst)); in brw_disassemble_inst()
1822 format(file, " rlen %"PRIu64, brw_inst_rlen(devinfo, inst)); in brw_disassemble_inst()
1825 pad(file, 64); in brw_disassemble_inst()
1827 string(file, "{"); in brw_disassemble_inst()
1829 err |= control(file, "access mode", access_mode, in brw_disassemble_inst()
1832 err |= control(file, "write enable control", wectrl, in brw_disassemble_inst()
1835 err |= control(file, "mask control", mask_ctrl, in brw_disassemble_inst()
1838 err |= control(file, "dependency control", dep_ctrl, in brw_disassemble_inst()
1843 err |= qtr_ctrl(file, devinfo, inst); in brw_disassemble_inst()
1849 format(file, " compr4"); in brw_disassemble_inst()
1851 err |= control(file, "compression control", compr_ctrl, in brw_disassemble_inst()
1856 err |= control(file, "compaction", cmpt_ctrl, is_compacted, &space); in brw_disassemble_inst()
1857 err |= control(file, "thread control", thread_ctrl, in brw_disassemble_inst()
1860 err |= control(file, "branch ctrl", branch_ctrl, in brw_disassemble_inst()
1863 err |= control(file, "acc write control", accwr, in brw_disassemble_inst()
1867 err |= control(file, "end of thread", end_of_thread, in brw_disassemble_inst()
1870 string(file, " "); in brw_disassemble_inst()
1871 string(file, "}"); in brw_disassemble_inst()
1873 string(file, ";"); in brw_disassemble_inst()
1874 newline(file); in brw_disassemble_inst()