unsigned num_channels,
bool glc,
bool slc,
- bool writeonly_memory,
bool use_format)
{
LLVMValueRef args[] = {
}
ac_build_intrinsic(ctx, name, ctx->voidt, args, ARRAY_SIZE(args),
- ac_get_store_intr_attribs(writeonly_memory));
+ AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY);
}
static void
LLVMTypeRef return_channel_type,
bool glc,
bool slc,
- bool writeonly_memory,
bool use_format,
bool structurized)
{
}
ac_build_intrinsic(ctx, name, ctx->voidt, args, idx,
- ac_get_store_intr_attribs(writeonly_memory));
+ AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY);
}
void
LLVMValueRef voffset,
unsigned num_channels,
bool glc,
- bool slc,
- bool writeonly_memory)
+ bool slc)
{
if (HAVE_LLVM >= 0x800) {
ac_build_llvm8_buffer_store_common(ctx, rsrc, data, vindex,
voffset, NULL, num_channels,
ctx->f32, glc, slc,
- writeonly_memory, true, true);
+ true, true);
} else {
ac_build_llvm7_buffer_store_common(ctx, rsrc, data, vindex, voffset,
num_channels, glc, slc,
- writeonly_memory, true);
+ true);
}
}
unsigned inst_offset,
bool glc,
bool slc,
- bool writeonly_memory,
bool swizzle_enable_hint)
{
/* Split 3 channel stores, because only LLVM 9+ support 3-channel
ac_build_buffer_store_dword(ctx, rsrc, v01, 2, voffset,
soffset, inst_offset, glc, slc,
- writeonly_memory, swizzle_enable_hint);
+ swizzle_enable_hint);
ac_build_buffer_store_dword(ctx, rsrc, v[2], 1, voffset,
soffset, inst_offset + 8,
glc, slc,
- writeonly_memory, swizzle_enable_hint);
+ swizzle_enable_hint);
return;
}
num_channels,
ctx->f32,
glc, slc,
- writeonly_memory,
false, false);
} else {
if (voffset)
ac_to_float(ctx, vdata),
ctx->i32_0, offset,
num_channels, glc, slc,
- writeonly_memory, false);
+ false);
}
return;
}
ac_build_raw_tbuffer_store(ctx, rsrc, vdata, voffset, soffset,
immoffset, num_channels, dfmt, nfmt, glc,
- slc, writeonly_memory);
+ slc);
}
static LLVMValueRef
unsigned nfmt,
bool glc,
bool slc,
- bool writeonly_memory,
bool structurized)
{
LLVMValueRef args[7];
indexing_kind, type_name);
ac_build_intrinsic(ctx, name, ctx->voidt, args, idx,
- ac_get_store_intr_attribs(writeonly_memory));
+ AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY);
}
static void
unsigned nfmt,
bool glc,
bool slc,
- bool writeonly_memory,
bool structurized) /* only matters for LLVM 8+ */
{
if (HAVE_LLVM >= 0x800) {
ac_build_llvm8_tbuffer_store(ctx, rsrc, vdata, vindex, voffset,
soffset, num_channels, dfmt, nfmt,
- glc, slc, writeonly_memory,
- structurized);
+ glc, slc, structurized);
} else {
LLVMValueRef params[] = {
vdata,
type_names[func]);
ac_build_intrinsic(ctx, name, ctx->voidt, params, 10,
- ac_get_store_intr_attribs(writeonly_memory));
+ AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY);
}
}
unsigned dfmt,
unsigned nfmt,
bool glc,
- bool slc,
- bool writeonly_memory)
+ bool slc)
{
ac_build_tbuffer_store(ctx, rsrc, vdata, vindex, voffset, soffset,
immoffset, num_channels, dfmt, nfmt, glc, slc,
- writeonly_memory, true);
+ true);
}
void
unsigned dfmt,
unsigned nfmt,
bool glc,
- bool slc,
- bool writeonly_memory)
+ bool slc)
{
ac_build_tbuffer_store(ctx, rsrc, vdata, NULL, voffset, soffset,
immoffset, num_channels, dfmt, nfmt, glc, slc,
- writeonly_memory, false);
+ false);
}
void
LLVMValueRef vdata,
LLVMValueRef voffset,
LLVMValueRef soffset,
- bool glc,
- bool writeonly_memory)
+ bool glc)
{
vdata = LLVMBuildBitCast(ctx->builder, vdata, ctx->i16, "");
ac_build_llvm8_buffer_store_common(ctx, rsrc, vdata, NULL,
voffset, soffset, 1,
ctx->i16, glc, false,
- writeonly_memory, false,
- false);
+ false, false);
} else {
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_16;
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
vdata = LLVMBuildZExt(ctx->builder, vdata, ctx->i32, "");
ac_build_raw_tbuffer_store(ctx, rsrc, vdata, voffset, soffset,
- ctx->i32_0, 1, dfmt, nfmt, glc, false,
- writeonly_memory);
+ ctx->i32_0, 1, dfmt, nfmt, glc,
+ false);
}
}
LLVMValueRef vdata,
LLVMValueRef voffset,
LLVMValueRef soffset,
- bool glc,
- bool writeonly_memory)
+ bool glc)
{
vdata = LLVMBuildBitCast(ctx->builder, vdata, ctx->i8, "");
ac_build_llvm8_buffer_store_common(ctx, rsrc, vdata, NULL,
voffset, soffset, 1,
ctx->i8, glc, false,
- writeonly_memory, false,
- false);
+ false, false);
} else {
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_8;
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
vdata = LLVMBuildZExt(ctx->builder, vdata, ctx->i32, "");
ac_build_raw_tbuffer_store(ctx, rsrc, vdata, voffset, soffset,
- ctx->i32_0, 1, dfmt, nfmt, glc, false,
- writeonly_memory);
+ ctx->i32_0, 1, dfmt, nfmt, glc, false);
}
}
/**
unsigned inst_offset,
bool glc,
bool slc,
- bool writeonly_memory,
bool swizzle_enable_hint);
void
LLVMValueRef voffset,
unsigned num_channels,
bool glc,
- bool slc,
- bool writeonly_memory);
+ bool slc);
LLVMValueRef
ac_build_buffer_load(struct ac_llvm_context *ctx,
LLVMValueRef vdata,
LLVMValueRef voffset,
LLVMValueRef soffset,
- bool glc,
- bool writeonly_memory);
+ bool glc);
void
ac_build_tbuffer_store_byte(struct ac_llvm_context *ctx,
LLVMValueRef vdata,
LLVMValueRef voffset,
LLVMValueRef soffset,
- bool glc,
- bool writeonly_memory);
+ bool glc);
void
ac_build_struct_tbuffer_store(struct ac_llvm_context *ctx,
unsigned dfmt,
unsigned nfmt,
bool glc,
- bool slc,
- bool writeonly_memory);
+ bool slc);
void
ac_build_raw_tbuffer_store(struct ac_llvm_context *ctx,
unsigned dfmt,
unsigned nfmt,
bool glc,
- bool slc,
- bool writeonly_memory);
+ bool slc);
LLVMValueRef
ac_get_thread_id(struct ac_llvm_context *ctx);
AC_FUNC_ATTR_READONLY;
}
-static inline unsigned
-ac_get_store_intr_attribs(bool writeonly_memory)
-{
- return writeonly_memory ? AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY :
- AC_FUNC_ATTR_WRITEONLY;
-}
-
unsigned
ac_count_scratch_private_memory(LLVMValueRef function);
if (num_bytes == 1) {
ac_build_tbuffer_store_byte(&ctx->ac, rsrc, data,
offset, ctx->ac.i32_0,
- cache_policy & ac_glc,
- writeonly_memory);
+ cache_policy & ac_glc);
} else if (num_bytes == 2) {
ac_build_tbuffer_store_short(&ctx->ac, rsrc, data,
offset, ctx->ac.i32_0,
- cache_policy & ac_glc,
- writeonly_memory);
+ cache_policy & ac_glc);
} else {
int num_channels = num_bytes / 4;
num_channels, offset,
ctx->ac.i32_0, 0,
cache_policy & ac_glc,
- false, writeonly_memory,
- false);
+ false, false);
}
}
}
ac_build_buffer_store_format(&ctx->ac, rsrc, src, vindex,
ctx->ac.i32_0, src_channels,
- args.cache_policy & ac_glc, false,
- writeonly_memory);
+ args.cache_policy & ac_glc, false);
} else {
args.opcode = ac_image_store;
args.data[0] = ac_to_float(&ctx->ac, get_src(ctx, instr->src[3]));
if (!is_tess_factor && writemask != 0xF)
ac_build_buffer_store_dword(&ctx->ac, ctx->hs_ring_tess_offchip, value, 1,
buf_addr, ctx->oc_lds,
- 4 * (base + chan), 1, 0, true, false);
+ 4 * (base + chan), 1, 0, false);
}
if (writemask == 0xF) {
ac_build_buffer_store_dword(&ctx->ac, ctx->hs_ring_tess_offchip, src, 4,
buf_addr, ctx->oc_lds,
- (base * 4), 1, 0, true, false);
+ (base * 4), 1, 0, false);
}
}
ctx->gsvs_ring[stream],
out_val, 1,
voffset, ctx->gs2vs_offset, 0,
- 1, 1, true, true);
+ 1, 1, true);
}
}
ac_build_buffer_store_dword(&ctx->ac, so_buffers[buf],
vdata, num_comps, so_write_offsets[buf],
ctx->ac.i32_0, offset,
- 1, 1, true, false);
+ 1, 1, false);
}
static void
out_val, 1,
NULL, ctx->es2gs_offset,
(4 * param_index + j) * 4,
- 1, 1, true, true);
+ 1, 1, true);
}
}
}
ac_build_buffer_store_dword(&ctx->ac, buffer,
LLVMConstInt(ctx->ac.i32, 0x80000000, false),
1, ctx->ac.i32_0, tf_base,
- 0, 1, 0, true, false);
+ 0, 1, 0, false);
tf_offset += 4;
ac_nir_build_endif(&inner_if_ctx);
/* Store the tessellation factors. */
ac_build_buffer_store_dword(&ctx->ac, buffer, vec0,
MIN2(stride, 4), byteoffset, tf_base,
- tf_offset, 1, 0, true, false);
+ tf_offset, 1, 0, false);
if (vec1)
ac_build_buffer_store_dword(&ctx->ac, buffer, vec1,
stride - 4, byteoffset, tf_base,
- 16 + tf_offset, 1, 0, true, false);
+ 16 + tf_offset, 1, 0, false);
//store to offchip for TES to read - only if TES reads them
if (ctx->options->key.tcs.tes_reads_tess_factors) {
ac_build_buffer_store_dword(&ctx->ac, ctx->hs_ring_tess_offchip, outer_vec,
outer_comps, tf_outer_offset,
- ctx->oc_lds, 0, 1, 0, true, false);
+ ctx->oc_lds, 0, 1, 0, false);
if (inner_comps) {
param_inner = shader_io_get_unique_index(VARYING_SLOT_TESS_LEVEL_INNER);
tf_inner_offset = get_tcs_tes_buffer_address(ctx, NULL,
ac_build_gather_values(&ctx->ac, inner, inner_comps);
ac_build_buffer_store_dword(&ctx->ac, ctx->hs_ring_tess_offchip, inner_vec,
inner_comps, tf_inner_offset,
- ctx->oc_lds, 0, 1, 0, true, false);
+ ctx->oc_lds, 0, 1, 0, false);
}
}
ac_nir_build_endif(&if_ctx);
};
LLVMValueRef rsrc = ac_build_gather_values(&ctx->ac, desc, 4);
ac_build_buffer_store_dword(&ctx->ac, rsrc, count, 1, ctx->i32_0,
- ctx->i32_0, 0, true, true, true, false);
+ ctx->i32_0, 0, true, true, false);
} else {
LLVMBuildStore(builder, count,
si_expand_32bit_pointer(ctx, vertex_count_addr));
ac_build_buffer_store_format(&ctx->ac, output_indexbuf, vdata,
vindex, ctx->i32_0, 3, true,
- INDEX_STORES_USE_SLC, true);
+ INDEX_STORES_USE_SLC);
}
lp_build_endif(&if_accepted);
if (reg->Register.WriteMask != 0xF && !is_tess_factor) {
ac_build_buffer_store_dword(&ctx->ac, buffer, value, 1,
buf_addr, base,
- 4 * chan_index, 1, 0, true, false);
+ 4 * chan_index, 1, 0, false);
}
/* Write tess factors into VGPRs for the epilog. */
LLVMValueRef value = ac_build_gather_values(&ctx->ac,
values, 4);
ac_build_buffer_store_dword(&ctx->ac, buffer, value, 4, buf_addr,
- base, 0, 1, 0, true, false);
+ base, 0, 1, 0, false);
}
}
ac_build_buffer_store_dword(&ctx->ac, buffer, value, 1,
addr, base,
4 * buffer_store_offset,
- 1, 0, true, false);
+ 1, 0, false);
}
/* Write tess factors into VGPRs for the epilog. */
LLVMValueRef value = ac_build_gather_values(&ctx->ac,
values, 4);
ac_build_buffer_store_dword(&ctx->ac, buffer, value, 4, addr,
- base, 0, 1, 0, true, false);
+ base, 0, 1, 0, false);
}
}
vdata, num_comps,
so_write_offsets[buf_idx],
ctx->i32_0,
- stream_out->dst_offset * 4, 1, 1, true, false);
+ stream_out->dst_offset * 4, 1, 1, false);
}
/**
LLVMValueRef value = lshs_lds_load(bld_base, ctx->ac.i32, ~0, lds_ptr);
ac_build_buffer_store_dword(&ctx->ac, buffer, value, 4, buffer_addr,
- buffer_offset, 0, 1, 0, true, false);
+ buffer_offset, 0, 1, 0, false);
}
}
ac_build_buffer_store_dword(&ctx->ac, buffer,
LLVMConstInt(ctx->i32, 0x80000000, 0),
1, ctx->i32_0, tf_base,
- offset, 1, 0, true, false);
+ offset, 1, 0, false);
offset += 4;
}
/* Store the tessellation factors. */
ac_build_buffer_store_dword(&ctx->ac, buffer, vec0,
MIN2(stride, 4), byteoffset, tf_base,
- offset, 1, 0, true, false);
+ offset, 1, 0, false);
offset += 16;
if (vec1)
ac_build_buffer_store_dword(&ctx->ac, buffer, vec1,
stride - 4, byteoffset, tf_base,
- offset, 1, 0, true, false);
+ offset, 1, 0, false);
/* Store the tess factors into the offchip buffer if TES reads them. */
if (shader->key.part.tcs.epilog.tes_reads_tess_factors) {
ac_build_buffer_store_dword(&ctx->ac, buf, outer_vec,
outer_comps, tf_outer_offset,
- base, 0, 1, 0, true, false);
+ base, 0, 1, 0, false);
if (inner_comps) {
param_inner = si_shader_io_get_unique_index_patch(
TGSI_SEMANTIC_TESSINNER, 0);
ac_build_gather_values(&ctx->ac, inner, inner_comps);
ac_build_buffer_store_dword(&ctx->ac, buf, inner_vec,
inner_comps, tf_inner_offset,
- base, 0, 1, 0, true, false);
+ base, 0, 1, 0, false);
}
}
ctx->esgs_ring,
out_val, 1, NULL, soffset,
(4 * param + chan) * 4,
- 1, 1, true, true);
+ 1, 1, true);
}
}
ctx->gsvs_ring[stream],
out_val, 1,
voffset, soffset, 0,
- 1, 1, true, true);
+ 1, 1, true);
}
}
voff, ctx->i32_0, 0,
!!(cache_policy & ac_glc),
!!(cache_policy & ac_slc),
- writeonly_memory, false);
+ false);
}
}
ac_build_gather_values(&ctx->ac, chans, num_channels),
vindex, ctx->i32_0 /* voffset */,
num_channels,
- !!(args.cache_policy & ac_glc), false,
- writeonly_memory);
+ !!(args.cache_policy & ac_glc),
+ false);
} else {
args.opcode = ac_image_store;
args.data[0] = ac_build_gather_values(&ctx->ac, chans, 4);
args.dim = ac_image_dim_from_tgsi_target(ctx->screen, inst->Memory.Texture);
- args.attributes = ac_get_store_intr_attribs(writeonly_memory);
+ args.attributes = AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY;
args.dmask = 0xf;
emit_data->output[emit_data->chan] =