Mesa (master): ac/nir: fix shader clock with subgroup scope
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun May 24 19:42:34 UTC 2020
Module: Mesa
Branch: master
Commit: b034f6cf2a267d3f5cdc24271bc61e5c496f1744
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b034f6cf2a267d3f5cdc24271bc61e5c496f1744
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed May 20 09:56:36 2020 +0200
ac/nir: fix shader clock with subgroup scope
The compiler should emit s_memtime instead of s_memrealtime for
the subgroup scope. I don't know why this LLVM 9 checks was for
but LLVM 8 also has this amdgcn intrinsic.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5117>
---
src/amd/llvm/ac_llvm_build.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index edb6c9a06c7..db953019edd 100644
--- a/src/amd/llvm/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
@@ -459,9 +459,7 @@ ac_build_optimization_barrier(struct ac_llvm_context *ctx,
LLVMValueRef
ac_build_shader_clock(struct ac_llvm_context *ctx)
{
- const char *intr = LLVM_VERSION_MAJOR >= 9 && ctx->chip_class >= GFX8 ?
- "llvm.amdgcn.s.memrealtime" : "llvm.readcyclecounter";
- LLVMValueRef tmp = ac_build_intrinsic(ctx, intr, ctx->i64, NULL, 0, 0);
+ LLVMValueRef tmp = ac_build_intrinsic(ctx, "llvm.amdgcn.s.memtime", ctx->i64, NULL, 0, 0);
return LLVMBuildBitCast(ctx->builder, tmp, ctx->v2i32, "");
}
More information about the mesa-commit
mailing list