LLVMValueRef vindex, LLVMValueRef voffset,
LLVMValueRef soffset, unsigned num_channels,
LLVMTypeRef channel_type, unsigned cache_policy,
- bool can_speculate, bool use_format,
- bool structurized)
+ bool can_speculate, bool use_format)
{
LLVMValueRef args[5];
int idx = 0;
args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
- if (structurized)
- args[idx++] = vindex ? vindex : ctx->i32_0;
+ if (vindex)
+ args[idx++] = vindex;
args[idx++] = voffset ? voffset : ctx->i32_0;
args[idx++] = soffset ? soffset : ctx->i32_0;
args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0);
unsigned func =
!ac_has_vec3_support(ctx->gfx_level, use_format) && num_channels == 3 ? 4 : num_channels;
- const char *indexing_kind = structurized ? "struct" : "raw";
+ const char *indexing_kind = vindex ? "struct" : "raw";
char name[256], type_name[8];
/* D16 is only supported on gfx8+ */
}
return ac_build_buffer_load_common(ctx, rsrc, vindex, voffset, soffset, num_channels,
- channel_type, cache_policy, can_speculate, false, false);
+ channel_type, cache_policy, can_speculate, false);
}
LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
ac_llvm_extract_elem(ctx, res, 4));
}
- return ac_build_buffer_load_common(ctx, rsrc, vindex, voffset, ctx->i32_0, num_channels,
- d16 ? ctx->f16 : ctx->f32, cache_policy, can_speculate, true,
- true);
+ return ac_build_buffer_load_common(ctx, rsrc, vindex, voffset, ctx->i32_0,
+ num_channels, d16 ? ctx->f16 : ctx->f32, cache_policy,
+ can_speculate, true);
}
static LLVMValueRef ac_build_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
LLVMValueRef vindex, LLVMValueRef voffset,
LLVMValueRef soffset, unsigned num_channels,
unsigned dfmt, unsigned nfmt, unsigned cache_policy,
- bool can_speculate, bool structurized)
+ bool can_speculate)
{
LLVMValueRef args[6];
int idx = 0;
args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
- if (structurized)
- args[idx++] = vindex ? vindex : ctx->i32_0;
+ if (vindex)
+ args[idx++] = vindex;
args[idx++] = voffset ? voffset : ctx->i32_0;
args[idx++] = soffset ? soffset : ctx->i32_0;
args[idx++] = LLVMConstInt(ctx->i32, ac_get_tbuffer_format(ctx->gfx_level, dfmt, nfmt), 0);
args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0);
unsigned func =
!ac_has_vec3_support(ctx->gfx_level, true) && num_channels == 3 ? 4 : num_channels;
- const char *indexing_kind = structurized ? "struct" : "raw";
+ const char *indexing_kind = vindex ? "struct" : "raw";
char name[256], type_name[8];
LLVMTypeRef type = func > 1 ? LLVMVectorType(ctx->i32, func) : ctx->i32;
bool can_speculate)
{
return ac_build_tbuffer_load(ctx, rsrc, vindex, voffset, soffset, num_channels, dfmt,
- nfmt, cache_policy, can_speculate, true);
+ nfmt, cache_policy, can_speculate);
}
LLVMValueRef ac_build_buffer_load_short(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
unsigned cache_policy)
{
return ac_build_buffer_load_common(ctx, rsrc, NULL, voffset, soffset, 1, ctx->i16,
- cache_policy, false, false, false);
+ cache_policy, false, false);
}
LLVMValueRef ac_build_buffer_load_byte(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
unsigned cache_policy)
{
return ac_build_buffer_load_common(ctx, rsrc, NULL, voffset, soffset, 1, ctx->i8, cache_policy,
- false, false, false);
+ false, false);
}
/**
unsigned num_channels = 1 << (MAX2(load_log_size, 2) - 2);
loads[i] =
ac_build_buffer_load_common(ctx, rsrc, vindex, voffset, tmp, num_channels, channel_type,
- cache_policy, can_speculate, false, true);
+ cache_policy, can_speculate, false);
if (load_log_size >= 2)
loads[i] = ac_to_integer(ctx, loads[i]);
}