summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-25 23:40:52 +0100
committerMarek Olšák <[email protected]>2017-03-03 17:30:07 +0100
commit94811dc66c2318c271ed41265beffbb9df196577 (patch)
treefd60d8ffc55214bfd641c3627bba6b6782444ba5 /src/amd/common/ac_llvm_build.c
parent52660484c1b3f0e9237b7d4642c5503db5cd53cf (diff)
radeonsi: move SI.vs.load.input building into amd/common
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.c')
-rw-r--r--src/amd/common/ac_llvm_build.c17
1 files changed, 17 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