summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-24 22:44:18 +0100
committerMarek Olšák <[email protected]>2017-03-03 15:29:30 +0100
commit9c09592086d8b8801d663756efcc997bc741868d (patch)
tree4755dc2a0a53472c846a385eb77d2b22f0210d04 /src/gallium/drivers/radeonsi/si_shader.c
parente729dc7c46bc903f40c933d40ce507d6cd23bf83 (diff)
radeonsi: move kill intrinsic building into amd/common
just a cleanup Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 48b4a94b3c9..4fa46d4ff17 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1940,11 +1940,9 @@ static void si_alpha_test(struct lp_build_tgsi_context *bld_base,
lp_build_const_float(gallivm, 1.0f),
lp_build_const_float(gallivm, -1.0f));
- lp_build_intrinsic(gallivm->builder, "llvm.AMDGPU.kill",
- ctx->voidt, &arg, 1, LP_FUNC_ATTR_LEGACY);
+ ac_emit_kill(&ctx->ac, arg);
} else {
- lp_build_intrinsic(gallivm->builder, "llvm.AMDGPU.kilp",
- ctx->voidt, NULL, 0, LP_FUNC_ATTR_LEGACY);
+ ac_emit_kill(&ctx->ac, NULL);
}
}
@@ -5033,8 +5031,7 @@ static void si_llvm_emit_vertex(
lp_build_const_float(gallivm, 1.0f),
lp_build_const_float(gallivm, -1.0f));
- lp_build_intrinsic(gallivm->builder, "llvm.AMDGPU.kill",
- ctx->voidt, &kill, 1, LP_FUNC_ATTR_LEGACY);
+ ac_emit_kill(&ctx->ac, kill);
} else {
lp_build_if(&if_state, gallivm, can_emit);
}
@@ -5656,8 +5653,7 @@ static void si_llvm_emit_polygon_stipple(struct si_shader_context *ctx,
/* The intrinsic kills the thread if arg < 0. */
bit = LLVMBuildSelect(builder, bit, LLVMConstReal(ctx->f32, 0),
LLVMConstReal(ctx->f32, -1), "");
- lp_build_intrinsic(builder, "llvm.AMDGPU.kill", ctx->voidt, &bit, 1,
- LP_FUNC_ATTR_LEGACY);
+ ac_emit_kill(&ctx->ac, bit);
}
void si_shader_binary_read_config(struct ac_shader_binary *binary,