LLVMValueRef voffset,
unsigned num_channels,
bool glc,
+ bool slc,
bool writeonly_memory)
{
if (HAVE_LLVM >= 0x800) {
ac_build_llvm8_buffer_store_common(ctx, rsrc, data, vindex,
voffset, NULL, num_channels,
- ctx->f32, glc, false,
+ ctx->f32, glc, slc,
writeonly_memory, true, true);
} else {
ac_build_llvm7_buffer_store_common(ctx, rsrc, data, vindex, voffset,
- num_channels, glc, false,
+ num_channels, glc, slc,
writeonly_memory, true);
}
}
ac_build_buffer_store_format(&ctx->ac, rsrc, src, vindex,
ctx->ac.i32_0, src_channels,
- args.cache_policy & ac_glc,
+ args.cache_policy & ac_glc, false,
writeonly_memory);
} else {
args.opcode = ac_image_store;
}
/* Write indices for accepted primitives. */
- LLVMValueRef buf_args[] = {
- ac_to_float(&ctx->ac, ac_build_expand_to_vec4(&ctx->ac,
- ac_build_gather_values(&ctx->ac, index, 3), 3)),
- output_indexbuf,
- LLVMBuildAdd(builder, start, prim_index, ""),
- ctx->i32_0, /* voffset */
- ctx->i1true, /* glc */
- LLVMConstInt(ctx->i1, INDEX_STORES_USE_SLC, 0),
- };
- ac_build_intrinsic(&ctx->ac, "llvm.amdgcn.buffer.store.format.v4f32",
- ctx->voidt, buf_args, 6,
- ac_get_store_intr_attribs(true));
+ LLVMValueRef vindex = LLVMBuildAdd(builder, start, prim_index, "");
+ LLVMValueRef vdata = ac_build_gather_values(&ctx->ac, index, 3);
+
+ if (!ac_has_vec3_support(ctx->ac.chip_class, true))
+ vdata = ac_build_expand_to_vec4(&ctx->ac, vdata, 3);
+
+ ac_build_buffer_store_format(&ctx->ac, output_indexbuf, vdata,
+ vindex, ctx->i32_0, 3, true,
+ INDEX_STORES_USE_SLC, true);
}
lp_build_endif(&if_accepted);
ac_build_gather_values(&ctx->ac, chans, num_channels),
vindex, ctx->i32_0 /* voffset */,
num_channels,
- !!(args.cache_policy & ac_glc),
+ !!(args.cache_policy & ac_glc), false,
writeonly_memory);
} else {
args.opcode = ac_image_store;