Lines Matching refs:inst
46 const fs_inst *inst);
190 fs_inst *inst = bld.emit(FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_LOGICAL, in VARYING_PULL_CONSTANT_LOAD() local
192 inst->size_written = 4 * vec4_result.component_size(inst->exec_size); in VARYING_PULL_CONSTANT_LOAD()
228 fs_inst::equals(fs_inst *inst) const in equals()
230 return (opcode == inst->opcode && in equals()
231 dst.equals(inst->dst) && in equals()
232 src[0].equals(inst->src[0]) && in equals()
233 src[1].equals(inst->src[1]) && in equals()
234 src[2].equals(inst->src[2]) && in equals()
235 saturate == inst->saturate && in equals()
236 predicate == inst->predicate && in equals()
237 conditional_mod == inst->conditional_mod && in equals()
238 mlen == inst->mlen && in equals()
239 base_mrf == inst->base_mrf && in equals()
240 target == inst->target && in equals()
241 eot == inst->eot && in equals()
242 header_size == inst->header_size && in equals()
243 shadow_compare == inst->shadow_compare && in equals()
244 exec_size == inst->exec_size && in equals()
245 offset == inst->offset); in equals()
883 flag_mask(const fs_inst *inst) in flag_mask() argument
885 const unsigned start = inst->flag_subreg * 16 + inst->group; in flag_mask()
886 const unsigned end = start + inst->exec_size; in flag_mask()
950 fs_visitor::implied_mrf_writes(fs_inst *inst) const in implied_mrf_writes()
952 if (inst->mlen == 0) in implied_mrf_writes()
955 if (inst->base_mrf == -1) in implied_mrf_writes()
958 switch (inst->opcode) { in implied_mrf_writes()
990 return inst->mlen; in implied_mrf_writes()
992 return inst->mlen; in implied_mrf_writes()
1391 fs_inst *inst; in emit_gs_thread_end() local
1414 inst = abld.emit(SHADER_OPCODE_URB_WRITE_SIMD8, reg_undef, hdr); in emit_gs_thread_end()
1415 inst->mlen = 1; in emit_gs_thread_end()
1422 inst = abld.emit(SHADER_OPCODE_URB_WRITE_SIMD8, reg_undef, payload); in emit_gs_thread_end()
1423 inst->mlen = 2; in emit_gs_thread_end()
1425 inst->eot = true; in emit_gs_thread_end()
1426 inst->offset = 0; in emit_gs_thread_end()
1444 foreach_block_and_inst(block, fs_inst, inst, cfg) { in assign_curb_setup()
1445 for (unsigned int i = 0; i < inst->sources; i++) { in assign_curb_setup()
1446 if (inst->src[i].file == UNIFORM) { in assign_curb_setup()
1447 int uniform_nr = inst->src[i].nr + inst->src[i].offset / 4; in assign_curb_setup()
1449 if (inst->src[i].nr >= UBO_START) { in assign_curb_setup()
1451 constant_nr = ubo_push_start[inst->src[i].nr - UBO_START] + in assign_curb_setup()
1452 inst->src[i].offset / 4; in assign_curb_setup()
1467 brw_reg.abs = inst->src[i].abs; in assign_curb_setup()
1468 brw_reg.negate = inst->src[i].negate; in assign_curb_setup()
1470 assert(inst->src[i].stride == 0); in assign_curb_setup()
1471 inst->src[i] = byte_offset( in assign_curb_setup()
1472 retype(brw_reg, inst->src[i].type), in assign_curb_setup()
1473 inst->src[i].offset % 4); in assign_curb_setup()
1583 foreach_block_and_inst(block, fs_inst, inst, cfg) { in assign_urb_setup()
1584 if (inst->opcode == FS_OPCODE_LINTERP) { in assign_urb_setup()
1585 assert(inst->src[1].file == FIXED_GRF); in assign_urb_setup()
1586 inst->src[1].nr += urb_start; in assign_urb_setup()
1589 if (inst->opcode == FS_OPCODE_CINTERP) { in assign_urb_setup()
1590 assert(inst->src[0].file == FIXED_GRF); in assign_urb_setup()
1591 inst->src[0].nr += urb_start; in assign_urb_setup()
1600 fs_visitor::convert_attr_sources_to_hw_regs(fs_inst *inst) in convert_attr_sources_to_hw_regs() argument
1602 for (int i = 0; i < inst->sources; i++) { in convert_attr_sources_to_hw_regs()
1603 if (inst->src[i].file == ATTR) { in convert_attr_sources_to_hw_regs()
1606 inst->src[i].nr + in convert_attr_sources_to_hw_regs()
1607 inst->src[i].offset / REG_SIZE; in convert_attr_sources_to_hw_regs()
1618 unsigned total_size = inst->exec_size * in convert_attr_sources_to_hw_regs()
1619 inst->src[i].stride * in convert_attr_sources_to_hw_regs()
1620 type_sz(inst->src[i].type); in convert_attr_sources_to_hw_regs()
1624 (total_size <= REG_SIZE) ? inst->exec_size : inst->exec_size / 2; in convert_attr_sources_to_hw_regs()
1626 unsigned width = inst->src[i].stride == 0 ? 1 : exec_size; in convert_attr_sources_to_hw_regs()
1628 stride(byte_offset(retype(brw_vec8_grf(grf, 0), inst->src[i].type), in convert_attr_sources_to_hw_regs()
1629 inst->src[i].offset % REG_SIZE), in convert_attr_sources_to_hw_regs()
1630 exec_size * inst->src[i].stride, in convert_attr_sources_to_hw_regs()
1631 width, inst->src[i].stride); in convert_attr_sources_to_hw_regs()
1632 reg.abs = inst->src[i].abs; in convert_attr_sources_to_hw_regs()
1633 reg.negate = inst->src[i].negate; in convert_attr_sources_to_hw_regs()
1635 inst->src[i] = reg; in convert_attr_sources_to_hw_regs()
1653 foreach_block_and_inst(block, fs_inst, inst, cfg) { in assign_vs_urb_setup()
1654 convert_attr_sources_to_hw_regs(inst); in assign_vs_urb_setup()
1664 foreach_block_and_inst(block, fs_inst, inst, cfg) { in assign_tcs_single_patch_urb_setup()
1665 convert_attr_sources_to_hw_regs(inst); in assign_tcs_single_patch_urb_setup()
1679 foreach_block_and_inst(block, fs_inst, inst, cfg) { in assign_tes_urb_setup()
1680 convert_attr_sources_to_hw_regs(inst); in assign_tes_urb_setup()
1694 foreach_block_and_inst(block, fs_inst, inst, cfg) { in assign_gs_urb_setup()
1696 convert_attr_sources_to_hw_regs(inst); in assign_gs_urb_setup()
1748 foreach_block_and_inst(block, fs_inst, inst, cfg) { in split_virtual_grfs()
1749 if (inst->dst.file == VGRF) { in split_virtual_grfs()
1750 int reg = vgrf_to_reg[inst->dst.nr]; in split_virtual_grfs()
1751 for (unsigned j = 1; j < this->alloc.sizes[inst->dst.nr]; j++) in split_virtual_grfs()
1755 for (int i = 0; i < inst->sources; i++) { in split_virtual_grfs()
1756 if (inst->src[i].file == VGRF) { in split_virtual_grfs()
1757 int reg = vgrf_to_reg[inst->src[i].nr]; in split_virtual_grfs()
1758 for (unsigned j = 1; j < this->alloc.sizes[inst->src[i].nr]; j++) in split_virtual_grfs()
1764 foreach_block_and_inst(block, fs_inst, inst, cfg) { in split_virtual_grfs()
1765 if (inst->dst.file == VGRF) { in split_virtual_grfs()
1766 int reg = vgrf_to_reg[inst->dst.nr] + inst->dst.offset / REG_SIZE; in split_virtual_grfs()
1767 for (unsigned j = 1; j < regs_written(inst); j++) in split_virtual_grfs()
1770 for (int i = 0; i < inst->sources; i++) { in split_virtual_grfs()
1771 if (inst->src[i].file == VGRF) { in split_virtual_grfs()
1772 int reg = vgrf_to_reg[inst->src[i].nr] + inst->src[i].offset / REG_SIZE; in split_virtual_grfs()
1773 for (unsigned j = 1; j < regs_read(inst, i); j++) in split_virtual_grfs()
1817 foreach_block_and_inst(block, fs_inst, inst, cfg) { in split_virtual_grfs()
1818 if (inst->dst.file == VGRF) { in split_virtual_grfs()
1819 reg = vgrf_to_reg[inst->dst.nr] + inst->dst.offset / REG_SIZE; in split_virtual_grfs()
1820 inst->dst.nr = new_virtual_grf[reg]; in split_virtual_grfs()
1821 inst->dst.offset = new_reg_offset[reg] * REG_SIZE + in split_virtual_grfs()
1822 inst->dst.offset % REG_SIZE; in split_virtual_grfs()
1825 for (int i = 0; i < inst->sources; i++) { in split_virtual_grfs()
1826 if (inst->src[i].file == VGRF) { in split_virtual_grfs()
1827 reg = vgrf_to_reg[inst->src[i].nr] + inst->src[i].offset / REG_SIZE; in split_virtual_grfs()
1828 inst->src[i].nr = new_virtual_grf[reg]; in split_virtual_grfs()
1829 inst->src[i].offset = new_reg_offset[reg] * REG_SIZE + in split_virtual_grfs()
1830 inst->src[i].offset % REG_SIZE; in split_virtual_grfs()
1855 foreach_block_and_inst(block, const fs_inst, inst, cfg) { in compact_virtual_grfs()
1856 if (inst->dst.file == VGRF) in compact_virtual_grfs()
1857 remap_table[inst->dst.nr] = 0; in compact_virtual_grfs()
1859 for (int i = 0; i < inst->sources; i++) { in compact_virtual_grfs()
1860 if (inst->src[i].file == VGRF) in compact_virtual_grfs()
1861 remap_table[inst->src[i].nr] = 0; in compact_virtual_grfs()
1884 foreach_block_and_inst(block, fs_inst, inst, cfg) { in compact_virtual_grfs()
1885 if (inst->dst.file == VGRF) in compact_virtual_grfs()
1886 inst->dst.nr = remap_table[inst->dst.nr]; in compact_virtual_grfs()
1888 for (int i = 0; i < inst->sources; i++) { in compact_virtual_grfs()
1889 if (inst->src[i].file == VGRF) in compact_virtual_grfs()
1890 inst->src[i].nr = remap_table[inst->src[i].nr]; in compact_virtual_grfs()
2049 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in assign_constant_locations()
2050 for (int i = 0 ; i < inst->sources; i++) { in assign_constant_locations()
2051 if (inst->src[i].file != UNIFORM) in assign_constant_locations()
2064 assert(inst->src[i].offset % type_sz(inst->src[i].type) == 0); in assign_constant_locations()
2066 unsigned u = inst->src[i].nr + in assign_constant_locations()
2067 inst->src[i].offset / UNIFORM_SLOT_SIZE; in assign_constant_locations()
2073 if (inst->opcode == SHADER_OPCODE_MOV_INDIRECT && i == 0) { in assign_constant_locations()
2074 slots_read = DIV_ROUND_UP(inst->src[2].ud, UNIFORM_SLOT_SIZE); in assign_constant_locations()
2076 unsigned bytes_read = inst->components_read(i) * in assign_constant_locations()
2077 type_sz(inst->src[i].type); in assign_constant_locations()
2083 type_sz(inst->src[i].type)); in assign_constant_locations()
2275 foreach_block_and_inst_safe (block, fs_inst, inst, cfg) { in lower_constant_loads()
2277 const fs_builder ibld(this, block, inst); in lower_constant_loads()
2279 for (int i = 0; i < inst->sources; i++) { in lower_constant_loads()
2280 if (inst->src[i].file != UNIFORM) in lower_constant_loads()
2284 if (inst->opcode == SHADER_OPCODE_MOV_INDIRECT && i == 0) in lower_constant_loads()
2287 if (!get_pull_locs(inst->src[i], &index, &pull_index)) in lower_constant_loads()
2290 assert(inst->src[i].stride == 0); in lower_constant_loads()
2301 inst->src[i].file = VGRF; in lower_constant_loads()
2302 inst->src[i].nr = dst.nr; in lower_constant_loads()
2303 inst->src[i].offset = (base & (block_sz - 1)) + in lower_constant_loads()
2304 inst->src[i].offset % 4; in lower_constant_loads()
2309 if (inst->opcode == SHADER_OPCODE_MOV_INDIRECT && in lower_constant_loads()
2310 inst->src[0].file == UNIFORM) { in lower_constant_loads()
2312 if (!get_pull_locs(inst->src[0], &index, &pull_index)) in lower_constant_loads()
2315 VARYING_PULL_CONSTANT_LOAD(ibld, inst->dst, in lower_constant_loads()
2317 inst->src[1], in lower_constant_loads()
2319 inst->remove(block); in lower_constant_loads()
2332 foreach_block_and_inst(block, fs_inst, inst, cfg) { in opt_algebraic()
2333 switch (inst->opcode) { in opt_algebraic()
2335 if (inst->src[0].file != IMM) in opt_algebraic()
2338 if (inst->saturate) { in opt_algebraic()
2339 if (inst->dst.type != inst->src[0].type) in opt_algebraic()
2342 if (brw_saturate_immediate(inst->dst.type, in opt_algebraic()
2343 &inst->src[0].as_brw_reg())) { in opt_algebraic()
2344 inst->saturate = false; in opt_algebraic()
2351 if (inst->src[1].file != IMM) in opt_algebraic()
2355 if (inst->src[1].is_one()) { in opt_algebraic()
2356 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2357 inst->src[1] = reg_undef; in opt_algebraic()
2363 if (inst->src[1].is_negative_one()) { in opt_algebraic()
2364 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2365 inst->src[0].negate = !inst->src[0].negate; in opt_algebraic()
2366 inst->src[1] = reg_undef; in opt_algebraic()
2372 if (inst->src[1].is_zero()) { in opt_algebraic()
2373 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2374 inst->src[0] = inst->src[1]; in opt_algebraic()
2375 inst->src[1] = reg_undef; in opt_algebraic()
2380 if (inst->src[0].file == IMM) { in opt_algebraic()
2381 assert(inst->src[0].type == BRW_REGISTER_TYPE_F); in opt_algebraic()
2382 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2383 inst->src[0].f *= inst->src[1].f; in opt_algebraic()
2384 inst->src[1] = reg_undef; in opt_algebraic()
2390 if (inst->src[1].file != IMM) in opt_algebraic()
2394 if (inst->src[1].is_zero()) { in opt_algebraic()
2395 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2396 inst->src[1] = reg_undef; in opt_algebraic()
2401 if (inst->src[0].file == IMM) { in opt_algebraic()
2402 assert(inst->src[0].type == BRW_REGISTER_TYPE_F); in opt_algebraic()
2403 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2404 inst->src[0].f += inst->src[1].f; in opt_algebraic()
2405 inst->src[1] = reg_undef; in opt_algebraic()
2411 if (inst->src[0].equals(inst->src[1])) { in opt_algebraic()
2412 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2413 inst->src[1] = reg_undef; in opt_algebraic()
2419 if (inst->src[1].equals(inst->src[2])) { in opt_algebraic()
2420 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2421 inst->src[0] = inst->src[1]; in opt_algebraic()
2422 inst->src[1] = reg_undef; in opt_algebraic()
2423 inst->src[2] = reg_undef; in opt_algebraic()
2429 if (inst->conditional_mod == BRW_CONDITIONAL_GE && in opt_algebraic()
2430 inst->src[0].abs && in opt_algebraic()
2431 inst->src[0].negate && in opt_algebraic()
2432 inst->src[1].is_zero()) { in opt_algebraic()
2433 inst->src[0].abs = false; in opt_algebraic()
2434 inst->src[0].negate = false; in opt_algebraic()
2435 inst->conditional_mod = BRW_CONDITIONAL_Z; in opt_algebraic()
2441 if (inst->src[0].equals(inst->src[1])) { in opt_algebraic()
2442 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2443 inst->src[1] = reg_undef; in opt_algebraic()
2444 inst->predicate = BRW_PREDICATE_NONE; in opt_algebraic()
2445 inst->predicate_inverse = false; in opt_algebraic()
2447 } else if (inst->saturate && inst->src[1].file == IMM) { in opt_algebraic()
2448 switch (inst->conditional_mod) { in opt_algebraic()
2451 switch (inst->src[1].type) { in opt_algebraic()
2453 if (inst->src[1].f >= 1.0f) { in opt_algebraic()
2454 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2455 inst->src[1] = reg_undef; in opt_algebraic()
2456 inst->conditional_mod = BRW_CONDITIONAL_NONE; in opt_algebraic()
2466 switch (inst->src[1].type) { in opt_algebraic()
2468 if (inst->src[1].f <= 0.0f) { in opt_algebraic()
2469 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2470 inst->src[1] = reg_undef; in opt_algebraic()
2471 inst->conditional_mod = BRW_CONDITIONAL_NONE; in opt_algebraic()
2484 if (inst->src[1].is_zero() || inst->src[2].is_zero()) { in opt_algebraic()
2485 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2486 inst->src[1] = reg_undef; in opt_algebraic()
2487 inst->src[2] = reg_undef; in opt_algebraic()
2489 } else if (inst->src[0].is_zero()) { in opt_algebraic()
2490 inst->opcode = BRW_OPCODE_MUL; in opt_algebraic()
2491 inst->src[0] = inst->src[2]; in opt_algebraic()
2492 inst->src[2] = reg_undef; in opt_algebraic()
2494 } else if (inst->src[1].is_one()) { in opt_algebraic()
2495 inst->opcode = BRW_OPCODE_ADD; in opt_algebraic()
2496 inst->src[1] = inst->src[2]; in opt_algebraic()
2497 inst->src[2] = reg_undef; in opt_algebraic()
2499 } else if (inst->src[2].is_one()) { in opt_algebraic()
2500 inst->opcode = BRW_OPCODE_ADD; in opt_algebraic()
2501 inst->src[2] = reg_undef; in opt_algebraic()
2503 } else if (inst->src[1].file == IMM && inst->src[2].file == IMM) { in opt_algebraic()
2504 inst->opcode = BRW_OPCODE_ADD; in opt_algebraic()
2505 inst->src[1].f *= inst->src[2].f; in opt_algebraic()
2506 inst->src[2] = reg_undef; in opt_algebraic()
2511 if (is_uniform(inst->src[0])) { in opt_algebraic()
2512 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2513 inst->sources = 1; in opt_algebraic()
2514 inst->force_writemask_all = true; in opt_algebraic()
2516 } else if (inst->src[1].file == IMM) { in opt_algebraic()
2517 inst->opcode = BRW_OPCODE_MOV; in opt_algebraic()
2527 const unsigned comp = inst->src[1].ud & (inst->exec_size - 1); in opt_algebraic()
2528 inst->src[0] = component(inst->src[0], comp); in opt_algebraic()
2529 inst->sources = 1; in opt_algebraic()
2530 inst->force_writemask_all = true; in opt_algebraic()
2540 if (progress && inst->is_commutative()) { in opt_algebraic()
2541 if (inst->src[0].file == IMM) { in opt_algebraic()
2542 fs_reg tmp = inst->src[1]; in opt_algebraic()
2543 inst->src[1] = inst->src[0]; in opt_algebraic()
2544 inst->src[0] = tmp; in opt_algebraic()
2570 foreach_block_and_inst(block, fs_inst, inst, cfg) { in opt_zero_samples()
2571 if (!inst->is_tex()) in opt_zero_samples()
2574 fs_inst *load_payload = (fs_inst *) inst->prev; in opt_zero_samples()
2587 while (inst->mlen > inst->header_size + inst->exec_size / 8 && in opt_zero_samples()
2588 load_payload->src[(inst->mlen - inst->header_size) / in opt_zero_samples()
2589 (inst->exec_size / 8) + in opt_zero_samples()
2590 inst->header_size - 1].is_zero()) { in opt_zero_samples()
2591 inst->mlen -= inst->exec_size / 8; in opt_zero_samples()
2707 foreach_block_and_inst(block, fs_inst, inst, cfg) { in opt_register_renaming()
2708 if (inst->opcode == BRW_OPCODE_IF || inst->opcode == BRW_OPCODE_DO) { in opt_register_renaming()
2710 } else if (inst->opcode == BRW_OPCODE_ENDIF || in opt_register_renaming()
2711 inst->opcode == BRW_OPCODE_WHILE) { in opt_register_renaming()
2716 for (int i = 0; i < inst->sources; i++) { in opt_register_renaming()
2717 if (inst->src[i].file == VGRF && in opt_register_renaming()
2718 remap[inst->src[i].nr] != -1 && in opt_register_renaming()
2719 remap[inst->src[i].nr] != inst->src[i].nr) { in opt_register_renaming()
2720 inst->src[i].nr = remap[inst->src[i].nr]; in opt_register_renaming()
2725 const int dst = inst->dst.nr; in opt_register_renaming()
2728 inst->dst.file == VGRF && in opt_register_renaming()
2729 alloc.sizes[inst->dst.nr] * REG_SIZE == inst->size_written && in opt_register_renaming()
2730 !inst->is_partial_write()) { in opt_register_renaming()
2734 remap[dst] = alloc.allocate(regs_written(inst)); in opt_register_renaming()
2735 inst->dst.nr = remap[dst]; in opt_register_renaming()
2738 } else if (inst->dst.file == VGRF && in opt_register_renaming()
2741 inst->dst.nr = remap[dst]; in opt_register_renaming()
2776 foreach_inst_in_block_reverse(fs_inst, inst, last_bblock) { in opt_redundant_discard_jumps()
2777 if (inst->opcode == FS_OPCODE_PLACEHOLDER_HALT) { in opt_redundant_discard_jumps()
2778 placeholder_halt = inst; in opt_redundant_discard_jumps()
2828 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in compute_to_mrf()
2832 if (inst->opcode != BRW_OPCODE_MOV || in compute_to_mrf()
2833 inst->is_partial_write() || in compute_to_mrf()
2834 inst->dst.file != MRF || inst->src[0].file != VGRF || in compute_to_mrf()
2835 inst->dst.type != inst->src[0].type || in compute_to_mrf()
2836 inst->src[0].abs || inst->src[0].negate || in compute_to_mrf()
2837 !inst->src[0].is_contiguous() || in compute_to_mrf()
2838 inst->src[0].offset % REG_SIZE != 0) in compute_to_mrf()
2844 if (this->virtual_grf_end[inst->src[0].nr] > ip) in compute_to_mrf()
2852 unsigned regs_left = (1 << regs_read(inst, 0)) - 1; in compute_to_mrf()
2854 foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) { in compute_to_mrf()
2856 inst->src[0], inst->size_read(0))) { in compute_to_mrf()
2874 inst->src[0], inst->size_read(0))) in compute_to_mrf()
2892 inst->src[0], scan_inst->dst, scan_inst->size_written); in compute_to_mrf()
2910 inst->src[0], inst->size_read(0))) { in compute_to_mrf()
2918 inst->dst, inst->size_written)) { in compute_to_mrf()
2927 inst->dst, inst->size_written)) { in compute_to_mrf()
2943 regs_left = (1 << regs_read(inst, 0)) - 1; in compute_to_mrf()
2945 foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) { in compute_to_mrf()
2947 inst->src[0], inst->size_read(0))) { in compute_to_mrf()
2950 inst->src[0], scan_inst->dst, scan_inst->size_written); in compute_to_mrf()
2953 reg_offset(inst->src[0]); in compute_to_mrf()
2955 if (inst->dst.nr & BRW_MRF_COMPR4) { in compute_to_mrf()
2960 scan_inst->dst.nr = inst->dst.nr + rel_offset / REG_SIZE * 4; in compute_to_mrf()
2972 scan_inst->dst.nr = inst->dst.nr + rel_offset / REG_SIZE; in compute_to_mrf()
2976 scan_inst->dst.offset = inst->dst.offset + rel_offset % REG_SIZE; in compute_to_mrf()
2977 scan_inst->saturate |= inst->saturate; in compute_to_mrf()
2984 inst->remove(block); in compute_to_mrf()
3013 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in eliminate_find_live_channel()
3014 switch (inst->opcode) { in eliminate_find_live_channel()
3033 inst->opcode = BRW_OPCODE_MOV; in eliminate_find_live_channel()
3034 inst->src[0] = brw_imm_ud(0u); in eliminate_find_live_channel()
3035 inst->sources = 1; in eliminate_find_live_channel()
3036 inst->force_writemask_all = true; in eliminate_find_live_channel()
3124 foreach_block_and_inst_safe (block, fs_inst, inst, cfg) { in remove_duplicate_mrf_writes()
3125 if (inst->is_control_flow()) { in remove_duplicate_mrf_writes()
3129 if (inst->opcode == BRW_OPCODE_MOV && in remove_duplicate_mrf_writes()
3130 inst->dst.file == MRF) { in remove_duplicate_mrf_writes()
3131 fs_inst *prev_inst = last_mrf_move[inst->dst.nr]; in remove_duplicate_mrf_writes()
3132 if (prev_inst && inst->equals(prev_inst)) { in remove_duplicate_mrf_writes()
3133 inst->remove(block); in remove_duplicate_mrf_writes()
3140 if (inst->dst.file == MRF) { in remove_duplicate_mrf_writes()
3141 last_mrf_move[inst->dst.nr] = NULL; in remove_duplicate_mrf_writes()
3144 if (inst->mlen > 0 && inst->base_mrf != -1) { in remove_duplicate_mrf_writes()
3148 for (int i = 0; i < implied_mrf_writes(inst); i++) { in remove_duplicate_mrf_writes()
3149 last_mrf_move[inst->base_mrf + i] = NULL; in remove_duplicate_mrf_writes()
3156 regions_overlap(inst->dst, inst->size_written, in remove_duplicate_mrf_writes()
3163 if (inst->opcode == BRW_OPCODE_MOV && in remove_duplicate_mrf_writes()
3164 inst->dst.file == MRF && in remove_duplicate_mrf_writes()
3165 inst->src[0].file != ARF && in remove_duplicate_mrf_writes()
3166 !inst->is_partial_write()) { in remove_duplicate_mrf_writes()
3167 last_mrf_move[inst->dst.nr] = inst; in remove_duplicate_mrf_writes()
3193 foreach_inst_in_block_safe (fs_inst, inst, block) { in remove_extra_rounding_modes()
3194 if (inst->opcode == SHADER_OPCODE_RND_MODE) { in remove_extra_rounding_modes()
3195 assert(inst->src[0].file == BRW_IMMEDIATE_VALUE); in remove_extra_rounding_modes()
3196 const brw_rnd_mode mode = (brw_rnd_mode) inst->src[0].d; in remove_extra_rounding_modes()
3198 inst->remove(block); in remove_extra_rounding_modes()
3214 clear_deps_for_inst_src(fs_inst *inst, bool *deps, int first_grf, int grf_len) in clear_deps_for_inst_src() argument
3217 for (int i = 0; i < inst->sources; i++) { in clear_deps_for_inst_src()
3219 if (inst->src[i].file == VGRF || inst->src[i].file == FIXED_GRF) { in clear_deps_for_inst_src()
3220 grf = inst->src[i].nr; in clear_deps_for_inst_src()
3228 if (inst->exec_size == 16) in clear_deps_for_inst_src()
3252 fs_inst *inst) in insert_gen4_pre_send_dependency_workarounds() argument
3254 int write_len = regs_written(inst); in insert_gen4_pre_send_dependency_workarounds()
3255 int first_write_grf = inst->dst.nr; in insert_gen4_pre_send_dependency_workarounds()
3262 clear_deps_for_inst_src(inst, needs_dep, first_write_grf, write_len); in insert_gen4_pre_send_dependency_workarounds()
3269 foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) { in insert_gen4_pre_send_dependency_workarounds()
3276 DEP_RESOLVE_MOV(fs_builder(this, block, inst), in insert_gen4_pre_send_dependency_workarounds()
3293 DEP_RESOLVE_MOV(fs_builder(this, block, inst), reg); in insert_gen4_pre_send_dependency_workarounds()
3323 fs_visitor::insert_gen4_post_send_dependency_workarounds(bblock_t *block, fs_inst *inst) in insert_gen4_post_send_dependency_workarounds() argument
3325 int write_len = regs_written(inst); in insert_gen4_post_send_dependency_workarounds()
3326 int first_write_grf = inst->dst.nr; in insert_gen4_post_send_dependency_workarounds()
3335 foreach_inst_in_block_starting_from(fs_inst, scan_inst, inst) { in insert_gen4_post_send_dependency_workarounds()
3380 foreach_block_and_inst(block, fs_inst, inst, cfg) { in insert_gen4_send_dependency_workarounds()
3381 if (inst->mlen != 0 && inst->dst.file == VGRF) { in insert_gen4_send_dependency_workarounds()
3382 insert_gen4_pre_send_dependency_workarounds(block, inst); in insert_gen4_send_dependency_workarounds()
3383 insert_gen4_post_send_dependency_workarounds(block, inst); in insert_gen4_send_dependency_workarounds()
3411 foreach_block_and_inst (block, fs_inst, inst, cfg) { in lower_uniform_pull_constant_loads()
3412 if (inst->opcode != FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD) in lower_uniform_pull_constant_loads()
3416 const fs_builder ubld = fs_builder(this, block, inst).exec_all(); in lower_uniform_pull_constant_loads()
3422 brw_imm_ud(inst->src[1].ud / 16)); in lower_uniform_pull_constant_loads()
3424 inst->opcode = FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GEN7; in lower_uniform_pull_constant_loads()
3425 inst->src[1] = payload; in lower_uniform_pull_constant_loads()
3426 inst->header_size = 1; in lower_uniform_pull_constant_loads()
3427 inst->mlen = 1; in lower_uniform_pull_constant_loads()
3436 inst->base_mrf = FIRST_PULL_LOAD_MRF(devinfo->gen) + 1; in lower_uniform_pull_constant_loads()
3437 inst->mlen = 1; in lower_uniform_pull_constant_loads()
3447 foreach_block_and_inst_safe (block, fs_inst, inst, cfg) { in lower_load_payload()
3448 if (inst->opcode != SHADER_OPCODE_LOAD_PAYLOAD) in lower_load_payload()
3451 assert(inst->dst.file == MRF || inst->dst.file == VGRF); in lower_load_payload()
3452 assert(inst->saturate == false); in lower_load_payload()
3453 fs_reg dst = inst->dst; in lower_load_payload()
3459 const fs_builder ibld(this, block, inst); in lower_load_payload()
3462 for (uint8_t i = 0; i < inst->header_size; i++) { in lower_load_payload()
3463 if (inst->src[i].file != BAD_FILE) { in lower_load_payload()
3465 fs_reg mov_src = retype(inst->src[i], BRW_REGISTER_TYPE_UD); in lower_load_payload()
3471 if (inst->dst.file == MRF && (inst->dst.nr & BRW_MRF_COMPR4) && in lower_load_payload()
3472 inst->exec_size > 8) { in lower_load_payload()
3489 assert(inst->exec_size == 16); in lower_load_payload()
3490 assert(inst->header_size + 4 <= inst->sources); in lower_load_payload()
3491 for (uint8_t i = inst->header_size; i < inst->header_size + 4; i++) { in lower_load_payload()
3492 if (inst->src[i].file != BAD_FILE) { in lower_load_payload()
3494 fs_reg compr4_dst = retype(dst, inst->src[i].type); in lower_load_payload()
3496 ibld.MOV(compr4_dst, inst->src[i]); in lower_load_payload()
3499 fs_reg mov_dst = retype(dst, inst->src[i].type); in lower_load_payload()
3500 ibld.half(0).MOV(mov_dst, half(inst->src[i], 0)); in lower_load_payload()
3502 ibld.half(1).MOV(mov_dst, half(inst->src[i], 1)); in lower_load_payload()
3521 inst->header_size += 4; in lower_load_payload()
3524 for (uint8_t i = inst->header_size; i < inst->sources; i++) { in lower_load_payload()
3525 if (inst->src[i].file != BAD_FILE) in lower_load_payload()
3526 ibld.MOV(retype(dst, inst->src[i].type), inst->src[i]); in lower_load_payload()
3530 inst->remove(block); in lower_load_payload()
3545 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in lower_integer_multiplication()
3546 const fs_builder ibld(this, block, inst); in lower_integer_multiplication()
3548 if (inst->opcode == BRW_OPCODE_MUL) { in lower_integer_multiplication()
3549 if (inst->dst.is_accumulator() || in lower_integer_multiplication()
3550 (inst->dst.type != BRW_REGISTER_TYPE_D && in lower_integer_multiplication()
3551 inst->dst.type != BRW_REGISTER_TYPE_UD)) in lower_integer_multiplication()
3561 if (inst->src[1].file == IMM && in lower_integer_multiplication()
3562 inst->src[1].ud < (1 << 16)) { in lower_integer_multiplication()
3572 inst->dst.type); in lower_integer_multiplication()
3573 ibld.MOV(imm, inst->src[1]); in lower_integer_multiplication()
3574 ibld.MUL(inst->dst, imm, inst->src[0]); in lower_integer_multiplication()
3576 const bool ud = (inst->src[1].type == BRW_REGISTER_TYPE_UD); in lower_integer_multiplication()
3577 ibld.MUL(inst->dst, inst->src[0], in lower_integer_multiplication()
3578 ud ? brw_imm_uw(inst->src[1].ud) in lower_integer_multiplication()
3579 : brw_imm_w(inst->src[1].d)); in lower_integer_multiplication()
3628 fs_reg orig_dst = inst->dst; in lower_integer_multiplication()
3629 fs_reg low = inst->dst; in lower_integer_multiplication()
3631 regions_overlap(inst->dst, inst->size_written, in lower_integer_multiplication()
3632 inst->src[0], inst->size_read(0)) || in lower_integer_multiplication()
3633 regions_overlap(inst->dst, inst->size_written, in lower_integer_multiplication()
3634 inst->src[1], inst->size_read(1))) { in lower_integer_multiplication()
3637 low = fs_reg(VGRF, alloc.allocate(regs_written(inst)), in lower_integer_multiplication()
3638 inst->dst.type); in lower_integer_multiplication()
3639 low.stride = inst->dst.stride; in lower_integer_multiplication()
3640 low.offset = inst->dst.offset % REG_SIZE; in lower_integer_multiplication()
3644 fs_reg high(VGRF, alloc.allocate(regs_written(inst)), in lower_integer_multiplication()
3645 inst->dst.type); in lower_integer_multiplication()
3646 high.stride = inst->dst.stride; in lower_integer_multiplication()
3647 high.offset = inst->dst.offset % REG_SIZE; in lower_integer_multiplication()
3650 if (inst->src[1].file == IMM) { in lower_integer_multiplication()
3651 ibld.MUL(low, inst->src[0], in lower_integer_multiplication()
3652 brw_imm_uw(inst->src[1].ud & 0xffff)); in lower_integer_multiplication()
3653 ibld.MUL(high, inst->src[0], in lower_integer_multiplication()
3654 brw_imm_uw(inst->src[1].ud >> 16)); in lower_integer_multiplication()
3656 ibld.MUL(low, inst->src[0], in lower_integer_multiplication()
3657 subscript(inst->src[1], BRW_REGISTER_TYPE_UW, 0)); in lower_integer_multiplication()
3658 ibld.MUL(high, inst->src[0], in lower_integer_multiplication()
3659 subscript(inst->src[1], BRW_REGISTER_TYPE_UW, 1)); in lower_integer_multiplication()
3662 ibld.MUL(low, subscript(inst->src[0], BRW_REGISTER_TYPE_UW, 0), in lower_integer_multiplication()
3663 inst->src[1]); in lower_integer_multiplication()
3664 ibld.MUL(high, subscript(inst->src[0], BRW_REGISTER_TYPE_UW, 1), in lower_integer_multiplication()
3665 inst->src[1]); in lower_integer_multiplication()
3672 if (needs_mov || inst->conditional_mod) { in lower_integer_multiplication()
3673 set_condmod(inst->conditional_mod, in lower_integer_multiplication()
3678 } else if (inst->opcode == SHADER_OPCODE_MULH) { in lower_integer_multiplication()
3680 assert(inst->exec_size <= get_lowered_simd_width(devinfo, inst)); in lower_integer_multiplication()
3681 const fs_reg acc = retype(brw_acc_reg(inst->exec_size), in lower_integer_multiplication()
3682 inst->dst.type); in lower_integer_multiplication()
3683 fs_inst *mul = ibld.MUL(acc, inst->src[0], inst->src[1]); in lower_integer_multiplication()
3684 fs_inst *mach = ibld.MACH(inst->dst, inst->src[0], inst->src[1]); in lower_integer_multiplication()
3703 inst->group > 0) { in lower_integer_multiplication()
3722 mach->dst = ibld.vgrf(inst->dst.type); in lower_integer_multiplication()
3723 ibld.MOV(inst->dst, mach->dst); in lower_integer_multiplication()
3729 inst->remove(block); in lower_integer_multiplication()
3746 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in lower_minmax()
3747 const fs_builder ibld(this, block, inst); in lower_minmax()
3749 if (inst->opcode == BRW_OPCODE_SEL && in lower_minmax()
3750 inst->predicate == BRW_PREDICATE_NONE) { in lower_minmax()
3754 ibld.CMP(ibld.null_reg_d(), inst->src[0], inst->src[1], in lower_minmax()
3755 inst->conditional_mod); in lower_minmax()
3756 inst->predicate = BRW_PREDICATE_NORMAL; in lower_minmax()
3757 inst->conditional_mod = BRW_CONDITIONAL_NONE; in lower_minmax()
3789 lower_fb_write_logical_send(const fs_builder &bld, fs_inst *inst, in lower_fb_write_logical_send() argument
3794 assert(inst->src[FB_WRITE_LOGICAL_SRC_COMPONENTS].file == IMM); in lower_fb_write_logical_send()
3796 const fs_reg &color0 = inst->src[FB_WRITE_LOGICAL_SRC_COLOR0]; in lower_fb_write_logical_send()
3797 const fs_reg &color1 = inst->src[FB_WRITE_LOGICAL_SRC_COLOR1]; in lower_fb_write_logical_send()
3798 const fs_reg &src0_alpha = inst->src[FB_WRITE_LOGICAL_SRC_SRC0_ALPHA]; in lower_fb_write_logical_send()
3799 const fs_reg &src_depth = inst->src[FB_WRITE_LOGICAL_SRC_SRC_DEPTH]; in lower_fb_write_logical_send()
3800 const fs_reg &dst_depth = inst->src[FB_WRITE_LOGICAL_SRC_DST_DEPTH]; in lower_fb_write_logical_send()
3801 const fs_reg &src_stencil = inst->src[FB_WRITE_LOGICAL_SRC_SRC_STENCIL]; in lower_fb_write_logical_send()
3802 fs_reg sample_mask = inst->src[FB_WRITE_LOGICAL_SRC_OMASK]; in lower_fb_write_logical_send()
3804 inst->src[FB_WRITE_LOGICAL_SRC_COMPONENTS].ud; in lower_fb_write_logical_send()
3857 inst->group), in lower_fb_write_logical_send()
3874 } else if (key->replicate_alpha && inst->target != 0) { in lower_fb_write_logical_send()
3925 inst->src[0] = payload; in lower_fb_write_logical_send()
3926 inst->resize_sources(1); in lower_fb_write_logical_send()
3938 inst->resize_sources(0); in lower_fb_write_logical_send()
3939 inst->base_mrf = 1; in lower_fb_write_logical_send()
3942 inst->opcode = FS_OPCODE_FB_WRITE; in lower_fb_write_logical_send()
3943 inst->mlen = regs_written(load); in lower_fb_write_logical_send()
3944 inst->header_size = header_size; in lower_fb_write_logical_send()
3948 lower_fb_read_logical_send(const fs_builder &bld, fs_inst *inst) in lower_fb_read_logical_send() argument
3957 inst->resize_sources(1); in lower_fb_read_logical_send()
3958 inst->src[0] = header; in lower_fb_read_logical_send()
3959 inst->opcode = FS_OPCODE_FB_READ; in lower_fb_read_logical_send()
3960 inst->mlen = length; in lower_fb_read_logical_send()
3961 inst->header_size = length; in lower_fb_read_logical_send()
3965 lower_sampler_logical_send_gen4(const fs_builder &bld, fs_inst *inst, opcode op, in lower_sampler_logical_send_gen4() argument
4060 inst->opcode = op; in lower_sampler_logical_send_gen4()
4061 inst->src[0] = reg_undef; in lower_sampler_logical_send_gen4()
4062 inst->src[1] = surface; in lower_sampler_logical_send_gen4()
4063 inst->src[2] = sampler; in lower_sampler_logical_send_gen4()
4064 inst->resize_sources(3); in lower_sampler_logical_send_gen4()
4065 inst->base_mrf = msg_begin.nr; in lower_sampler_logical_send_gen4()
4066 inst->mlen = msg_end.nr - msg_begin.nr; in lower_sampler_logical_send_gen4()
4067 inst->header_size = 1; in lower_sampler_logical_send_gen4()
4071 lower_sampler_logical_send_gen5(const fs_builder &bld, fs_inst *inst, opcode op, in lower_sampler_logical_send_gen5() argument
4085 if (inst->offset != 0) { in lower_sampler_logical_send_gen5()
4154 inst->opcode = op; in lower_sampler_logical_send_gen5()
4155 inst->src[0] = reg_undef; in lower_sampler_logical_send_gen5()
4156 inst->src[1] = surface; in lower_sampler_logical_send_gen5()
4157 inst->src[2] = sampler; in lower_sampler_logical_send_gen5()
4158 inst->resize_sources(3); in lower_sampler_logical_send_gen5()
4159 inst->base_mrf = message.nr; in lower_sampler_logical_send_gen5()
4160 inst->mlen = msg_end.nr - message.nr; in lower_sampler_logical_send_gen5()
4161 inst->header_size = header_size; in lower_sampler_logical_send_gen5()
4164 assert(inst->mlen <= MAX_SAMPLER_MESSAGE_SIZE); in lower_sampler_logical_send_gen5()
4177 lower_sampler_logical_send_gen7(const fs_builder &bld, fs_inst *inst, opcode op, in lower_sampler_logical_send_gen7() argument
4197 inst->offset != 0 || inst->eot || in lower_sampler_logical_send_gen7()
4216 if (!inst->eot && regs_written(inst) != 4 * reg_width) { in lower_sampler_logical_send_gen7()
4217 assert(regs_written(inst) % reg_width == 0); in lower_sampler_logical_send_gen7()
4218 unsigned mask = ~((1 << (regs_written(inst) / reg_width)) - 1) & 0xf; in lower_sampler_logical_send_gen7()
4219 inst->offset |= mask << 12; in lower_sampler_logical_send_gen7()
4226 if (inst->offset) { in lower_sampler_logical_send_gen7()
4227 ubld1.MOV(component(header, 2), brw_imm_ud(inst->offset)); in lower_sampler_logical_send_gen7()
4402 inst->opcode = op; in lower_sampler_logical_send_gen7()
4403 inst->src[0] = src_payload; in lower_sampler_logical_send_gen7()
4404 inst->src[1] = surface; in lower_sampler_logical_send_gen7()
4405 inst->src[2] = sampler; in lower_sampler_logical_send_gen7()
4406 inst->resize_sources(3); in lower_sampler_logical_send_gen7()
4407 inst->mlen = mlen; in lower_sampler_logical_send_gen7()
4408 inst->header_size = header_size; in lower_sampler_logical_send_gen7()
4411 assert(inst->mlen <= MAX_SAMPLER_MESSAGE_SIZE); in lower_sampler_logical_send_gen7()
4415 lower_sampler_logical_send(const fs_builder &bld, fs_inst *inst, opcode op) in lower_sampler_logical_send() argument
4418 const fs_reg &coordinate = inst->src[TEX_LOGICAL_SRC_COORDINATE]; in lower_sampler_logical_send()
4419 const fs_reg &shadow_c = inst->src[TEX_LOGICAL_SRC_SHADOW_C]; in lower_sampler_logical_send()
4420 const fs_reg &lod = inst->src[TEX_LOGICAL_SRC_LOD]; in lower_sampler_logical_send()
4421 const fs_reg &lod2 = inst->src[TEX_LOGICAL_SRC_LOD2]; in lower_sampler_logical_send()
4422 const fs_reg &sample_index = inst->src[TEX_LOGICAL_SRC_SAMPLE_INDEX]; in lower_sampler_logical_send()
4423 const fs_reg &mcs = inst->src[TEX_LOGICAL_SRC_MCS]; in lower_sampler_logical_send()
4424 const fs_reg &surface = inst->src[TEX_LOGICAL_SRC_SURFACE]; in lower_sampler_logical_send()
4425 const fs_reg &sampler = inst->src[TEX_LOGICAL_SRC_SAMPLER]; in lower_sampler_logical_send()
4426 const fs_reg &tg4_offset = inst->src[TEX_LOGICAL_SRC_TG4_OFFSET]; in lower_sampler_logical_send()
4427 assert(inst->src[TEX_LOGICAL_SRC_COORD_COMPONENTS].file == IMM); in lower_sampler_logical_send()
4428 const unsigned coord_components = inst->src[TEX_LOGICAL_SRC_COORD_COMPONENTS].ud; in lower_sampler_logical_send()
4429 assert(inst->src[TEX_LOGICAL_SRC_GRAD_COMPONENTS].file == IMM); in lower_sampler_logical_send()
4430 const unsigned grad_components = inst->src[TEX_LOGICAL_SRC_GRAD_COMPONENTS].ud; in lower_sampler_logical_send()
4433 lower_sampler_logical_send_gen7(bld, inst, op, coordinate, in lower_sampler_logical_send()
4438 lower_sampler_logical_send_gen5(bld, inst, op, coordinate, in lower_sampler_logical_send()
4443 lower_sampler_logical_send_gen4(bld, inst, op, coordinate, in lower_sampler_logical_send()
4465 lower_surface_logical_send(const fs_builder &bld, fs_inst *inst, opcode op, in lower_surface_logical_send() argument
4469 const fs_reg &addr = inst->src[0]; in lower_surface_logical_send()
4470 const fs_reg &src = inst->src[1]; in lower_surface_logical_send()
4471 const fs_reg &surface = inst->src[2]; in lower_surface_logical_send()
4472 const UNUSED fs_reg &dims = inst->src[3]; in lower_surface_logical_send()
4473 const fs_reg &arg = inst->src[4]; in lower_surface_logical_send()
4476 const unsigned addr_sz = inst->components_read(0); in lower_surface_logical_send()
4477 const unsigned src_sz = inst->components_read(1); in lower_surface_logical_send()
4499 inst->opcode = op; in lower_surface_logical_send()
4500 inst->mlen = header_sz + (addr_sz + src_sz) * inst->exec_size / 8; in lower_surface_logical_send()
4501 inst->header_size = header_sz; in lower_surface_logical_send()
4503 inst->src[0] = payload; in lower_surface_logical_send()
4504 inst->src[1] = surface; in lower_surface_logical_send()
4505 inst->src[2] = arg; in lower_surface_logical_send()
4506 inst->resize_sources(3); in lower_surface_logical_send()
4512 lower_varying_pull_constant_logical_send(const fs_builder &bld, fs_inst *inst) in lower_varying_pull_constant_logical_send() argument
4522 bld.MOV(tmp, inst->src[1]); in lower_varying_pull_constant_logical_send()
4523 inst->src[1] = tmp; in lower_varying_pull_constant_logical_send()
4525 inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7; in lower_varying_pull_constant_logical_send()
4531 bld.MOV(byte_offset(payload, REG_SIZE), inst->src[1]); in lower_varying_pull_constant_logical_send()
4533 inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4; in lower_varying_pull_constant_logical_send()
4534 inst->resize_sources(1); in lower_varying_pull_constant_logical_send()
4535 inst->base_mrf = payload.nr; in lower_varying_pull_constant_logical_send()
4536 inst->header_size = 1; in lower_varying_pull_constant_logical_send()
4537 inst->mlen = 1 + inst->exec_size / 8; in lower_varying_pull_constant_logical_send()
4542 lower_math_logical_send(const fs_builder &bld, fs_inst *inst) in lower_math_logical_send() argument
4546 inst->base_mrf = 2; in lower_math_logical_send()
4547 inst->mlen = inst->sources * inst->exec_size / 8; in lower_math_logical_send()
4549 if (inst->sources > 1) { in lower_math_logical_send()
4559 const bool is_int_div = inst->opcode != SHADER_OPCODE_POW; in lower_math_logical_send()
4560 const fs_reg src0 = is_int_div ? inst->src[1] : inst->src[0]; in lower_math_logical_send()
4561 const fs_reg src1 = is_int_div ? inst->src[0] : inst->src[1]; in lower_math_logical_send()
4563 inst->resize_sources(1); in lower_math_logical_send()
4564 inst->src[0] = src0; in lower_math_logical_send()
4566 assert(inst->exec_size == 8); in lower_math_logical_send()
4567 bld.MOV(fs_reg(MRF, inst->base_mrf + 1, src1.type), src1); in lower_math_logical_send()
4576 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in lower_logical_sends()
4577 const fs_builder ibld(this, block, inst); in lower_logical_sends()
4579 switch (inst->opcode) { in lower_logical_sends()
4582 lower_fb_write_logical_send(ibld, inst, in lower_logical_sends()
4589 lower_fb_read_logical_send(ibld, inst); in lower_logical_sends()
4593 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TEX); in lower_logical_sends()
4597 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXD); in lower_logical_sends()
4601 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXF); in lower_logical_sends()
4605 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXL); in lower_logical_sends()
4609 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXS); in lower_logical_sends()
4613 lower_sampler_logical_send(ibld, inst, FS_OPCODE_TXB); in lower_logical_sends()
4617 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXF_CMS); in lower_logical_sends()
4621 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXF_CMS_W); in lower_logical_sends()
4625 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXF_UMS); in lower_logical_sends()
4629 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXF_MCS); in lower_logical_sends()
4633 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_LOD); in lower_logical_sends()
4637 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TG4); in lower_logical_sends()
4641 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TG4_OFFSET); in lower_logical_sends()
4645 lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_SAMPLEINFO); in lower_logical_sends()
4649 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4655 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4661 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4667 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4673 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4679 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4685 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4691 lower_surface_logical_send(ibld, inst, in lower_logical_sends()
4697 lower_varying_pull_constant_logical_send(ibld, inst); in lower_logical_sends()
4717 if (devinfo->gen < 6 && inst->mlen == 0) { in lower_logical_sends()
4718 lower_math_logical_send(ibld, inst); in lower_logical_sends()
4754 const fs_inst *inst) in get_fpu_lowered_simd_width() argument
4757 unsigned max_width = MIN2(32, inst->exec_size); in get_fpu_lowered_simd_width()
4768 unsigned reg_count = DIV_ROUND_UP(inst->size_written, REG_SIZE); in get_fpu_lowered_simd_width()
4770 for (unsigned i = 0; i < inst->sources; i++) in get_fpu_lowered_simd_width()
4771 reg_count = MAX2(reg_count, DIV_ROUND_UP(inst->size_read(i), REG_SIZE)); in get_fpu_lowered_simd_width()
4777 max_width = MIN2(max_width, inst->exec_size / DIV_ROUND_UP(reg_count, 2)); in get_fpu_lowered_simd_width()
4794 for (unsigned i = 0; i < inst->sources; i++) { in get_fpu_lowered_simd_width()
4796 const bool is_scalar_exception = is_uniform(inst->src[i]) && in get_fpu_lowered_simd_width()
4797 (devinfo->is_haswell || type_sz(inst->src[i].type) != 8); in get_fpu_lowered_simd_width()
4799 type_sz(inst->dst.type) == 4 && inst->dst.stride == 1 && in get_fpu_lowered_simd_width()
4800 type_sz(inst->src[i].type) == 2 && inst->src[i].stride == 1; in get_fpu_lowered_simd_width()
4802 if (inst->size_written > REG_SIZE && in get_fpu_lowered_simd_width()
4803 inst->size_read(i) != 0 && inst->size_read(i) <= REG_SIZE && in get_fpu_lowered_simd_width()
4805 const unsigned reg_count = DIV_ROUND_UP(inst->size_written, REG_SIZE); in get_fpu_lowered_simd_width()
4806 max_width = MIN2(max_width, inst->exec_size / reg_count); in get_fpu_lowered_simd_width()
4820 if (devinfo->gen < 8 && !inst->force_writemask_all) in get_fpu_lowered_simd_width()
4829 if (inst->conditional_mod && (devinfo->gen < 8 || inst->is_3src(devinfo))) in get_fpu_lowered_simd_width()
4837 if (inst->is_3src(devinfo) && !devinfo->supports_simd16_3src) in get_fpu_lowered_simd_width()
4838 max_width = MIN2(max_width, inst->exec_size / reg_count); in get_fpu_lowered_simd_width()
4852 if (devinfo->gen < 8 && inst->size_written > REG_SIZE && in get_fpu_lowered_simd_width()
4853 !inst->force_writemask_all) { in get_fpu_lowered_simd_width()
4854 const unsigned channels_per_grf = inst->exec_size / in get_fpu_lowered_simd_width()
4855 DIV_ROUND_UP(inst->size_written, REG_SIZE); in get_fpu_lowered_simd_width()
4856 const unsigned exec_type_size = get_exec_type_size(inst); in get_fpu_lowered_simd_width()
4871 (exec_type_size == 8 || type_sz(inst->dst.type) == 8)) in get_fpu_lowered_simd_width()
4897 const fs_inst *inst) in get_sampler_lowered_simd_width() argument
4907 !inst->components_read(TEX_LOGICAL_SRC_COORDINATE)) ? 0 : in get_sampler_lowered_simd_width()
4908 (devinfo->gen >= 5 && inst->opcode != SHADER_OPCODE_TXF_LOGICAL && in get_sampler_lowered_simd_width()
4909 inst->opcode != SHADER_OPCODE_TXF_CMS_LOGICAL) ? 4 : in get_sampler_lowered_simd_width()
4916 (inst->opcode == SHADER_OPCODE_TXL || in get_sampler_lowered_simd_width()
4917 inst->opcode == SHADER_OPCODE_TXF) && in get_sampler_lowered_simd_width()
4918 inst->src[TEX_LOGICAL_SRC_LOD].is_zero(); in get_sampler_lowered_simd_width()
4924 MAX2(inst->components_read(TEX_LOGICAL_SRC_COORDINATE), in get_sampler_lowered_simd_width()
4926 inst->components_read(TEX_LOGICAL_SRC_SHADOW_C) + in get_sampler_lowered_simd_width()
4927 (implicit_lod ? 0 : inst->components_read(TEX_LOGICAL_SRC_LOD)) + in get_sampler_lowered_simd_width()
4928 inst->components_read(TEX_LOGICAL_SRC_LOD2) + in get_sampler_lowered_simd_width()
4929 inst->components_read(TEX_LOGICAL_SRC_SAMPLE_INDEX) + in get_sampler_lowered_simd_width()
4930 (inst->opcode == SHADER_OPCODE_TG4_OFFSET_LOGICAL ? in get_sampler_lowered_simd_width()
4931 inst->components_read(TEX_LOGICAL_SRC_TG4_OFFSET) : 0) + in get_sampler_lowered_simd_width()
4932 inst->components_read(TEX_LOGICAL_SRC_MCS); in get_sampler_lowered_simd_width()
4938 return MIN2(inst->exec_size, in get_sampler_lowered_simd_width()
4950 const fs_inst *inst) in get_lowered_simd_width() argument
4952 switch (inst->opcode) { in get_lowered_simd_width()
4984 return get_fpu_lowered_simd_width(devinfo, inst); in get_lowered_simd_width()
4999 !inst->dst.is_null() ? 8 : ~0); in get_lowered_simd_width()
5000 return MIN2(max_width, get_fpu_lowered_simd_width(devinfo, inst)); in get_lowered_simd_width()
5009 get_fpu_lowered_simd_width(devinfo, inst)); in get_lowered_simd_width()
5012 assert(inst->src[0].file == BAD_FILE || inst->exec_size <= 16); in get_lowered_simd_width()
5013 return inst->exec_size; in get_lowered_simd_width()
5025 return (devinfo->gen >= 7 ? MIN2(16, inst->exec_size) : in get_lowered_simd_width()
5026 devinfo->gen == 5 || devinfo->is_g4x ? MIN2(16, inst->exec_size) : in get_lowered_simd_width()
5027 MIN2(8, inst->exec_size)); in get_lowered_simd_width()
5031 return (devinfo->gen >= 7 ? MIN2(16, inst->exec_size) : in get_lowered_simd_width()
5032 MIN2(8, inst->exec_size)); in get_lowered_simd_width()
5037 return MIN2(8, inst->exec_size); in get_lowered_simd_width()
5052 return MIN2(16, inst->exec_size); in get_lowered_simd_width()
5061 return (devinfo->gen == 4 ? 16 : MIN2(16, inst->exec_size)); in get_lowered_simd_width()
5090 MIN2(8, inst->exec_size) : MIN2(16, inst->exec_size)); in get_lowered_simd_width()
5097 get_fpu_lowered_simd_width(devinfo, inst)); in get_lowered_simd_width()
5104 inst->src[FB_WRITE_LOGICAL_SRC_SRC_DEPTH].file == BAD_FILE || in get_lowered_simd_width()
5105 inst->exec_size == 8); in get_lowered_simd_width()
5107 return (inst->src[FB_WRITE_LOGICAL_SRC_COLOR1].file != BAD_FILE ? in get_lowered_simd_width()
5108 8 : MIN2(16, inst->exec_size)); in get_lowered_simd_width()
5111 return MIN2(16, inst->exec_size); in get_lowered_simd_width()
5122 return get_sampler_lowered_simd_width(devinfo, inst); in get_lowered_simd_width()
5134 return inst->src[TEX_LOGICAL_SRC_SHADOW_C].file == BAD_FILE ? 16 : 8; in get_lowered_simd_width()
5136 return get_sampler_lowered_simd_width(devinfo, inst); in get_lowered_simd_width()
5146 return get_sampler_lowered_simd_width(devinfo, inst); in get_lowered_simd_width()
5158 return MIN2(16, inst->exec_size); in get_lowered_simd_width()
5166 return MIN2(8, inst->exec_size); in get_lowered_simd_width()
5181 max_size / (inst->dst.stride * type_sz(inst->dst.type)), in get_lowered_simd_width()
5182 inst->exec_size); in get_lowered_simd_width()
5187 DIV_ROUND_UP(inst->dst.component_size(inst->exec_size), REG_SIZE); in get_lowered_simd_width()
5194 assert(!inst->header_size); in get_lowered_simd_width()
5195 for (unsigned i = 0; i < inst->sources; i++) in get_lowered_simd_width()
5196 assert(type_sz(inst->dst.type) == type_sz(inst->src[i].type) || in get_lowered_simd_width()
5197 inst->src[i].file == BAD_FILE); in get_lowered_simd_width()
5199 return inst->exec_size / DIV_ROUND_UP(reg_count, 2); in get_lowered_simd_width()
5201 return inst->exec_size; in get_lowered_simd_width()
5205 return inst->exec_size; in get_lowered_simd_width()
5215 needs_src_copy(const fs_builder &lbld, const fs_inst *inst, unsigned i) in needs_src_copy() argument
5217 return !(is_periodic(inst->src[i], lbld.dispatch_width()) || in needs_src_copy()
5218 (inst->components_read(i) == 1 && in needs_src_copy()
5219 lbld.dispatch_width() <= inst->exec_size)) || in needs_src_copy()
5220 (inst->flags_written() & in needs_src_copy()
5221 flag_mask(inst->src[i], type_sz(inst->src[i].type))); in needs_src_copy()
5230 emit_unzip(const fs_builder &lbld, fs_inst *inst, unsigned i) in emit_unzip() argument
5233 const fs_reg src = horiz_offset(inst->src[i], lbld.group()); in emit_unzip()
5235 if (needs_src_copy(lbld, inst, i)) { in emit_unzip()
5241 inst->exec_size), 0); in emit_unzip()
5242 const fs_reg tmp = lbld.vgrf(inst->src[i].type, inst->components_read(i)); in emit_unzip()
5244 for (unsigned k = 0; k < inst->components_read(i); ++k) in emit_unzip()
5245 cbld.MOV(offset(tmp, lbld, k), offset(src, inst->exec_size, k)); in emit_unzip()
5249 } else if (is_periodic(inst->src[i], lbld.dispatch_width())) { in emit_unzip()
5253 return inst->src[i]; in emit_unzip()
5270 needs_dst_copy(const fs_builder &lbld, const fs_inst *inst) in needs_dst_copy() argument
5276 if (inst->size_written > inst->dst.component_size(inst->exec_size)) in needs_dst_copy()
5283 if (lbld.dispatch_width() > inst->exec_size) in needs_dst_copy()
5286 for (unsigned i = 0; i < inst->sources; i++) { in needs_dst_copy()
5290 if (needs_src_copy(lbld, inst, i)) in needs_dst_copy()
5299 if (regions_overlap(inst->dst, inst->size_written, in needs_dst_copy()
5300 inst->src[i], inst->size_read(i)) && in needs_dst_copy()
5301 !inst->dst.equals(inst->src[i])) in needs_dst_copy()
5318 fs_inst *inst) in emit_zip() argument
5324 const fs_reg dst = horiz_offset(inst->dst, lbld_after.group()); in emit_zip()
5325 const unsigned dst_size = inst->size_written / in emit_zip()
5326 inst->dst.component_size(inst->exec_size); in emit_zip()
5328 if (needs_dst_copy(lbld_after, inst)) { in emit_zip()
5329 const fs_reg tmp = lbld_after.vgrf(inst->dst.type, dst_size); in emit_zip()
5331 if (inst->predicate) { in emit_zip()
5338 inst->exec_size), 0); in emit_zip()
5341 offset(dst, inst->exec_size, k)); in emit_zip()
5347 inst->exec_size), 0); in emit_zip()
5353 gbld_after.MOV(offset(dst, inst->exec_size, k), in emit_zip()
5372 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in lower_simd_width()
5373 const unsigned lower_width = get_lowered_simd_width(devinfo, inst); in lower_simd_width()
5375 if (lower_width != inst->exec_size) { in lower_simd_width()
5381 const unsigned max_width = MAX2(inst->exec_size, lower_width); in lower_simd_width()
5382 const fs_builder ibld = bld.at(block, inst) in lower_simd_width()
5383 .exec_all(inst->force_writemask_all) in lower_simd_width()
5384 .group(max_width, inst->group / max_width); in lower_simd_width()
5389 const unsigned n = DIV_ROUND_UP(inst->exec_size, lower_width); in lower_simd_width()
5390 const unsigned dst_size = inst->size_written / in lower_simd_width()
5391 inst->dst.component_size(inst->exec_size); in lower_simd_width()
5393 assert(!inst->writes_accumulator && !inst->mlen); in lower_simd_width()
5408 exec_node *const after_inst = inst->next; in lower_simd_width()
5414 fs_inst split_inst = *inst; in lower_simd_width()
5416 split_inst.eot = inst->eot && i == 0; in lower_simd_width()
5424 for (unsigned j = 0; j < inst->sources; j++) in lower_simd_width()
5425 split_inst.src[j] = emit_unzip(lbld.at(block, inst), inst, j); in lower_simd_width()
5427 split_inst.dst = emit_zip(lbld.at(block, inst), in lower_simd_width()
5428 lbld.at(block, after_inst), inst); in lower_simd_width()
5432 lbld.at(block, inst->next).emit(split_inst); in lower_simd_width()
5435 inst->remove(block); in lower_simd_width()
5465 foreach_block_and_inst(block, backend_instruction, inst, cfg) { in dump_instructions()
5468 dump_instruction(inst, file); in dump_instructions()
5474 foreach_in_list(backend_instruction, inst, &instructions) { in dump_instructions()
5476 dump_instruction(inst, file); in dump_instructions()
5494 fs_inst *inst = (fs_inst *)be_inst; in dump_instruction() local
5496 if (inst->predicate) { in dump_instruction()
5498 inst->predicate_inverse ? '-' : '+', in dump_instruction()
5499 inst->flag_subreg); in dump_instruction()
5502 fprintf(file, "%s", brw_instruction_name(devinfo, inst->opcode)); in dump_instruction()
5503 if (inst->saturate) in dump_instruction()
5505 if (inst->conditional_mod) { in dump_instruction()
5506 fprintf(file, "%s", conditional_modifier[inst->conditional_mod]); in dump_instruction()
5507 if (!inst->predicate && in dump_instruction()
5508 (devinfo->gen < 5 || (inst->opcode != BRW_OPCODE_SEL && in dump_instruction()
5509 inst->opcode != BRW_OPCODE_IF && in dump_instruction()
5510 inst->opcode != BRW_OPCODE_WHILE))) { in dump_instruction()
5511 fprintf(file, ".f0.%d", inst->flag_subreg); in dump_instruction()
5514 fprintf(file, "(%d) ", inst->exec_size); in dump_instruction()
5516 if (inst->mlen) { in dump_instruction()
5517 fprintf(file, "(mlen: %d) ", inst->mlen); in dump_instruction()
5520 if (inst->eot) { in dump_instruction()
5524 switch (inst->dst.file) { in dump_instruction()
5526 fprintf(file, "vgrf%d", inst->dst.nr); in dump_instruction()
5529 fprintf(file, "g%d", inst->dst.nr); in dump_instruction()
5532 fprintf(file, "m%d", inst->dst.nr); in dump_instruction()
5538 fprintf(file, "***u%d***", inst->dst.nr); in dump_instruction()
5541 fprintf(file, "***attr%d***", inst->dst.nr); in dump_instruction()
5544 switch (inst->dst.nr) { in dump_instruction()
5549 fprintf(file, "a0.%d", inst->dst.subnr); in dump_instruction()
5552 fprintf(file, "acc%d", inst->dst.subnr); in dump_instruction()
5555 fprintf(file, "f%d.%d", inst->dst.nr & 0xf, inst->dst.subnr); in dump_instruction()
5558 fprintf(file, "arf%d.%d", inst->dst.nr & 0xf, inst->dst.subnr); in dump_instruction()
5566 if (inst->dst.offset || in dump_instruction()
5567 (inst->dst.file == VGRF && in dump_instruction()
5568 alloc.sizes[inst->dst.nr] * REG_SIZE != inst->size_written)) { in dump_instruction()
5569 const unsigned reg_size = (inst->dst.file == UNIFORM ? 4 : REG_SIZE); in dump_instruction()
5570 fprintf(file, "+%d.%d", inst->dst.offset / reg_size, in dump_instruction()
5571 inst->dst.offset % reg_size); in dump_instruction()
5574 if (inst->dst.stride != 1) in dump_instruction()
5575 fprintf(file, "<%u>", inst->dst.stride); in dump_instruction()
5576 fprintf(file, ":%s, ", brw_reg_type_to_letters(inst->dst.type)); in dump_instruction()
5578 for (int i = 0; i < inst->sources; i++) { in dump_instruction()
5579 if (inst->src[i].negate) in dump_instruction()
5581 if (inst->src[i].abs) in dump_instruction()
5583 switch (inst->src[i].file) { in dump_instruction()
5585 fprintf(file, "vgrf%d", inst->src[i].nr); in dump_instruction()
5588 fprintf(file, "g%d", inst->src[i].nr); in dump_instruction()
5591 fprintf(file, "***m%d***", inst->src[i].nr); in dump_instruction()
5594 fprintf(file, "attr%d", inst->src[i].nr); in dump_instruction()
5597 fprintf(file, "u%d", inst->src[i].nr); in dump_instruction()
5603 switch (inst->src[i].type) { in dump_instruction()
5605 fprintf(file, "%-gf", inst->src[i].f); in dump_instruction()
5608 fprintf(file, "%fdf", inst->src[i].df); in dump_instruction()
5612 fprintf(file, "%dd", inst->src[i].d); in dump_instruction()
5616 fprintf(file, "%uu", inst->src[i].ud); in dump_instruction()
5620 brw_vf_to_float((inst->src[i].ud >> 0) & 0xff), in dump_instruction()
5621 brw_vf_to_float((inst->src[i].ud >> 8) & 0xff), in dump_instruction()
5622 brw_vf_to_float((inst->src[i].ud >> 16) & 0xff), in dump_instruction()
5623 brw_vf_to_float((inst->src[i].ud >> 24) & 0xff)); in dump_instruction()
5631 switch (inst->src[i].nr) { in dump_instruction()
5636 fprintf(file, "a0.%d", inst->src[i].subnr); in dump_instruction()
5639 fprintf(file, "acc%d", inst->src[i].subnr); in dump_instruction()
5642 fprintf(file, "f%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr); in dump_instruction()
5645 fprintf(file, "arf%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr); in dump_instruction()
5651 if (inst->src[i].offset || in dump_instruction()
5652 (inst->src[i].file == VGRF && in dump_instruction()
5653 alloc.sizes[inst->src[i].nr] * REG_SIZE != inst->size_read(i))) { in dump_instruction()
5654 const unsigned reg_size = (inst->src[i].file == UNIFORM ? 4 : REG_SIZE); in dump_instruction()
5655 fprintf(file, "+%d.%d", inst->src[i].offset / reg_size, in dump_instruction()
5656 inst->src[i].offset % reg_size); in dump_instruction()
5659 if (inst->src[i].abs) in dump_instruction()
5662 if (inst->src[i].file != IMM) { in dump_instruction()
5664 if (inst->src[i].file == ARF || inst->src[i].file == FIXED_GRF) { in dump_instruction()
5665 unsigned hstride = inst->src[i].hstride; in dump_instruction()
5668 stride = inst->src[i].stride; in dump_instruction()
5673 fprintf(file, ":%s", brw_reg_type_to_letters(inst->src[i].type)); in dump_instruction()
5676 if (i < inst->sources - 1 && inst->src[i + 1].file != BAD_FILE) in dump_instruction()
5682 if (inst->force_writemask_all) in dump_instruction()
5685 if (inst->exec_size != dispatch_width) in dump_instruction()
5686 fprintf(file, "group%d ", inst->group); in dump_instruction()
5904 foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { in opt_drop_redundant_mov_to_flags()
5905 if (inst->is_control_flow()) { in opt_drop_redundant_mov_to_flags()
5907 } else if (inst->opcode == FS_OPCODE_MOV_DISPATCH_TO_FLAGS) { in opt_drop_redundant_mov_to_flags()
5908 if (!flag_mov_found[inst->flag_subreg]) { in opt_drop_redundant_mov_to_flags()
5909 flag_mov_found[inst->flag_subreg] = true; in opt_drop_redundant_mov_to_flags()
5911 inst->remove(block); in opt_drop_redundant_mov_to_flags()
5914 } else if (inst->flags_written()) { in opt_drop_redundant_mov_to_flags()
5915 flag_mov_found[inst->flag_subreg] = false; in opt_drop_redundant_mov_to_flags()
6080 foreach_block_and_inst_safe (block, fs_inst, inst, cfg) { in fixup_3src_null_dest()
6081 if (inst->is_3src(devinfo) && inst->dst.is_null()) { in fixup_3src_null_dest()
6082 inst->dst = fs_reg(VGRF, alloc.allocate(dispatch_width / 8), in fixup_3src_null_dest()
6083 inst->dst.type); in fixup_3src_null_dest()
6291 fs_inst *inst = bld.emit(SHADER_OPCODE_URB_WRITE_SIMD8_MASKED, in run_tcs_single_patch() local
6293 inst->mlen = 3; in run_tcs_single_patch()
6294 inst->eot = true; in run_tcs_single_patch()