mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
ac: use llvm.amdgcn.fract intrinsic for nir_op_ffract
Noticed with a Doom shader. 29077 shaders in 15096 tests Totals: SGPRS: 1282125 -> 1282133 (0.00 %) VGPRS: 908716 -> 908616 (-0.01 %) Spilled SGPRs: 24811 -> 24779 (-0.13 %) Code Size: 49048176 -> 48936488 (-0.23 %) bytes Max Waves: 244232 -> 244226 (-0.00 %) Totals from affected shaders: SGPRS: 229584 -> 229592 (0.00 %) VGPRS: 163268 -> 163168 (-0.06 %) Spilled SGPRs: 8682 -> 8650 (-0.37 %) Code Size: 12819572 -> 12707884 (-0.87 %) bytes Max Waves: 24398 -> 24392 (-0.02 %) Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
220c1dce1e
commit
f4f0e3a395
1 changed files with 4 additions and 5 deletions
|
|
@ -2155,19 +2155,18 @@ LLVMValueRef ac_build_fract(struct ac_llvm_context *ctx, LLVMValueRef src0,
|
|||
char *intr;
|
||||
|
||||
if (bitsize == 32) {
|
||||
intr = "llvm.floor.f32";
|
||||
intr = "llvm.amdgcn.fract.f32";
|
||||
type = ctx->f32;
|
||||
} else {
|
||||
intr = "llvm.floor.f64";
|
||||
intr = "llvm.amdgcn.fract.f64";
|
||||
type = ctx->f64;
|
||||
}
|
||||
|
||||
LLVMValueRef params[] = {
|
||||
src0,
|
||||
};
|
||||
LLVMValueRef floor = ac_build_intrinsic(ctx, intr, type, params, 1,
|
||||
AC_FUNC_ATTR_READNONE);
|
||||
return LLVMBuildFSub(ctx->builder, src0, floor, "");
|
||||
return ac_build_intrinsic(ctx, intr, type, params, 1,
|
||||
AC_FUNC_ATTR_READNONE);
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_isign(struct ac_llvm_context *ctx, LLVMValueRef src0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue