ac/radeonsi: create ac_build_shader_clock() helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -343,6 +343,14 @@ ac_build_optimization_barrier(struct ac_llvm_context *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
LLVMValueRef
|
||||
ac_build_shader_clock(struct ac_llvm_context *ctx)
|
||||
{
|
||||
LLVMValueRef tmp = ac_build_intrinsic(ctx, "llvm.readcyclecounter",
|
||||
ctx->i64, NULL, 0, 0);
|
||||
return LLVMBuildBitCast(ctx->builder, tmp, ctx->v2i32, "");
|
||||
}
|
||||
|
||||
LLVMValueRef
|
||||
ac_build_ballot(struct ac_llvm_context *ctx,
|
||||
LLVMValueRef value)
|
||||
|
Reference in New Issue
Block a user