ac: replace glc,slc with cache_policy for loads
cosmetic change Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
@@ -1107,13 +1107,11 @@ LLVMValueRef ac_build_load_to_sgpr_uint_wraparound(struct ac_llvm_context *ctx,
|
|||||||
return ac_build_load_custom(ctx, base_ptr, index, true, true, false);
|
return ac_build_load_custom(ctx, base_ptr, index, true, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LLVMValueRef get_cache_policy(struct ac_llvm_context *ctx,
|
static unsigned get_load_cache_policy(struct ac_llvm_context *ctx,
|
||||||
bool load, bool glc, bool slc)
|
unsigned cache_policy)
|
||||||
{
|
{
|
||||||
return LLVMConstInt(ctx->i32,
|
return cache_policy |
|
||||||
(glc ? ac_glc : 0) +
|
(ctx->chip_class >= GFX10 && cache_policy & ac_glc ? ac_dlc : 0);
|
||||||
(slc ? ac_slc : 0) +
|
|
||||||
(ctx->chip_class >= GFX10 && glc && load ? ac_dlc : 0), 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1302,8 +1300,7 @@ ac_build_llvm7_buffer_load_common(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate,
|
bool can_speculate,
|
||||||
bool use_format)
|
bool use_format)
|
||||||
{
|
{
|
||||||
@@ -1311,8 +1308,8 @@ ac_build_llvm7_buffer_load_common(struct ac_llvm_context *ctx,
|
|||||||
LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, ""),
|
LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, ""),
|
||||||
vindex ? vindex : ctx->i32_0,
|
vindex ? vindex : ctx->i32_0,
|
||||||
voffset,
|
voffset,
|
||||||
LLVMConstInt(ctx->i1, glc, 0),
|
LLVMConstInt(ctx->i1, !!(cache_policy & ac_glc), 0),
|
||||||
LLVMConstInt(ctx->i1, slc, 0)
|
LLVMConstInt(ctx->i1, !!(cache_policy & ac_slc), 0)
|
||||||
};
|
};
|
||||||
unsigned func = CLAMP(num_channels, 1, 3) - 1;
|
unsigned func = CLAMP(num_channels, 1, 3) - 1;
|
||||||
|
|
||||||
@@ -1341,8 +1338,7 @@ ac_build_llvm8_buffer_load_common(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
LLVMTypeRef channel_type,
|
LLVMTypeRef channel_type,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate,
|
bool can_speculate,
|
||||||
bool use_format,
|
bool use_format,
|
||||||
bool structurized)
|
bool structurized)
|
||||||
@@ -1354,7 +1350,7 @@ ac_build_llvm8_buffer_load_common(struct ac_llvm_context *ctx,
|
|||||||
args[idx++] = vindex ? vindex : ctx->i32_0;
|
args[idx++] = vindex ? vindex : ctx->i32_0;
|
||||||
args[idx++] = voffset ? voffset : ctx->i32_0;
|
args[idx++] = voffset ? voffset : ctx->i32_0;
|
||||||
args[idx++] = soffset ? soffset : ctx->i32_0;
|
args[idx++] = soffset ? soffset : ctx->i32_0;
|
||||||
args[idx++] = get_cache_policy(ctx, true, glc, slc);
|
args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0);
|
||||||
unsigned func = !ac_has_vec3_support(ctx->chip_class, use_format) && num_channels == 3 ? 4 : num_channels;
|
unsigned func = !ac_has_vec3_support(ctx->chip_class, use_format) && num_channels == 3 ? 4 : num_channels;
|
||||||
const char *indexing_kind = structurized ? "struct" : "raw";
|
const char *indexing_kind = structurized ? "struct" : "raw";
|
||||||
char name[256], type_name[8];
|
char name[256], type_name[8];
|
||||||
@@ -1382,8 +1378,7 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
unsigned inst_offset,
|
unsigned inst_offset,
|
||||||
unsigned glc,
|
unsigned cache_policy,
|
||||||
unsigned slc,
|
|
||||||
bool can_speculate,
|
bool can_speculate,
|
||||||
bool allow_smem)
|
bool allow_smem)
|
||||||
{
|
{
|
||||||
@@ -1393,8 +1388,8 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
|
|||||||
if (soffset)
|
if (soffset)
|
||||||
offset = LLVMBuildAdd(ctx->builder, offset, soffset, "");
|
offset = LLVMBuildAdd(ctx->builder, offset, soffset, "");
|
||||||
|
|
||||||
if (allow_smem && !slc &&
|
if (allow_smem && !(cache_policy & ac_slc) &&
|
||||||
(!glc || (HAVE_LLVM >= 0x0800 && ctx->chip_class >= GFX8))) {
|
(!(cache_policy & ac_glc) || (HAVE_LLVM >= 0x0800 && ctx->chip_class >= GFX8))) {
|
||||||
assert(vindex == NULL);
|
assert(vindex == NULL);
|
||||||
|
|
||||||
LLVMValueRef result[8];
|
LLVMValueRef result[8];
|
||||||
@@ -1411,7 +1406,7 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef args[3] = {
|
LLVMValueRef args[3] = {
|
||||||
rsrc,
|
rsrc,
|
||||||
offset,
|
offset,
|
||||||
get_cache_policy(ctx, true, glc, false),
|
LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0),
|
||||||
};
|
};
|
||||||
result[i] = ac_build_intrinsic(ctx, intrname,
|
result[i] = ac_build_intrinsic(ctx, intrname,
|
||||||
ctx->f32, args, num_args,
|
ctx->f32, args, num_args,
|
||||||
@@ -1430,13 +1425,13 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
|
|||||||
return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex,
|
return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex,
|
||||||
offset, ctx->i32_0,
|
offset, ctx->i32_0,
|
||||||
num_channels, ctx->f32,
|
num_channels, ctx->f32,
|
||||||
glc, slc,
|
cache_policy,
|
||||||
can_speculate, false,
|
can_speculate, false,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ac_build_llvm7_buffer_load_common(ctx, rsrc, vindex, offset,
|
return ac_build_llvm7_buffer_load_common(ctx, rsrc, vindex, offset,
|
||||||
num_channels, glc, slc,
|
num_channels, cache_policy,
|
||||||
can_speculate, false);
|
can_speculate, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1445,17 +1440,16 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool can_speculate)
|
bool can_speculate)
|
||||||
{
|
{
|
||||||
if (HAVE_LLVM >= 0x800) {
|
if (HAVE_LLVM >= 0x800) {
|
||||||
return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex, voffset, ctx->i32_0,
|
return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex, voffset, ctx->i32_0,
|
||||||
num_channels, ctx->f32,
|
num_channels, ctx->f32,
|
||||||
glc, false,
|
cache_policy, can_speculate, true, true);
|
||||||
can_speculate, true, true);
|
|
||||||
}
|
}
|
||||||
return ac_build_llvm7_buffer_load_common(ctx, rsrc, vindex, voffset,
|
return ac_build_llvm7_buffer_load_common(ctx, rsrc, vindex, voffset,
|
||||||
num_channels, glc, false,
|
num_channels, cache_policy,
|
||||||
can_speculate, true);
|
can_speculate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1464,14 +1458,13 @@ LLVMValueRef ac_build_buffer_load_format_gfx9_safe(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool can_speculate)
|
bool can_speculate)
|
||||||
{
|
{
|
||||||
if (HAVE_LLVM >= 0x800) {
|
if (HAVE_LLVM >= 0x800) {
|
||||||
return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex, voffset, ctx->i32_0,
|
return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex, voffset, ctx->i32_0,
|
||||||
num_channels, ctx->f32,
|
num_channels, ctx->f32,
|
||||||
glc, false,
|
cache_policy, can_speculate, true, true);
|
||||||
can_speculate, true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMValueRef elem_count = LLVMBuildExtractElement(ctx->builder, rsrc, LLVMConstInt(ctx->i32, 2, 0), "");
|
LLVMValueRef elem_count = LLVMBuildExtractElement(ctx->builder, rsrc, LLVMConstInt(ctx->i32, 2, 0), "");
|
||||||
@@ -1486,7 +1479,7 @@ LLVMValueRef ac_build_buffer_load_format_gfx9_safe(struct ac_llvm_context *ctx,
|
|||||||
LLVMConstInt(ctx->i32, 2, 0), "");
|
LLVMConstInt(ctx->i32, 2, 0), "");
|
||||||
|
|
||||||
return ac_build_llvm7_buffer_load_common(ctx, new_rsrc, vindex, voffset,
|
return ac_build_llvm7_buffer_load_common(ctx, new_rsrc, vindex, voffset,
|
||||||
num_channels, glc, false,
|
num_channels, cache_policy,
|
||||||
can_speculate, true);
|
can_speculate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1542,8 +1535,7 @@ ac_build_llvm8_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
unsigned dfmt,
|
unsigned dfmt,
|
||||||
unsigned nfmt,
|
unsigned nfmt,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate,
|
bool can_speculate,
|
||||||
bool structurized)
|
bool structurized)
|
||||||
{
|
{
|
||||||
@@ -1555,7 +1547,7 @@ ac_build_llvm8_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
args[idx++] = voffset ? voffset : ctx->i32_0;
|
args[idx++] = voffset ? voffset : ctx->i32_0;
|
||||||
args[idx++] = soffset ? soffset : ctx->i32_0;
|
args[idx++] = soffset ? soffset : ctx->i32_0;
|
||||||
args[idx++] = LLVMConstInt(ctx->i32, ac_get_tbuffer_format(ctx, dfmt, nfmt), 0);
|
args[idx++] = LLVMConstInt(ctx->i32, ac_get_tbuffer_format(ctx, dfmt, nfmt), 0);
|
||||||
args[idx++] = get_cache_policy(ctx, true, glc, slc);
|
args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0);
|
||||||
unsigned func = !ac_has_vec3_support(ctx->chip_class, true) && num_channels == 3 ? 4 : num_channels;
|
unsigned func = !ac_has_vec3_support(ctx->chip_class, true) && num_channels == 3 ? 4 : num_channels;
|
||||||
const char *indexing_kind = structurized ? "struct" : "raw";
|
const char *indexing_kind = structurized ? "struct" : "raw";
|
||||||
char name[256], type_name[8];
|
char name[256], type_name[8];
|
||||||
@@ -1580,8 +1572,7 @@ ac_build_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
unsigned dfmt,
|
unsigned dfmt,
|
||||||
unsigned nfmt,
|
unsigned nfmt,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate,
|
bool can_speculate,
|
||||||
bool structurized) /* only matters for LLVM 8+ */
|
bool structurized) /* only matters for LLVM 8+ */
|
||||||
{
|
{
|
||||||
@@ -1590,7 +1581,7 @@ ac_build_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
|
|
||||||
return ac_build_llvm8_tbuffer_load(ctx, rsrc, vindex, voffset,
|
return ac_build_llvm8_tbuffer_load(ctx, rsrc, vindex, voffset,
|
||||||
soffset, num_channels,
|
soffset, num_channels,
|
||||||
dfmt, nfmt, glc, slc,
|
dfmt, nfmt, cache_policy,
|
||||||
can_speculate, structurized);
|
can_speculate, structurized);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1602,8 +1593,8 @@ ac_build_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
immoffset,
|
immoffset,
|
||||||
LLVMConstInt(ctx->i32, dfmt, false),
|
LLVMConstInt(ctx->i32, dfmt, false),
|
||||||
LLVMConstInt(ctx->i32, nfmt, false),
|
LLVMConstInt(ctx->i32, nfmt, false),
|
||||||
LLVMConstInt(ctx->i1, glc, false),
|
LLVMConstInt(ctx->i1, !!(cache_policy & ac_glc), false),
|
||||||
LLVMConstInt(ctx->i1, slc, false),
|
LLVMConstInt(ctx->i1, !!(cache_policy & ac_slc), false),
|
||||||
};
|
};
|
||||||
unsigned func = CLAMP(num_channels, 1, 3) - 1;
|
unsigned func = CLAMP(num_channels, 1, 3) - 1;
|
||||||
LLVMTypeRef types[] = {ctx->i32, ctx->v2i32, ctx->v4i32};
|
LLVMTypeRef types[] = {ctx->i32, ctx->v2i32, ctx->v4i32};
|
||||||
@@ -1627,13 +1618,12 @@ ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
unsigned dfmt,
|
unsigned dfmt,
|
||||||
unsigned nfmt,
|
unsigned nfmt,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate)
|
bool can_speculate)
|
||||||
{
|
{
|
||||||
return ac_build_tbuffer_load(ctx, rsrc, vindex, voffset, soffset,
|
return ac_build_tbuffer_load(ctx, rsrc, vindex, voffset, soffset,
|
||||||
immoffset, num_channels, dfmt, nfmt, glc,
|
immoffset, num_channels, dfmt, nfmt,
|
||||||
slc, can_speculate, true);
|
cache_policy, can_speculate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMValueRef
|
LLVMValueRef
|
||||||
@@ -1645,13 +1635,12 @@ ac_build_raw_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
unsigned dfmt,
|
unsigned dfmt,
|
||||||
unsigned nfmt,
|
unsigned nfmt,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate)
|
bool can_speculate)
|
||||||
{
|
{
|
||||||
return ac_build_tbuffer_load(ctx, rsrc, NULL, voffset, soffset,
|
return ac_build_tbuffer_load(ctx, rsrc, NULL, voffset, soffset,
|
||||||
immoffset, num_channels, dfmt, nfmt, glc,
|
immoffset, num_channels, dfmt, nfmt,
|
||||||
slc, can_speculate, false);
|
cache_policy, can_speculate, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMValueRef
|
LLVMValueRef
|
||||||
@@ -1660,7 +1649,7 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
LLVMValueRef immoffset,
|
LLVMValueRef immoffset,
|
||||||
bool glc)
|
unsigned cache_policy)
|
||||||
{
|
{
|
||||||
LLVMValueRef res;
|
LLVMValueRef res;
|
||||||
|
|
||||||
@@ -1670,14 +1659,14 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
|
|||||||
/* LLVM 9+ supports i8/i16 with struct/raw intrinsics. */
|
/* LLVM 9+ supports i8/i16 with struct/raw intrinsics. */
|
||||||
res = ac_build_llvm8_buffer_load_common(ctx, rsrc, NULL,
|
res = ac_build_llvm8_buffer_load_common(ctx, rsrc, NULL,
|
||||||
voffset, soffset,
|
voffset, soffset,
|
||||||
1, ctx->i16, glc, false,
|
1, ctx->i16, cache_policy,
|
||||||
false, false, false);
|
false, false, false);
|
||||||
} else {
|
} else {
|
||||||
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_16;
|
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_16;
|
||||||
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
|
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
|
||||||
|
|
||||||
res = ac_build_raw_tbuffer_load(ctx, rsrc, voffset, soffset,
|
res = ac_build_raw_tbuffer_load(ctx, rsrc, voffset, soffset,
|
||||||
immoffset, 1, dfmt, nfmt, glc, false,
|
immoffset, 1, dfmt, nfmt, cache_policy,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
res = LLVMBuildTrunc(ctx->builder, res, ctx->i16, "");
|
res = LLVMBuildTrunc(ctx->builder, res, ctx->i16, "");
|
||||||
@@ -1692,7 +1681,7 @@ ac_build_tbuffer_load_byte(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
LLVMValueRef immoffset,
|
LLVMValueRef immoffset,
|
||||||
bool glc)
|
unsigned cache_policy)
|
||||||
{
|
{
|
||||||
LLVMValueRef res;
|
LLVMValueRef res;
|
||||||
|
|
||||||
@@ -1702,14 +1691,14 @@ ac_build_tbuffer_load_byte(struct ac_llvm_context *ctx,
|
|||||||
/* LLVM 9+ supports i8/i16 with struct/raw intrinsics. */
|
/* LLVM 9+ supports i8/i16 with struct/raw intrinsics. */
|
||||||
res = ac_build_llvm8_buffer_load_common(ctx, rsrc, NULL,
|
res = ac_build_llvm8_buffer_load_common(ctx, rsrc, NULL,
|
||||||
voffset, soffset,
|
voffset, soffset,
|
||||||
1, ctx->i8, glc, false,
|
1, ctx->i8, cache_policy,
|
||||||
false, false, false);
|
false, false, false);
|
||||||
} else {
|
} else {
|
||||||
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_8;
|
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_8;
|
||||||
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
|
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
|
||||||
|
|
||||||
res = ac_build_raw_tbuffer_load(ctx, rsrc, voffset, soffset,
|
res = ac_build_raw_tbuffer_load(ctx, rsrc, voffset, soffset,
|
||||||
immoffset, 1, dfmt, nfmt, glc, false,
|
immoffset, 1, dfmt, nfmt, cache_policy,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
res = LLVMBuildTrunc(ctx->builder, res, ctx->i8, "");
|
res = LLVMBuildTrunc(ctx->builder, res, ctx->i8, "");
|
||||||
@@ -1811,8 +1800,7 @@ ac_build_opencoded_load_format(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate)
|
bool can_speculate)
|
||||||
{
|
{
|
||||||
LLVMValueRef tmp;
|
LLVMValueRef tmp;
|
||||||
@@ -1851,13 +1839,13 @@ ac_build_opencoded_load_format(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels = 1 << (MAX2(load_log_size, 2) - 2);
|
unsigned num_channels = 1 << (MAX2(load_log_size, 2) - 2);
|
||||||
loads[i] = ac_build_llvm8_buffer_load_common(
|
loads[i] = ac_build_llvm8_buffer_load_common(
|
||||||
ctx, rsrc, vindex, voffset, tmp,
|
ctx, rsrc, vindex, voffset, tmp,
|
||||||
num_channels, channel_type, glc, slc,
|
num_channels, channel_type, cache_policy,
|
||||||
can_speculate, false, true);
|
can_speculate, false, true);
|
||||||
} else {
|
} else {
|
||||||
tmp = LLVMBuildAdd(ctx->builder, voffset, tmp, "");
|
tmp = LLVMBuildAdd(ctx->builder, voffset, tmp, "");
|
||||||
loads[i] = ac_build_llvm7_buffer_load_common(
|
loads[i] = ac_build_llvm7_buffer_load_common(
|
||||||
ctx, rsrc, vindex, tmp,
|
ctx, rsrc, vindex, tmp,
|
||||||
1 << (load_log_size - 2), glc, slc, can_speculate, false);
|
1 << (load_log_size - 2), cache_policy, can_speculate, false);
|
||||||
}
|
}
|
||||||
if (load_log_size >= 2)
|
if (load_log_size >= 2)
|
||||||
loads[i] = ac_to_integer(ctx, loads[i]);
|
loads[i] = ac_to_integer(ctx, loads[i]);
|
||||||
|
@@ -288,8 +288,7 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
unsigned inst_offset,
|
unsigned inst_offset,
|
||||||
unsigned glc,
|
unsigned cache_policy,
|
||||||
unsigned slc,
|
|
||||||
bool can_speculate,
|
bool can_speculate,
|
||||||
bool allow_smem);
|
bool allow_smem);
|
||||||
|
|
||||||
@@ -298,7 +297,7 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool can_speculate);
|
bool can_speculate);
|
||||||
|
|
||||||
/* load_format that handles the stride & element count better if idxen is
|
/* load_format that handles the stride & element count better if idxen is
|
||||||
@@ -308,7 +307,7 @@ LLVMValueRef ac_build_buffer_load_format_gfx9_safe(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool can_speculate);
|
bool can_speculate);
|
||||||
|
|
||||||
LLVMValueRef
|
LLVMValueRef
|
||||||
@@ -317,7 +316,7 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
LLVMValueRef immoffset,
|
LLVMValueRef immoffset,
|
||||||
bool glc);
|
unsigned cache_policy);
|
||||||
|
|
||||||
LLVMValueRef
|
LLVMValueRef
|
||||||
ac_build_tbuffer_load_byte(struct ac_llvm_context *ctx,
|
ac_build_tbuffer_load_byte(struct ac_llvm_context *ctx,
|
||||||
@@ -325,7 +324,7 @@ ac_build_tbuffer_load_byte(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
LLVMValueRef immoffset,
|
LLVMValueRef immoffset,
|
||||||
bool glc);
|
unsigned cache_policy);
|
||||||
|
|
||||||
LLVMValueRef
|
LLVMValueRef
|
||||||
ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx,
|
ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx,
|
||||||
@@ -337,8 +336,7 @@ ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
unsigned dfmt,
|
unsigned dfmt,
|
||||||
unsigned nfmt,
|
unsigned nfmt,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate);
|
bool can_speculate);
|
||||||
|
|
||||||
LLVMValueRef
|
LLVMValueRef
|
||||||
@@ -350,8 +348,7 @@ ac_build_raw_tbuffer_load(struct ac_llvm_context *ctx,
|
|||||||
unsigned num_channels,
|
unsigned num_channels,
|
||||||
unsigned dfmt,
|
unsigned dfmt,
|
||||||
unsigned nfmt,
|
unsigned nfmt,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate);
|
bool can_speculate);
|
||||||
|
|
||||||
/* For ac_build_fetch_format.
|
/* For ac_build_fetch_format.
|
||||||
@@ -380,8 +377,7 @@ ac_build_opencoded_load_format(struct ac_llvm_context *ctx,
|
|||||||
LLVMValueRef vindex,
|
LLVMValueRef vindex,
|
||||||
LLVMValueRef voffset,
|
LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset,
|
LLVMValueRef soffset,
|
||||||
bool glc,
|
unsigned cache_policy,
|
||||||
bool slc,
|
|
||||||
bool can_speculate);
|
bool can_speculate);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -1303,14 +1303,14 @@ static LLVMValueRef build_tex_intrinsic(struct ac_nir_context *ctx,
|
|||||||
args->coords[0],
|
args->coords[0],
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
util_last_bit(mask),
|
util_last_bit(mask),
|
||||||
false, true);
|
0, true);
|
||||||
} else {
|
} else {
|
||||||
return ac_build_buffer_load_format(&ctx->ac,
|
return ac_build_buffer_load_format(&ctx->ac,
|
||||||
args->resource,
|
args->resource,
|
||||||
args->coords[0],
|
args->coords[0],
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
util_last_bit(mask),
|
util_last_bit(mask),
|
||||||
false, true);
|
0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1743,22 +1743,21 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
|
|||||||
offset,
|
offset,
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
immoffset,
|
immoffset,
|
||||||
cache_policy & ac_glc);
|
cache_policy);
|
||||||
} else if (load_bytes == 2) {
|
} else if (load_bytes == 2) {
|
||||||
ret = ac_build_tbuffer_load_short(&ctx->ac,
|
ret = ac_build_tbuffer_load_short(&ctx->ac,
|
||||||
rsrc,
|
rsrc,
|
||||||
offset,
|
offset,
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
immoffset,
|
immoffset,
|
||||||
cache_policy & ac_glc);
|
cache_policy);
|
||||||
} else {
|
} else {
|
||||||
int num_channels = util_next_power_of_two(load_bytes) / 4;
|
int num_channels = util_next_power_of_two(load_bytes) / 4;
|
||||||
bool can_speculate = access & ACCESS_CAN_REORDER;
|
bool can_speculate = access & ACCESS_CAN_REORDER;
|
||||||
|
|
||||||
ret = ac_build_buffer_load(&ctx->ac, rsrc, num_channels,
|
ret = ac_build_buffer_load(&ctx->ac, rsrc, num_channels,
|
||||||
vindex, offset, immoffset, 0,
|
vindex, offset, immoffset, 0,
|
||||||
cache_policy & ac_glc, 0,
|
cache_policy, can_speculate, false);
|
||||||
can_speculate, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMTypeRef byte_vec = LLVMVectorType(ctx->ac.i8, ac_get_type_size(LLVMTypeOf(ret)));
|
LLVMTypeRef byte_vec = LLVMVectorType(ctx->ac.i8, ac_get_type_size(LLVMTypeOf(ret)));
|
||||||
@@ -1804,7 +1803,7 @@ static LLVMValueRef visit_load_ubo_buffer(struct ac_nir_context *ctx,
|
|||||||
offset,
|
offset,
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
immoffset,
|
immoffset,
|
||||||
false);
|
0);
|
||||||
} else {
|
} else {
|
||||||
assert(load_bytes == 2);
|
assert(load_bytes == 2);
|
||||||
results[i] = ac_build_tbuffer_load_short(&ctx->ac,
|
results[i] = ac_build_tbuffer_load_short(&ctx->ac,
|
||||||
@@ -1812,13 +1811,13 @@ static LLVMValueRef visit_load_ubo_buffer(struct ac_nir_context *ctx,
|
|||||||
offset,
|
offset,
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
immoffset,
|
immoffset,
|
||||||
false);
|
0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = ac_build_gather_values(&ctx->ac, results, num_components);
|
ret = ac_build_gather_values(&ctx->ac, results, num_components);
|
||||||
} else {
|
} else {
|
||||||
ret = ac_build_buffer_load(&ctx->ac, rsrc, num_components, NULL, offset,
|
ret = ac_build_buffer_load(&ctx->ac, rsrc, num_components, NULL, offset,
|
||||||
NULL, 0, false, false, true, true);
|
NULL, 0, 0, true, true);
|
||||||
|
|
||||||
ret = ac_trim_vector(&ctx->ac, ret, num_components);
|
ret = ac_trim_vector(&ctx->ac, ret, num_components);
|
||||||
}
|
}
|
||||||
@@ -2467,7 +2466,7 @@ static LLVMValueRef visit_image_load(struct ac_nir_context *ctx,
|
|||||||
bool can_speculate = access & ACCESS_CAN_REORDER;
|
bool can_speculate = access & ACCESS_CAN_REORDER;
|
||||||
res = ac_build_buffer_load_format(&ctx->ac, rsrc, vindex,
|
res = ac_build_buffer_load_format(&ctx->ac, rsrc, vindex,
|
||||||
ctx->ac.i32_0, num_channels,
|
ctx->ac.i32_0, num_channels,
|
||||||
!!(args.cache_policy & ac_glc),
|
args.cache_policy,
|
||||||
can_speculate);
|
can_speculate);
|
||||||
res = ac_build_expand_to_vec4(&ctx->ac, res, num_channels);
|
res = ac_build_expand_to_vec4(&ctx->ac, res, num_channels);
|
||||||
|
|
||||||
@@ -3476,7 +3475,7 @@ static LLVMValueRef get_bindless_index_from_uniform(struct ac_nir_context *ctx,
|
|||||||
LLVMValueRef ubo_index = ctx->abi->load_ubo(ctx->abi, ctx->ac.i32_0);
|
LLVMValueRef ubo_index = ctx->abi->load_ubo(ctx->abi, ctx->ac.i32_0);
|
||||||
|
|
||||||
LLVMValueRef ret = ac_build_buffer_load(&ctx->ac, ubo_index, 1, NULL, offset,
|
LLVMValueRef ret = ac_build_buffer_load(&ctx->ac, ubo_index, 1, NULL, offset,
|
||||||
NULL, 0, false, false, true, true);
|
NULL, 0, 0, true, true);
|
||||||
|
|
||||||
return LLVMBuildBitCast(ctx->ac.builder, ret, ctx->ac.i32, "");
|
return LLVMBuildBitCast(ctx->ac.builder, ret, ctx->ac.i32, "");
|
||||||
}
|
}
|
||||||
|
@@ -1630,7 +1630,7 @@ load_tes_input(struct ac_shader_abi *abi,
|
|||||||
buf_addr = LLVMBuildAdd(ctx->ac.builder, buf_addr, comp_offset, "");
|
buf_addr = LLVMBuildAdd(ctx->ac.builder, buf_addr, comp_offset, "");
|
||||||
|
|
||||||
result = ac_build_buffer_load(&ctx->ac, ctx->hs_ring_tess_offchip, num_components, NULL,
|
result = ac_build_buffer_load(&ctx->ac, ctx->hs_ring_tess_offchip, num_components, NULL,
|
||||||
buf_addr, ctx->oc_lds, is_compact ? (4 * const_index) : 0, 1, 0, true, false);
|
buf_addr, ctx->oc_lds, is_compact ? (4 * const_index) : 0, ac_glc, true, false);
|
||||||
result = ac_trim_vector(&ctx->ac, result, num_components);
|
result = ac_trim_vector(&ctx->ac, result, num_components);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1673,7 +1673,7 @@ load_gs_input(struct ac_shader_abi *abi,
|
|||||||
ctx->esgs_ring, 1,
|
ctx->esgs_ring, 1,
|
||||||
ctx->ac.i32_0,
|
ctx->ac.i32_0,
|
||||||
vtx_offset, soffset,
|
vtx_offset, soffset,
|
||||||
0, 1, 0, true, false);
|
0, ac_glc, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ac_get_type_size(type) == 2) {
|
if (ac_get_type_size(type) == 2) {
|
||||||
@@ -2236,8 +2236,7 @@ handle_vs_input_decl(struct radv_shader_context *ctx,
|
|||||||
LLVMConstInt(ctx->ac.i32, attrib_offset, false),
|
LLVMConstInt(ctx->ac.i32, attrib_offset, false),
|
||||||
ctx->ac.i32_0, ctx->ac.i32_0,
|
ctx->ac.i32_0, ctx->ac.i32_0,
|
||||||
num_channels,
|
num_channels,
|
||||||
data_format, num_format,
|
data_format, num_format, 0, true);
|
||||||
false, false, true);
|
|
||||||
|
|
||||||
if (ctx->options->key.vs.post_shuffle & (1 << attrib_index)) {
|
if (ctx->options->key.vs.post_shuffle & (1 << attrib_index)) {
|
||||||
LLVMValueRef c[4];
|
LLVMValueRef c[4];
|
||||||
@@ -4041,7 +4040,7 @@ ac_gs_copy_shader_emit(struct radv_shader_context *ctx)
|
|||||||
ctx->gsvs_ring[0],
|
ctx->gsvs_ring[0],
|
||||||
1, ctx->ac.i32_0,
|
1, ctx->ac.i32_0,
|
||||||
vtx_offset, soffset,
|
vtx_offset, soffset,
|
||||||
0, 1, 1, true, false);
|
0, ac_glc | ac_slc, true, false);
|
||||||
|
|
||||||
LLVMTypeRef type = LLVMGetAllocatedType(ctx->abi.outputs[ac_llvm_reg_index_soa(i, j)]);
|
LLVMTypeRef type = LLVMGetAllocatedType(ctx->abi.outputs[ac_llvm_reg_index_soa(i, j)]);
|
||||||
if (ac_get_type_size(type) == 2) {
|
if (ac_get_type_size(type) == 2) {
|
||||||
|
@@ -473,7 +473,7 @@ void si_build_prim_discard_compute_shader(struct si_shader_context *ctx)
|
|||||||
for (unsigned i = 0; i < 3; i++) {
|
for (unsigned i = 0; i < 3; i++) {
|
||||||
index[i] = ac_build_buffer_load_format(&ctx->ac, input_indexbuf,
|
index[i] = ac_build_buffer_load_format(&ctx->ac, input_indexbuf,
|
||||||
index[i], ctx->i32_0, 1,
|
index[i], ctx->i32_0, 1,
|
||||||
false, true);
|
0, true);
|
||||||
index[i] = ac_to_integer(&ctx->ac, index[i]);
|
index[i] = ac_to_integer(&ctx->ac, index[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -541,8 +541,7 @@ void si_llvm_load_input_vs(
|
|||||||
tmp = ac_build_opencoded_load_format(
|
tmp = ac_build_opencoded_load_format(
|
||||||
&ctx->ac, fix_fetch.u.log_size, fix_fetch.u.num_channels_m1 + 1,
|
&ctx->ac, fix_fetch.u.log_size, fix_fetch.u.num_channels_m1 + 1,
|
||||||
fix_fetch.u.format, fix_fetch.u.reverse, !opencode,
|
fix_fetch.u.format, fix_fetch.u.reverse, !opencode,
|
||||||
t_list, vertex_index, ctx->ac.i32_0, ctx->ac.i32_0,
|
t_list, vertex_index, ctx->ac.i32_0, ctx->ac.i32_0, 0, true);
|
||||||
false, false, true);
|
|
||||||
for (unsigned i = 0; i < 4; ++i)
|
for (unsigned i = 0; i < 4; ++i)
|
||||||
out[i] = LLVMBuildExtractElement(ctx->ac.builder, tmp, LLVMConstInt(ctx->i32, i, false), "");
|
out[i] = LLVMBuildExtractElement(ctx->ac.builder, tmp, LLVMConstInt(ctx->i32, i, false), "");
|
||||||
return;
|
return;
|
||||||
@@ -568,7 +567,7 @@ void si_llvm_load_input_vs(
|
|||||||
for (unsigned i = 0; i < num_fetches; ++i) {
|
for (unsigned i = 0; i < num_fetches; ++i) {
|
||||||
LLVMValueRef voffset = LLVMConstInt(ctx->i32, fetch_stride * i, 0);
|
LLVMValueRef voffset = LLVMConstInt(ctx->i32, fetch_stride * i, 0);
|
||||||
fetches[i] = ac_build_buffer_load_format(&ctx->ac, t_list, vertex_index, voffset,
|
fetches[i] = ac_build_buffer_load_format(&ctx->ac, t_list, vertex_index, voffset,
|
||||||
channels_per_fetch, false, true);
|
channels_per_fetch, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_fetches == 1 && channels_per_fetch > 1) {
|
if (num_fetches == 1 && channels_per_fetch > 1) {
|
||||||
@@ -967,14 +966,14 @@ static LLVMValueRef buffer_load(struct lp_build_tgsi_context *bld_base,
|
|||||||
|
|
||||||
if (swizzle == ~0) {
|
if (swizzle == ~0) {
|
||||||
value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset,
|
value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset,
|
||||||
0, 1, 0, can_speculate, false);
|
0, ac_glc, can_speculate, false);
|
||||||
|
|
||||||
return LLVMBuildBitCast(ctx->ac.builder, value, vec_type, "");
|
return LLVMBuildBitCast(ctx->ac.builder, value, vec_type, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!llvm_type_is_64bit(ctx, type)) {
|
if (!llvm_type_is_64bit(ctx, type)) {
|
||||||
value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset,
|
value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset,
|
||||||
0, 1, 0, can_speculate, false);
|
0, ac_glc, can_speculate, false);
|
||||||
|
|
||||||
value = LLVMBuildBitCast(ctx->ac.builder, value, vec_type, "");
|
value = LLVMBuildBitCast(ctx->ac.builder, value, vec_type, "");
|
||||||
return LLVMBuildExtractElement(ctx->ac.builder, value,
|
return LLVMBuildExtractElement(ctx->ac.builder, value,
|
||||||
@@ -982,10 +981,10 @@ static LLVMValueRef buffer_load(struct lp_build_tgsi_context *bld_base,
|
|||||||
}
|
}
|
||||||
|
|
||||||
value = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset,
|
value = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset,
|
||||||
swizzle * 4, 1, 0, can_speculate, false);
|
swizzle * 4, ac_glc, can_speculate, false);
|
||||||
|
|
||||||
value2 = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset,
|
value2 = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset,
|
||||||
swizzle * 4 + 4, 1, 0, can_speculate, false);
|
swizzle * 4 + 4, ac_glc, can_speculate, false);
|
||||||
|
|
||||||
return si_llvm_emit_fetch_64bit(bld_base, type, value, value2);
|
return si_llvm_emit_fetch_64bit(bld_base, type, value, value2);
|
||||||
}
|
}
|
||||||
@@ -1589,14 +1588,14 @@ LLVMValueRef si_llvm_load_input_gs(struct ac_shader_abi *abi,
|
|||||||
soffset = LLVMConstInt(ctx->i32, (param * 4 + swizzle) * 256, 0);
|
soffset = LLVMConstInt(ctx->i32, (param * 4 + swizzle) * 256, 0);
|
||||||
|
|
||||||
value = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1, ctx->i32_0,
|
value = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1, ctx->i32_0,
|
||||||
vtx_offset, soffset, 0, 1, 0, true, false);
|
vtx_offset, soffset, 0, ac_glc, true, false);
|
||||||
if (llvm_type_is_64bit(ctx, type)) {
|
if (llvm_type_is_64bit(ctx, type)) {
|
||||||
LLVMValueRef value2;
|
LLVMValueRef value2;
|
||||||
soffset = LLVMConstInt(ctx->i32, (param * 4 + swizzle + 1) * 256, 0);
|
soffset = LLVMConstInt(ctx->i32, (param * 4 + swizzle + 1) * 256, 0);
|
||||||
|
|
||||||
value2 = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1,
|
value2 = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1,
|
||||||
ctx->i32_0, vtx_offset, soffset,
|
ctx->i32_0, vtx_offset, soffset,
|
||||||
0, 1, 0, true, false);
|
0, ac_glc, true, false);
|
||||||
return si_llvm_emit_fetch_64bit(bld_base, type, value, value2);
|
return si_llvm_emit_fetch_64bit(bld_base, type, value, value2);
|
||||||
}
|
}
|
||||||
return LLVMBuildBitCast(ctx->ac.builder, value, type, "");
|
return LLVMBuildBitCast(ctx->ac.builder, value, type, "");
|
||||||
@@ -1908,7 +1907,7 @@ static LLVMValueRef buffer_load_const(struct si_shader_context *ctx,
|
|||||||
LLVMValueRef offset)
|
LLVMValueRef offset)
|
||||||
{
|
{
|
||||||
return ac_build_buffer_load(&ctx->ac, resource, 1, NULL, offset, NULL,
|
return ac_build_buffer_load(&ctx->ac, resource, 1, NULL, offset, NULL,
|
||||||
0, 0, 0, true, true);
|
0, 0, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LLVMValueRef load_sample_position(struct ac_shader_abi *abi, LLVMValueRef sample_id)
|
static LLVMValueRef load_sample_position(struct ac_shader_abi *abi, LLVMValueRef sample_id)
|
||||||
@@ -5787,7 +5786,7 @@ si_generate_gs_copy_shader(struct si_screen *sscreen,
|
|||||||
ac_build_buffer_load(&ctx.ac,
|
ac_build_buffer_load(&ctx.ac,
|
||||||
ctx.gsvs_ring[0], 1,
|
ctx.gsvs_ring[0], 1,
|
||||||
ctx.i32_0, voffset,
|
ctx.i32_0, voffset,
|
||||||
soffset, 0, 1, 1,
|
soffset, 0, ac_glc | ac_slc,
|
||||||
true, false);
|
true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -515,7 +515,7 @@ static void load_emit(
|
|||||||
emit_data->output[emit_data->chan] =
|
emit_data->output[emit_data->chan] =
|
||||||
ac_build_buffer_load(&ctx->ac, args.resource,
|
ac_build_buffer_load(&ctx->ac, args.resource,
|
||||||
util_last_bit(inst->Dst[0].Register.WriteMask),
|
util_last_bit(inst->Dst[0].Register.WriteMask),
|
||||||
NULL, voffset, NULL, 0, 0, 0, true, true);
|
NULL, voffset, NULL, 0, 0, true, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,9 +552,7 @@ static void load_emit(
|
|||||||
ac_build_buffer_load(&ctx->ac, args.resource,
|
ac_build_buffer_load(&ctx->ac, args.resource,
|
||||||
util_last_bit(inst->Dst[0].Register.WriteMask),
|
util_last_bit(inst->Dst[0].Register.WriteMask),
|
||||||
NULL, voffset, NULL, 0,
|
NULL, voffset, NULL, 0,
|
||||||
!!(args.cache_policy & ac_glc),
|
args.cache_policy, can_speculate, false);
|
||||||
!!(args.cache_policy & ac_slc),
|
|
||||||
can_speculate, false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +564,7 @@ static void load_emit(
|
|||||||
vindex,
|
vindex,
|
||||||
ctx->i32_0,
|
ctx->i32_0,
|
||||||
num_channels,
|
num_channels,
|
||||||
!!(args.cache_policy & ac_glc),
|
args.cache_policy,
|
||||||
can_speculate);
|
can_speculate);
|
||||||
emit_data->output[emit_data->chan] =
|
emit_data->output[emit_data->chan] =
|
||||||
ac_build_expand_to_vec4(&ctx->ac, result, num_channels);
|
ac_build_expand_to_vec4(&ctx->ac, result, num_channels);
|
||||||
@@ -1340,7 +1338,7 @@ static void build_tex_intrinsic(const struct lp_build_tgsi_action *action,
|
|||||||
args.resource,
|
args.resource,
|
||||||
vindex,
|
vindex,
|
||||||
ctx->i32_0,
|
ctx->i32_0,
|
||||||
num_channels, false, true);
|
num_channels, 0, true);
|
||||||
emit_data->output[emit_data->chan] =
|
emit_data->output[emit_data->chan] =
|
||||||
ac_build_expand_to_vec4(&ctx->ac, result, num_channels);
|
ac_build_expand_to_vec4(&ctx->ac, result, num_channels);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user