summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_llvm_build.c17
-rw-r--r--src/amd/common/ac_llvm_build.h6
2 files changed, 23 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 9435b189de4..8fac89ccd7b 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -730,6 +730,23 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
}
}
+LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
+ LLVMValueRef rsrc,
+ LLVMValueRef vindex,
+ LLVMValueRef voffset,
+ bool readonly_memory)
+{
+ LLVMValueRef args[] = {
+ rsrc,
+ voffset,
+ vindex,
+ };
+ return ac_emit_llvm_intrinsic(ctx, "llvm.SI.vs.load.input",
+ ctx->v4f32, args, 3,
+ AC_FUNC_ATTR_READNONE |
+ AC_FUNC_ATTR_LEGACY);
+}
+
/**
* Set range metadata on an instruction. This can only be used on load and
* call instructions. If you know an instruction can only produce the values
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index aa99e92e256..ae96d56abb9 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -145,6 +145,12 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
unsigned slc,
bool readonly_memory);
+LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
+ LLVMValueRef rsrc,
+ LLVMValueRef vindex,
+ LLVMValueRef voffset,
+ bool readonly_memory);
+
LLVMValueRef
ac_get_thread_id(struct ac_llvm_context *ctx);