• Home
  • Raw
  • Download

Lines Matching refs:ac

110 	if (type == ctx->ac.i64 || type == ctx->ac.f64)  in llvm_type_is_64bit()
249 value = ac_to_integer(&ctx->ac, value); in unpack_llvm_param()
252 value = LLVMBuildLShr(ctx->ac.builder, value, in unpack_llvm_param()
257 value = LLVMBuildAnd(ctx->ac.builder, value, in unpack_llvm_param()
373 return LLVMBuildMul(ctx->ac.builder, patch_stride, rel_patch_id, ""); in get_tcs_in_current_patch_offset()
383 return LLVMBuildAdd(ctx->ac.builder, patch0_offset, in get_tcs_out_current_patch_offset()
384 LLVMBuildMul(ctx->ac.builder, patch_stride, in get_tcs_out_current_patch_offset()
397 return LLVMBuildAdd(ctx->ac.builder, patch0_patch_data_offset, in get_tcs_out_current_patch_data_offset()
398 LLVMBuildMul(ctx->ac.builder, patch_stride, in get_tcs_out_current_patch_data_offset()
447 result = LLVMBuildUDiv(ctx->ac.builder, result, divisor, ""); in get_instance_index_for_fetch()
449 return LLVMBuildAdd(ctx->ac.builder, result, in get_instance_index_for_fetch()
459 LLVMBuilderRef builder = ctx->ac.builder; in extract_double_to_float()
460 LLVMTypeRef f64 = LLVMDoubleTypeInContext(ctx->ac.context); in extract_double_to_float()
474 return LLVMBuildAShr(ctx->ac.builder, i32, in unpack_sint16()
477 return LLVMBuildSExt(ctx->ac.builder, in unpack_sint16()
478 LLVMBuildTrunc(ctx->ac.builder, i32, in unpack_sint16()
479 ctx->ac.i16, ""), in unpack_sint16()
493 LLVMValueRef sel_x1 = LLVMBuildICmp(ctx->ac.builder, in si_llvm_load_input_vs()
499 LLVMValueRef sel_y1 = LLVMBuildICmp(ctx->ac.builder, in si_llvm_load_input_vs()
515 LLVMValueRef x = LLVMBuildSelect(ctx->ac.builder, sel_x1, in si_llvm_load_input_vs()
517 LLVMValueRef y = LLVMBuildSelect(ctx->ac.builder, sel_y1, in si_llvm_load_input_vs()
520 out[0] = LLVMBuildSIToFP(ctx->ac.builder, x, ctx->f32, ""); in si_llvm_load_input_vs()
521 out[1] = LLVMBuildSIToFP(ctx->ac.builder, y, ctx->f32, ""); in si_llvm_load_input_vs()
524 out[3] = ctx->ac.f32_1; in si_llvm_load_input_vs()
547 out[0] = LLVMBuildSelect(ctx->ac.builder, sel_x1, in si_llvm_load_input_vs()
549 out[1] = LLVMBuildSelect(ctx->ac.builder, sel_y1, in si_llvm_load_input_vs()
575 t_list = ac_build_load_to_sgpr(&ctx->ac, t_list_ptr, t_offset); in si_llvm_load_input_vs()
611 input[i] = ac_build_buffer_load_format(&ctx->ac, t_list, in si_llvm_load_input_vs()
619 out[chan] = LLVMBuildExtractElement(ctx->ac.builder, in si_llvm_load_input_vs()
635 tmp = LLVMBuildFPToUI(ctx->ac.builder, tmp, ctx->i32, ""); in si_llvm_load_input_vs()
637 tmp = ac_to_integer(&ctx->ac, tmp); in si_llvm_load_input_vs()
645 tmp = LLVMBuildShl(ctx->ac.builder, tmp, in si_llvm_load_input_vs()
648 tmp = LLVMBuildAShr(ctx->ac.builder, tmp, c30, ""); in si_llvm_load_input_vs()
654 tmp = LLVMBuildSIToFP(ctx->ac.builder, tmp, ctx->f32, ""); in si_llvm_load_input_vs()
655 clamp = LLVMBuildFCmp(ctx->ac.builder, LLVMRealULT, tmp, neg_one, ""); in si_llvm_load_input_vs()
656 tmp = LLVMBuildSelect(ctx->ac.builder, clamp, neg_one, tmp, ""); in si_llvm_load_input_vs()
658 tmp = LLVMBuildSIToFP(ctx->ac.builder, tmp, ctx->f32, ""); in si_llvm_load_input_vs()
667 out[chan] = ac_to_integer(&ctx->ac, out[chan]); in si_llvm_load_input_vs()
668 out[chan] = LLVMBuildUIToFP(ctx->ac.builder, in si_llvm_load_input_vs()
670 out[chan] = LLVMBuildFMul(ctx->ac.builder, out[chan], in si_llvm_load_input_vs()
688 out[chan] = ac_to_integer(&ctx->ac, out[chan]); in si_llvm_load_input_vs()
689 out[chan] = LLVMBuildSIToFP(ctx->ac.builder, in si_llvm_load_input_vs()
691 out[chan] = LLVMBuildFMul(ctx->ac.builder, out[chan], in si_llvm_load_input_vs()
702 out[chan] = ac_to_integer(&ctx->ac, out[chan]); in si_llvm_load_input_vs()
703 out[chan] = LLVMBuildUIToFP(ctx->ac.builder, in si_llvm_load_input_vs()
709 out[chan] = ac_to_integer(&ctx->ac, out[chan]); in si_llvm_load_input_vs()
710 out[chan] = LLVMBuildSIToFP(ctx->ac.builder, in si_llvm_load_input_vs()
738 out[chan] = LLVMBuildExtractElement(ctx->ac.builder, in si_llvm_load_input_vs()
746 out[3] = ac_to_float(&ctx->ac, ctx->i32_1); in si_llvm_load_input_vs()
796 result = LLVMBuildLoad(ctx->ac.builder, result, ""); in si_get_indirect_index()
810 result = ac_to_integer(&ctx->ac, result); in si_get_indirect_index()
814 result = LLVMBuildMul(ctx->ac.builder, result, in si_get_indirect_index()
816 result = LLVMBuildAdd(ctx->ac.builder, result, in si_get_indirect_index()
845 base_addr = LLVMBuildAdd(ctx->ac.builder, base_addr, in get_dw_address_from_generic_indices()
846 LLVMBuildMul(ctx->ac.builder, vertex_index, in get_dw_address_from_generic_indices()
851 base_addr = LLVMBuildAdd(ctx->ac.builder, base_addr, in get_dw_address_from_generic_indices()
852 LLVMBuildMul(ctx->ac.builder, param_index, in get_dw_address_from_generic_indices()
863 return LLVMBuildAdd(ctx->ac.builder, base_addr, in get_dw_address_from_generic_indices()
968 total_vertices = LLVMBuildMul(ctx->ac.builder, vertices_per_patch, in get_tcs_tes_buffer_address()
973 base_addr = LLVMBuildMul(ctx->ac.builder, rel_patch_id, in get_tcs_tes_buffer_address()
976 base_addr = LLVMBuildAdd(ctx->ac.builder, base_addr, in get_tcs_tes_buffer_address()
985 base_addr = LLVMBuildAdd(ctx->ac.builder, base_addr, in get_tcs_tes_buffer_address()
986 LLVMBuildMul(ctx->ac.builder, param_index, in get_tcs_tes_buffer_address()
989 base_addr = LLVMBuildMul(ctx->ac.builder, base_addr, constant16, ""); in get_tcs_tes_buffer_address()
995 base_addr = LLVMBuildAdd(ctx->ac.builder, base_addr, in get_tcs_tes_buffer_address()
1018 param_index = LLVMBuildAdd(ctx->ac.builder, param_index, in get_tcs_tes_buffer_address_from_generic_indices()
1094 value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset, in buffer_load()
1097 return LLVMBuildBitCast(ctx->ac.builder, value, vec_type, ""); in buffer_load()
1101 value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset, in buffer_load()
1104 value = LLVMBuildBitCast(ctx->ac.builder, value, vec_type, ""); in buffer_load()
1105 return LLVMBuildExtractElement(ctx->ac.builder, value, in buffer_load()
1109 value = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset, in buffer_load()
1112 value2 = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset, in buffer_load()
1154 value = ac_lds_load(&ctx->ac, dw_addr); in lds_load()
1156 return LLVMBuildBitCast(ctx->ac.builder, value, type, ""); in lds_load()
1173 ac_lds_store(&ctx->ac, dw_addr, value); in lds_store()
1179 LLVMBuilderRef builder = ctx->ac.builder; in desc_from_addr_base64k()
1249 param_index = LLVMBuildAdd(ctx->ac.builder, param_index, in si_nir_load_tcs_varyings()
1267 return ac_build_varying_gather_values(&ctx->ac, value, num_components, component); in si_nir_load_tcs_varyings()
1331 param_index = LLVMBuildAdd(ctx->ac.builder, param_index, in si_nir_load_input_tes()
1353 return ac_build_varying_gather_values(&ctx->ac, value, num_components, component); in si_nir_load_input_tes()
1417 value = ac_build_clamp(&ctx->ac, value); in store_output_tcs()
1423 value = ac_to_integer(&ctx->ac, value); in store_output_tcs()
1427 ac_build_buffer_store_dword(&ctx->ac, buffer, value, 1, in store_output_tcs()
1436 LLVMBuildStore(ctx->ac.builder, value, /* outer */ in store_output_tcs()
1439 LLVMBuildStore(ctx->ac.builder, value, /* inner */ in store_output_tcs()
1448 ac_build_buffer_store_dword(&ctx->ac, buffer, value, 4, buf_addr, in store_output_tcs()
1476 param_index = LLVMBuildAdd(ctx->ac.builder, param_index, in si_nir_store_output_tcs()
1533 LLVMValueRef value = ac_llvm_extract_elem(&ctx->ac, src, chan - component); in si_nir_store_output_tcs()
1537 ac_lds_store(&ctx->ac, dw_addr, value); in si_nir_store_output_tcs()
1539 value = ac_to_integer(&ctx->ac, value); in si_nir_store_output_tcs()
1543 ac_build_buffer_store_dword(&ctx->ac, buffer, value, 1, in si_nir_store_output_tcs()
1552 LLVMBuildStore(ctx->ac.builder, value, /* outer */ in si_nir_store_output_tcs()
1555 LLVMBuildStore(ctx->ac.builder, value, /* inner */ in si_nir_store_output_tcs()
1564 ac_build_buffer_store_dword(&ctx->ac, buffer, value, 4, addr, in si_nir_store_output_tcs()
1610 vtx_offset = LLVMBuildAdd(ctx->ac.builder, vtx_offset, in si_llvm_load_input_gs()
1634 value = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1, ctx->i32_0, in si_llvm_load_input_gs()
1640 value2 = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1, in si_llvm_load_input_gs()
1645 return LLVMBuildBitCast(ctx->ac.builder, value, type, ""); in si_llvm_load_input_gs()
1705 return ac_build_fs_interp(&ctx->ac, in si_build_fs_interp()
1710 return ac_build_fs_interp_mov(&ctx->ac, in si_build_fs_interp()
1761 interp_param = LLVMBuildBitCast(ctx->ac.builder, interp_param, in interp_fs_input()
1764 i = LLVMBuildExtractElement(ctx->ac.builder, interp_param, in interp_fs_input()
1766 j = LLVMBuildExtractElement(ctx->ac.builder, interp_param, in interp_fs_input()
1781 is_face_positive = LLVMBuildICmp(ctx->ac.builder, LLVMIntNE, in interp_fs_input()
1794 result[chan] = LLVMBuildSelect(ctx->ac.builder, in interp_fs_input()
1882 return ac_build_buffer_load(&ctx->ac, resource, 1, NULL, offset, NULL, in buffer_load_const()
1891 LLVMValueRef resource = ac_build_load_to_sgpr(&ctx->ac, desc, buf_index); in load_sample_position()
1895 LLVMValueRef offset1 = LLVMBuildAdd(ctx->ac.builder, offset0, LLVMConstInt(ctx->i32, 4, 0), ""); in load_sample_position()
1917 ctx->ac.f32_0, in si_load_tess_coord()
1918 ctx->ac.f32_0 in si_load_tess_coord()
1924 coord[2] = lp_build_sub(bld, ctx->ac.f32_1, in si_load_tess_coord()
1994 value = LLVMBuildAdd(ctx->ac.builder, in si_load_system_value()
2014 indexed = LLVMBuildLShr(ctx->ac.builder, vs_state, ctx->i32_1, ""); in si_load_system_value()
2015 indexed = LLVMBuildTrunc(ctx->ac.builder, indexed, ctx->i1, ""); in si_load_system_value()
2017 value = LLVMBuildSelect(ctx->ac.builder, indexed, in si_load_system_value()
2104 buf = ac_build_load_to_sgpr(&ctx->ac, buf, slot); in si_load_system_value()
2165 value = lp_build_intrinsic(ctx->ac.builder, in si_load_system_value()
2169 value = LLVMBuildNot(ctx->ac.builder, value, ""); in si_load_system_value()
2170 value = LLVMBuildSExt(ctx->ac.builder, value, ctx->i32, ""); in si_load_system_value()
2178 value = ac_get_thread_id(&ctx->ac); in si_load_system_value()
2183 LLVMValueRef id = ac_get_thread_id(&ctx->ac); in si_load_system_value()
2184 id = LLVMBuildZExt(ctx->ac.builder, id, ctx->i64, ""); in si_load_system_value()
2185 value = LLVMBuildShl(ctx->ac.builder, LLVMConstInt(ctx->i64, 1, 0), id, ""); in si_load_system_value()
2186 value = LLVMBuildBitCast(ctx->ac.builder, value, ctx->v2i32, ""); in si_load_system_value()
2195 LLVMValueRef id = ac_get_thread_id(&ctx->ac); in si_load_system_value()
2204 id = LLVMBuildZExt(ctx->ac.builder, id, ctx->i64, ""); in si_load_system_value()
2205 value = LLVMBuildShl(ctx->ac.builder, value, id, ""); in si_load_system_value()
2208 value = LLVMBuildNot(ctx->ac.builder, value, ""); in si_load_system_value()
2209 value = LLVMBuildBitCast(ctx->ac.builder, value, ctx->v2i32, ""); in si_load_system_value()
2231 assert(!ctx->ac.lds); in si_declare_compute_memory()
2233 var = LLVMAddGlobalInAddressSpace(ctx->ac.module, in si_declare_compute_memory()
2239 ctx->ac.lds = LLVMBuildBitCast(ctx->ac.builder, var, i8p, ""); in si_declare_compute_memory()
2247 return ac_build_load_to_sgpr(&ctx->ac, list_ptr, in load_const_buffer_desc()
2257 index = LLVMBuildAdd(ctx->ac.builder, index, in load_ubo()
2260 return ac_build_load_to_sgpr(&ctx->ac, ptr, index); in load_ubo()
2271 index = LLVMBuildSub(ctx->ac.builder, in load_ssbo()
2275 return ac_build_load_to_sgpr(&ctx->ac, rsrc_ptr, index); in load_ssbo()
2339 addr = LLVMBuildLShr(ctx->ac.builder, addr, LLVMConstInt(ctx->i32, 2, 0), ""); in fetch_constant()
2340 LLVMValueRef result = ac_build_load_invariant(&ctx->ac, ptr, addr); in fetch_constant()
2349 ptr = LLVMBuildPtrToInt(ctx->ac.builder, ptr, ctx->i64, ""); in fetch_constant()
2350 ptr = LLVMBuildBitCast(ctx->ac.builder, ptr, ctx->v2i32, ""); in fetch_constant()
2353 LLVMBuildExtractElement(ctx->ac.builder, ptr, ctx->i32_0, ""), in fetch_constant()
2354 LLVMBuildExtractElement(ctx->ac.builder, ptr, ctx->i32_1, ""), in fetch_constant()
2364 LLVMValueRef desc = ac_build_gather_values(&ctx->ac, desc_elems, 4); in fetch_constant()
2378 index = LLVMBuildAdd(ctx->ac.builder, index, in fetch_constant()
2380 bufp = ac_build_load_to_sgpr(&ctx->ac, ptr, index); in fetch_constant()
2391 return LLVMBuildOr(ctx->ac.builder, val[0], in si_llvm_pack_two_int16()
2392 LLVMBuildShl(ctx->ac.builder, val[1], in si_llvm_pack_two_int16()
2402 LLVMBuildAnd(ctx->ac.builder, val[0], in si_llvm_pack_two_int32_as_int16()
2415 LLVMValueRef f32undef = LLVMGetUndef(ctx->ac.f32); in si_llvm_init_export_args()
2416 LLVMBuilderRef builder = ctx->ac.builder; in si_llvm_init_export_args()
2484 packed = ac_build_cvt_pkrtz_f16(&ctx->ac, pack_args); in si_llvm_init_export_args()
2485 args->out[chan] = ac_to_float(&ctx->ac, packed); in si_llvm_init_export_args()
2491 val[chan] = ac_build_clamp(&ctx->ac, values[chan]); in si_llvm_init_export_args()
2501 args->out[0] = ac_to_float(&ctx->ac, si_llvm_pack_two_int16(ctx, val)); in si_llvm_init_export_args()
2502 args->out[1] = ac_to_float(&ctx->ac, si_llvm_pack_two_int16(ctx, val+2)); in si_llvm_init_export_args()
2521 val[chan], ctx->ac.f32_0, ""), in si_llvm_init_export_args()
2528 args->out[0] = ac_to_float(&ctx->ac, si_llvm_pack_two_int32_as_int16(ctx, val)); in si_llvm_init_export_args()
2529 args->out[1] = ac_to_float(&ctx->ac, si_llvm_pack_two_int32_as_int16(ctx, val+2)); in si_llvm_init_export_args()
2540 val[chan] = ac_to_integer(&ctx->ac, values[chan]); in si_llvm_init_export_args()
2547 args->out[0] = ac_to_float(&ctx->ac, si_llvm_pack_two_int16(ctx, val)); in si_llvm_init_export_args()
2548 args->out[1] = ac_to_float(&ctx->ac, si_llvm_pack_two_int16(ctx, val+2)); in si_llvm_init_export_args()
2564 val[chan] = ac_to_integer(&ctx->ac, values[chan]); in si_llvm_init_export_args()
2574 args->out[0] = ac_to_float(&ctx->ac, si_llvm_pack_two_int32_as_int16(ctx, val)); in si_llvm_init_export_args()
2575 args->out[1] = ac_to_float(&ctx->ac, si_llvm_pack_two_int32_as_int16(ctx, val+2)); in si_llvm_init_export_args()
2605 LLVMBuildFCmp(ctx->ac.builder, cond, alpha, alpha_ref, ""); in si_alpha_test()
2606 ac_build_kill_if_false(&ctx->ac, alpha_pass); in si_alpha_test()
2608 ac_build_kill_if_false(&ctx->ac, LLVMConstInt(ctx->i1, 0, 0)); in si_alpha_test()
2622 coverage = ac_to_integer(&ctx->ac, coverage); in si_scale_alpha_by_sample_mask()
2624 coverage = lp_build_intrinsic(ctx->ac.builder, "llvm.ctpop.i32", in si_scale_alpha_by_sample_mask()
2628 coverage = LLVMBuildUIToFP(ctx->ac.builder, coverage, in si_scale_alpha_by_sample_mask()
2631 coverage = LLVMBuildFMul(ctx->ac.builder, coverage, in si_scale_alpha_by_sample_mask()
2635 return LLVMBuildFMul(ctx->ac.builder, alpha, coverage, ""); in si_scale_alpha_by_sample_mask()
2648 LLVMValueRef const_resource = ac_build_load_to_sgpr(&ctx->ac, ptr, constbuf_index); in si_llvm_emit_clipvertex()
2721 out[j] = ac_to_integer(&ctx->ac, shader_out->values[start + j]); in emit_streamout_output()
2736 vdata = LLVMBuildInsertElement(ctx->ac.builder, vdata, out[j], in emit_streamout_output()
2742 ac_build_buffer_store_dword(&ctx->ac, so_buffers[buf_idx], in emit_streamout_output()
2759 LLVMBuilderRef builder = ctx->ac.builder; in si_llvm_emit_streamout()
2767 LLVMValueRef tid = ac_get_thread_id(&ctx->ac); in si_llvm_emit_streamout()
2805 so_buffers[i] = ac_build_load_to_sgpr(&ctx->ac, buf_ptr, offset); in si_llvm_emit_streamout()
2840 ac_build_export(&ctx->ac, &args); in si_export_param()
2944 pos_args[0].out[0] = ctx->ac.f32_0; /* X */ in si_llvm_export_vs()
2945 pos_args[0].out[1] = ctx->ac.f32_0; /* Y */ in si_llvm_export_vs()
2946 pos_args[0].out[2] = ctx->ac.f32_0; /* Z */ in si_llvm_export_vs()
2947 pos_args[0].out[3] = ctx->ac.f32_1; /* W */ in si_llvm_export_vs()
2963 pos_args[1].out[0] = ctx->ac.f32_0; /* X */ in si_llvm_export_vs()
2964 pos_args[1].out[1] = ctx->ac.f32_0; /* Y */ in si_llvm_export_vs()
2965 pos_args[1].out[2] = ctx->ac.f32_0; /* Z */ in si_llvm_export_vs()
2966 pos_args[1].out[3] = ctx->ac.f32_0; /* W */ in si_llvm_export_vs()
2974 edgeflag_value = LLVMBuildFPToUI(ctx->ac.builder, in si_llvm_export_vs()
2977 edgeflag_value = ac_build_umin(&ctx->ac, in si_llvm_export_vs()
2982 pos_args[1].out[1] = ac_to_float(&ctx->ac, edgeflag_value); in si_llvm_export_vs()
2995 v = ac_to_integer(&ctx->ac, v); in si_llvm_export_vs()
2996 v = LLVMBuildShl(ctx->ac.builder, v, in si_llvm_export_vs()
2998 v = LLVMBuildOr(ctx->ac.builder, v, in si_llvm_export_vs()
2999 ac_to_integer(&ctx->ac, pos_args[1].out[2]), ""); in si_llvm_export_vs()
3000 pos_args[1].out[2] = ac_to_float(&ctx->ac, v); in si_llvm_export_vs()
3030 ac_build_export(&ctx->ac, &pos_args[i]); in si_llvm_export_vs()
3053 lds_vertex_offset = LLVMBuildMul(ctx->ac.builder, invocation_id, in si_copy_tcs_inputs()
3056 lds_base = LLVMBuildAdd(ctx->ac.builder, lds_base, lds_vertex_offset, ""); in si_copy_tcs_inputs()
3062 LLVMValueRef lds_ptr = LLVMBuildAdd(ctx->ac.builder, lds_base, in si_copy_tcs_inputs()
3071 LLVMValueRef value = lds_load(bld_base, ctx->ac.i32, ~0, in si_copy_tcs_inputs()
3074 ac_build_buffer_store_dword(&ctx->ac, buffer, value, 4, buffer_addr, in si_copy_tcs_inputs()
3105 LLVMBuildICmp(ctx->ac.builder, LLVMIntEQ, in si_write_tess_factors()
3149 lds_inner = LLVMBuildAdd(ctx->ac.builder, lds_base, in si_write_tess_factors()
3152 lds_outer = LLVMBuildAdd(ctx->ac.builder, lds_base, in si_write_tess_factors()
3158 lds_load(bld_base, ctx->ac.i32, i, lds_outer); in si_write_tess_factors()
3162 lds_load(bld_base, ctx->ac.i32, i, lds_inner); in si_write_tess_factors()
3188 byteoffset = LLVMBuildMul(ctx->ac.builder, rel_patch_id, in si_write_tess_factors()
3192 LLVMBuildICmp(ctx->ac.builder, LLVMIntEQ, in si_write_tess_factors()
3198 ac_build_buffer_store_dword(&ctx->ac, buffer, in si_write_tess_factors()
3208 ac_build_buffer_store_dword(&ctx->ac, buffer, vec0, in si_write_tess_factors()
3213 ac_build_buffer_store_dword(&ctx->ac, buffer, vec1, in si_write_tess_factors()
3234 ac_build_buffer_store_dword(&ctx->ac, buf, outer_vec, in si_write_tess_factors()
3245 ac_build_buffer_store_dword(&ctx->ac, buf, inner_vec, in si_write_tess_factors()
3258 return LLVMBuildInsertValue(ctx->ac.builder, ret, in si_insert_input_ret()
3267 LLVMBuilderRef builder = ctx->ac.builder; in si_insert_input_ret_float()
3271 ac_to_float(&ctx->ac, p), in si_insert_input_ret_float()
3279 LLVMBuilderRef builder = ctx->ac.builder; in si_insert_input_ptr_as_2xi32()
3298 LLVMBuilderRef builder = ctx->ac.builder; in si_llvm_emit_tcs_epilogue()
3318 rel_patch_id = ac_build_phi(&ctx->ac, ctx->i32, 2, values, blocks); in si_llvm_emit_tcs_epilogue()
3322 tf_lds_offset = ac_build_phi(&ctx->ac, ctx->i32, 2, values, blocks); in si_llvm_emit_tcs_epilogue()
3326 invocation_id = ac_build_phi(&ctx->ac, ctx->i32, 2, values, blocks); in si_llvm_emit_tcs_epilogue()
3360 rel_patch_id = ac_to_float(&ctx->ac, rel_patch_id); in si_llvm_emit_tcs_epilogue()
3361 invocation_id = ac_to_float(&ctx->ac, invocation_id); in si_llvm_emit_tcs_epilogue()
3362 tf_lds_offset = ac_to_float(&ctx->ac, tf_lds_offset); in si_llvm_emit_tcs_epilogue()
3378 value = ac_to_float(&ctx->ac, value); in si_llvm_emit_tcs_epilogue()
3423 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_set_ls_return_value_for_tcs()
3424 ac_to_float(&ctx->ac, ctx->abi.tcs_patch_id), in si_set_ls_return_value_for_tcs()
3426 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_set_ls_return_value_for_tcs()
3427 ac_to_float(&ctx->ac, ctx->abi.tcs_rel_ids), in si_set_ls_return_value_for_tcs()
3472 LLVMValueRef base_dw_addr = LLVMBuildMul(ctx->ac.builder, vertex_id, in si_llvm_emit_ls_epilogue()
3501 LLVMValueRef dw_addr = LLVMBuildAdd(ctx->ac.builder, base_dw_addr, in si_llvm_emit_ls_epilogue()
3509 LLVMBuildLoad(ctx->ac.builder, addrs[4 * i + chan], "")); in si_llvm_emit_ls_epilogue()
3532 LLVMValueRef vertex_idx = ac_get_thread_id(&ctx->ac); in si_llvm_emit_es_epilogue()
3534 vertex_idx = LLVMBuildOr(ctx->ac.builder, vertex_idx, in si_llvm_emit_es_epilogue()
3535 LLVMBuildMul(ctx->ac.builder, wave_idx, in si_llvm_emit_es_epilogue()
3537 lds_base = LLVMBuildMul(ctx->ac.builder, vertex_idx, in si_llvm_emit_es_epilogue()
3552 LLVMValueRef out_val = LLVMBuildLoad(ctx->ac.builder, addrs[4 * i + chan], ""); in si_llvm_emit_es_epilogue()
3553 out_val = ac_to_integer(&ctx->ac, out_val); in si_llvm_emit_es_epilogue()
3561 ac_build_buffer_store_dword(&ctx->ac, in si_llvm_emit_es_epilogue()
3583 ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_NOP | AC_SENDMSG_GS_DONE, in emit_gs_epilogue()
3643 cond = LLVMBuildTrunc(ctx->ac.builder, cond, in si_llvm_emit_vs_epilogue()
3650 val = LLVMBuildLoad(ctx->ac.builder, addr, ""); in si_llvm_emit_vs_epilogue()
3651 val = ac_build_clamp(&ctx->ac, val); in si_llvm_emit_vs_epilogue()
3652 LLVMBuildStore(ctx->ac.builder, val, addr); in si_llvm_emit_vs_epilogue()
3666 LLVMBuildLoad(ctx->ac.builder, in si_llvm_emit_vs_epilogue()
3681 outputs[i].values[0] = ac_to_float(&ctx->ac, get_primitive_id(ctx, 0)); in si_llvm_emit_vs_epilogue()
3714 ac_export_mrt_z(&ctx->ac, depth, stencil, samplemask, &args); in si_export_mrt_z()
3730 color[i] = ac_build_clamp(&ctx->ac, color[i]); in si_export_mrt_color()
3734 color[3] = ctx->ac.f32_1; in si_export_mrt_color()
3789 ac_build_export(&ctx->ac, &exp->args[i]); in si_emit_ps_exports()
3808 ac_build_export(&ctx->ac, &args); in si_export_null()
3831 LLVMBuilderRef builder = ctx->ac.builder; in si_llvm_return_fs_outputs()
3839 ac_build_kill_if_false(&ctx->ac, LLVMBuildLoad(builder, ctx->postponed_kill, "")); in si_llvm_return_fs_outputs()
3878 ac_to_integer(&ctx->ac, in si_llvm_return_fs_outputs()
3931 ac_build_waitcnt(&ctx->ac, waitcnt); in membar_emit()
3942 tmp = lp_build_intrinsic(ctx->ac.builder, "llvm.readcyclecounter", in clock_emit()
3944 tmp = LLVMBuildBitCast(ctx->ac.builder, tmp, ctx->v2i32, ""); in clock_emit()
3947 LLVMBuildExtractElement(ctx->ac.builder, tmp, ctx->i32_0, ""); in clock_emit()
3949 LLVMBuildExtractElement(ctx->ac.builder, tmp, ctx->i32_1, ""); in clock_emit()
3979 val = ac_to_integer(&ctx->ac, emit_data->args[0]); in si_llvm_emit_ddxy()
3980 val = ac_build_ddxy(&ctx->ac, mask, idx, val); in si_llvm_emit_ddxy()
3998 a = LLVMBuildExtractElement(ctx->ac.builder, interp_ij, in si_llvm_emit_ddxy_interp()
4033 sample_id = ac_to_integer(&ctx->ac, sample_id); in interp_fetch_args()
4053 ctx->ac.f32_0, in interp_fetch_args()
4054 ctx->ac.f32_0, in interp_fetch_args()
4062 emit_data->args[0] = LLVMBuildExtractElement(ctx->ac.builder, in interp_fetch_args()
4066 emit_data->args[0] = LLVMBuildFSub(ctx->ac.builder, emit_data->args[0], halfval, ""); in interp_fetch_args()
4067 emit_data->args[1] = LLVMBuildExtractElement(ctx->ac.builder, in interp_fetch_args()
4070 emit_data->args[1] = LLVMBuildFSub(ctx->ac.builder, emit_data->args[1], halfval, ""); in interp_fetch_args()
4147 LLVMValueRef ddx_el = LLVMBuildExtractElement(ctx->ac.builder, in build_interp_intrinsic()
4149 LLVMValueRef ddy_el = LLVMBuildExtractElement(ctx->ac.builder, in build_interp_intrinsic()
4151 LLVMValueRef interp_el = LLVMBuildExtractElement(ctx->ac.builder, in build_interp_intrinsic()
4155 interp_el = ac_to_float(&ctx->ac, interp_el); in build_interp_intrinsic()
4157 temp1 = LLVMBuildFMul(ctx->ac.builder, ddx_el, emit_data->args[0], ""); in build_interp_intrinsic()
4159 temp1 = LLVMBuildFAdd(ctx->ac.builder, temp1, interp_el, ""); in build_interp_intrinsic()
4161 temp2 = LLVMBuildFMul(ctx->ac.builder, ddy_el, emit_data->args[1], ""); in build_interp_intrinsic()
4163 ij_out[i] = LLVMBuildFAdd(ctx->ac.builder, temp2, temp1, ""); in build_interp_intrinsic()
4169 interp_param = ac_to_float(&ctx->ac, interp_param); in build_interp_intrinsic()
4180 ctx->ac.builder, interp_param, ctx->i32_0, ""); in build_interp_intrinsic()
4182 ctx->ac.builder, interp_param, ctx->i32_1, ""); in build_interp_intrinsic()
4187 gather = LLVMBuildInsertElement(ctx->ac.builder, in build_interp_intrinsic()
4192 ctx->ac.builder, gather, array_idx, ""); in build_interp_intrinsic()
4203 LLVMValueRef tmp = ac_build_vote_all(&ctx->ac, emit_data->args[0]); in vote_all_emit()
4205 LLVMBuildSExt(ctx->ac.builder, tmp, ctx->i32, ""); in vote_all_emit()
4215 LLVMValueRef tmp = ac_build_vote_any(&ctx->ac, emit_data->args[0]); in vote_any_emit()
4217 LLVMBuildSExt(ctx->ac.builder, tmp, ctx->i32, ""); in vote_any_emit()
4227 LLVMValueRef tmp = ac_build_vote_eq(&ctx->ac, emit_data->args[0]); in vote_eq_emit()
4229 LLVMBuildSExt(ctx->ac.builder, tmp, ctx->i32, ""); in vote_eq_emit()
4238 LLVMBuilderRef builder = ctx->ac.builder; in ballot_emit()
4242 tmp = ac_build_ballot(&ctx->ac, tmp); in ballot_emit()
4272 ac_build_optimization_barrier(&ctx->ac, &emit_data->args[0]); in read_lane_emit()
4275 emit_data->args[i] = ac_to_integer(&ctx->ac, emit_data->args[i]); in read_lane_emit()
4278 ac_build_intrinsic(&ctx->ac, action->intr_name, in read_lane_emit()
4317 gs_next_vertex = LLVMBuildLoad(ctx->ac.builder, in si_llvm_emit_vertex()
4329 can_emit = LLVMBuildICmp(ctx->ac.builder, LLVMIntULT, gs_next_vertex, in si_llvm_emit_vertex()
4335 ac_build_kill_if_false(&ctx->ac, can_emit); in si_llvm_emit_vertex()
4347 LLVMValueRef out_val = LLVMBuildLoad(ctx->ac.builder, addrs[4 * i + chan], ""); in si_llvm_emit_vertex()
4356 out_val = ac_to_integer(&ctx->ac, out_val); in si_llvm_emit_vertex()
4358 ac_build_buffer_store_dword(&ctx->ac, in si_llvm_emit_vertex()
4369 LLVMBuildStore(ctx->ac.builder, gs_next_vertex, ctx->gs_next_vertex[stream]); in si_llvm_emit_vertex()
4372 ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_EMIT | AC_SENDMSG_GS | (stream << 8), in si_llvm_emit_vertex()
4397 ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_CUT | AC_SENDMSG_GS | (stream << 8), in si_llvm_emit_primitive()
4424 ac_build_waitcnt(&ctx->ac, LGKM_CNT & VM_CNT); in si_llvm_emit_barrier()
4428 lp_build_intrinsic(ctx->ac.builder, in si_llvm_emit_barrier()
4507 ctx->param_streamout_config = add_arg(fninfo, ARG_SGPR, ctx->ac.i32); in declare_streamout_params()
4511 ctx->param_streamout_write_index = add_arg(fninfo, ARG_SGPR, ctx->ac.i32); in declare_streamout_params()
4518 ctx->param_streamout_offset[i] = add_arg(fninfo, ARG_SGPR, ctx->ac.i32); in declare_streamout_params()
5008 ac_declare_lds_as_pointer(&ctx->ac); in create_function()
5017 LLVMBuilderRef builder = ctx->ac.builder; in preload_ring_buffers()
5030 ac_build_load_to_sgpr(&ctx->ac, buf_ptr, offset); in preload_ring_buffers()
5037 ac_build_load_to_sgpr(&ctx->ac, buf_ptr, offset); in preload_ring_buffers()
5043 base_ring = ac_build_load_to_sgpr(&ctx->ac, buf_ptr, offset); in preload_ring_buffers()
5114 LLVMBuilderRef builder = ctx->ac.builder; in si_llvm_emit_polygon_stipple()
5126 desc = ac_build_load_to_sgpr(&ctx->ac, param_rw_buffers, slot); in si_llvm_emit_polygon_stipple()
5132 row = ac_to_integer(&ctx->ac, row); in si_llvm_emit_polygon_stipple()
5135 ac_build_kill_if_false(&ctx->ac, bit); in si_llvm_emit_polygon_stipple()
5630 LLVMBuildRetVoid(ctx->ac.builder); in si_llvm_build_ret()
5632 LLVMBuildRet(ctx->ac.builder, ret); in si_llvm_build_ret()
5673 builder = ctx.ac.builder; in si_generate_gs_copy_shader()
5703 end_bb = LLVMAppendBasicBlockInContext(ctx.ac.context, ctx.main_fn, "end"); in si_generate_gs_copy_shader()
5716 bb = LLVMInsertBasicBlockInContext(ctx.ac.context, end_bb, "out"); in si_generate_gs_copy_shader()
5735 ac_build_buffer_load(&ctx.ac, in si_generate_gs_copy_shader()
5758 LLVMBuildRetVoid(ctx.ac.builder); in si_generate_gs_copy_shader()
5934 ac_optimize_vs_outputs(&ctx->ac, in si_optimize_vs_outputs()
5974 lp_build_intrinsic(ctx->ac.builder, in si_init_exec_from_input()
6078 ac_init_exec_full_mask(&ctx->ac); in si_compile_tgsi_main()
6087 LLVMBuildICmp(ctx->ac.builder, LLVMIntULT, in si_compile_tgsi_main()
6088 ac_get_thread_id(&ctx->ac), num_threads, ""); in si_compile_tgsi_main()
6113 LLVMBuildStore(ctx->ac.builder, LLVMConstInt(ctx->i1, 1, 0), in si_compile_tgsi_main()
6334 LLVMBuilderRef builder = ctx->ac.builder; in si_build_gs_prolog_function()
6368 ac_init_exec_full_mask(&ctx->ac); in si_build_gs_prolog_function()
6380 p = ac_to_float(&ctx->ac, p); in si_build_gs_prolog_function()
6429 out = ac_to_float(&ctx->ac, out); in si_build_gs_prolog_function()
6437 out = ac_to_float(&ctx->ac, vtx_out[i]); in si_build_gs_prolog_function()
6457 LLVMBuilderRef builder = ctx->ac.builder; in si_build_wrapper_function()
6520 ac_init_exec_full_mask(&ctx->ac); in si_build_wrapper_function()
6578 ac_get_thread_id(&ctx->ac), count, ""); in si_build_wrapper_function()
7067 ctx.ac.module, debug, ctx.type, name)) { in si_get_shader_part()
7095 list = LLVMBuildBitCast(ctx->ac.builder, list, ctx->i64, ""); in si_prolog_get_rw_buffers()
7096 list = LLVMBuildIntToPtr(ctx->ac.builder, list, in si_prolog_get_rw_buffers()
7169 LLVMBuildICmp(ctx->ac.builder, LLVMIntNE, in si_build_vs_prolog_function()
7175 LLVMBuildSelect(ctx->ac.builder, has_hs_threads, in si_build_vs_prolog_function()
7191 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, p, i, ""); in si_build_vs_prolog_function()
7195 p = ac_to_float(&ctx->ac, p); in si_build_vs_prolog_function()
7196 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, p, in si_build_vs_prolog_function()
7208 ac_build_load_to_sgpr(&ctx->ac, list, buf_index); in si_build_vs_prolog_function()
7224 divisor = ac_to_integer(&ctx->ac, divisor); in si_build_vs_prolog_function()
7234 index = LLVMBuildAdd(ctx->ac.builder, in si_build_vs_prolog_function()
7240 index = ac_to_float(&ctx->ac, index); in si_build_vs_prolog_function()
7241 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, index, in si_build_vs_prolog_function()
7348 ac_declare_lds_as_pointer(&ctx->ac); in si_build_tcs_epilog_function()
7361 LLVMBuildRetVoid(ctx->ac.builder); in si_build_tcs_epilog_function()
7476 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, p, i, ""); in si_build_ps_prolog_function()
7501 bc_optimize = LLVMBuildLShr(ctx->ac.builder, bc_optimize, in si_build_ps_prolog_function()
7503 bc_optimize = LLVMBuildTrunc(ctx->ac.builder, bc_optimize, in si_build_ps_prolog_function()
7515 tmp = LLVMBuildSelect(ctx->ac.builder, bc_optimize, in si_build_ps_prolog_function()
7517 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7530 tmp = LLVMBuildSelect(ctx->ac.builder, bc_optimize, in si_build_ps_prolog_function()
7532 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7548 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7552 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7564 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7568 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7582 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7586 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7598 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7602 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7624 interp[0] = LLVMBuildExtractValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7626 interp[1] = LLVMBuildExtractValue(ctx->ac.builder, ret, in si_build_ps_prolog_function()
7636 face = ac_to_integer(&ctx->ac, face); in si_build_ps_prolog_function()
7648 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, color[chan], in si_build_ps_prolog_function()
7687 samplemask = ac_to_integer(&ctx->ac, samplemask); in si_build_ps_prolog_function()
7689 ctx->ac.builder, in si_build_ps_prolog_function()
7691 LLVMBuildShl(ctx->ac.builder, in si_build_ps_prolog_function()
7695 samplemask = ac_to_float(&ctx->ac, samplemask); in si_build_ps_prolog_function()
7697 ret = LLVMBuildInsertValue(ctx->ac.builder, ret, samplemask, in si_build_ps_prolog_function()
7806 LLVMBuildRetVoid(ctx->ac.builder); in si_build_ps_epilog_function()