Mesa (master): ac/llvm: remove the -1 hack from ac_atomic_inc_wrap
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 9 08:47:27 UTC 2020
Module: Mesa
Branch: master
Commit: 438392243fb284884e8499758064256fb3dad48d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=438392243fb284884e8499758064256fb3dad48d
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Fri Jun 19 18:33:32 2020 +0200
ac/llvm: remove the -1 hack from ac_atomic_inc_wrap
To match the behavior of proprietary drivers.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
---
src/amd/llvm/ac_nir_to_llvm.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c
index bd3cc246e5c..862ae5c30ff 100644
--- a/src/amd/llvm/ac_nir_to_llvm.c
+++ b/src/amd/llvm/ac_nir_to_llvm.c
@@ -3032,16 +3032,6 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx,
case nir_intrinsic_image_deref_atomic_inc_wrap: {
atomic_name = "inc";
atomic_subop = ac_atomic_inc_wrap;
- /* ATOMIC_INC instruction does:
- * value = (value + 1) % (data + 1)
- * but we want:
- * value = (value + 1) % data
- * So replace 'data' by 'data - 1'.
- */
- ctx->ssa_defs[instr->src[3].ssa->index] =
- LLVMBuildSub(ctx->ac.builder,
- ctx->ssa_defs[instr->src[3].ssa->index],
- ctx->ac.i32_1, "");
break;
}
case nir_intrinsic_bindless_image_atomic_dec_wrap:
More information about the mesa-commit
mailing list