mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 01:10:39 +01:00
ac: add imad & fmad helpers
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
2276f8f064
commit
659f2e0fcb
2 changed files with 18 additions and 0 deletions
|
|
@ -1969,6 +1969,20 @@ LLVMValueRef ac_build_bfe(struct ac_llvm_context *ctx, LLVMValueRef input,
|
|||
AC_FUNC_ATTR_READNONE);
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_imad(struct ac_llvm_context *ctx, LLVMValueRef s0,
|
||||
LLVMValueRef s1, LLVMValueRef s2)
|
||||
{
|
||||
return LLVMBuildAdd(ctx->builder,
|
||||
LLVMBuildMul(ctx->builder, s0, s1, ""), s2, "");
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_fmad(struct ac_llvm_context *ctx, LLVMValueRef s0,
|
||||
LLVMValueRef s1, LLVMValueRef s2)
|
||||
{
|
||||
return LLVMBuildFAdd(ctx->builder,
|
||||
LLVMBuildFMul(ctx->builder, s0, s1, ""), s2, "");
|
||||
}
|
||||
|
||||
void ac_build_waitcnt(struct ac_llvm_context *ctx, unsigned simm16)
|
||||
{
|
||||
LLVMValueRef args[1] = {
|
||||
|
|
|
|||
|
|
@ -398,6 +398,10 @@ void ac_build_kill_if_false(struct ac_llvm_context *ctx, LLVMValueRef i1);
|
|||
LLVMValueRef ac_build_bfe(struct ac_llvm_context *ctx, LLVMValueRef input,
|
||||
LLVMValueRef offset, LLVMValueRef width,
|
||||
bool is_signed);
|
||||
LLVMValueRef ac_build_imad(struct ac_llvm_context *ctx, LLVMValueRef s0,
|
||||
LLVMValueRef s1, LLVMValueRef s2);
|
||||
LLVMValueRef ac_build_fmad(struct ac_llvm_context *ctx, LLVMValueRef s0,
|
||||
LLVMValueRef s1, LLVMValueRef s2);
|
||||
|
||||
void ac_build_waitcnt(struct ac_llvm_context *ctx, unsigned simm16);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue