summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-02 13:54:48 +1100
committerTimothy Arceri <[email protected]>2018-02-07 08:43:08 +1100
commitb7b89bbddb8e78bdc93cf7a64c191ed1be647f13 (patch)
tree7f56dd5768749fd54f8c6e18591eb0dd09bf05b6 /src/gallium
parentd116af383ffef775ccfc8f2f64b603aebb6b374a (diff)
ac/radeonsi: create ac_build_shader_clock() helper
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index bb8cf8f7795..b2ff5b24e68 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3873,11 +3873,7 @@ static void clock_emit(
struct lp_build_emit_data *emit_data)
{
struct si_shader_context *ctx = si_shader_context(bld_base);
- LLVMValueRef tmp;
-
- tmp = lp_build_intrinsic(ctx->ac.builder, "llvm.readcyclecounter",
- ctx->i64, NULL, 0, 0);
- tmp = LLVMBuildBitCast(ctx->ac.builder, tmp, ctx->v2i32, "");
+ LLVMValueRef tmp = ac_build_shader_clock(&ctx->ac);
emit_data->output[0] =
LLVMBuildExtractElement(ctx->ac.builder, tmp, ctx->i32_0, "");