mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 22:18:13 +02:00
radeonsi: Use unique names for referring to texture sampling intrinsics.
Append the overloaded vector type used for passing in the addressing parameters. Without this, LLVM uses the same function signature for all those types, which cannot work. Fixes problems e.g. with FlightGear and Red Eclipse. (cherry picked from commit 1b3afea30de757815555d9eb1d6e72e2586d6a0c)
This commit is contained in:
parent
d04b50b4de
commit
93f61addb5
1 changed files with 18 additions and 3 deletions
|
|
@ -940,21 +940,36 @@ static void tex_fetch_args(
|
|||
4);
|
||||
}
|
||||
|
||||
static void build_tex_intrinsic(const struct lp_build_tgsi_action * action,
|
||||
struct lp_build_tgsi_context * bld_base,
|
||||
struct lp_build_emit_data * emit_data)
|
||||
{
|
||||
struct lp_build_context * base = &bld_base->base;
|
||||
char intr_name[23];
|
||||
|
||||
sprintf(intr_name, "%sv%ui32", action->intr_name,
|
||||
LLVMGetVectorSize(LLVMTypeOf(emit_data->args[1])));
|
||||
|
||||
emit_data->output[emit_data->chan] = lp_build_intrinsic(
|
||||
base->gallivm->builder, intr_name, emit_data->dst_type,
|
||||
emit_data->args, emit_data->arg_count);
|
||||
}
|
||||
|
||||
static const struct lp_build_tgsi_action tex_action = {
|
||||
.fetch_args = tex_fetch_args,
|
||||
.emit = lp_build_tgsi_intrinsic,
|
||||
.emit = build_tex_intrinsic,
|
||||
.intr_name = "llvm.SI.sample."
|
||||
};
|
||||
|
||||
static const struct lp_build_tgsi_action txb_action = {
|
||||
.fetch_args = tex_fetch_args,
|
||||
.emit = lp_build_tgsi_intrinsic,
|
||||
.emit = build_tex_intrinsic,
|
||||
.intr_name = "llvm.SI.sampleb."
|
||||
};
|
||||
|
||||
static const struct lp_build_tgsi_action txl_action = {
|
||||
.fetch_args = tex_fetch_args,
|
||||
.emit = lp_build_tgsi_intrinsic,
|
||||
.emit = build_tex_intrinsic,
|
||||
.intr_name = "llvm.SI.samplel."
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue