Lines Matching defs:args
498 LLVMValueRef args[3] = {value, ctx->i32_0, LLVMConstInt(ctx->i32, LLVMIntNE, 0)};
503 ac_build_optimization_barrier(ctx, &args[0], false);
505 args[0] = ac_to_integer(ctx, args[0]);
508 ctx, name, ctx->iN_wavemask, args, 3,
521 LLVMValueRef args[3] = {
528 ctx, name, ctx->iN_wavemask, args, 3,
953 LLVMValueRef args[5];
959 args[0] = llvm_chan;
960 args[1] = attr_number;
961 args[2] = params;
964 ctx->f32, args, 3, AC_FUNC_ATTR_READNONE);
966 args[0] = p;
967 args[1] = i;
968 args[2] = p;
971 ctx->f32, args, 3, AC_FUNC_ATTR_READNONE);
973 args[0] = p;
974 args[1] = j;
975 args[2] = p10;
978 ctx->f32, args, 3, AC_FUNC_ATTR_READNONE);
983 args[0] = i;
984 args[1] = llvm_chan;
985 args[2] = attr_number;
986 args[3] = params;
989 ctx->f32, args, 4, AC_FUNC_ATTR_READNONE);
991 args[0] = p1;
992 args[1] = j;
993 args[2] = llvm_chan;
994 args[3] = attr_number;
995 args[4] = params;
998 ctx->f32, args, 5, AC_FUNC_ATTR_READNONE);
1006 LLVMValueRef args[6];
1012 args[0] = llvm_chan;
1013 args[1] = attr_number;
1014 args[2] = params;
1017 ctx->f32, args, 3, AC_FUNC_ATTR_READNONE);
1019 args[0] = p;
1020 args[1] = i;
1021 args[2] = p;
1022 args[3] = high_16bits ? ctx->i1true : ctx->i1false;
1025 ctx->f32, args, 4, AC_FUNC_ATTR_READNONE);
1027 args[0] = p;
1028 args[1] = j;
1029 args[2] = p10;
1030 args[3] = high_16bits ? ctx->i1true : ctx->i1false;
1033 ctx->f16, args, 4, AC_FUNC_ATTR_READNONE);
1038 args[0] = i;
1039 args[1] = llvm_chan;
1040 args[2] = attr_number;
1041 args[3] = high_16bits ? ctx->i1true : ctx->i1false;
1042 args[4] = params;
1044 p1 = ac_build_intrinsic(ctx, "llvm.amdgcn.interp.p1.f16", ctx->f32, args, 5,
1047 args[0] = p1;
1048 args[1] = j;
1049 args[2] = llvm_chan;
1050 args[3] = attr_number;
1051 args[4] = high_16bits ? ctx->i1true : ctx->i1false;
1052 args[5] = params;
1054 return ac_build_intrinsic(ctx, "llvm.amdgcn.interp.p2.f16", ctx->f16, args, 6,
1063 LLVMValueRef args[4];
1068 args[0] = llvm_chan;
1069 args[1] = attr_number;
1070 args[2] = params;
1073 ctx->f32, args, 3, AC_FUNC_ATTR_READNONE);
1077 args[0] = parameter;
1078 args[1] = llvm_chan;
1079 args[2] = attr_number;
1080 args[3] = params;
1082 return ac_build_intrinsic(ctx, "llvm.amdgcn.interp.mov", ctx->f32, args, 4,
1207 LLVMValueRef args[6];
1209 args[idx++] = data;
1210 args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
1212 args[idx++] = vindex ? vindex : ctx->i32_0;
1213 args[idx++] = voffset ? voffset : ctx->i32_0;
1214 args[idx++] = soffset ? soffset : ctx->i32_0;
1215 args[idx++] = LLVMConstInt(ctx->i32, get_store_cache_policy(ctx, cache_policy), 0);
1228 ac_build_intrinsic(ctx, name, ctx->voidt, args, idx, AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY);
1272 LLVMValueRef args[5];
1274 args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
1276 args[idx++] = vindex ? vindex : ctx->i32_0;
1277 args[idx++] = voffset ? voffset : ctx->i32_0;
1278 args[idx++] = soffset ? soffset : ctx->i32_0;
1279 args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0);
1299 return ac_build_intrinsic(ctx, name, type, args, idx, ac_get_load_intr_attribs(can_speculate));
1321 LLVMValueRef args[3] = {
1326 result[i] = ac_build_intrinsic(ctx, "llvm.amdgcn.s.buffer.load.f32", ctx->f32, args, 3,
1374 LLVMValueRef args[] = {ac_build_gather_values(ctx, addr_comp, 2),
1376 LLVMValueRef res = LLVMBuildCall2(ctx->builder, calltype, inlineasm, args, 2, "");
1393 LLVMValueRef args[6];
1395 args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
1397 args[idx++] = vindex ? vindex : ctx->i32_0;
1398 args[idx++] = voffset ? voffset : ctx->i32_0;
1399 args[idx++] = soffset ? soffset : ctx->i32_0;
1400 args[idx++] = LLVMConstInt(ctx->i32, ac_get_tbuffer_format(ctx->gfx_level, dfmt, nfmt), 0);
1401 args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0);
1412 return ac_build_intrinsic(ctx, name, type, args, idx, ac_get_load_intr_attribs(can_speculate));
1839 LLVMValueRef args[2];
1840 args[0] = LLVMConstInt(ctx->i32, msg, false);
1841 args[1] = wave_id;
1842 ac_build_intrinsic(ctx, "llvm.amdgcn.s.sendmsg", ctx->voidt, args, 2, 0);
1929 LLVMValueRef args[2] = {a, b};
1930 return ac_build_intrinsic(ctx, name, LLVMTypeOf(a), args, 2, AC_FUNC_ATTR_READNONE);
1939 LLVMValueRef args[2] = {a, b};
1940 return ac_build_intrinsic(ctx, name, LLVMTypeOf(a), args, 2, AC_FUNC_ATTR_READNONE);
1976 LLVMValueRef args[9];
1978 args[0] = LLVMConstInt(ctx->i32, a->target, 0);
1979 args[1] = LLVMConstInt(ctx->i32, a->enabled_channels, 0);
1984 args[2] = LLVMBuildBitCast(ctx->builder, a->out[0], ctx->v2i16, "");
1985 args[3] = LLVMBuildBitCast(ctx->builder, a->out[1], ctx->v2i16, "");
1986 args[4] = LLVMConstInt(ctx->i1, a->done, 0);
1987 args[5] = LLVMConstInt(ctx->i1, a->valid_mask, 0);
1989 ac_build_intrinsic(ctx, "llvm.amdgcn.exp.compr.v2i16", ctx->voidt, args, 6, 0);
1991 args[2] = LLVMBuildBitCast(ctx->builder, a->out[0], ctx->f32, "");
1992 args[3] = LLVMBuildBitCast(ctx->builder, a->out[1], ctx->f32, "");
1993 args[4] = LLVMBuildBitCast(ctx->builder, a->out[2], ctx->f32, "");
1994 args[5] = LLVMBuildBitCast(ctx->builder, a->out[3], ctx->f32, "");
1995 args[6] = LLVMConstInt(ctx->i1, a->done, 0);
1996 args[7] = LLVMConstInt(ctx->i1, a->valid_mask, 0);
1998 ac_build_intrinsic(ctx, "llvm.amdgcn.exp.f32", ctx->voidt, args, 8, 0);
2004 struct ac_export_args args;
2012 args.enabled_channels = 0x0; /* enabled channels */
2013 args.valid_mask = 1; /* whether the EXEC mask is valid */
2014 args.done = 1; /* DONE bit */
2016 args.target = ctx->gfx_level >= GFX11 ? V_008DFC_SQ_EXP_MRT : V_008DFC_SQ_EXP_NULL;
2017 args.compr = 0; /* COMPR flag (0 = 32-bit export) */
2018 args.out[0] = LLVMGetUndef(ctx->f32); /* R */
2019 args.out[1] = LLVMGetUndef(ctx->f32); /* G */
2020 args.out[2] = LLVMGetUndef(ctx->f32); /* B */
2021 args.out[3] = LLVMGetUndef(ctx->f32); /* A */
2023 ac_build_export(ctx, &args);
2104 LLVMValueRef args[18];
2187 args[num_args++] = a->data[0];
2189 args[num_args++] = a->data[1];
2193 args[num_args++] = LLVMConstInt(ctx->i32, dmask, false);
2196 args[num_args++] = ac_to_integer(ctx, a->offset);
2198 args[num_args++] = ac_to_float(ctx, a->bias);
2202 args[num_args++] = ac_to_float(ctx, a->compare);
2206 args[num_args++] = ac_to_float(ctx, a->derivs[i]);
2211 args[num_args++] = LLVMBuildBitCast(ctx->builder, a->coords[i], coord_type, "");
2213 args[num_args++] = LLVMBuildBitCast(ctx->builder, a->lod, coord_type, "");
2215 args[num_args++] = LLVMBuildBitCast(ctx->builder, a->min_lod, coord_type, "");
2219 args[num_args++] = a->resource;
2221 args[num_args++] = a->sampler;
2222 args[num_args++] = LLVMConstInt(ctx->i1, a->unorm, false);
2225 args[num_args++] = a->tfe ? ctx->i32_1 : ctx->i32_0; /* texfailctrl */
2226 args[num_args++] = LLVMConstInt(
2317 LLVMValueRef result = ac_build_intrinsic(ctx, intr_name, retty, args, num_args, a->attributes);
2344 LLVMValueRef ac_build_cvt_pkrtz_f16(struct ac_llvm_context *ctx, LLVMValueRef args[2])
2346 return ac_build_intrinsic(ctx, "llvm.amdgcn.cvt.pkrtz", ctx->v2f16, args, 2,
2350 LLVMValueRef ac_build_cvt_pknorm_i16(struct ac_llvm_context *ctx, LLVMValueRef args[2])
2352 LLVMValueRef res = ac_build_intrinsic(ctx, "llvm.amdgcn.cvt.pknorm.i16", ctx->v2i16, args, 2,
2357 LLVMValueRef ac_build_cvt_pknorm_u16(struct ac_llvm_context *ctx, LLVMValueRef args[2])
2359 LLVMValueRef res = ac_build_intrinsic(ctx, "llvm.amdgcn.cvt.pknorm.u16", ctx->v2i16, args, 2,
2365 LLVMValueRef args[2])
2374 return LLVMBuildCall2(ctx->builder, calltype, code, args, 2, "");
2378 LLVMValueRef args[2])
2387 return LLVMBuildCall2(ctx->builder, calltype, code, args, 2, "");
2391 LLVMValueRef ac_build_cvt_pk_i16(struct ac_llvm_context *ctx, LLVMValueRef args[2], unsigned bits,
2405 args[i] = ac_build_imin(ctx, args[i], alpha ? max_alpha : max_rgb);
2406 args[i] = ac_build_imax(ctx, args[i], alpha ? min_alpha : min_rgb);
2411 ac_build_intrinsic(ctx, "llvm.amdgcn.cvt.pk.i16", ctx->v2i16, args, 2, AC_FUNC_ATTR_READNONE);
2416 LLVMValueRef ac_build_cvt_pk_u16(struct ac_llvm_context *ctx, LLVMValueRef args[2], unsigned bits,
2428 args[i] = ac_build_umin(ctx, args[i], alpha ? max_alpha : max_rgb);
2433 ac_build_intrinsic(ctx, "llvm.amdgcn.cvt.pk.u16", ctx->v2i16, args, 2, AC_FUNC_ATTR_READNONE);
2450 LLVMValueRef args[] = {
2457 ctx->i32, args, 3, AC_FUNC_ATTR_READNONE);
2517 LLVMValueRef args[1] = {
2520 ac_build_intrinsic(ctx, "llvm.amdgcn.s.waitcnt", ctx->voidt, args, 1, 0);
3339 LLVMValueRef args[6] = {
3350 ctx->i32, args, 6, AC_FUNC_ATTR_READNONE | AC_FUNC_ATTR_CONVERGENT);
4300 LLVMValueRef ac_build_call(struct ac_llvm_context *ctx, LLVMValueRef func, LLVMValueRef *args,
4303 LLVMValueRef ret = LLVMBuildCall(ctx->builder, func, args, num_args, "");
4310 struct ac_export_args *args)
4318 memset(args, 0, sizeof(*args));
4321 args->valid_mask = 1; /* whether the EXEC mask is valid */
4322 args->done = 1; /* DONE bit */
4326 args->target = V_008DFC_SQ_EXP_MRTZ;
4328 args->compr = 0; /* COMP flag */
4329 args->out[0] = LLVMGetUndef(ctx->f32); /* R, depth */
4330 args->out[1] = LLVMGetUndef(ctx->f32); /* G, stencil test val[0:7], stencil op val[8:15] */
4331 args->out[2] = LLVMGetUndef(ctx->f32); /* B, sample mask */
4332 args->out[3] = LLVMGetUndef(ctx->f32); /* A, alpha to mask */
4336 args->compr = ctx->gfx_level < GFX11; /* COMPR flag */
4342 args->out[0] = ac_to_float(ctx, stencil);
4347 args->out[1] = samplemask;
4352 args->out[0] = depth;
4356 args->out[1] = stencil;
4360 args->out[2] = samplemask;
4364 args->out[3] = mrt0_alpha;
4375 args->enabled_channels = mask;
4433 const struct ac_shader_args *args)
4441 ac_get_arg(ctx, args->gs_invocation_id),
4472 struct ac_export_args args;
4475 args.out[0] = prim->passthrough;
4477 args.out[0] = ac_pack_prim_export(ctx, prim);
4480 args.out[0] = LLVMBuildBitCast(ctx->builder, args.out[0], ctx->f32, "");
4481 args.out[1] = LLVMGetUndef(ctx->f32);
4482 args.out[2] = LLVMGetUndef(ctx->f32);
4483 args.out[3] = LLVMGetUndef(ctx->f32);
4485 args.target = V_008DFC_SQ_EXP_PRIM;
4486 args.enabled_channels = 1;
4487 args.done = true;
4488 args.valid_mask = false;
4489 args.compr = false;
4491 ac_build_export(ctx, &args);
4530 LLVMValueRef ac_build_main(const struct ac_shader_args *args, struct ac_llvm_context *ctx,
4536 for (unsigned i = 0; i < args->arg_count; i++) {
4537 arg_types[i] = arg_llvm_type(args->args[i].type, args->args[i].size, ctx);
4540 LLVMTypeRef main_function_type = LLVMFunctionType(ret_type, arg_types, args->arg_count, 0);
4548 for (unsigned i = 0; i < args->arg_count; ++i) {
4551 if (args->args[i].file != AC_ARG_SGPR)
4610 LLVMValueRef args[2] = {
4614 return ac_build_intrinsic(ctx, "llvm.amdgcn.class.f32", ctx->i1, args, 2,