• Home
  • Raw
  • Download

Lines Matching refs:alu

500 	struct r600_bytecode_alu alu;  in evergreen_interp_alu()  local
509 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in evergreen_interp_alu()
512 alu.op = ALU_OP2_INTERP_ZW; in evergreen_interp_alu()
514 alu.op = ALU_OP2_INTERP_XY; in evergreen_interp_alu()
517 alu.dst.sel = ctx->shader->input[input].gpr; in evergreen_interp_alu()
518 alu.dst.write = 1; in evergreen_interp_alu()
521 alu.dst.chan = i % 4; in evergreen_interp_alu()
523 alu.src[0].sel = gpr; in evergreen_interp_alu()
524 alu.src[0].chan = (base_chan - (i % 2)); in evergreen_interp_alu()
526 alu.src[1].sel = V_SQ_ALU_SRC_PARAM_BASE + ctx->shader->input[input].lds_pos; in evergreen_interp_alu()
528 alu.bank_swizzle_force = SQ_ALU_VEC_210; in evergreen_interp_alu()
530 alu.last = 1; in evergreen_interp_alu()
531 r = r600_bytecode_add_alu(ctx->bc, &alu); in evergreen_interp_alu()
541 struct r600_bytecode_alu alu; in evergreen_interp_flat() local
544 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in evergreen_interp_flat()
546 alu.op = ALU_OP1_INTERP_LOAD_P0; in evergreen_interp_flat()
548 alu.dst.sel = ctx->shader->input[input].gpr; in evergreen_interp_flat()
549 alu.dst.write = 1; in evergreen_interp_flat()
551 alu.dst.chan = i; in evergreen_interp_flat()
553 alu.src[0].sel = V_SQ_ALU_SRC_PARAM_BASE + ctx->shader->input[input].lds_pos; in evergreen_interp_flat()
554 alu.src[0].chan = i; in evergreen_interp_flat()
557 alu.last = 1; in evergreen_interp_flat()
558 r = r600_bytecode_add_alu(ctx->bc, &alu); in evergreen_interp_flat()
688 struct r600_bytecode_alu alu; in select_twoside_color() local
694 memset(&alu, 0, sizeof(alu)); in select_twoside_color()
695 alu.op = ALU_OP3_CNDGT; in select_twoside_color()
696 alu.is_op3 = 1; in select_twoside_color()
697 alu.dst.write = 1; in select_twoside_color()
698 alu.dst.sel = gpr_front; in select_twoside_color()
699 alu.src[0].sel = ctx->face_gpr; in select_twoside_color()
700 alu.src[1].sel = gpr_front; in select_twoside_color()
701 alu.src[2].sel = gpr_back; in select_twoside_color()
703 alu.dst.chan = i; in select_twoside_color()
704 alu.src[1].chan = i; in select_twoside_color()
705 alu.src[2].chan = i; in select_twoside_color()
706 alu.last = (i==3); in select_twoside_color()
708 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in select_twoside_color()
721 struct r600_bytecode_alu alu; in single_alu_op2() local
726 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in single_alu_op2()
727 alu.op = op; in single_alu_op2()
728 alu.src[0].sel = src0_sel; in single_alu_op2()
730 alu.src[0].value = src0_chan_val; in single_alu_op2()
732 alu.src[0].chan = src0_chan_val; in single_alu_op2()
733 alu.src[1].sel = src1_sel; in single_alu_op2()
735 alu.src[1].value = src1_chan_val; in single_alu_op2()
737 alu.src[1].chan = src1_chan_val; in single_alu_op2()
738 alu.dst.sel = dst_sel; in single_alu_op2()
739 alu.dst.chan = i; in single_alu_op2()
740 alu.dst.write = i == dst_chan; in single_alu_op2()
741 alu.last = (i == 3); in single_alu_op2()
742 r = r600_bytecode_add_alu(ctx->bc, &alu); in single_alu_op2()
749 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in single_alu_op2()
750 alu.op = op; in single_alu_op2()
751 alu.src[0].sel = src0_sel; in single_alu_op2()
753 alu.src[0].value = src0_chan_val; in single_alu_op2()
755 alu.src[0].chan = src0_chan_val; in single_alu_op2()
756 alu.src[1].sel = src1_sel; in single_alu_op2()
758 alu.src[1].value = src1_chan_val; in single_alu_op2()
760 alu.src[1].chan = src1_chan_val; in single_alu_op2()
761 alu.dst.sel = dst_sel; in single_alu_op2()
762 alu.dst.chan = dst_chan; in single_alu_op2()
763 alu.dst.write = 1; in single_alu_op2()
764 alu.last = 1; in single_alu_op2()
765 r = r600_bytecode_add_alu(ctx->bc, &alu); in single_alu_op2()
778 struct r600_bytecode_alu alu; in single_alu_op3() local
783 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in single_alu_op3()
784 alu.op = op; in single_alu_op3()
785 alu.src[0].sel = src0_sel; in single_alu_op3()
787 alu.src[0].value = src0_chan_val; in single_alu_op3()
789 alu.src[0].chan = src0_chan_val; in single_alu_op3()
790 alu.src[1].sel = src1_sel; in single_alu_op3()
792 alu.src[1].value = src1_chan_val; in single_alu_op3()
794 alu.src[1].chan = src1_chan_val; in single_alu_op3()
795 alu.src[2].sel = src2_sel; in single_alu_op3()
797 alu.src[2].value = src2_chan_val; in single_alu_op3()
799 alu.src[2].chan = src2_chan_val; in single_alu_op3()
800 alu.dst.sel = dst_sel; in single_alu_op3()
801 alu.dst.chan = dst_chan; in single_alu_op3()
802 alu.is_op3 = 1; in single_alu_op3()
803 alu.last = 1; in single_alu_op3()
804 r = r600_bytecode_add_alu(ctx->bc, &alu); in single_alu_op3()
858 struct r600_bytecode_alu alu; in tgsi_barrier() local
861 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_barrier()
862 alu.op = ctx->inst_info->op; in tgsi_barrier()
863 alu.last = 1; in tgsi_barrier()
865 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_barrier()
1038 struct r600_bytecode_alu alu; in tgsi_declaration() local
1039 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_declaration()
1040 alu.op = ALU_OP1_MOV; in tgsi_declaration()
1041 alu.src[0].sel = 0; in tgsi_declaration()
1042 alu.src[0].chan = 0 + i; in tgsi_declaration()
1043 alu.dst.sel = 1; in tgsi_declaration()
1044 alu.dst.chan = 0 + i; in tgsi_declaration()
1045 alu.dst.write = 1; in tgsi_declaration()
1046 alu.last = (i == 1) ? 1 : 0; in tgsi_declaration()
1047 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_declaration()
1051 struct r600_bytecode_alu alu; in tgsi_declaration() local
1052 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_declaration()
1053 alu.op = ALU_OP2_ADD; in tgsi_declaration()
1054 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_declaration()
1055 alu.src[1].sel = 1; in tgsi_declaration()
1056 alu.src[1].chan = 0; in tgsi_declaration()
1057 alu.src[1].neg = 1; in tgsi_declaration()
1058 alu.dst.sel = 1; in tgsi_declaration()
1059 alu.dst.chan = 2; in tgsi_declaration()
1060 alu.dst.write = 1; in tgsi_declaration()
1061 alu.last = 1; in tgsi_declaration()
1062 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_declaration()
1066 alu.op = ALU_OP2_ADD; in tgsi_declaration()
1067 alu.src[0].sel = 1; in tgsi_declaration()
1068 alu.src[0].chan = 2; in tgsi_declaration()
1069 alu.src[1].sel = 1; in tgsi_declaration()
1070 alu.src[1].chan = 1; in tgsi_declaration()
1071 alu.src[1].neg = 1; in tgsi_declaration()
1072 alu.dst.sel = 1; in tgsi_declaration()
1073 alu.dst.chan = 2; in tgsi_declaration()
1074 alu.dst.write = 1; in tgsi_declaration()
1075 alu.last = 1; in tgsi_declaration()
1076 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_declaration()
1271 struct r600_bytecode_alu alu; in load_sample_position() local
1273 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_sample_position()
1274 alu.op = ALU_OP1_MOV; in load_sample_position()
1275 r600_bytecode_src(&alu.src[0], sample_id, chan_sel); in load_sample_position()
1276 alu.dst.sel = t1; in load_sample_position()
1277 alu.dst.write = 1; in load_sample_position()
1278 alu.last = 1; in load_sample_position()
1279 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_sample_position()
1318 struct r600_bytecode_alu alu; in load_block_grid_size() local
1319 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_block_grid_size()
1320 alu.op = ALU_OP1_MOV; in load_block_grid_size()
1321 alu.src[0].sel = V_SQ_ALU_SRC_0; in load_block_grid_size()
1322 alu.dst.sel = t1; in load_block_grid_size()
1323 alu.dst.write = 1; in load_block_grid_size()
1324 alu.last = 1; in load_block_grid_size()
1325 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_block_grid_size()
1496 struct r600_bytecode_alu alu; in tgsi_fetch_rel_const() local
1498 memset(&alu, 0, sizeof(alu)); in tgsi_fetch_rel_const()
1500 alu.op = ALU_OP2_ADD_INT; in tgsi_fetch_rel_const()
1501 alu.src[0].sel = ctx->bc->ar_reg; in tgsi_fetch_rel_const()
1502 alu.src[0].chan = ar_chan; in tgsi_fetch_rel_const()
1504 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_fetch_rel_const()
1505 alu.src[1].value = offset; in tgsi_fetch_rel_const()
1507 alu.dst.sel = dst_reg; in tgsi_fetch_rel_const()
1508 alu.dst.chan = ar_chan; in tgsi_fetch_rel_const()
1509 alu.dst.write = 1; in tgsi_fetch_rel_const()
1510 alu.last = 1; in tgsi_fetch_rel_const()
1512 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_fetch_rel_const()
1564 struct r600_bytecode_alu alu; in fetch_gs_input() local
1585 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in fetch_gs_input()
1586 alu.op = ALU_OP1_MOV; in fetch_gs_input()
1587 alu.src[0].sel = ctx->gs_rotated_input[0]; in fetch_gs_input()
1588 alu.src[0].chan = i == 2 ? 3 : i; in fetch_gs_input()
1589 alu.dst.sel = treg[i]; in fetch_gs_input()
1590 alu.dst.chan = 0; in fetch_gs_input()
1591 alu.dst.write = 1; in fetch_gs_input()
1592 alu.last = 1; in fetch_gs_input()
1593 r = r600_bytecode_add_alu(ctx->bc, &alu); in fetch_gs_input()
1597 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in fetch_gs_input()
1598 alu.op = ALU_OP1_MOV; in fetch_gs_input()
1599 alu.src[0].sel = treg[0]; in fetch_gs_input()
1600 alu.src[0].rel = 1; in fetch_gs_input()
1601 alu.dst.sel = t2; in fetch_gs_input()
1602 alu.dst.write = 1; in fetch_gs_input()
1603 alu.last = 1; in fetch_gs_input()
1604 r = r600_bytecode_add_alu(ctx->bc, &alu); in fetch_gs_input()
1813 struct r600_bytecode_alu alu; in do_lds_fetch_values() local
1836 memset(&alu, 0, sizeof(alu)); in do_lds_fetch_values()
1837 alu.op = LDS_OP1_LDS_READ_RET; in do_lds_fetch_values()
1838 alu.src[0].sel = temp_reg; in do_lds_fetch_values()
1839 alu.src[0].chan = i; in do_lds_fetch_values()
1840 alu.src[1].sel = V_SQ_ALU_SRC_0; in do_lds_fetch_values()
1841 alu.src[2].sel = V_SQ_ALU_SRC_0; in do_lds_fetch_values()
1842 alu.dst.chan = 0; in do_lds_fetch_values()
1843 alu.is_lds_idx_op = true; in do_lds_fetch_values()
1844 alu.last = 1; in do_lds_fetch_values()
1845 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_lds_fetch_values()
1854 memset(&alu, 0, sizeof(alu)); in do_lds_fetch_values()
1856 alu.op = ALU_OP1_MOV; in do_lds_fetch_values()
1857 alu.src[0].sel = EG_V_SQ_ALU_SRC_LDS_OQ_A_POP; in do_lds_fetch_values()
1858 alu.src[0].chan = 0; in do_lds_fetch_values()
1859 alu.dst.sel = dst_reg; in do_lds_fetch_values()
1860 alu.dst.chan = i; in do_lds_fetch_values()
1861 alu.dst.write = 1; in do_lds_fetch_values()
1862 alu.last = 1; in do_lds_fetch_values()
1863 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_lds_fetch_values()
1983 struct r600_bytecode_alu alu; in tgsi_split_constant() local
2011 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_split_constant()
2012 alu.op = ALU_OP1_MOV; in tgsi_split_constant()
2013 alu.src[0].sel = ctx->src[i].sel; in tgsi_split_constant()
2014 alu.src[0].chan = k; in tgsi_split_constant()
2015 alu.src[0].rel = ctx->src[i].rel; in tgsi_split_constant()
2016 alu.src[0].kc_bank = ctx->src[i].kc_bank; in tgsi_split_constant()
2017 alu.src[0].kc_rel = ctx->src[i].kc_rel; in tgsi_split_constant()
2018 alu.dst.sel = treg; in tgsi_split_constant()
2019 alu.dst.chan = k; in tgsi_split_constant()
2020 alu.dst.write = 1; in tgsi_split_constant()
2022 alu.last = 1; in tgsi_split_constant()
2023 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_split_constant()
2039 struct r600_bytecode_alu alu; in tgsi_split_literal_constant() local
2051 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_split_literal_constant()
2052 alu.op = ALU_OP1_MOV; in tgsi_split_literal_constant()
2053 alu.src[0].sel = ctx->src[i].sel; in tgsi_split_literal_constant()
2054 alu.src[0].chan = k; in tgsi_split_literal_constant()
2055 alu.src[0].value = ctx->src[i].value[k]; in tgsi_split_literal_constant()
2056 alu.dst.sel = treg; in tgsi_split_literal_constant()
2057 alu.dst.chan = k; in tgsi_split_literal_constant()
2058 alu.dst.write = 1; in tgsi_split_literal_constant()
2060 alu.last = 1; in tgsi_split_literal_constant()
2061 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_split_literal_constant()
2124 struct r600_bytecode_alu alu; in emit_streamout() local
2125 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_streamout()
2126 alu.op = ALU_OP1_MOV; in emit_streamout()
2127 alu.src[0].sel = so_gpr[i]; in emit_streamout()
2128 alu.src[0].chan = so->output[i].start_component + j; in emit_streamout()
2130 alu.dst.sel = tmp; in emit_streamout()
2131 alu.dst.chan = j; in emit_streamout()
2132 alu.dst.write = 1; in emit_streamout()
2134 alu.last = 1; in emit_streamout()
2135 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_streamout()
2210 struct r600_bytecode_alu alu; in convert_edgeflag_to_int() local
2219 memset(&alu, 0, sizeof(alu)); in convert_edgeflag_to_int()
2220 alu.op = ALU_OP1_MOV; in convert_edgeflag_to_int()
2221 alu.src[0].sel = reg; in convert_edgeflag_to_int()
2222 alu.dst.sel = reg; in convert_edgeflag_to_int()
2223 alu.dst.write = 1; in convert_edgeflag_to_int()
2224 alu.dst.clamp = 1; in convert_edgeflag_to_int()
2225 alu.last = 1; in convert_edgeflag_to_int()
2226 r600_bytecode_add_alu(ctx->bc, &alu); in convert_edgeflag_to_int()
2228 memset(&alu, 0, sizeof(alu)); in convert_edgeflag_to_int()
2229 alu.op = ALU_OP1_FLT_TO_INT; in convert_edgeflag_to_int()
2230 alu.src[0].sel = reg; in convert_edgeflag_to_int()
2231 alu.dst.sel = reg; in convert_edgeflag_to_int()
2232 alu.dst.write = 1; in convert_edgeflag_to_int()
2233 alu.last = 1; in convert_edgeflag_to_int()
2234 r600_bytecode_add_alu(ctx->bc, &alu); in convert_edgeflag_to_int()
2245 struct r600_bytecode_alu alu; in generate_gs_copy_shader() local
2276 memset(&alu, 0, sizeof(alu)); in generate_gs_copy_shader()
2277 alu.op = ALU_OP2_AND_INT; in generate_gs_copy_shader()
2278 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in generate_gs_copy_shader()
2279 alu.src[1].value = 0x3fffffff; in generate_gs_copy_shader()
2280 alu.dst.write = 1; in generate_gs_copy_shader()
2281 r600_bytecode_add_alu(ctx.bc, &alu); in generate_gs_copy_shader()
2284 memset(&alu, 0, sizeof(alu)); in generate_gs_copy_shader()
2285 alu.op = ALU_OP2_LSHR_INT; in generate_gs_copy_shader()
2286 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in generate_gs_copy_shader()
2287 alu.src[1].value = 0x1e; in generate_gs_copy_shader()
2288 alu.dst.chan = 1; in generate_gs_copy_shader()
2289 alu.dst.write = 1; in generate_gs_copy_shader()
2290 alu.last = 1; in generate_gs_copy_shader()
2291 r600_bytecode_add_alu(ctx.bc, &alu); in generate_gs_copy_shader()
2348 memset(&alu, 0, sizeof(alu)); in generate_gs_copy_shader()
2349 alu.op = ALU_OP2_PRED_SETE_INT; in generate_gs_copy_shader()
2350 alu.src[0].chan = 1; in generate_gs_copy_shader()
2351 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in generate_gs_copy_shader()
2352 alu.src[1].value = ring; in generate_gs_copy_shader()
2353 alu.execute_mask = 1; in generate_gs_copy_shader()
2354 alu.update_pred = 1; in generate_gs_copy_shader()
2355 alu.last = 1; in generate_gs_copy_shader()
2356 r600_bytecode_add_alu_type(ctx.bc, &alu, CF_OP_ALU_PUSH_BEFORE); in generate_gs_copy_shader()
2368 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in generate_gs_copy_shader()
2369 alu.op = ALU_OP0_NOP; in generate_gs_copy_shader()
2370 alu.last = 1; in generate_gs_copy_shader()
2371 r600_bytecode_add_alu(ctx.bc, &alu); in generate_gs_copy_shader()
2551 struct r600_bytecode_alu alu; in emit_inc_ring_offset() local
2554 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_inc_ring_offset()
2555 alu.op = ALU_OP2_ADD_INT; in emit_inc_ring_offset()
2556 alu.src[0].sel = ctx->gs_export_gpr_tregs[idx]; in emit_inc_ring_offset()
2557 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in emit_inc_ring_offset()
2558 alu.src[1].value = ctx->gs_out_ring_offset >> 4; in emit_inc_ring_offset()
2559 alu.dst.sel = ctx->gs_export_gpr_tregs[idx]; in emit_inc_ring_offset()
2560 alu.dst.write = 1; in emit_inc_ring_offset()
2561 alu.last = 1; in emit_inc_ring_offset()
2562 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_inc_ring_offset()
2736 struct r600_bytecode_alu alu; in emit_lds_vs_writes() local
2758 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_lds_vs_writes()
2759 alu.op = LDS_OP3_LDS_WRITE_REL; in emit_lds_vs_writes()
2760 alu.src[0].sel = temp_reg; in emit_lds_vs_writes()
2761 alu.src[0].chan = chan; in emit_lds_vs_writes()
2762 alu.src[1].sel = ctx->shader->output[i].gpr; in emit_lds_vs_writes()
2763 alu.src[1].chan = j * 2; in emit_lds_vs_writes()
2764 alu.src[2].sel = ctx->shader->output[i].gpr; in emit_lds_vs_writes()
2765 alu.src[2].chan = (j * 2) + 1; in emit_lds_vs_writes()
2766 alu.last = 1; in emit_lds_vs_writes()
2767 alu.dst.chan = 0; in emit_lds_vs_writes()
2768 alu.lds_idx = 1; in emit_lds_vs_writes()
2769 alu.is_lds_idx_op = true; in emit_lds_vs_writes()
2770 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_lds_vs_writes()
2784 struct r600_bytecode_alu alu; in r600_store_tcs_output() local
2820 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_store_tcs_output()
2821 alu.op = LDS_OP3_LDS_WRITE_REL; in r600_store_tcs_output()
2822 alu.src[0].sel = temp_reg; in r600_store_tcs_output()
2823 alu.src[0].chan = i; in r600_store_tcs_output()
2825 alu.src[1].sel = dst->Register.Index; in r600_store_tcs_output()
2826 alu.src[1].sel += ctx->file_offset[dst->Register.File]; in r600_store_tcs_output()
2827 alu.src[1].chan = i; in r600_store_tcs_output()
2829 alu.src[2].sel = dst->Register.Index; in r600_store_tcs_output()
2830 alu.src[2].sel += ctx->file_offset[dst->Register.File]; in r600_store_tcs_output()
2831 alu.src[2].chan = i + 1; in r600_store_tcs_output()
2832 alu.lds_idx = 1; in r600_store_tcs_output()
2833 alu.dst.chan = 0; in r600_store_tcs_output()
2834 alu.last = 1; in r600_store_tcs_output()
2835 alu.is_lds_idx_op = true; in r600_store_tcs_output()
2836 r = r600_bytecode_add_alu(ctx->bc, &alu); in r600_store_tcs_output()
2842 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_store_tcs_output()
2843 alu.op = LDS_OP2_LDS_WRITE; in r600_store_tcs_output()
2844 alu.src[0].sel = temp_reg; in r600_store_tcs_output()
2845 alu.src[0].chan = i; in r600_store_tcs_output()
2847 alu.src[1].sel = dst->Register.Index; in r600_store_tcs_output()
2848 alu.src[1].sel += ctx->file_offset[dst->Register.File]; in r600_store_tcs_output()
2849 alu.src[1].chan = i; in r600_store_tcs_output()
2851 alu.src[2].sel = V_SQ_ALU_SRC_0; in r600_store_tcs_output()
2852 alu.dst.chan = 0; in r600_store_tcs_output()
2853 alu.last = 1; in r600_store_tcs_output()
2854 alu.is_lds_idx_op = true; in r600_store_tcs_output()
2855 r = r600_bytecode_add_alu(ctx->bc, &alu); in r600_store_tcs_output()
2897 struct r600_bytecode_alu alu; in r600_emit_tess_factor() local
2902 memset(&alu, 0, sizeof(alu)); in r600_emit_tess_factor()
2903 alu.op = ALU_OP2_PRED_SETE_INT; in r600_emit_tess_factor()
2904 alu.src[0].chan = 2; in r600_emit_tess_factor()
2905 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in r600_emit_tess_factor()
2906 alu.execute_mask = 1; in r600_emit_tess_factor()
2907 alu.update_pred = 1; in r600_emit_tess_factor()
2908 alu.last = 1; in r600_emit_tess_factor()
2909 r600_bytecode_add_alu_type(ctx->bc, &alu, CF_OP_ALU_PUSH_BEFORE); in r600_emit_tess_factor()
3046 struct r600_bytecode_alu alu; in load_thread_id_gpr() local
3052 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_thread_id_gpr()
3053 alu.op = ALU_OP1_MBCNT_32LO_ACCUM_PREV_INT; in load_thread_id_gpr()
3054 alu.dst.sel = ctx->temp_reg; in load_thread_id_gpr()
3055 alu.dst.chan = 0; in load_thread_id_gpr()
3056 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in load_thread_id_gpr()
3057 alu.src[0].value = 0xffffffff; in load_thread_id_gpr()
3058 alu.dst.write = 1; in load_thread_id_gpr()
3059 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_thread_id_gpr()
3063 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_thread_id_gpr()
3064 alu.op = ALU_OP1_MBCNT_32HI_INT; in load_thread_id_gpr()
3065 alu.dst.sel = ctx->temp_reg; in load_thread_id_gpr()
3066 alu.dst.chan = 1; in load_thread_id_gpr()
3067 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in load_thread_id_gpr()
3068 alu.src[0].value = 0xffffffff; in load_thread_id_gpr()
3069 alu.dst.write = 1; in load_thread_id_gpr()
3070 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_thread_id_gpr()
3074 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_thread_id_gpr()
3075 alu.op = ALU_OP3_MULADD_UINT24; in load_thread_id_gpr()
3076 alu.dst.sel = ctx->temp_reg; in load_thread_id_gpr()
3077 alu.dst.chan = 2; in load_thread_id_gpr()
3078 alu.src[0].sel = EG_V_SQ_ALU_SRC_SE_ID; in load_thread_id_gpr()
3079 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in load_thread_id_gpr()
3080 alu.src[1].value = 256; in load_thread_id_gpr()
3081 alu.src[2].sel = EG_V_SQ_ALU_SRC_HW_WAVE_ID; in load_thread_id_gpr()
3082 alu.dst.write = 1; in load_thread_id_gpr()
3083 alu.is_op3 = 1; in load_thread_id_gpr()
3084 alu.last = 1; in load_thread_id_gpr()
3085 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_thread_id_gpr()
3454 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3455 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3456 alu.op = ALU_OP1_RECIP_IEEE; in r600_shader_from_tgsi()
3457 alu.src[0].sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3458 alu.src[0].chan = 3; in r600_shader_from_tgsi()
3460 alu.dst.sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3461 alu.dst.chan = j; in r600_shader_from_tgsi()
3462 alu.dst.write = (j == 3); in r600_shader_from_tgsi()
3463 alu.last = (j == 3); in r600_shader_from_tgsi()
3464 if ((r = r600_bytecode_add_alu(ctx.bc, &alu))) in r600_shader_from_tgsi()
3468 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3469 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3470 alu.op = ALU_OP1_RECIP_IEEE; in r600_shader_from_tgsi()
3471 alu.src[0].sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3472 alu.src[0].chan = 3; in r600_shader_from_tgsi()
3474 alu.dst.sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3475 alu.dst.chan = 3; in r600_shader_from_tgsi()
3476 alu.dst.write = 1; in r600_shader_from_tgsi()
3477 alu.last = 1; in r600_shader_from_tgsi()
3478 if ((r = r600_bytecode_add_alu(ctx.bc, &alu))) in r600_shader_from_tgsi()
3484 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3492 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3493 alu.op = ALU_OP1_MOV; in r600_shader_from_tgsi()
3494 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in r600_shader_from_tgsi()
3495 alu.src[0].value = 0; in r600_shader_from_tgsi()
3496 alu.dst.sel = ctx.gs_export_gpr_tregs[j]; in r600_shader_from_tgsi()
3497 alu.dst.write = 1; in r600_shader_from_tgsi()
3498 alu.last = 1; in r600_shader_from_tgsi()
3499 r = r600_bytecode_add_alu(ctx.bc, &alu); in r600_shader_from_tgsi()
3621 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3622 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3623 alu.op = ALU_OP2_DOT4; in r600_shader_from_tgsi()
3624 alu.src[0].sel = shader->output[ctx.cv_output].gpr; in r600_shader_from_tgsi()
3625 alu.src[0].chan = j; in r600_shader_from_tgsi()
3627 alu.src[1].sel = 512 + i; in r600_shader_from_tgsi()
3628 alu.src[1].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in r600_shader_from_tgsi()
3629 alu.src[1].chan = j; in r600_shader_from_tgsi()
3631 alu.dst.sel = clipdist_temp[oreg]; in r600_shader_from_tgsi()
3632 alu.dst.chan = j; in r600_shader_from_tgsi()
3633 alu.dst.write = (j == ochan); in r600_shader_from_tgsi()
3635 alu.last = 1; in r600_shader_from_tgsi()
3636 r = r600_bytecode_add_alu(ctx.bc, &alu); in r600_shader_from_tgsi()
4019 struct r600_bytecode_alu alu; in tgsi_op2_64_params() local
4067 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_64_params()
4071 alu.dst.sel = use_tmp ? ctx->temp_reg : dest_temp; in tgsi_op2_64_params()
4072 alu.dst.chan = i; in tgsi_op2_64_params()
4073 alu.dst.write = 1; in tgsi_op2_64_params()
4075 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_64_params()
4078 alu.dst.write = 0; in tgsi_op2_64_params()
4080 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_64_params()
4082 alu.op = op_override ? op_override : ctx->inst_info->op; in tgsi_op2_64_params()
4084 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_op2_64_params()
4087 r600_bytecode_src(&alu.src[j], &ctx->src[j], fp64_switch(i)); in tgsi_op2_64_params()
4090 r600_bytecode_src(&alu.src[0], &ctx->src[1], fp64_switch(i)); in tgsi_op2_64_params()
4091 r600_bytecode_src(&alu.src[1], &ctx->src[0], fp64_switch(i)); in tgsi_op2_64_params()
4098 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_op2_64_params()
4105 alu.last = 1; in tgsi_op2_64_params()
4107 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_64_params()
4121 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_64_params()
4122 alu.op = ALU_OP1_MOV; in tgsi_op2_64_params()
4125 alu.dst.sel = dest_temp; in tgsi_op2_64_params()
4126 alu.dst.chan = i; in tgsi_op2_64_params()
4127 alu.dst.write = 1; in tgsi_op2_64_params()
4129 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_64_params()
4130 alu.src[0].sel = ctx->temp_reg; in tgsi_op2_64_params()
4131 alu.src[0].chan = use_tmp - 1; in tgsi_op2_64_params()
4132 alu.last = (i == lasti); in tgsi_op2_64_params()
4134 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_64_params()
4168 struct r600_bytecode_alu alu; in tgsi_op3_64() local
4175 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op3_64()
4176 alu.op = ctx->inst_info->op; in tgsi_op3_64()
4178 r600_bytecode_src(&alu.src[j], &ctx->src[j], i == 3 ? 0 : 1); in tgsi_op3_64()
4182 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op3_64()
4184 alu.dst.sel = tmp; in tgsi_op3_64()
4186 alu.dst.chan = i; in tgsi_op3_64()
4187 alu.is_op3 = 1; in tgsi_op3_64()
4189 alu.last = 1; in tgsi_op3_64()
4191 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op3_64()
4201 struct r600_bytecode_alu alu; in tgsi_op2_s() local
4216 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_s()
4218 alu.dst.sel = ctx->temp_reg; in tgsi_op2_s()
4219 alu.dst.chan = i; in tgsi_op2_s()
4220 alu.dst.write = 1; in tgsi_op2_s()
4222 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_s()
4224 alu.op = op; in tgsi_op2_s()
4227 r600_bytecode_src(&alu.src[j], &ctx->src[j], i); in tgsi_op2_s()
4230 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_op2_s()
4231 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_op2_s()
4234 alu.last = 1; in tgsi_op2_s()
4236 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_s()
4247 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_s()
4248 alu.op = ALU_OP1_MOV; in tgsi_op2_s()
4249 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_s()
4250 alu.src[0].sel = ctx->temp_reg; in tgsi_op2_s()
4251 alu.src[0].chan = i; in tgsi_op2_s()
4252 alu.last = (i == lasti); in tgsi_op2_s()
4254 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_s()
4280 struct r600_bytecode_alu alu; in tgsi_ineg() local
4288 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ineg()
4289 alu.op = ctx->inst_info->op; in tgsi_ineg()
4291 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_ineg()
4293 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_ineg()
4295 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_ineg()
4298 alu.last = 1; in tgsi_ineg()
4300 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ineg()
4311 struct r600_bytecode_alu alu; in tgsi_dneg() local
4319 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dneg()
4320 alu.op = ALU_OP1_MOV; in tgsi_dneg()
4322 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_dneg()
4325 r600_bytecode_src_toggle_neg(&alu.src[0]); in tgsi_dneg()
4326 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_dneg()
4329 alu.last = 1; in tgsi_dneg()
4331 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dneg()
4342 struct r600_bytecode_alu alu; in tgsi_dfracexp() local
4347 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dfracexp()
4348 alu.op = ctx->inst_info->op; in tgsi_dfracexp()
4350 alu.dst.sel = ctx->temp_reg; in tgsi_dfracexp()
4351 alu.dst.chan = i; in tgsi_dfracexp()
4352 alu.dst.write = 1; in tgsi_dfracexp()
4354 r600_bytecode_src(&alu.src[j], &ctx->src[j], fp64_switch(i)); in tgsi_dfracexp()
4358 alu.last = 1; in tgsi_dfracexp()
4360 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dfracexp()
4370 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dfracexp()
4371 alu.op = ALU_OP1_MOV; in tgsi_dfracexp()
4372 alu.src[0].chan = (i & 1) + 2; in tgsi_dfracexp()
4373 alu.src[0].sel = ctx->temp_reg; in tgsi_dfracexp()
4375 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_dfracexp()
4376 alu.dst.write = 1; in tgsi_dfracexp()
4377 alu.last = 1; in tgsi_dfracexp()
4378 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dfracexp()
4386 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dfracexp()
4387 alu.op = ALU_OP1_MOV; in tgsi_dfracexp()
4388 alu.src[0].chan = 1; in tgsi_dfracexp()
4389 alu.src[0].sel = ctx->temp_reg; in tgsi_dfracexp()
4391 tgsi_dst(ctx, &inst->Dst[1], i, &alu.dst); in tgsi_dfracexp()
4392 alu.last = 1; in tgsi_dfracexp()
4393 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dfracexp()
4406 struct r600_bytecode_alu alu; in egcm_int_to_double() local
4414 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
4415 alu.op = ctx->inst_info->op; in egcm_int_to_double()
4417 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in egcm_int_to_double()
4418 alu.dst.sel = ctx->temp_reg; in egcm_int_to_double()
4419 alu.dst.chan = i; in egcm_int_to_double()
4420 alu.dst.write = 1; in egcm_int_to_double()
4421 alu.last = 1; in egcm_int_to_double()
4423 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
4429 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
4430 alu.op = ALU_OP1_FLT32_TO_FLT64; in egcm_int_to_double()
4432 alu.src[0].chan = i/2; in egcm_int_to_double()
4434 alu.src[0].sel = ctx->temp_reg; in egcm_int_to_double()
4436 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in egcm_int_to_double()
4437 alu.src[0].value = 0x0; in egcm_int_to_double()
4439 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in egcm_int_to_double()
4440 alu.last = i == lasti; in egcm_int_to_double()
4442 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
4453 struct r600_bytecode_alu alu; in egcm_double_to_int() local
4468 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_double_to_int()
4469 alu.op = ctx->inst_info->op; in egcm_double_to_int()
4471 alu.src[0].chan = i; in egcm_double_to_int()
4472 alu.src[0].sel = treg; in egcm_double_to_int()
4473 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in egcm_double_to_int()
4474 alu.last = (i == lasti); in egcm_double_to_int()
4476 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_double_to_int()
4490 struct r600_bytecode_alu alu; in cayman_emit_unary_double_raw() local
4496 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_emit_unary_double_raw()
4497 alu.op = op; in cayman_emit_unary_double_raw()
4499 r600_bytecode_src(&alu.src[0], src, 1); in cayman_emit_unary_double_raw()
4500 r600_bytecode_src(&alu.src[1], src, 0); in cayman_emit_unary_double_raw()
4503 r600_bytecode_src_set_abs(&alu.src[1]); in cayman_emit_unary_double_raw()
4505 alu.dst.sel = dst_reg; in cayman_emit_unary_double_raw()
4506 alu.dst.chan = i; in cayman_emit_unary_double_raw()
4507 alu.dst.write = (i == 0 || i == 1); in cayman_emit_unary_double_raw()
4510 alu.last = 1; in cayman_emit_unary_double_raw()
4511 r = r600_bytecode_add_alu(bc, &alu); in cayman_emit_unary_double_raw()
4523 struct r600_bytecode_alu alu; in cayman_emit_double_instr() local
4545 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_emit_double_instr()
4546 alu.op = ALU_OP1_MOV; in cayman_emit_double_instr()
4547 alu.src[0].sel = t1; in cayman_emit_double_instr()
4548 alu.src[0].chan = (i == 0 || i == 2) ? 0 : 1; in cayman_emit_double_instr()
4549 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_emit_double_instr()
4550 alu.dst.write = 1; in cayman_emit_double_instr()
4552 alu.last = 1; in cayman_emit_double_instr()
4553 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_emit_double_instr()
4564 struct r600_bytecode_alu alu; in cayman_emit_float_instr() local
4568 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_emit_float_instr()
4569 alu.op = ctx->inst_info->op; in cayman_emit_float_instr()
4571 r600_bytecode_src(&alu.src[j], &ctx->src[j], 0); in cayman_emit_float_instr()
4575 r600_bytecode_src_set_abs(&alu.src[j]); in cayman_emit_float_instr()
4578 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_emit_float_instr()
4579 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in cayman_emit_float_instr()
4582 alu.last = 1; in cayman_emit_float_instr()
4583 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_emit_float_instr()
4594 struct r600_bytecode_alu alu; in cayman_mul_int_instr() local
4603 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_int_instr()
4604 alu.op = ctx->inst_info->op; in cayman_mul_int_instr()
4606 r600_bytecode_src(&alu.src[j], &ctx->src[j], k); in cayman_mul_int_instr()
4608 alu.dst.sel = t1; in cayman_mul_int_instr()
4609 alu.dst.chan = i; in cayman_mul_int_instr()
4610 alu.dst.write = (i == k); in cayman_mul_int_instr()
4612 alu.last = 1; in cayman_mul_int_instr()
4613 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_int_instr()
4622 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_int_instr()
4623 alu.op = ALU_OP1_MOV; in cayman_mul_int_instr()
4624 alu.src[0].sel = t1; in cayman_mul_int_instr()
4625 alu.src[0].chan = i; in cayman_mul_int_instr()
4626 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_mul_int_instr()
4627 alu.dst.write = 1; in cayman_mul_int_instr()
4629 alu.last = 1; in cayman_mul_int_instr()
4630 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_int_instr()
4643 struct r600_bytecode_alu alu; in cayman_mul_double_instr() local
4655 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_double_instr()
4656 alu.op = ctx->inst_info->op; in cayman_mul_double_instr()
4658 r600_bytecode_src(&alu.src[j], &ctx->src[j], k * 2 + ((i == 3) ? 0 : 1)); in cayman_mul_double_instr()
4660 alu.dst.sel = t1; in cayman_mul_double_instr()
4661 alu.dst.chan = i; in cayman_mul_double_instr()
4662 alu.dst.write = 1; in cayman_mul_double_instr()
4664 alu.last = 1; in cayman_mul_double_instr()
4665 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_double_instr()
4673 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_double_instr()
4674 alu.op = ALU_OP1_MOV; in cayman_mul_double_instr()
4675 alu.src[0].sel = t1; in cayman_mul_double_instr()
4676 alu.src[0].chan = i; in cayman_mul_double_instr()
4677 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_mul_double_instr()
4678 alu.dst.write = 1; in cayman_mul_double_instr()
4680 alu.last = 1; in cayman_mul_double_instr()
4681 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_double_instr()
4696 struct r600_bytecode_alu alu; in cayman_ddiv_instr() local
4712 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_ddiv_instr()
4713 alu.op = ALU_OP2_MUL_64; in cayman_ddiv_instr()
4715 r600_bytecode_src(&alu.src[0], &ctx->src[0], k * 2 + ((i == 3) ? 0 : 1)); in cayman_ddiv_instr()
4717 alu.src[1].sel = t1; in cayman_ddiv_instr()
4718 alu.src[1].chan = (i == 3) ? 0 : 1; in cayman_ddiv_instr()
4720 alu.dst.sel = t1; in cayman_ddiv_instr()
4721 alu.dst.chan = i; in cayman_ddiv_instr()
4722 alu.dst.write = 1; in cayman_ddiv_instr()
4724 alu.last = 1; in cayman_ddiv_instr()
4725 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_ddiv_instr()
4731 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_ddiv_instr()
4732 alu.op = ALU_OP1_MOV; in cayman_ddiv_instr()
4733 alu.src[0].sel = t1; in cayman_ddiv_instr()
4734 alu.src[0].chan = i; in cayman_ddiv_instr()
4735 tgsi_dst(ctx, &inst->Dst[0], k * 2 + i, &alu.dst); in cayman_ddiv_instr()
4736 alu.dst.write = 1; in cayman_ddiv_instr()
4738 alu.last = 1; in cayman_ddiv_instr()
4739 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_ddiv_instr()
4754 struct r600_bytecode_alu alu; in tgsi_setup_trig() local
4756 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_setup_trig()
4757 alu.op = ALU_OP3_MULADD; in tgsi_setup_trig()
4758 alu.is_op3 = 1; in tgsi_setup_trig()
4760 alu.dst.chan = 0; in tgsi_setup_trig()
4761 alu.dst.sel = ctx->temp_reg; in tgsi_setup_trig()
4762 alu.dst.write = 1; in tgsi_setup_trig()
4764 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_setup_trig()
4766 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_setup_trig()
4767 alu.src[1].chan = 0; in tgsi_setup_trig()
4768 alu.src[1].value = u_bitcast_f2u(0.5f * M_1_PI); in tgsi_setup_trig()
4769 alu.src[2].sel = V_SQ_ALU_SRC_0_5; in tgsi_setup_trig()
4770 alu.src[2].chan = 0; in tgsi_setup_trig()
4771 alu.last = 1; in tgsi_setup_trig()
4772 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_setup_trig()
4776 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_setup_trig()
4777 alu.op = ALU_OP1_FRACT; in tgsi_setup_trig()
4779 alu.dst.chan = 0; in tgsi_setup_trig()
4780 alu.dst.sel = ctx->temp_reg; in tgsi_setup_trig()
4781 alu.dst.write = 1; in tgsi_setup_trig()
4783 alu.src[0].sel = ctx->temp_reg; in tgsi_setup_trig()
4784 alu.src[0].chan = 0; in tgsi_setup_trig()
4785 alu.last = 1; in tgsi_setup_trig()
4786 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_setup_trig()
4790 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_setup_trig()
4791 alu.op = ALU_OP3_MULADD; in tgsi_setup_trig()
4792 alu.is_op3 = 1; in tgsi_setup_trig()
4794 alu.dst.chan = 0; in tgsi_setup_trig()
4795 alu.dst.sel = ctx->temp_reg; in tgsi_setup_trig()
4796 alu.dst.write = 1; in tgsi_setup_trig()
4798 alu.src[0].sel = ctx->temp_reg; in tgsi_setup_trig()
4799 alu.src[0].chan = 0; in tgsi_setup_trig()
4801 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_setup_trig()
4802 alu.src[1].chan = 0; in tgsi_setup_trig()
4803 alu.src[2].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_setup_trig()
4804 alu.src[2].chan = 0; in tgsi_setup_trig()
4807 alu.src[1].value = u_bitcast_f2u(2.0f * M_PI); in tgsi_setup_trig()
4808 alu.src[2].value = u_bitcast_f2u(-M_PI); in tgsi_setup_trig()
4810 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_setup_trig()
4811 alu.src[2].sel = V_SQ_ALU_SRC_0_5; in tgsi_setup_trig()
4812 alu.src[2].neg = 1; in tgsi_setup_trig()
4815 alu.last = 1; in tgsi_setup_trig()
4816 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_setup_trig()
4825 struct r600_bytecode_alu alu; in cayman_trig() local
4835 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_trig()
4836 alu.op = ctx->inst_info->op; in cayman_trig()
4837 alu.dst.chan = i; in cayman_trig()
4839 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_trig()
4840 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in cayman_trig()
4842 alu.src[0].sel = ctx->temp_reg; in cayman_trig()
4843 alu.src[0].chan = 0; in cayman_trig()
4845 alu.last = 1; in cayman_trig()
4846 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_trig()
4856 struct r600_bytecode_alu alu; in tgsi_trig() local
4864 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_trig()
4865 alu.op = ctx->inst_info->op; in tgsi_trig()
4866 alu.dst.chan = 0; in tgsi_trig()
4867 alu.dst.sel = ctx->temp_reg; in tgsi_trig()
4868 alu.dst.write = 1; in tgsi_trig()
4870 alu.src[0].sel = ctx->temp_reg; in tgsi_trig()
4871 alu.src[0].chan = 0; in tgsi_trig()
4872 alu.last = 1; in tgsi_trig()
4873 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_trig()
4882 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_trig()
4883 alu.op = ALU_OP1_MOV; in tgsi_trig()
4885 alu.src[0].sel = ctx->temp_reg; in tgsi_trig()
4886 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_trig()
4888 alu.last = 1; in tgsi_trig()
4889 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_trig()
4899 struct r600_bytecode_alu alu; in tgsi_kill() local
4903 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_kill()
4904 alu.op = ctx->inst_info->op; in tgsi_kill()
4906 alu.dst.chan = i; in tgsi_kill()
4908 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_kill()
4911 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_kill()
4912 alu.src[1].neg = 1; in tgsi_kill()
4914 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_kill()
4917 alu.last = 1; in tgsi_kill()
4919 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_kill()
4933 struct r600_bytecode_alu alu; in tgsi_lit() local
4937 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
4938 alu.op = ALU_OP2_MAX; in tgsi_lit()
4939 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in tgsi_lit()
4940 alu.src[1].sel = V_SQ_ALU_SRC_0; /*0.0*/ in tgsi_lit()
4941 alu.src[1].chan = 1; in tgsi_lit()
4943 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
4944 alu.dst.chan = 0; in tgsi_lit()
4945 alu.dst.write = 1; in tgsi_lit()
4947 alu.last = 1; in tgsi_lit()
4948 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
4961 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
4962 alu.op = ALU_OP1_LOG_CLAMPED; in tgsi_lit()
4963 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
4964 alu.src[0].chan = 0; in tgsi_lit()
4965 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
4966 alu.dst.chan = i; in tgsi_lit()
4968 alu.dst.write = 1; in tgsi_lit()
4969 alu.last = 1; in tgsi_lit()
4971 alu.dst.write = 0; in tgsi_lit()
4973 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
4979 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
4980 alu.op = ALU_OP1_LOG_CLAMPED; in tgsi_lit()
4981 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
4982 alu.src[0].chan = 0; in tgsi_lit()
4983 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
4984 alu.dst.chan = 2; in tgsi_lit()
4985 alu.dst.write = 1; in tgsi_lit()
4986 alu.last = 1; in tgsi_lit()
4987 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
4992 chan = alu.dst.chan; in tgsi_lit()
4993 sel = alu.dst.sel; in tgsi_lit()
4996 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
4997 alu.op = ALU_OP3_MUL_LIT; in tgsi_lit()
4998 alu.src[0].sel = sel; in tgsi_lit()
4999 alu.src[0].chan = chan; in tgsi_lit()
5000 r600_bytecode_src(&alu.src[1], &ctx->src[0], 3); in tgsi_lit()
5001 r600_bytecode_src(&alu.src[2], &ctx->src[0], 0); in tgsi_lit()
5002 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
5003 alu.dst.chan = 0; in tgsi_lit()
5004 alu.dst.write = 1; in tgsi_lit()
5005 alu.is_op3 = 1; in tgsi_lit()
5006 alu.last = 1; in tgsi_lit()
5007 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5014 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5015 alu.op = ALU_OP1_EXP_IEEE; in tgsi_lit()
5016 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
5017 alu.src[0].chan = 0; in tgsi_lit()
5018 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_lit()
5020 alu.dst.write = 1; in tgsi_lit()
5021 alu.last = 1; in tgsi_lit()
5023 alu.dst.write = 0; in tgsi_lit()
5024 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5030 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5031 alu.op = ALU_OP1_EXP_IEEE; in tgsi_lit()
5032 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
5033 alu.src[0].chan = 0; in tgsi_lit()
5034 tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst); in tgsi_lit()
5035 alu.last = 1; in tgsi_lit()
5036 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5043 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5044 alu.op = ALU_OP1_MOV; in tgsi_lit()
5045 alu.src[0].sel = V_SQ_ALU_SRC_1; /*1.0*/ in tgsi_lit()
5046 alu.src[0].chan = 0; in tgsi_lit()
5047 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in tgsi_lit()
5048 alu.dst.write = (inst->Dst[0].Register.WriteMask >> 0) & 1; in tgsi_lit()
5049 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5054 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5055 alu.op = ALU_OP2_MAX; in tgsi_lit()
5056 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_lit()
5057 alu.src[1].sel = V_SQ_ALU_SRC_0; /*0.0*/ in tgsi_lit()
5058 alu.src[1].chan = 0; in tgsi_lit()
5059 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in tgsi_lit()
5060 alu.dst.write = (inst->Dst[0].Register.WriteMask >> 1) & 1; in tgsi_lit()
5061 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5066 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5067 alu.op = ALU_OP1_MOV; in tgsi_lit()
5068 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_lit()
5069 alu.src[0].chan = 0; in tgsi_lit()
5070 tgsi_dst(ctx, &inst->Dst[0], 3, &alu.dst); in tgsi_lit()
5071 alu.dst.write = (inst->Dst[0].Register.WriteMask >> 3) & 1; in tgsi_lit()
5072 alu.last = 1; in tgsi_lit()
5073 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5083 struct r600_bytecode_alu alu; in tgsi_rsq() local
5086 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_rsq()
5088 alu.op = ALU_OP1_RECIPSQRT_IEEE; in tgsi_rsq()
5091 r600_bytecode_src(&alu.src[i], &ctx->src[i], 0); in tgsi_rsq()
5092 r600_bytecode_src_set_abs(&alu.src[i]); in tgsi_rsq()
5094 alu.dst.sel = ctx->temp_reg; in tgsi_rsq()
5095 alu.dst.write = 1; in tgsi_rsq()
5096 alu.last = 1; in tgsi_rsq()
5097 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_rsq()
5107 struct r600_bytecode_alu alu; in tgsi_helper_tempx_replicate() local
5111 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_helper_tempx_replicate()
5112 alu.src[0].sel = ctx->temp_reg; in tgsi_helper_tempx_replicate()
5113 alu.op = ALU_OP1_MOV; in tgsi_helper_tempx_replicate()
5114 alu.dst.chan = i; in tgsi_helper_tempx_replicate()
5115 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_helper_tempx_replicate()
5116 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in tgsi_helper_tempx_replicate()
5118 alu.last = 1; in tgsi_helper_tempx_replicate()
5119 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_helper_tempx_replicate()
5129 struct r600_bytecode_alu alu; in tgsi_trans_srcx_replicate() local
5132 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_trans_srcx_replicate()
5133 alu.op = ctx->inst_info->op; in tgsi_trans_srcx_replicate()
5135 r600_bytecode_src(&alu.src[i], &ctx->src[i], 0); in tgsi_trans_srcx_replicate()
5137 alu.dst.sel = ctx->temp_reg; in tgsi_trans_srcx_replicate()
5138 alu.dst.write = 1; in tgsi_trans_srcx_replicate()
5139 alu.last = 1; in tgsi_trans_srcx_replicate()
5140 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_trans_srcx_replicate()
5151 struct r600_bytecode_alu alu; in cayman_pow() local
5155 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_pow()
5156 alu.op = ALU_OP1_LOG_IEEE; in cayman_pow()
5157 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in cayman_pow()
5158 alu.dst.sel = ctx->temp_reg; in cayman_pow()
5159 alu.dst.chan = i; in cayman_pow()
5160 alu.dst.write = 1; in cayman_pow()
5162 alu.last = 1; in cayman_pow()
5163 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_pow()
5169 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_pow()
5170 alu.op = ALU_OP2_MUL; in cayman_pow()
5171 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in cayman_pow()
5172 alu.src[1].sel = ctx->temp_reg; in cayman_pow()
5173 alu.dst.sel = ctx->temp_reg; in cayman_pow()
5174 alu.dst.write = 1; in cayman_pow()
5175 alu.last = 1; in cayman_pow()
5176 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_pow()
5182 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_pow()
5183 alu.op = ALU_OP1_EXP_IEEE; in cayman_pow()
5184 alu.src[0].sel = ctx->temp_reg; in cayman_pow()
5186 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_pow()
5187 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in cayman_pow()
5189 alu.last = 1; in cayman_pow()
5190 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_pow()
5199 struct r600_bytecode_alu alu; in tgsi_pow() local
5203 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pow()
5204 alu.op = ALU_OP1_LOG_IEEE; in tgsi_pow()
5205 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_pow()
5206 alu.dst.sel = ctx->temp_reg; in tgsi_pow()
5207 alu.dst.write = 1; in tgsi_pow()
5208 alu.last = 1; in tgsi_pow()
5209 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pow()
5213 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pow()
5214 alu.op = ALU_OP2_MUL; in tgsi_pow()
5215 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_pow()
5216 alu.src[1].sel = ctx->temp_reg; in tgsi_pow()
5217 alu.dst.sel = ctx->temp_reg; in tgsi_pow()
5218 alu.dst.write = 1; in tgsi_pow()
5219 alu.last = 1; in tgsi_pow()
5220 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pow()
5224 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pow()
5225 alu.op = ALU_OP1_EXP_IEEE; in tgsi_pow()
5226 alu.src[0].sel = ctx->temp_reg; in tgsi_pow()
5227 alu.dst.sel = ctx->temp_reg; in tgsi_pow()
5228 alu.dst.write = 1; in tgsi_pow()
5229 alu.last = 1; in tgsi_pow()
5230 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pow()
5239 struct r600_bytecode_alu alu; in tgsi_divmod() local
5299 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5300 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5302 alu.dst.sel = tmp2; in tgsi_divmod()
5303 alu.dst.chan = 0; in tgsi_divmod()
5304 alu.dst.write = 1; in tgsi_divmod()
5306 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
5308 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
5310 alu.last = 1; in tgsi_divmod()
5311 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5315 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5316 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5318 alu.dst.sel = tmp2; in tgsi_divmod()
5319 alu.dst.chan = 1; in tgsi_divmod()
5320 alu.dst.write = 1; in tgsi_divmod()
5322 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
5324 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5326 alu.last = 1; in tgsi_divmod()
5327 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5334 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5335 alu.op = ALU_OP2_XOR_INT; in tgsi_divmod()
5337 alu.dst.sel = tmp2; in tgsi_divmod()
5338 alu.dst.chan = 2; in tgsi_divmod()
5339 alu.dst.write = 1; in tgsi_divmod()
5341 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
5342 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5344 alu.last = 1; in tgsi_divmod()
5345 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5350 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5351 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
5352 alu.is_op3 = 1; in tgsi_divmod()
5354 alu.dst.sel = tmp2; in tgsi_divmod()
5355 alu.dst.chan = 0; in tgsi_divmod()
5356 alu.dst.write = 1; in tgsi_divmod()
5358 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
5359 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
5360 alu.src[2].sel = tmp2; in tgsi_divmod()
5361 alu.src[2].chan = 0; in tgsi_divmod()
5363 alu.last = 1; in tgsi_divmod()
5364 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5368 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5369 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
5370 alu.is_op3 = 1; in tgsi_divmod()
5372 alu.dst.sel = tmp2; in tgsi_divmod()
5373 alu.dst.chan = 1; in tgsi_divmod()
5374 alu.dst.write = 1; in tgsi_divmod()
5376 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
5377 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5378 alu.src[2].sel = tmp2; in tgsi_divmod()
5379 alu.src[2].chan = 1; in tgsi_divmod()
5381 alu.last = 1; in tgsi_divmod()
5382 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5390 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5391 alu.op = ALU_OP1_UINT_TO_FLT; in tgsi_divmod()
5393 alu.dst.sel = tmp3; in tgsi_divmod()
5394 alu.dst.chan = 0; in tgsi_divmod()
5395 alu.dst.write = 1; in tgsi_divmod()
5398 alu.src[0].sel = tmp2; in tgsi_divmod()
5399 alu.src[0].chan = 1; in tgsi_divmod()
5401 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
5404 alu.last = 1; in tgsi_divmod()
5405 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5410 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5411 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_divmod()
5413 alu.dst.sel = tmp0; in tgsi_divmod()
5414 alu.dst.chan = j; in tgsi_divmod()
5415 alu.dst.write = (j == 0); in tgsi_divmod()
5417 alu.src[0].sel = tmp3; in tgsi_divmod()
5418 alu.src[0].chan = 0; in tgsi_divmod()
5421 alu.last = 1; in tgsi_divmod()
5422 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5426 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5427 alu.op = ALU_OP2_MUL; in tgsi_divmod()
5429 alu.src[0].sel = tmp0; in tgsi_divmod()
5430 alu.src[0].chan = 0; in tgsi_divmod()
5432 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_divmod()
5433 alu.src[1].value = 0x4f800000; in tgsi_divmod()
5435 alu.dst.sel = tmp3; in tgsi_divmod()
5436 alu.dst.write = 1; in tgsi_divmod()
5437 alu.last = 1; in tgsi_divmod()
5438 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_divmod()
5442 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5443 alu.op = ALU_OP1_FLT_TO_UINT; in tgsi_divmod()
5445 alu.dst.sel = tmp0; in tgsi_divmod()
5446 alu.dst.chan = 0; in tgsi_divmod()
5447 alu.dst.write = 1; in tgsi_divmod()
5449 alu.src[0].sel = tmp3; in tgsi_divmod()
5450 alu.src[0].chan = 0; in tgsi_divmod()
5452 alu.last = 1; in tgsi_divmod()
5453 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5457 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5458 alu.op = ALU_OP1_RECIP_UINT; in tgsi_divmod()
5460 alu.dst.sel = tmp0; in tgsi_divmod()
5461 alu.dst.chan = 0; in tgsi_divmod()
5462 alu.dst.write = 1; in tgsi_divmod()
5465 alu.src[0].sel = tmp2; in tgsi_divmod()
5466 alu.src[0].chan = 1; in tgsi_divmod()
5468 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
5471 alu.last = 1; in tgsi_divmod()
5472 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5479 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5480 alu.op = ALU_OP2_MULLO_UINT; in tgsi_divmod()
5482 alu.dst.sel = tmp0; in tgsi_divmod()
5483 alu.dst.chan = j; in tgsi_divmod()
5484 alu.dst.write = (j == 2); in tgsi_divmod()
5486 alu.src[0].sel = tmp0; in tgsi_divmod()
5487 alu.src[0].chan = 0; in tgsi_divmod()
5489 alu.src[1].sel = tmp2; in tgsi_divmod()
5490 alu.src[1].chan = 1; in tgsi_divmod()
5492 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5495 alu.last = (j == 3); in tgsi_divmod()
5496 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5500 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5501 alu.op = ALU_OP2_MULLO_UINT; in tgsi_divmod()
5503 alu.dst.sel = tmp0; in tgsi_divmod()
5504 alu.dst.chan = 2; in tgsi_divmod()
5505 alu.dst.write = 1; in tgsi_divmod()
5507 alu.src[0].sel = tmp0; in tgsi_divmod()
5508 alu.src[0].chan = 0; in tgsi_divmod()
5510 alu.src[1].sel = tmp2; in tgsi_divmod()
5511 alu.src[1].chan = 1; in tgsi_divmod()
5513 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5516 alu.last = 1; in tgsi_divmod()
5517 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5522 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5523 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5525 alu.dst.sel = tmp0; in tgsi_divmod()
5526 alu.dst.chan = 3; in tgsi_divmod()
5527 alu.dst.write = 1; in tgsi_divmod()
5529 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
5530 alu.src[1].sel = tmp0; in tgsi_divmod()
5531 alu.src[1].chan = 2; in tgsi_divmod()
5533 alu.last = 1; in tgsi_divmod()
5534 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5540 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5541 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
5543 alu.dst.sel = tmp0; in tgsi_divmod()
5544 alu.dst.chan = j; in tgsi_divmod()
5545 alu.dst.write = (j == 1); in tgsi_divmod()
5547 alu.src[0].sel = tmp0; in tgsi_divmod()
5548 alu.src[0].chan = 0; in tgsi_divmod()
5551 alu.src[1].sel = tmp2; in tgsi_divmod()
5552 alu.src[1].chan = 1; in tgsi_divmod()
5554 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5556 alu.last = (j == 3); in tgsi_divmod()
5557 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5561 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5562 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
5564 alu.dst.sel = tmp0; in tgsi_divmod()
5565 alu.dst.chan = 1; in tgsi_divmod()
5566 alu.dst.write = 1; in tgsi_divmod()
5568 alu.src[0].sel = tmp0; in tgsi_divmod()
5569 alu.src[0].chan = 0; in tgsi_divmod()
5572 alu.src[1].sel = tmp2; in tgsi_divmod()
5573 alu.src[1].chan = 1; in tgsi_divmod()
5575 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5578 alu.last = 1; in tgsi_divmod()
5579 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5584 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5585 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
5586 alu.is_op3 = 1; in tgsi_divmod()
5588 alu.dst.sel = tmp0; in tgsi_divmod()
5589 alu.dst.chan = 2; in tgsi_divmod()
5590 alu.dst.write = 1; in tgsi_divmod()
5592 alu.src[0].sel = tmp0; in tgsi_divmod()
5593 alu.src[0].chan = 1; in tgsi_divmod()
5594 alu.src[1].sel = tmp0; in tgsi_divmod()
5595 alu.src[1].chan = 3; in tgsi_divmod()
5596 alu.src[2].sel = tmp0; in tgsi_divmod()
5597 alu.src[2].chan = 2; in tgsi_divmod()
5599 alu.last = 1; in tgsi_divmod()
5600 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5606 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5607 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
5609 alu.dst.sel = tmp0; in tgsi_divmod()
5610 alu.dst.chan = j; in tgsi_divmod()
5611 alu.dst.write = (j == 3); in tgsi_divmod()
5613 alu.src[0].sel = tmp0; in tgsi_divmod()
5614 alu.src[0].chan = 2; in tgsi_divmod()
5616 alu.src[1].sel = tmp0; in tgsi_divmod()
5617 alu.src[1].chan = 0; in tgsi_divmod()
5619 alu.last = (j == 3); in tgsi_divmod()
5620 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5624 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5625 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
5627 alu.dst.sel = tmp0; in tgsi_divmod()
5628 alu.dst.chan = 3; in tgsi_divmod()
5629 alu.dst.write = 1; in tgsi_divmod()
5631 alu.src[0].sel = tmp0; in tgsi_divmod()
5632 alu.src[0].chan = 2; in tgsi_divmod()
5634 alu.src[1].sel = tmp0; in tgsi_divmod()
5635 alu.src[1].chan = 0; in tgsi_divmod()
5637 alu.last = 1; in tgsi_divmod()
5638 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5643 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5644 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5646 alu.dst.sel = tmp1; in tgsi_divmod()
5647 alu.dst.chan = 0; in tgsi_divmod()
5648 alu.dst.write = 1; in tgsi_divmod()
5650 alu.src[0].sel = tmp0; in tgsi_divmod()
5651 alu.src[0].chan = 0; in tgsi_divmod()
5652 alu.src[1].sel = tmp0; in tgsi_divmod()
5653 alu.src[1].chan = 3; in tgsi_divmod()
5655 alu.last = 1; in tgsi_divmod()
5656 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5660 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5661 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
5663 alu.dst.sel = tmp1; in tgsi_divmod()
5664 alu.dst.chan = 1; in tgsi_divmod()
5665 alu.dst.write = 1; in tgsi_divmod()
5667 alu.src[0].sel = tmp0; in tgsi_divmod()
5668 alu.src[0].chan = 0; in tgsi_divmod()
5669 alu.src[1].sel = tmp0; in tgsi_divmod()
5670 alu.src[1].chan = 3; in tgsi_divmod()
5672 alu.last = 1; in tgsi_divmod()
5673 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5677 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5678 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
5679 alu.is_op3 = 1; in tgsi_divmod()
5681 alu.dst.sel = tmp0; in tgsi_divmod()
5682 alu.dst.chan = 0; in tgsi_divmod()
5683 alu.dst.write = 1; in tgsi_divmod()
5685 alu.src[0].sel = tmp0; in tgsi_divmod()
5686 alu.src[0].chan = 1; in tgsi_divmod()
5687 alu.src[1].sel = tmp1; in tgsi_divmod()
5688 alu.src[1].chan = 1; in tgsi_divmod()
5689 alu.src[2].sel = tmp1; in tgsi_divmod()
5690 alu.src[2].chan = 0; in tgsi_divmod()
5692 alu.last = 1; in tgsi_divmod()
5693 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5699 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5700 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
5702 alu.dst.sel = tmp0; in tgsi_divmod()
5703 alu.dst.chan = j; in tgsi_divmod()
5704 alu.dst.write = (j == 2); in tgsi_divmod()
5706 alu.src[0].sel = tmp0; in tgsi_divmod()
5707 alu.src[0].chan = 0; in tgsi_divmod()
5710 alu.src[1].sel = tmp2; in tgsi_divmod()
5711 alu.src[1].chan = 0; in tgsi_divmod()
5713 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
5716 alu.last = (j == 3); in tgsi_divmod()
5717 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5721 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5722 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
5724 alu.dst.sel = tmp0; in tgsi_divmod()
5725 alu.dst.chan = 2; in tgsi_divmod()
5726 alu.dst.write = 1; in tgsi_divmod()
5728 alu.src[0].sel = tmp0; in tgsi_divmod()
5729 alu.src[0].chan = 0; in tgsi_divmod()
5732 alu.src[1].sel = tmp2; in tgsi_divmod()
5733 alu.src[1].chan = 0; in tgsi_divmod()
5735 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
5738 alu.last = 1; in tgsi_divmod()
5739 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5746 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5747 alu.op = ALU_OP2_MULLO_UINT; in tgsi_divmod()
5749 alu.dst.sel = tmp0; in tgsi_divmod()
5750 alu.dst.chan = j; in tgsi_divmod()
5751 alu.dst.write = (j == 1); in tgsi_divmod()
5754 alu.src[0].sel = tmp2; in tgsi_divmod()
5755 alu.src[0].chan = 1; in tgsi_divmod()
5757 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
5760 alu.src[1].sel = tmp0; in tgsi_divmod()
5761 alu.src[1].chan = 2; in tgsi_divmod()
5763 alu.last = (j == 3); in tgsi_divmod()
5764 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5768 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5769 alu.op = ALU_OP2_MULLO_UINT; in tgsi_divmod()
5771 alu.dst.sel = tmp0; in tgsi_divmod()
5772 alu.dst.chan = 1; in tgsi_divmod()
5773 alu.dst.write = 1; in tgsi_divmod()
5776 alu.src[0].sel = tmp2; in tgsi_divmod()
5777 alu.src[0].chan = 1; in tgsi_divmod()
5779 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
5782 alu.src[1].sel = tmp0; in tgsi_divmod()
5783 alu.src[1].chan = 2; in tgsi_divmod()
5785 alu.last = 1; in tgsi_divmod()
5786 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5791 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5792 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5794 alu.dst.sel = tmp0; in tgsi_divmod()
5795 alu.dst.chan = 3; in tgsi_divmod()
5796 alu.dst.write = 1; in tgsi_divmod()
5799 alu.src[0].sel = tmp2; in tgsi_divmod()
5800 alu.src[0].chan = 0; in tgsi_divmod()
5802 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
5805 alu.src[1].sel = tmp0; in tgsi_divmod()
5806 alu.src[1].chan = 1; in tgsi_divmod()
5808 alu.last = 1; in tgsi_divmod()
5809 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5813 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5814 alu.op = ALU_OP2_SETGE_UINT; in tgsi_divmod()
5816 alu.dst.sel = tmp1; in tgsi_divmod()
5817 alu.dst.chan = 0; in tgsi_divmod()
5818 alu.dst.write = 1; in tgsi_divmod()
5820 alu.src[0].sel = tmp0; in tgsi_divmod()
5821 alu.src[0].chan = 3; in tgsi_divmod()
5823 alu.src[1].sel = tmp2; in tgsi_divmod()
5824 alu.src[1].chan = 1; in tgsi_divmod()
5826 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5829 alu.last = 1; in tgsi_divmod()
5830 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5834 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5835 alu.op = ALU_OP2_SETGE_UINT; in tgsi_divmod()
5837 alu.dst.sel = tmp1; in tgsi_divmod()
5838 alu.dst.chan = 1; in tgsi_divmod()
5839 alu.dst.write = 1; in tgsi_divmod()
5842 alu.src[0].sel = tmp2; in tgsi_divmod()
5843 alu.src[0].chan = 0; in tgsi_divmod()
5845 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
5848 alu.src[1].sel = tmp0; in tgsi_divmod()
5849 alu.src[1].chan = 1; in tgsi_divmod()
5851 alu.last = 1; in tgsi_divmod()
5852 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5858 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5859 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5861 alu.dst.sel = tmp1; in tgsi_divmod()
5862 alu.dst.chan = 2; in tgsi_divmod()
5863 alu.dst.write = 1; in tgsi_divmod()
5865 alu.src[0].sel = tmp0; in tgsi_divmod()
5866 alu.src[0].chan = 3; in tgsi_divmod()
5869 alu.src[1].sel = tmp2; in tgsi_divmod()
5870 alu.src[1].chan = 1; in tgsi_divmod()
5872 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5875 alu.last = 1; in tgsi_divmod()
5876 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5880 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5881 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
5883 alu.dst.sel = tmp1; in tgsi_divmod()
5884 alu.dst.chan = 3; in tgsi_divmod()
5885 alu.dst.write = 1; in tgsi_divmod()
5887 alu.src[0].sel = tmp0; in tgsi_divmod()
5888 alu.src[0].chan = 3; in tgsi_divmod()
5890 alu.src[1].sel = tmp2; in tgsi_divmod()
5891 alu.src[1].chan = 1; in tgsi_divmod()
5893 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5896 alu.last = 1; in tgsi_divmod()
5897 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5903 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5904 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
5906 alu.dst.sel = tmp1; in tgsi_divmod()
5907 alu.dst.chan = 2; in tgsi_divmod()
5908 alu.dst.write = 1; in tgsi_divmod()
5910 alu.src[0].sel = tmp0; in tgsi_divmod()
5911 alu.src[0].chan = 2; in tgsi_divmod()
5912 alu.src[1].sel = V_SQ_ALU_SRC_1_INT; in tgsi_divmod()
5914 alu.last = 1; in tgsi_divmod()
5915 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5919 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5920 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
5922 alu.dst.sel = tmp1; in tgsi_divmod()
5923 alu.dst.chan = 3; in tgsi_divmod()
5924 alu.dst.write = 1; in tgsi_divmod()
5926 alu.src[0].sel = tmp0; in tgsi_divmod()
5927 alu.src[0].chan = 2; in tgsi_divmod()
5928 alu.src[1].sel = V_SQ_ALU_SRC_M_1_INT; in tgsi_divmod()
5930 alu.last = 1; in tgsi_divmod()
5931 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5937 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5938 alu.op = ALU_OP2_AND_INT; in tgsi_divmod()
5940 alu.dst.sel = tmp1; in tgsi_divmod()
5941 alu.dst.chan = 0; in tgsi_divmod()
5942 alu.dst.write = 1; in tgsi_divmod()
5944 alu.src[0].sel = tmp1; in tgsi_divmod()
5945 alu.src[0].chan = 0; in tgsi_divmod()
5946 alu.src[1].sel = tmp1; in tgsi_divmod()
5947 alu.src[1].chan = 1; in tgsi_divmod()
5949 alu.last = 1; in tgsi_divmod()
5950 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5955 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5956 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
5957 alu.is_op3 = 1; in tgsi_divmod()
5959 alu.dst.sel = tmp0; in tgsi_divmod()
5960 alu.dst.chan = 2; in tgsi_divmod()
5961 alu.dst.write = 1; in tgsi_divmod()
5963 alu.src[0].sel = tmp1; in tgsi_divmod()
5964 alu.src[0].chan = 0; in tgsi_divmod()
5965 alu.src[1].sel = tmp0; in tgsi_divmod()
5966 alu.src[1].chan = mod ? 3 : 2; in tgsi_divmod()
5967 alu.src[2].sel = tmp1; in tgsi_divmod()
5968 alu.src[2].chan = 2; in tgsi_divmod()
5970 alu.last = 1; in tgsi_divmod()
5971 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5975 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5976 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
5977 alu.is_op3 = 1; in tgsi_divmod()
5980 alu.dst.sel = tmp0; in tgsi_divmod()
5981 alu.dst.chan = 2; in tgsi_divmod()
5982 alu.dst.write = 1; in tgsi_divmod()
5984 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
5987 alu.src[0].sel = tmp1; in tgsi_divmod()
5988 alu.src[0].chan = 1; in tgsi_divmod()
5989 alu.src[1].sel = tmp1; in tgsi_divmod()
5990 alu.src[1].chan = 3; in tgsi_divmod()
5991 alu.src[2].sel = tmp0; in tgsi_divmod()
5992 alu.src[2].chan = 2; in tgsi_divmod()
5994 alu.last = 1; in tgsi_divmod()
5995 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6005 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6006 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6008 alu.dst.sel = tmp0; in tgsi_divmod()
6009 alu.dst.chan = 0; in tgsi_divmod()
6010 alu.dst.write = 1; in tgsi_divmod()
6012 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
6013 alu.src[1].sel = tmp0; in tgsi_divmod()
6014 alu.src[1].chan = 2; in tgsi_divmod()
6016 alu.last = 1; in tgsi_divmod()
6017 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6022 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6023 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
6024 alu.is_op3 = 1; in tgsi_divmod()
6026 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
6028 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
6029 alu.src[1].sel = tmp0; in tgsi_divmod()
6030 alu.src[1].chan = 2; in tgsi_divmod()
6031 alu.src[2].sel = tmp0; in tgsi_divmod()
6032 alu.src[2].chan = 0; in tgsi_divmod()
6034 alu.last = 1; in tgsi_divmod()
6035 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6041 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6042 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6044 alu.dst.sel = tmp0; in tgsi_divmod()
6045 alu.dst.chan = 0; in tgsi_divmod()
6046 alu.dst.write = 1; in tgsi_divmod()
6048 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
6049 alu.src[1].sel = tmp0; in tgsi_divmod()
6050 alu.src[1].chan = 2; in tgsi_divmod()
6052 alu.last = 1; in tgsi_divmod()
6053 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6058 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6059 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
6060 alu.is_op3 = 1; in tgsi_divmod()
6062 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
6064 alu.src[0].sel = tmp2; in tgsi_divmod()
6065 alu.src[0].chan = 2; in tgsi_divmod()
6066 alu.src[1].sel = tmp0; in tgsi_divmod()
6067 alu.src[1].chan = 2; in tgsi_divmod()
6068 alu.src[2].sel = tmp0; in tgsi_divmod()
6069 alu.src[2].chan = 0; in tgsi_divmod()
6071 alu.last = 1; in tgsi_divmod()
6072 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6104 struct r600_bytecode_alu alu; in tgsi_f2i() local
6113 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_f2i()
6114 alu.op = ALU_OP1_TRUNC; in tgsi_f2i()
6116 alu.dst.sel = ctx->temp_reg; in tgsi_f2i()
6117 alu.dst.chan = i; in tgsi_f2i()
6118 alu.dst.write = 1; in tgsi_f2i()
6120 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_f2i()
6122 alu.last = 1; in tgsi_f2i()
6123 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_f2i()
6132 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_f2i()
6133 alu.op = ctx->inst_info->op; in tgsi_f2i()
6135 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_f2i()
6137 alu.src[0].sel = ctx->temp_reg; in tgsi_f2i()
6138 alu.src[0].chan = i; in tgsi_f2i()
6140 if (i == last_inst || alu.op == ALU_OP1_FLT_TO_UINT) in tgsi_f2i()
6141 alu.last = 1; in tgsi_f2i()
6142 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_f2i()
6153 struct r600_bytecode_alu alu; in tgsi_iabs() local
6163 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_iabs()
6164 alu.op = ALU_OP2_SUB_INT; in tgsi_iabs()
6166 alu.dst.sel = ctx->temp_reg; in tgsi_iabs()
6167 alu.dst.chan = i; in tgsi_iabs()
6168 alu.dst.write = 1; in tgsi_iabs()
6170 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_iabs()
6171 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_iabs()
6174 alu.last = 1; in tgsi_iabs()
6175 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_iabs()
6185 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_iabs()
6186 alu.op = ALU_OP3_CNDGE_INT; in tgsi_iabs()
6187 alu.is_op3 = 1; in tgsi_iabs()
6188 alu.dst.write = 1; in tgsi_iabs()
6190 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_iabs()
6192 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_iabs()
6193 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_iabs()
6194 alu.src[2].sel = ctx->temp_reg; in tgsi_iabs()
6195 alu.src[2].chan = i; in tgsi_iabs()
6198 alu.last = 1; in tgsi_iabs()
6199 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_iabs()
6209 struct r600_bytecode_alu alu; in tgsi_issg() local
6219 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_issg()
6220 alu.op = ALU_OP3_CNDGE_INT; in tgsi_issg()
6221 alu.is_op3 = 1; in tgsi_issg()
6223 alu.dst.sel = ctx->temp_reg; in tgsi_issg()
6224 alu.dst.chan = i; in tgsi_issg()
6225 alu.dst.write = 1; in tgsi_issg()
6227 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_issg()
6228 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_issg()
6229 alu.src[2].sel = V_SQ_ALU_SRC_M_1_INT; in tgsi_issg()
6232 alu.last = 1; in tgsi_issg()
6233 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_issg()
6243 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_issg()
6244 alu.op = ALU_OP3_CNDGT_INT; in tgsi_issg()
6245 alu.is_op3 = 1; in tgsi_issg()
6246 alu.dst.write = 1; in tgsi_issg()
6248 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_issg()
6250 alu.src[0].sel = ctx->temp_reg; in tgsi_issg()
6251 alu.src[0].chan = i; in tgsi_issg()
6253 alu.src[1].sel = V_SQ_ALU_SRC_1_INT; in tgsi_issg()
6255 alu.src[2].sel = ctx->temp_reg; in tgsi_issg()
6256 alu.src[2].chan = i; in tgsi_issg()
6259 alu.last = 1; in tgsi_issg()
6260 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_issg()
6272 struct r600_bytecode_alu alu; in tgsi_ssg() local
6277 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ssg()
6278 alu.op = ALU_OP3_CNDGT; in tgsi_ssg()
6279 alu.is_op3 = 1; in tgsi_ssg()
6281 alu.dst.sel = ctx->temp_reg; in tgsi_ssg()
6282 alu.dst.chan = i; in tgsi_ssg()
6284 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_ssg()
6285 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_ssg()
6286 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_ssg()
6289 alu.last = 1; in tgsi_ssg()
6290 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ssg()
6297 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ssg()
6298 alu.op = ALU_OP3_CNDGT; in tgsi_ssg()
6299 alu.is_op3 = 1; in tgsi_ssg()
6300 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_ssg()
6302 alu.src[0].sel = ctx->temp_reg; in tgsi_ssg()
6303 alu.src[0].chan = i; in tgsi_ssg()
6304 alu.src[0].neg = 1; in tgsi_ssg()
6306 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_ssg()
6307 alu.src[1].neg = 1; in tgsi_ssg()
6309 alu.src[2].sel = ctx->temp_reg; in tgsi_ssg()
6310 alu.src[2].chan = i; in tgsi_ssg()
6313 alu.last = 1; in tgsi_ssg()
6314 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ssg()
6324 struct r600_bytecode_alu alu; in tgsi_bfi() local
6336 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6337 alu.op = ALU_OP2_SETGE_INT; in tgsi_bfi()
6338 r600_bytecode_src(&alu.src[0], &ctx->src[3], i); in tgsi_bfi()
6339 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_bfi()
6340 alu.src[1].value = 32; in tgsi_bfi()
6341 alu.dst.sel = ctx->temp_reg; in tgsi_bfi()
6342 alu.dst.chan = i; in tgsi_bfi()
6343 alu.dst.write = 1; in tgsi_bfi()
6344 alu.last = i == last_inst; in tgsi_bfi()
6345 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6355 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6356 alu.op = ALU_OP2_BFM_INT; in tgsi_bfi()
6357 alu.dst.sel = t1; in tgsi_bfi()
6358 alu.dst.chan = i; in tgsi_bfi()
6359 alu.dst.write = 1; in tgsi_bfi()
6360 alu.last = i == last_inst; in tgsi_bfi()
6362 r600_bytecode_src(&alu.src[0], &ctx->src[3], i); in tgsi_bfi()
6363 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_bfi()
6365 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6377 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6378 alu.op = ALU_OP2_LSHL_INT; in tgsi_bfi()
6379 alu.dst.sel = t2; in tgsi_bfi()
6380 alu.dst.chan = i; in tgsi_bfi()
6381 alu.dst.write = 1; in tgsi_bfi()
6382 alu.last = i == last_inst; in tgsi_bfi()
6384 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_bfi()
6385 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_bfi()
6387 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6397 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6398 alu.op = ALU_OP3_BFI_INT; in tgsi_bfi()
6399 alu.is_op3 = 1; in tgsi_bfi()
6400 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_bfi()
6401 alu.dst.chan = i; in tgsi_bfi()
6402 alu.dst.write = 1; in tgsi_bfi()
6403 alu.last = i == last_inst; in tgsi_bfi()
6405 alu.src[0].sel = t1; in tgsi_bfi()
6406 alu.src[0].chan = i; in tgsi_bfi()
6407 alu.src[1].sel = t2; in tgsi_bfi()
6408 alu.src[1].chan = i; in tgsi_bfi()
6409 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_bfi()
6411 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6419 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6420 alu.op = ALU_OP3_CNDE_INT; in tgsi_bfi()
6421 alu.is_op3 = 1; in tgsi_bfi()
6422 alu.src[0].sel = ctx->temp_reg; in tgsi_bfi()
6423 alu.src[0].chan = i; in tgsi_bfi()
6424 r600_bytecode_src(&alu.src[2], &ctx->src[1], i); in tgsi_bfi()
6426 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_bfi()
6428 alu.src[1].sel = alu.dst.sel; in tgsi_bfi()
6429 alu.src[1].chan = i; in tgsi_bfi()
6431 alu.last = i == last_inst; in tgsi_bfi()
6432 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6442 struct r600_bytecode_alu alu; in tgsi_msb() local
6459 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_msb()
6460 alu.op = ctx->inst_info->op; in tgsi_msb()
6461 alu.dst.sel = t1; in tgsi_msb()
6462 alu.dst.chan = i; in tgsi_msb()
6463 alu.dst.write = 1; in tgsi_msb()
6464 alu.last = i == last_inst; in tgsi_msb()
6466 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_msb()
6468 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_msb()
6480 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_msb()
6481 alu.op = ALU_OP2_SUB_INT; in tgsi_msb()
6482 alu.dst.sel = t2; in tgsi_msb()
6483 alu.dst.chan = i; in tgsi_msb()
6484 alu.dst.write = 1; in tgsi_msb()
6485 alu.last = i == last_inst; in tgsi_msb()
6487 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_msb()
6488 alu.src[0].value = 31; in tgsi_msb()
6489 alu.src[1].sel = t1; in tgsi_msb()
6490 alu.src[1].chan = i; in tgsi_msb()
6492 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_msb()
6502 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_msb()
6503 alu.op = ALU_OP3_CNDGE_INT; in tgsi_msb()
6504 alu.is_op3 = 1; in tgsi_msb()
6505 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_msb()
6506 alu.dst.chan = i; in tgsi_msb()
6507 alu.dst.write = 1; in tgsi_msb()
6508 alu.last = i == last_inst; in tgsi_msb()
6510 alu.src[0].sel = t1; in tgsi_msb()
6511 alu.src[0].chan = i; in tgsi_msb()
6512 alu.src[1].sel = t2; in tgsi_msb()
6513 alu.src[1].chan = i; in tgsi_msb()
6514 alu.src[2].sel = t1; in tgsi_msb()
6515 alu.src[2].chan = i; in tgsi_msb()
6517 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_msb()
6528 struct r600_bytecode_alu alu; in tgsi_interp_egcm() local
6585 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
6586 alu.op = ALU_OP3_MULADD; in tgsi_interp_egcm()
6587 alu.is_op3 = 1; in tgsi_interp_egcm()
6588 alu.src[0].sel = gradientsH; in tgsi_interp_egcm()
6589 alu.src[0].chan = i; in tgsi_interp_egcm()
6591 alu.src[1].sel = sample_gpr; in tgsi_interp_egcm()
6592 alu.src[1].chan = 2; in tgsi_interp_egcm()
6595 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in tgsi_interp_egcm()
6597 alu.src[2].sel = interp_gpr; in tgsi_interp_egcm()
6598 alu.src[2].chan = interp_base_chan + i; in tgsi_interp_egcm()
6599 alu.dst.sel = ctx->temp_reg; in tgsi_interp_egcm()
6600 alu.dst.chan = i; in tgsi_interp_egcm()
6601 alu.last = i == 1; in tgsi_interp_egcm()
6603 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
6609 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
6610 alu.op = ALU_OP3_MULADD; in tgsi_interp_egcm()
6611 alu.is_op3 = 1; in tgsi_interp_egcm()
6612 alu.src[0].sel = gradientsV; in tgsi_interp_egcm()
6613 alu.src[0].chan = i; in tgsi_interp_egcm()
6615 alu.src[1].sel = sample_gpr; in tgsi_interp_egcm()
6616 alu.src[1].chan = 3; in tgsi_interp_egcm()
6619 r600_bytecode_src(&alu.src[1], &ctx->src[1], 1); in tgsi_interp_egcm()
6621 alu.src[2].sel = ctx->temp_reg; in tgsi_interp_egcm()
6622 alu.src[2].chan = i; in tgsi_interp_egcm()
6623 alu.dst.sel = ctx->temp_reg; in tgsi_interp_egcm()
6624 alu.dst.chan = i; in tgsi_interp_egcm()
6625 alu.last = i == 1; in tgsi_interp_egcm()
6627 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
6635 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
6636 alu.op = i < 4 ? ALU_OP2_INTERP_ZW : ALU_OP2_INTERP_XY; in tgsi_interp_egcm()
6638 alu.dst.sel = tmp; in tgsi_interp_egcm()
6640 alu.dst.write = 1; in tgsi_interp_egcm()
6643 alu.dst.write = 0; in tgsi_interp_egcm()
6645 alu.dst.chan = i % 4; in tgsi_interp_egcm()
6649 alu.src[0].sel = ctx->temp_reg; in tgsi_interp_egcm()
6650 alu.src[0].chan = 1 - (i % 2); in tgsi_interp_egcm()
6652 alu.src[0].sel = interp_gpr; in tgsi_interp_egcm()
6653 alu.src[0].chan = interp_base_chan + 1 - (i % 2); in tgsi_interp_egcm()
6655 alu.src[1].sel = V_SQ_ALU_SRC_PARAM_BASE + ctx->shader->input[input].lds_pos; in tgsi_interp_egcm()
6656 alu.src[1].chan = 0; in tgsi_interp_egcm()
6658 alu.last = i % 4 == 3; in tgsi_interp_egcm()
6659 alu.bank_swizzle_force = SQ_ALU_VEC_210; in tgsi_interp_egcm()
6661 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
6672 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
6673 alu.op = ALU_OP1_MOV; in tgsi_interp_egcm()
6674 alu.src[0].sel = tmp; in tgsi_interp_egcm()
6675 alu.src[0].chan = ctx->src[0].swizzle[i]; in tgsi_interp_egcm()
6676 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_interp_egcm()
6677 alu.dst.write = 1; in tgsi_interp_egcm()
6678 alu.last = i == lasti; in tgsi_interp_egcm()
6679 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
6690 struct r600_bytecode_alu alu; in tgsi_helper_copy() local
6694 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_helper_copy()
6696 alu.op = ALU_OP0_NOP; in tgsi_helper_copy()
6697 alu.dst.chan = i; in tgsi_helper_copy()
6699 alu.op = ALU_OP1_MOV; in tgsi_helper_copy()
6700 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_helper_copy()
6701 alu.src[0].sel = ctx->temp_reg; in tgsi_helper_copy()
6702 alu.src[0].chan = i; in tgsi_helper_copy()
6705 alu.last = 1; in tgsi_helper_copy()
6707 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_helper_copy()
6719 struct r600_bytecode_alu alu; in tgsi_make_src_for_op3() local
6727 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_make_src_for_op3()
6728 alu.op = ALU_OP1_MOV; in tgsi_make_src_for_op3()
6729 alu.dst.sel = temp; in tgsi_make_src_for_op3()
6730 alu.dst.chan = chan; in tgsi_make_src_for_op3()
6731 alu.dst.write = 1; in tgsi_make_src_for_op3()
6733 alu.src[0] = *bc_src; in tgsi_make_src_for_op3()
6734 alu.last = true; // sufficient? in tgsi_make_src_for_op3()
6735 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_make_src_for_op3()
6749 struct r600_bytecode_alu alu; in tgsi_op3_dst() local
6768 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op3_dst()
6769 alu.op = op; in tgsi_op3_dst()
6771 r = tgsi_make_src_for_op3(ctx, temp_regs[j], i, &alu.src[j], &ctx->src[j]); in tgsi_op3_dst()
6777 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op3_dst()
6779 alu.dst.sel = dst; in tgsi_op3_dst()
6781 alu.dst.chan = i; in tgsi_op3_dst()
6782 alu.dst.write = 1; in tgsi_op3_dst()
6783 alu.is_op3 = 1; in tgsi_op3_dst()
6785 alu.last = 1; in tgsi_op3_dst()
6787 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op3_dst()
6802 struct r600_bytecode_alu alu; in tgsi_dp() local
6810 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dp()
6811 alu.op = op; in tgsi_dp()
6813 r600_bytecode_src(&alu.src[j], &ctx->src[j], i); in tgsi_dp()
6816 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_dp()
6817 alu.dst.chan = i; in tgsi_dp()
6818 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in tgsi_dp()
6823 alu.src[0].sel = alu.src[1].sel = V_SQ_ALU_SRC_0; in tgsi_dp()
6824 alu.src[0].chan = alu.src[1].chan = 0; in tgsi_dp()
6829 alu.src[0].sel = alu.src[1].sel = V_SQ_ALU_SRC_0; in tgsi_dp()
6830 alu.src[0].chan = alu.src[1].chan = 0; in tgsi_dp()
6837 alu.last = 1; in tgsi_dp()
6839 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dp()
6867 struct r600_bytecode_alu alu; in do_vtx_fetch_inst() local
6876 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in do_vtx_fetch_inst()
6877 alu.op = ALU_OP1_MOV; in do_vtx_fetch_inst()
6878 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in do_vtx_fetch_inst()
6879 alu.dst.sel = ctx->temp_reg; in do_vtx_fetch_inst()
6880 alu.dst.chan = i; in do_vtx_fetch_inst()
6882 alu.last = 1; in do_vtx_fetch_inst()
6883 alu.dst.write = 1; in do_vtx_fetch_inst()
6884 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_vtx_fetch_inst()
6916 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in do_vtx_fetch_inst()
6917 alu.op = ALU_OP2_AND_INT; in do_vtx_fetch_inst()
6919 alu.dst.chan = i; in do_vtx_fetch_inst()
6920 alu.dst.sel = vtx.dst_gpr; in do_vtx_fetch_inst()
6921 alu.dst.write = 1; in do_vtx_fetch_inst()
6923 alu.src[0].sel = vtx.dst_gpr; in do_vtx_fetch_inst()
6924 alu.src[0].chan = i; in do_vtx_fetch_inst()
6926 alu.src[1].sel = R600_SHADER_BUFFER_INFO_SEL; in do_vtx_fetch_inst()
6927 alu.src[1].sel += (id * 2); in do_vtx_fetch_inst()
6928 alu.src[1].chan = i % 4; in do_vtx_fetch_inst()
6929 alu.src[1].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in do_vtx_fetch_inst()
6932 alu.last = 1; in do_vtx_fetch_inst()
6933 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_vtx_fetch_inst()
6939 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in do_vtx_fetch_inst()
6940 alu.op = ALU_OP2_OR_INT; in do_vtx_fetch_inst()
6942 alu.dst.chan = 3; in do_vtx_fetch_inst()
6943 alu.dst.sel = vtx.dst_gpr; in do_vtx_fetch_inst()
6944 alu.dst.write = 1; in do_vtx_fetch_inst()
6946 alu.src[0].sel = vtx.dst_gpr; in do_vtx_fetch_inst()
6947 alu.src[0].chan = 3; in do_vtx_fetch_inst()
6949 alu.src[1].sel = R600_SHADER_BUFFER_INFO_SEL + (id * 2) + 1; in do_vtx_fetch_inst()
6950 alu.src[1].chan = 0; in do_vtx_fetch_inst()
6951 alu.src[1].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in do_vtx_fetch_inst()
6953 alu.last = 1; in do_vtx_fetch_inst()
6954 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_vtx_fetch_inst()
6969 struct r600_bytecode_alu alu; in r600_do_buffer_txq() local
6970 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_do_buffer_txq()
6971 alu.op = ALU_OP1_MOV; in r600_do_buffer_txq()
6972 alu.src[0].sel = R600_SHADER_BUFFER_INFO_SEL; in r600_do_buffer_txq()
6974 alu.src[0].sel += (id * 2) + 1; in r600_do_buffer_txq()
6975 alu.src[0].chan = 1; in r600_do_buffer_txq()
6976 alu.src[0].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in r600_do_buffer_txq()
6977 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in r600_do_buffer_txq()
6978 alu.last = 1; in r600_do_buffer_txq()
6979 r = r600_bytecode_add_alu(ctx->bc, &alu); in r600_do_buffer_txq()
7010 struct r600_bytecode_alu alu; in tgsi_tex() local
7076 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7077 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7078 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7080 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7081 alu.dst.chan = i; in tgsi_tex()
7083 alu.last = 1; in tgsi_tex()
7085 alu.dst.write = 1; in tgsi_tex()
7086 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7093 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7094 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7095 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7097 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7098 alu.dst.chan = out_chan; in tgsi_tex()
7099 alu.last = 1; in tgsi_tex()
7100 alu.dst.write = 1; in tgsi_tex()
7101 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7107 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7108 alu.op = ALU_OP2_MUL; in tgsi_tex()
7109 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7110 alu.src[0].chan = out_chan; in tgsi_tex()
7111 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_tex()
7112 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7113 alu.dst.chan = i; in tgsi_tex()
7114 alu.dst.write = 1; in tgsi_tex()
7115 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7119 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7120 alu.op = ALU_OP1_MOV; in tgsi_tex()
7121 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_tex()
7122 alu.src[0].chan = 0; in tgsi_tex()
7123 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7124 alu.dst.chan = 3; in tgsi_tex()
7125 alu.last = 1; in tgsi_tex()
7126 alu.dst.write = 1; in tgsi_tex()
7127 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7146 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7147 alu.op = ALU_OP2_CUBE; in tgsi_tex()
7148 r600_bytecode_src(&alu.src[0], &ctx->src[0], src0_swizzle[i]); in tgsi_tex()
7149 r600_bytecode_src(&alu.src[1], &ctx->src[0], src1_swizzle[i]); in tgsi_tex()
7150 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7151 alu.dst.chan = i; in tgsi_tex()
7153 alu.last = 1; in tgsi_tex()
7154 alu.dst.write = 1; in tgsi_tex()
7155 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7163 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7164 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7165 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7166 alu.src[0].chan = 2; in tgsi_tex()
7167 alu.src[0].abs = 1; in tgsi_tex()
7168 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7169 alu.dst.chan = i; in tgsi_tex()
7171 alu.dst.write = 1; in tgsi_tex()
7173 alu.last = 1; in tgsi_tex()
7174 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7179 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7180 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7181 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7182 alu.src[0].chan = 2; in tgsi_tex()
7183 alu.src[0].abs = 1; in tgsi_tex()
7184 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7185 alu.dst.chan = 2; in tgsi_tex()
7186 alu.dst.write = 1; in tgsi_tex()
7187 alu.last = 1; in tgsi_tex()
7188 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7197 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7198 alu.op = ALU_OP3_MULADD; in tgsi_tex()
7199 alu.is_op3 = 1; in tgsi_tex()
7201 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7202 alu.src[0].chan = 0; in tgsi_tex()
7203 alu.src[1].sel = ctx->temp_reg; in tgsi_tex()
7204 alu.src[1].chan = 2; in tgsi_tex()
7206 alu.src[2].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7207 alu.src[2].chan = 0; in tgsi_tex()
7208 alu.src[2].value = u_bitcast_f2u(1.5f); in tgsi_tex()
7210 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7211 alu.dst.chan = 0; in tgsi_tex()
7212 alu.dst.write = 1; in tgsi_tex()
7214 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7218 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7219 alu.op = ALU_OP3_MULADD; in tgsi_tex()
7220 alu.is_op3 = 1; in tgsi_tex()
7222 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7223 alu.src[0].chan = 1; in tgsi_tex()
7224 alu.src[1].sel = ctx->temp_reg; in tgsi_tex()
7225 alu.src[1].chan = 2; in tgsi_tex()
7227 alu.src[2].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7228 alu.src[2].chan = 0; in tgsi_tex()
7229 alu.src[2].value = u_bitcast_f2u(1.5f); in tgsi_tex()
7231 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7232 alu.dst.chan = 1; in tgsi_tex()
7233 alu.dst.write = 1; in tgsi_tex()
7235 alu.last = 1; in tgsi_tex()
7236 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7244 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7245 alu.op = ALU_OP1_MOV; in tgsi_tex()
7247 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_tex()
7249 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7250 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7251 alu.dst.chan = 2; in tgsi_tex()
7252 alu.dst.write = 1; in tgsi_tex()
7253 alu.last = 1; in tgsi_tex()
7254 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7263 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7264 alu.op = ALU_OP1_MOV; in tgsi_tex()
7265 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7266 alu.src[0].chan = 3; in tgsi_tex()
7267 alu.dst.sel = mytmp; in tgsi_tex()
7268 alu.dst.chan = 0; in tgsi_tex()
7269 alu.dst.write = 1; in tgsi_tex()
7270 alu.last = 1; in tgsi_tex()
7271 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7276 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7277 alu.op = ALU_OP3_MULADD; in tgsi_tex()
7278 alu.is_op3 = 1; in tgsi_tex()
7279 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7280 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7281 alu.src[1].chan = 0; in tgsi_tex()
7282 alu.src[1].value = u_bitcast_f2u(8.0f); in tgsi_tex()
7283 alu.src[2].sel = mytmp; in tgsi_tex()
7284 alu.src[2].chan = 0; in tgsi_tex()
7285 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7286 alu.dst.chan = 3; in tgsi_tex()
7287 alu.dst.write = 1; in tgsi_tex()
7288 alu.last = 1; in tgsi_tex()
7289 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7307 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7308 alu.op = ALU_OP1_MOV; in tgsi_tex()
7309 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7310 alu.dst.sel = tex.src_gpr; in tgsi_tex()
7311 alu.dst.chan = 0; in tgsi_tex()
7312 alu.last = 1; in tgsi_tex()
7313 alu.dst.write = 1; in tgsi_tex()
7314 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7330 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7331 alu.op = ALU_OP1_MOV; in tgsi_tex()
7334 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_tex()
7336 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7337 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7338 alu.dst.chan = 2; in tgsi_tex()
7339 alu.last = 1; in tgsi_tex()
7340 alu.dst.write = 1; in tgsi_tex()
7341 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7370 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7371 alu.op = ALU_OP1_MOV; in tgsi_tex()
7372 r600_bytecode_src(&alu.src[0], &ctx->src[i], j); in tgsi_tex()
7373 alu.dst.sel = treg; in tgsi_tex()
7374 alu.dst.chan = j; in tgsi_tex()
7376 alu.last = 1; in tgsi_tex()
7377 alu.dst.write = 1; in tgsi_tex()
7378 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7415 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7416 alu.op = ALU_OP1_MOV; in tgsi_tex()
7417 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_tex()
7418 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7419 alu.dst.chan = i; in tgsi_tex()
7421 alu.last = 1; in tgsi_tex()
7422 alu.dst.write = 1; in tgsi_tex()
7423 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7442 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7443 alu.op = ALU_OP2_ADD_INT; in tgsi_tex()
7444 alu.src[0].sel = src_gpr; in tgsi_tex()
7445 alu.src[0].chan = 2; in tgsi_tex()
7446 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7447 alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleZ]; in tgsi_tex()
7448 alu.dst.sel = src_gpr; in tgsi_tex()
7449 alu.dst.chan = 2; in tgsi_tex()
7450 alu.dst.write = 1; in tgsi_tex()
7451 alu.last = 1; in tgsi_tex()
7452 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7463 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7464 alu.op = ALU_OP2_ADD_INT; in tgsi_tex()
7465 alu.src[0].sel = src_gpr; in tgsi_tex()
7466 alu.src[0].chan = 1; in tgsi_tex()
7467 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7468 alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleY]; in tgsi_tex()
7469 alu.dst.sel = src_gpr; in tgsi_tex()
7470 alu.dst.chan = 1; in tgsi_tex()
7471 alu.dst.write = 1; in tgsi_tex()
7472 alu.last = 1; in tgsi_tex()
7473 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7482 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7483 alu.op = ALU_OP2_ADD_INT; in tgsi_tex()
7484 alu.src[0].sel = src_gpr; in tgsi_tex()
7485 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7486 alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleX]; in tgsi_tex()
7487 alu.dst.sel = src_gpr; in tgsi_tex()
7488 alu.dst.write = 1; in tgsi_tex()
7489 alu.last = 1; in tgsi_tex()
7490 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7562 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7563 alu.op = ALU_OP2_MULLO_INT; in tgsi_tex()
7564 alu.src[0].sel = src_gpr; in tgsi_tex()
7565 alu.src[0].chan = sample_chan; in tgsi_tex()
7566 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7567 alu.src[1].value = 4; in tgsi_tex()
7568 alu.dst.sel = temp; in tgsi_tex()
7569 alu.dst.chan = i; in tgsi_tex()
7570 alu.dst.write = i == 0; in tgsi_tex()
7572 alu.last = 1; in tgsi_tex()
7573 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7578 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7579 alu.op = ALU_OP2_MULLO_INT; in tgsi_tex()
7580 alu.src[0].sel = src_gpr; in tgsi_tex()
7581 alu.src[0].chan = sample_chan; in tgsi_tex()
7582 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7583 alu.src[1].value = 4; in tgsi_tex()
7584 alu.dst.sel = temp; in tgsi_tex()
7585 alu.dst.chan = 0; in tgsi_tex()
7586 alu.dst.write = 1; in tgsi_tex()
7587 alu.last = 1; in tgsi_tex()
7588 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7594 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7595 alu.op = ALU_OP2_LSHR_INT; in tgsi_tex()
7596 alu.src[0].sel = temp; in tgsi_tex()
7597 alu.src[0].chan = 3; in tgsi_tex()
7598 alu.src[1].sel = temp; in tgsi_tex()
7599 alu.src[1].chan = 0; in tgsi_tex()
7600 alu.dst.sel = src_gpr; in tgsi_tex()
7601 alu.dst.chan = sample_chan; in tgsi_tex()
7602 alu.dst.write = 1; in tgsi_tex()
7603 alu.last = 1; in tgsi_tex()
7604 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7609 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7610 alu.op = ALU_OP2_AND_INT; in tgsi_tex()
7611 alu.src[0].sel = src_gpr; in tgsi_tex()
7612 alu.src[0].chan = sample_chan; in tgsi_tex()
7613 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7614 alu.src[1].value = 0xF; in tgsi_tex()
7615 alu.dst.sel = src_gpr; in tgsi_tex()
7616 alu.dst.chan = sample_chan; in tgsi_tex()
7617 alu.dst.write = 1; in tgsi_tex()
7618 alu.last = 1; in tgsi_tex()
7619 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7625 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7626 alu.op = ALU_OP1_INT_TO_FLT; in tgsi_tex()
7627 alu.src[0].sel = src_gpr; in tgsi_tex()
7628 alu.src[0].chan = sample_chan; in tgsi_tex()
7629 alu.dst.sel = ctx->file_offset[inst->Dst[0].Register.File] + inst->Dst[0].Register.Index; in tgsi_tex()
7630 alu.dst.chan = i; in tgsi_tex()
7631 alu.dst.write = 1; in tgsi_tex()
7632 alu.last = 1; in tgsi_tex()
7633 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7645 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7646 alu.op = ALU_OP1_MOV; in tgsi_tex()
7648 alu.src[0].sel = R600_SHADER_BUFFER_INFO_SEL; in tgsi_tex()
7651 alu.src[0].sel += id / 4; in tgsi_tex()
7652 alu.src[0].chan = id % 4; in tgsi_tex()
7655 alu.src[0].sel += (id * 2) + 1; in tgsi_tex()
7656 alu.src[0].chan = 2; in tgsi_tex()
7658 alu.src[0].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in tgsi_tex()
7659 tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst); in tgsi_tex()
7660 alu.last = 1; in tgsi_tex()
7661 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7927 struct r600_bytecode_alu alu; in tgsi_set_gds_temp() local
7928 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_set_gds_temp()
7929 alu.op = ALU_OP2_LSHL_INT; in tgsi_set_gds_temp()
7930 alu.src[0].sel = get_address_file_reg(ctx, inst->Src[0].Indirect.Index); in tgsi_set_gds_temp()
7931 alu.src[0].chan = 0; in tgsi_set_gds_temp()
7932 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_set_gds_temp()
7933 alu.src[1].value = 2; in tgsi_set_gds_temp()
7934 alu.dst.sel = ctx->temp_reg; in tgsi_set_gds_temp()
7935 alu.dst.chan = 0; in tgsi_set_gds_temp()
7936 alu.dst.write = 1; in tgsi_set_gds_temp()
7937 alu.last = 1; in tgsi_set_gds_temp()
7938 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_set_gds_temp()
8004 struct r600_bytecode_alu alu; in load_index_src() local
8009 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_index_src()
8010 alu.op = ALU_OP1_MOV; in load_index_src()
8011 alu.dst.sel = temp_reg; in load_index_src()
8012 alu.dst.chan = i; in load_index_src()
8025 r600_bytecode_src(&alu.src[0], &ctx->src[src_index], 1); in load_index_src()
8040 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in load_index_src()
8041 alu.src[0].value = 0; in load_index_src()
8043 r600_bytecode_src(&alu.src[0], &ctx->src[src_index], i); in load_index_src()
8047 alu.last = 1; in load_index_src()
8048 alu.dst.write = 1; in load_index_src()
8049 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_index_src()
8071 struct r600_bytecode_alu alu; in load_buffer_coord() local
8072 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_buffer_coord()
8073 alu.op = ALU_OP2_LSHR_INT; in load_buffer_coord()
8074 r600_bytecode_src(&alu.src[0], &ctx->src[src_idx], 0); in load_buffer_coord()
8075 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in load_buffer_coord()
8076 alu.src[1].value = 2; in load_buffer_coord()
8077 alu.dst.sel = temp_reg; in load_buffer_coord()
8078 alu.dst.write = 1; in load_buffer_coord()
8079 alu.last = 1; in load_buffer_coord()
8080 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_buffer_coord()
8223 struct r600_bytecode_alu alu; in tgsi_load_lds() local
8227 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_load_lds()
8228 alu.op = ALU_OP1_MOV; in tgsi_load_lds()
8229 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_load_lds()
8230 alu.dst.sel = temp_reg; in tgsi_load_lds()
8231 alu.dst.write = 1; in tgsi_load_lds()
8232 alu.last = 1; in tgsi_load_lds()
8233 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_load_lds()
8276 struct r600_bytecode_alu alu; in tgsi_store_buffer_rat() local
8277 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_buffer_rat()
8278 alu.op = ALU_OP1_MOV; in tgsi_store_buffer_rat()
8279 alu.dst.sel = temp_reg; in tgsi_store_buffer_rat()
8280 alu.dst.chan = i; in tgsi_store_buffer_rat()
8281 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_store_buffer_rat()
8282 alu.last = (i == 3); in tgsi_store_buffer_rat()
8283 alu.dst.write = 1; in tgsi_store_buffer_rat()
8284 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_buffer_rat()
8291 struct r600_bytecode_alu alu; in tgsi_store_buffer_rat() local
8302 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_buffer_rat()
8303 alu.op = ALU_OP1_MOV; in tgsi_store_buffer_rat()
8304 alu.dst.sel = ctx->temp_reg; in tgsi_store_buffer_rat()
8305 alu.dst.chan = 0; in tgsi_store_buffer_rat()
8307 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_store_buffer_rat()
8308 alu.last = 1; in tgsi_store_buffer_rat()
8309 alu.dst.write = 1; in tgsi_store_buffer_rat()
8310 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_buffer_rat()
8351 struct r600_bytecode_alu alu; in tgsi_store_rat() local
8353 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_rat()
8354 alu.op = ALU_OP1_MOV; in tgsi_store_rat()
8355 alu.dst.sel = ctx->temp_reg; in tgsi_store_rat()
8356 alu.dst.chan = i; in tgsi_store_rat()
8358 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_store_rat()
8360 alu.last = 1; in tgsi_store_rat()
8361 alu.dst.write = 1; in tgsi_store_rat()
8362 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_rat()
8392 struct r600_bytecode_alu alu; in tgsi_store_lds() local
8398 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_lds()
8399 alu.op = ALU_OP1_MOV; in tgsi_store_lds()
8400 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_store_lds()
8401 alu.dst.sel = temp_reg; in tgsi_store_lds()
8402 alu.dst.write = 1; in tgsi_store_lds()
8403 alu.last = 1; in tgsi_store_lds()
8404 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_lds()
8425 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_lds()
8426 alu.op = LDS_OP3_LDS_WRITE_REL; in tgsi_store_lds()
8428 alu.src[0].sel = temp_reg; in tgsi_store_lds()
8429 alu.src[0].chan = i; in tgsi_store_lds()
8430 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_store_lds()
8431 r600_bytecode_src(&alu.src[2], &ctx->src[1], i + 1); in tgsi_store_lds()
8432 alu.last = 1; in tgsi_store_lds()
8433 alu.is_lds_idx_op = true; in tgsi_store_lds()
8434 alu.lds_idx = 1; in tgsi_store_lds()
8435 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_lds()
8441 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_lds()
8442 alu.op = LDS_OP2_LDS_WRITE; in tgsi_store_lds()
8444 alu.src[0].sel = temp_reg; in tgsi_store_lds()
8445 alu.src[0].chan = i; in tgsi_store_lds()
8446 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_store_lds()
8448 alu.last = 1; in tgsi_store_lds()
8449 alu.is_lds_idx_op = true; in tgsi_store_lds()
8451 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_lds()
8473 struct r600_bytecode_alu alu; in tgsi_atomic_op_rat() local
8508 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_rat()
8509 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_rat()
8510 alu.dst.sel = ctx->thread_id_gpr; in tgsi_atomic_op_rat()
8511 alu.dst.chan = 0; in tgsi_atomic_op_rat()
8512 alu.dst.write = 1; in tgsi_atomic_op_rat()
8513 r600_bytecode_src(&alu.src[0], &ctx->src[3], 0); in tgsi_atomic_op_rat()
8514 alu.last = 1; in tgsi_atomic_op_rat()
8515 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_rat()
8519 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_rat()
8520 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_rat()
8521 alu.dst.sel = ctx->thread_id_gpr; in tgsi_atomic_op_rat()
8523 alu.dst.chan = 2; in tgsi_atomic_op_rat()
8525 alu.dst.chan = 3; in tgsi_atomic_op_rat()
8526 alu.dst.write = 1; in tgsi_atomic_op_rat()
8527 r600_bytecode_src(&alu.src[0], &ctx->src[2], 0); in tgsi_atomic_op_rat()
8528 alu.last = 1; in tgsi_atomic_op_rat()
8529 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_rat()
8533 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_rat()
8534 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_rat()
8535 alu.dst.sel = ctx->thread_id_gpr; in tgsi_atomic_op_rat()
8536 alu.dst.chan = 0; in tgsi_atomic_op_rat()
8537 alu.dst.write = 1; in tgsi_atomic_op_rat()
8538 r600_bytecode_src(&alu.src[0], &ctx->src[2], 0); in tgsi_atomic_op_rat()
8539 alu.last = 1; in tgsi_atomic_op_rat()
8540 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_rat()
8635 struct r600_bytecode_alu alu; in tgsi_atomic_op_gds() local
8656 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_gds()
8657 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_gds()
8658 alu.dst.sel = ctx->temp_reg; in tgsi_atomic_op_gds()
8659 alu.dst.chan = is_cm ? 1 : 0; in tgsi_atomic_op_gds()
8660 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_atomic_op_gds()
8661 alu.src[0].value = abs_value; in tgsi_atomic_op_gds()
8662 alu.last = 1; in tgsi_atomic_op_gds()
8663 alu.dst.write = 1; in tgsi_atomic_op_gds()
8664 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_gds()
8668 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_gds()
8669 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_gds()
8670 alu.dst.sel = ctx->temp_reg; in tgsi_atomic_op_gds()
8671 alu.dst.chan = is_cm ? 1 : 0; in tgsi_atomic_op_gds()
8672 r600_bytecode_src(&alu.src[0], &ctx->src[2], 0); in tgsi_atomic_op_gds()
8673 alu.last = 1; in tgsi_atomic_op_gds()
8674 alu.dst.write = 1; in tgsi_atomic_op_gds()
8675 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_gds()
8738 struct r600_bytecode_alu alu; in tgsi_atomic_op_lds() local
8739 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_lds()
8740 alu.op = lds_op; in tgsi_atomic_op_lds()
8741 alu.is_lds_idx_op = true; in tgsi_atomic_op_lds()
8742 alu.last = 1; in tgsi_atomic_op_lds()
8743 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_atomic_op_lds()
8744 r600_bytecode_src(&alu.src[1], &ctx->src[2], 0); in tgsi_atomic_op_lds()
8746 r600_bytecode_src(&alu.src[2], &ctx->src[3], 0); in tgsi_atomic_op_lds()
8748 alu.src[2].sel = V_SQ_ALU_SRC_0; in tgsi_atomic_op_lds()
8749 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_lds()
8754 memset(&alu, 0, sizeof(alu)); in tgsi_atomic_op_lds()
8756 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_lds()
8757 alu.src[0].sel = EG_V_SQ_ALU_SRC_LDS_OQ_A_POP; in tgsi_atomic_op_lds()
8758 alu.src[0].chan = 0; in tgsi_atomic_op_lds()
8759 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in tgsi_atomic_op_lds()
8760 alu.dst.write = 1; in tgsi_atomic_op_lds()
8761 alu.last = 1; in tgsi_atomic_op_lds()
8762 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_lds()
8812 struct r600_bytecode_alu alu; in tgsi_resq() local
8814 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_resq()
8815 alu.op = ALU_OP1_MOV; in tgsi_resq()
8817 alu.src[0].sel = R600_SHADER_BUFFER_INFO_SEL; in tgsi_resq()
8819 alu.src[0].sel += id / 4; in tgsi_resq()
8820 alu.src[0].chan = id % 4; in tgsi_resq()
8821 alu.src[0].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in tgsi_resq()
8822 tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst); in tgsi_resq()
8823 alu.last = 1; in tgsi_resq()
8824 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_resq()
8855 struct r600_bytecode_alu alu; in tgsi_lrp() local
8866 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
8867 alu.op = ALU_OP2_ADD; in tgsi_lrp()
8868 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_lrp()
8869 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_lrp()
8870 alu.omod = 3; in tgsi_lrp()
8871 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_lrp()
8872 alu.dst.chan = i; in tgsi_lrp()
8874 alu.last = 1; in tgsi_lrp()
8876 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
8888 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
8889 alu.op = ALU_OP2_ADD; in tgsi_lrp()
8890 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_lrp()
8891 alu.src[0].chan = 0; in tgsi_lrp()
8892 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_lrp()
8893 r600_bytecode_src_toggle_neg(&alu.src[1]); in tgsi_lrp()
8894 alu.dst.sel = ctx->temp_reg; in tgsi_lrp()
8895 alu.dst.chan = i; in tgsi_lrp()
8897 alu.last = 1; in tgsi_lrp()
8899 alu.dst.write = 1; in tgsi_lrp()
8900 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
8910 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
8911 alu.op = ALU_OP2_MUL; in tgsi_lrp()
8912 alu.src[0].sel = ctx->temp_reg; in tgsi_lrp()
8913 alu.src[0].chan = i; in tgsi_lrp()
8914 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_lrp()
8915 alu.dst.sel = ctx->temp_reg; in tgsi_lrp()
8916 alu.dst.chan = i; in tgsi_lrp()
8918 alu.last = 1; in tgsi_lrp()
8920 alu.dst.write = 1; in tgsi_lrp()
8921 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
8940 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
8941 alu.op = ALU_OP3_MULADD; in tgsi_lrp()
8942 alu.is_op3 = 1; in tgsi_lrp()
8943 r = tgsi_make_src_for_op3(ctx, temp_regs[0], i, &alu.src[0], &ctx->src[0]); in tgsi_lrp()
8946 r = tgsi_make_src_for_op3(ctx, temp_regs[1], i, &alu.src[1], &ctx->src[1]); in tgsi_lrp()
8949 alu.src[2].sel = ctx->temp_reg; in tgsi_lrp()
8950 alu.src[2].chan = i; in tgsi_lrp()
8952 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_lrp()
8953 alu.dst.chan = i; in tgsi_lrp()
8955 alu.last = 1; in tgsi_lrp()
8957 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
8967 struct r600_bytecode_alu alu; in tgsi_cmp() local
8991 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_cmp()
8992 alu.op = op; in tgsi_cmp()
8993 r = tgsi_make_src_for_op3(ctx, temp_regs[0], i, &alu.src[0], &ctx->src[0]); in tgsi_cmp()
8996 r = tgsi_make_src_for_op3(ctx, temp_regs[2], i, &alu.src[1], &ctx->src[2]); in tgsi_cmp()
8999 r = tgsi_make_src_for_op3(ctx, temp_regs[1], i, &alu.src[2], &ctx->src[1]); in tgsi_cmp()
9002 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_cmp()
9003 alu.dst.chan = i; in tgsi_cmp()
9004 alu.dst.write = 1; in tgsi_cmp()
9005 alu.is_op3 = 1; in tgsi_cmp()
9007 alu.last = 1; in tgsi_cmp()
9008 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_cmp()
9018 struct r600_bytecode_alu alu; in tgsi_ucmp() local
9026 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ucmp()
9027 alu.op = ALU_OP3_CNDE_INT; in tgsi_ucmp()
9028 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_ucmp()
9029 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_ucmp()
9030 r600_bytecode_src(&alu.src[2], &ctx->src[1], i); in tgsi_ucmp()
9031 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_ucmp()
9032 alu.dst.chan = i; in tgsi_ucmp()
9033 alu.dst.write = 1; in tgsi_ucmp()
9034 alu.is_op3 = 1; in tgsi_ucmp()
9036 alu.last = 1; in tgsi_ucmp()
9037 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ucmp()
9047 struct r600_bytecode_alu alu; in tgsi_exp() local
9053 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9055 alu.op = ALU_OP1_FLOOR; in tgsi_exp()
9056 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9058 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9059 alu.dst.chan = 0; in tgsi_exp()
9060 alu.dst.write = 1; in tgsi_exp()
9061 alu.last = 1; in tgsi_exp()
9062 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9068 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9069 alu.src[0].sel = ctx->temp_reg; in tgsi_exp()
9070 alu.src[0].chan = 0; in tgsi_exp()
9072 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9073 alu.dst.chan = i; in tgsi_exp()
9074 alu.dst.write = i == 0; in tgsi_exp()
9075 alu.last = i == 2; in tgsi_exp()
9076 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9081 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9082 alu.src[0].sel = ctx->temp_reg; in tgsi_exp()
9083 alu.src[0].chan = 0; in tgsi_exp()
9085 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9086 alu.dst.chan = 0; in tgsi_exp()
9087 alu.dst.write = 1; in tgsi_exp()
9088 alu.last = 1; in tgsi_exp()
9089 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9097 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9099 alu.op = ALU_OP1_FRACT; in tgsi_exp()
9100 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9102 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9104 r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_exp()
9108 alu.dst.write = 1; in tgsi_exp()
9109 alu.dst.chan = 1; in tgsi_exp()
9111 alu.last = 1; in tgsi_exp()
9113 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9122 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9123 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9124 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9126 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9127 alu.dst.chan = i; in tgsi_exp()
9129 alu.dst.write = 1; in tgsi_exp()
9130 alu.last = 1; in tgsi_exp()
9133 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9138 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9139 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9140 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9142 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9143 alu.dst.write = 1; in tgsi_exp()
9144 alu.dst.chan = 2; in tgsi_exp()
9146 alu.last = 1; in tgsi_exp()
9148 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9156 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9158 alu.op = ALU_OP1_MOV; in tgsi_exp()
9159 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_exp()
9160 alu.src[0].chan = 0; in tgsi_exp()
9162 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9163 alu.dst.chan = 3; in tgsi_exp()
9164 alu.dst.write = 1; in tgsi_exp()
9165 alu.last = 1; in tgsi_exp()
9166 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9176 struct r600_bytecode_alu alu; in tgsi_log() local
9184 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9186 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9187 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9188 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9190 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9191 alu.dst.chan = i; in tgsi_log()
9193 alu.dst.write = 1; in tgsi_log()
9195 alu.last = 1; in tgsi_log()
9196 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9202 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9204 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9205 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9206 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9208 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9209 alu.dst.chan = 0; in tgsi_log()
9210 alu.dst.write = 1; in tgsi_log()
9211 alu.last = 1; in tgsi_log()
9212 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9217 alu.op = ALU_OP1_FLOOR; in tgsi_log()
9218 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9219 alu.src[0].chan = 0; in tgsi_log()
9221 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9222 alu.dst.chan = 0; in tgsi_log()
9223 alu.dst.write = 1; in tgsi_log()
9224 alu.last = 1; in tgsi_log()
9226 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9236 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9238 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9239 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9240 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9242 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9243 alu.dst.chan = i; in tgsi_log()
9245 alu.dst.write = 1; in tgsi_log()
9247 alu.last = 1; in tgsi_log()
9249 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9254 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9256 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9257 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9258 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9260 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9261 alu.dst.chan = 1; in tgsi_log()
9262 alu.dst.write = 1; in tgsi_log()
9263 alu.last = 1; in tgsi_log()
9265 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9270 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9272 alu.op = ALU_OP1_FLOOR; in tgsi_log()
9273 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9274 alu.src[0].chan = 1; in tgsi_log()
9276 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9277 alu.dst.chan = 1; in tgsi_log()
9278 alu.dst.write = 1; in tgsi_log()
9279 alu.last = 1; in tgsi_log()
9281 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9287 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9288 alu.op = ALU_OP1_EXP_IEEE; in tgsi_log()
9289 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9290 alu.src[0].chan = 1; in tgsi_log()
9292 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9293 alu.dst.chan = i; in tgsi_log()
9295 alu.dst.write = 1; in tgsi_log()
9297 alu.last = 1; in tgsi_log()
9299 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9304 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9305 alu.op = ALU_OP1_EXP_IEEE; in tgsi_log()
9306 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9307 alu.src[0].chan = 1; in tgsi_log()
9309 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9310 alu.dst.chan = 1; in tgsi_log()
9311 alu.dst.write = 1; in tgsi_log()
9312 alu.last = 1; in tgsi_log()
9314 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9321 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9322 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_log()
9323 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9324 alu.src[0].chan = 1; in tgsi_log()
9326 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9327 alu.dst.chan = i; in tgsi_log()
9329 alu.dst.write = 1; in tgsi_log()
9331 alu.last = 1; in tgsi_log()
9333 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9338 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9339 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_log()
9340 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9341 alu.src[0].chan = 1; in tgsi_log()
9343 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9344 alu.dst.chan = 1; in tgsi_log()
9345 alu.dst.write = 1; in tgsi_log()
9346 alu.last = 1; in tgsi_log()
9348 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9353 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9355 alu.op = ALU_OP2_MUL; in tgsi_log()
9357 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9358 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9360 alu.src[1].sel = ctx->temp_reg; in tgsi_log()
9361 alu.src[1].chan = 1; in tgsi_log()
9363 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9364 alu.dst.chan = 1; in tgsi_log()
9365 alu.dst.write = 1; in tgsi_log()
9366 alu.last = 1; in tgsi_log()
9368 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9377 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9379 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9380 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9381 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9383 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9385 alu.dst.write = 1; in tgsi_log()
9386 alu.dst.chan = i; in tgsi_log()
9388 alu.last = 1; in tgsi_log()
9390 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9395 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9397 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9398 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9399 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9401 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9402 alu.dst.write = 1; in tgsi_log()
9403 alu.dst.chan = 2; in tgsi_log()
9404 alu.last = 1; in tgsi_log()
9406 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9414 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9416 alu.op = ALU_OP1_MOV; in tgsi_log()
9417 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_log()
9418 alu.src[0].chan = 0; in tgsi_log()
9420 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9421 alu.dst.chan = 3; in tgsi_log()
9422 alu.dst.write = 1; in tgsi_log()
9423 alu.last = 1; in tgsi_log()
9425 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9436 struct r600_bytecode_alu alu; in tgsi_eg_arl() local
9442 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_eg_arl()
9446 alu.op = ALU_OP1_FLT_TO_INT_FLOOR; in tgsi_eg_arl()
9449 alu.op = ALU_OP1_FLT_TO_INT; in tgsi_eg_arl()
9452 alu.op = ALU_OP1_MOV; in tgsi_eg_arl()
9462 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_eg_arl()
9463 alu.last = i == lasti; in tgsi_eg_arl()
9464 alu.dst.sel = reg; in tgsi_eg_arl()
9465 alu.dst.chan = i; in tgsi_eg_arl()
9466 alu.dst.write = 1; in tgsi_eg_arl()
9467 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_eg_arl()
9482 struct r600_bytecode_alu alu; in tgsi_r600_arl() local
9488 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
9489 alu.op = ALU_OP1_FLOOR; in tgsi_r600_arl()
9490 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
9491 alu.dst.write = 1; in tgsi_r600_arl()
9494 alu.dst.chan = i; in tgsi_r600_arl()
9495 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_r600_arl()
9496 alu.last = i == lasti; in tgsi_r600_arl()
9497 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
9502 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
9503 alu.op = ALU_OP1_FLT_TO_INT; in tgsi_r600_arl()
9504 alu.src[0].sel = ctx->bc->ar_reg; in tgsi_r600_arl()
9505 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
9506 alu.dst.write = 1; in tgsi_r600_arl()
9508 alu.last = TRUE; in tgsi_r600_arl()
9510 alu.dst.chan = i; in tgsi_r600_arl()
9511 alu.src[0].chan = i; in tgsi_r600_arl()
9512 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
9517 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
9518 alu.op = ALU_OP1_FLT_TO_INT; in tgsi_r600_arl()
9519 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
9520 alu.dst.write = 1; in tgsi_r600_arl()
9522 alu.last = TRUE; in tgsi_r600_arl()
9525 alu.dst.chan = i; in tgsi_r600_arl()
9526 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_r600_arl()
9527 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
9533 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
9534 alu.op = ALU_OP1_MOV; in tgsi_r600_arl()
9535 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
9536 alu.dst.write = 1; in tgsi_r600_arl()
9539 alu.dst.chan = i; in tgsi_r600_arl()
9540 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_r600_arl()
9541 alu.last = i == lasti; in tgsi_r600_arl()
9542 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
9559 struct r600_bytecode_alu alu; in tgsi_opdst() local
9563 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_opdst()
9565 alu.op = ALU_OP2_MUL; in tgsi_opdst()
9566 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_opdst()
9569 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_opdst()
9571 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_opdst()
9575 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_opdst()
9577 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_opdst()
9580 alu.last = 1; in tgsi_opdst()
9581 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_opdst()
9590 struct r600_bytecode_alu alu; in emit_logic_pred() local
9593 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_logic_pred()
9594 alu.op = opcode; in emit_logic_pred()
9595 alu.execute_mask = 1; in emit_logic_pred()
9596 alu.update_pred = 1; in emit_logic_pred()
9598 alu.dst.sel = ctx->temp_reg; in emit_logic_pred()
9599 alu.dst.write = 1; in emit_logic_pred()
9600 alu.dst.chan = 0; in emit_logic_pred()
9602 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in emit_logic_pred()
9603 alu.src[1].sel = V_SQ_ALU_SRC_0; in emit_logic_pred()
9604 alu.src[1].chan = 0; in emit_logic_pred()
9606 alu.last = 1; in emit_logic_pred()
9608 r = r600_bytecode_add_alu_type(ctx->bc, &alu, alu_type); in emit_logic_pred()
9996 struct r600_bytecode_alu alu; in tgsi_umad() local
10007 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_umad()
10009 alu.op = ALU_OP2_MULLO_UINT; in tgsi_umad()
10011 r600_bytecode_src(&alu.src[k], &ctx->src[k], i); in tgsi_umad()
10013 alu.dst.chan = j; in tgsi_umad()
10014 alu.dst.sel = ctx->temp_reg; in tgsi_umad()
10015 alu.dst.write = (j == i); in tgsi_umad()
10017 alu.last = 1; in tgsi_umad()
10018 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_umad()
10023 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_umad()
10025 alu.dst.chan = i; in tgsi_umad()
10026 alu.dst.sel = ctx->temp_reg; in tgsi_umad()
10027 alu.dst.write = 1; in tgsi_umad()
10029 alu.op = ALU_OP2_MULLO_UINT; in tgsi_umad()
10031 r600_bytecode_src(&alu.src[j], &ctx->src[j], i); in tgsi_umad()
10034 alu.last = 1; in tgsi_umad()
10035 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_umad()
10046 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_umad()
10047 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_umad()
10049 alu.op = ALU_OP2_ADD_INT; in tgsi_umad()
10051 alu.src[0].sel = ctx->temp_reg; in tgsi_umad()
10052 alu.src[0].chan = i; in tgsi_umad()
10054 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_umad()
10056 alu.last = 1; in tgsi_umad()
10058 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_umad()
10068 struct r600_bytecode_alu alu; in tgsi_pk2h() local
10073 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pk2h()
10074 alu.op = ALU_OP1_FLT32_TO_FLT16; in tgsi_pk2h()
10075 alu.dst.chan = 0; in tgsi_pk2h()
10076 alu.dst.sel = ctx->temp_reg; in tgsi_pk2h()
10077 alu.dst.write = 1; in tgsi_pk2h()
10078 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_pk2h()
10079 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pk2h()
10082 alu.dst.chan = 1; in tgsi_pk2h()
10083 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in tgsi_pk2h()
10084 alu.last = 1; in tgsi_pk2h()
10085 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pk2h()
10094 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pk2h()
10095 alu.op = ALU_OP3_MULADD_UINT24; in tgsi_pk2h()
10096 alu.is_op3 = 1; in tgsi_pk2h()
10097 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_pk2h()
10098 alu.last = i == lasti; in tgsi_pk2h()
10099 alu.src[0].sel = ctx->temp_reg; in tgsi_pk2h()
10100 alu.src[0].chan = 1; in tgsi_pk2h()
10101 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_pk2h()
10102 alu.src[1].value = 0x10000; in tgsi_pk2h()
10103 alu.src[2].sel = ctx->temp_reg; in tgsi_pk2h()
10104 alu.src[2].chan = 0; in tgsi_pk2h()
10105 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pk2h()
10116 struct r600_bytecode_alu alu; in tgsi_up2h() local
10122 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_up2h()
10123 alu.op = ALU_OP1_MOV; in tgsi_up2h()
10124 alu.dst.chan = 0; in tgsi_up2h()
10125 alu.dst.sel = ctx->temp_reg; in tgsi_up2h()
10126 alu.dst.write = 1; in tgsi_up2h()
10127 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_up2h()
10128 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_up2h()
10133 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_up2h()
10134 alu.op = ALU_OP2_LSHR_INT; in tgsi_up2h()
10135 alu.dst.chan = 1; in tgsi_up2h()
10136 alu.dst.sel = ctx->temp_reg; in tgsi_up2h()
10137 alu.dst.write = 1; in tgsi_up2h()
10138 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_up2h()
10139 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_up2h()
10140 alu.src[1].value = 16; in tgsi_up2h()
10141 alu.last = 1; in tgsi_up2h()
10142 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_up2h()
10150 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_up2h()
10151 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_up2h()
10152 alu.op = ALU_OP1_FLT16_TO_FLT32; in tgsi_up2h()
10153 alu.src[0].sel = ctx->temp_reg; in tgsi_up2h()
10154 alu.src[0].chan = i % 2; in tgsi_up2h()
10155 alu.last = i == lasti; in tgsi_up2h()
10156 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_up2h()
10167 struct r600_bytecode_alu alu; in tgsi_bfe() local
10183 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfe()
10184 alu.op = ALU_OP2_SETGE_INT; in tgsi_bfe()
10185 r600_bytecode_src(&alu.src[0], &ctx->src[2], i); in tgsi_bfe()
10186 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_bfe()
10187 alu.src[1].value = 32; in tgsi_bfe()
10188 alu.dst.sel = ctx->temp_reg; in tgsi_bfe()
10189 alu.dst.chan = i; in tgsi_bfe()
10190 alu.dst.write = 1; in tgsi_bfe()
10192 alu.last = 1; in tgsi_bfe()
10193 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfe()
10199 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfe()
10200 alu.op = ALU_OP3_CNDE_INT; in tgsi_bfe()
10201 alu.is_op3 = 1; in tgsi_bfe()
10202 alu.src[0].sel = ctx->temp_reg; in tgsi_bfe()
10203 alu.src[0].chan = i; in tgsi_bfe()
10205 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_bfe()
10207 alu.src[1].sel = dst; in tgsi_bfe()
10209 alu.src[1].sel = alu.dst.sel; in tgsi_bfe()
10210 alu.src[1].chan = i; in tgsi_bfe()
10211 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_bfe()
10212 alu.dst.write = 1; in tgsi_bfe()
10214 alu.last = 1; in tgsi_bfe()
10215 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfe()
10226 struct r600_bytecode_alu alu; in tgsi_clock() local
10229 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_clock()
10230 alu.op = ALU_OP1_MOV; in tgsi_clock()
10231 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in tgsi_clock()
10232 alu.src[0].sel = EG_V_SQ_ALU_SRC_TIME_LO; in tgsi_clock()
10233 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_clock()
10236 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_clock()
10237 alu.op = ALU_OP1_MOV; in tgsi_clock()
10238 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in tgsi_clock()
10239 alu.src[0].sel = EG_V_SQ_ALU_SRC_TIME_HI; in tgsi_clock()
10240 alu.last = 1; in tgsi_clock()
10241 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_clock()