ac/llvm: remove immoffset parameter from ac_build_tbuffer_load
Reviewed-by: Mihai Preda <mhpreda@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
This commit is contained in:
@@ -1323,13 +1323,10 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx, LLVMValueR
|
|||||||
|
|
||||||
static LLVMValueRef ac_build_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
static LLVMValueRef ac_build_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
||||||
LLVMValueRef vindex, LLVMValueRef voffset,
|
LLVMValueRef vindex, LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset, LLVMValueRef immoffset,
|
LLVMValueRef soffset, unsigned num_channels,
|
||||||
unsigned num_channels, unsigned dfmt, unsigned nfmt,
|
unsigned dfmt, unsigned nfmt, unsigned cache_policy,
|
||||||
unsigned cache_policy, bool can_speculate,
|
bool can_speculate, bool structurized)
|
||||||
bool structurized)
|
|
||||||
{
|
{
|
||||||
voffset = LLVMBuildAdd(ctx->builder, voffset, immoffset, "");
|
|
||||||
|
|
||||||
LLVMValueRef args[6];
|
LLVMValueRef args[6];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
|
args[idx++] = LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, "");
|
||||||
@@ -1354,11 +1351,11 @@ static LLVMValueRef ac_build_tbuffer_load(struct ac_llvm_context *ctx, LLVMValue
|
|||||||
|
|
||||||
LLVMValueRef ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
LLVMValueRef ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
||||||
LLVMValueRef vindex, LLVMValueRef voffset,
|
LLVMValueRef vindex, LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset, LLVMValueRef immoffset,
|
LLVMValueRef soffset, unsigned num_channels,
|
||||||
unsigned num_channels, unsigned dfmt, unsigned nfmt,
|
unsigned dfmt, unsigned nfmt, unsigned cache_policy,
|
||||||
unsigned cache_policy, bool can_speculate)
|
bool can_speculate)
|
||||||
{
|
{
|
||||||
return ac_build_tbuffer_load(ctx, rsrc, vindex, voffset, soffset, immoffset, num_channels, dfmt,
|
return ac_build_tbuffer_load(ctx, rsrc, vindex, voffset, soffset, num_channels, dfmt,
|
||||||
nfmt, cache_policy, can_speculate, true);
|
nfmt, cache_policy, can_speculate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -281,9 +281,9 @@ LLVMValueRef ac_build_tbuffer_load_byte(struct ac_llvm_context *ctx, LLVMValueRe
|
|||||||
|
|
||||||
LLVMValueRef ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
LLVMValueRef ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
||||||
LLVMValueRef vindex, LLVMValueRef voffset,
|
LLVMValueRef vindex, LLVMValueRef voffset,
|
||||||
LLVMValueRef soffset, LLVMValueRef immoffset,
|
LLVMValueRef soffset, unsigned num_channels,
|
||||||
unsigned num_channels, unsigned dfmt, unsigned nfmt,
|
unsigned dfmt, unsigned nfmt, unsigned cache_policy,
|
||||||
unsigned cache_policy, bool can_speculate);
|
bool can_speculate);
|
||||||
|
|
||||||
LLVMValueRef ac_build_raw_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
LLVMValueRef ac_build_raw_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
||||||
LLVMValueRef voffset, LLVMValueRef soffset,
|
LLVMValueRef voffset, LLVMValueRef soffset,
|
||||||
|
@@ -515,7 +515,7 @@ load_vs_input(struct radv_shader_context *ctx, unsigned driver_location, LLVMTyp
|
|||||||
|
|
||||||
values[chan] = ac_build_struct_tbuffer_load(
|
values[chan] = ac_build_struct_tbuffer_load(
|
||||||
&ctx->ac, t_list, chan_index, LLVMConstInt(ctx->ac.i32, chan_offset, false),
|
&ctx->ac, t_list, chan_index, LLVMConstInt(ctx->ac.i32, chan_offset, false),
|
||||||
ctx->ac.i32_0, ctx->ac.i32_0, 1, chan_format, num_format, 0, true);
|
ctx->ac.i32_0, 1, chan_format, num_format, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
input = ac_build_gather_values(&ctx->ac, values, num_channels);
|
input = ac_build_gather_values(&ctx->ac, values, num_channels);
|
||||||
@@ -531,7 +531,7 @@ load_vs_input(struct radv_shader_context *ctx, unsigned driver_location, LLVMTyp
|
|||||||
|
|
||||||
input = ac_build_struct_tbuffer_load(
|
input = ac_build_struct_tbuffer_load(
|
||||||
&ctx->ac, t_list, buffer_index, LLVMConstInt(ctx->ac.i32, attrib_offset, false),
|
&ctx->ac, t_list, buffer_index, LLVMConstInt(ctx->ac.i32, attrib_offset, false),
|
||||||
ctx->ac.i32_0, ctx->ac.i32_0, num_channels, data_format, num_format, 0, true);
|
ctx->ac.i32_0, num_channels, data_format, num_format, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
input = radv_fixup_vertex_input_fetches(ctx, input, num_channels, is_float);
|
input = radv_fixup_vertex_input_fetches(ctx, input, num_channels, is_float);
|
||||||
|
Reference in New Issue
Block a user