diff options
author | Marek Olšák <[email protected]> | 2017-02-23 02:06:40 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-03 15:29:30 +0100 |
commit | 369f4a87268547c7714ad8c16cb975e343bc8168 (patch) | |
tree | 977a2ede76fbabbe3dcc927939b2ac76ddc8d14a /src/amd/common/ac_llvm_build.c | |
parent | 9af03318aa1aada0c5371799759dc627cd981048 (diff) |
radeonsi: move llvm.SI.export building to 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.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 114cb0c1fff..fae551055ed 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -886,3 +886,18 @@ LLVMValueRef ac_emit_clamp(struct ac_llvm_context *ctx, LLVMValueRef value) AC_FUNC_ATTR_READNONE | AC_FUNC_ATTR_LEGACY); } + +void ac_emit_export(struct ac_llvm_context *ctx, struct ac_export_args *a) +{ + LLVMValueRef args[9]; + + args[0] = LLVMConstInt(ctx->i32, a->enabled_channels, 0); + args[1] = LLVMConstInt(ctx->i32, a->valid_mask, 0); + args[2] = LLVMConstInt(ctx->i32, a->done, 0); + args[3] = LLVMConstInt(ctx->i32, a->target, 0); + args[4] = LLVMConstInt(ctx->i32, a->compr, 0); + memcpy(args + 5, a->out, sizeof(a->out[0]) * 4); + + ac_emit_llvm_intrinsic(ctx, "llvm.SI.export", ctx->voidt, args, 9, + AC_FUNC_ATTR_LEGACY); +} |