summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-03-06 08:06:04 +1000
committerDave Airlie <[email protected]>2017-03-06 15:27:32 +1000
commit2830ece0fcc671d1beabb0414319f9d763fd52ea (patch)
tree4f321c5145c856666d4d50d07dd6adca0ed150df /src
parentcc59e24a6bc9bf8b51a22785beb07089770bec8d (diff)
radv/ac: switch to new intrinsics for pkrtz and clamp.
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index f861dd14797..058e9529c56 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4390,17 +4390,14 @@ si_llvm_init_export_args(struct nir_to_llvm_context *ctx,
};
LLVMValueRef packed;
- packed = ac_build_intrinsic(&ctx->ac, "llvm.SI.packf16",
- ctx->i32, pack_args, 2,
- AC_FUNC_ATTR_READNONE |
- AC_FUNC_ATTR_LEGACY);
+ packed = ac_build_cvt_pkrtz_f16(&ctx->ac, pack_args);
args[chan + 5] = packed;
}
break;
case V_028714_SPI_SHADER_UNORM16_ABGR:
for (unsigned chan = 0; chan < 4; chan++) {
- val[chan] = emit_float_saturate(ctx, values[chan], 0, 1);
+ val[chan] = ac_build_clamp(&ctx->ac, values[chan]);
val[chan] = LLVMBuildFMul(ctx->builder, val[chan],
LLVMConstReal(ctx->f32, 65535), "");
val[chan] = LLVMBuildFAdd(ctx->builder, val[chan],