LLVMValueRef rsrc,
LLVMValueRef vindex,
LLVMValueRef voffset,
+ unsigned num_channels,
bool can_speculate)
{
- LLVMValueRef args [] = {
- LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, ""),
- vindex,
- voffset,
- ctx->i1false, /* glc */
- ctx->i1false, /* slc */
- };
-
- return ac_build_intrinsic(ctx,
- "llvm.amdgcn.buffer.load.format.v4f32",
- ctx->v4f32, args, ARRAY_SIZE(args),
- ac_get_load_intr_attribs(can_speculate));
+ return ac_build_buffer_load_common(ctx, rsrc, vindex, voffset,
+ num_channels, false, false,
+ can_speculate, true);
}
/**
args->resource,
args->addr,
ctx->ac.i32_0,
- true);
+ 4, true);
}
args->opcode = ac_image_sample;
input = ac_build_buffer_load_format(&ctx->ac, t_list,
buffer_index,
ctx->ac.i32_0,
- true);
+ 4, true);
for (unsigned chan = 0; chan < 4; chan++) {
LLVMValueRef llvm_chan = LLVMConstInt(ctx->ac.i32, chan, false);