From 94811dc66c2318c271ed41265beffbb9df196577 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 25 Feb 2017 23:40:52 +0100 Subject: radeonsi: move SI.vs.load.input building into amd/common Reviewed-by: Dave Airlie --- src/amd/common/ac_llvm_build.c | 17 +++++++++++++++++ src/amd/common/ac_llvm_build.h | 6 ++++++ 2 files changed, 23 insertions(+) (limited to 'src/amd/common') 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); -- cgit v1.2.3