Mesa (master): ac/nir: Make intrinsic_name buffer long enough

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Wed Jun 28 19:21:50 UTC 2017


Module: Mesa
Branch: master
Commit: 6fc41bb4d59313985f67b1276d1fd1225be09426
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fc41bb4d59313985f67b1276d1fd1225be09426

Author: James Legg <jlegg at feralinteractive.com>
Date:   Fri Jun 23 11:18:56 2017 +0100

ac/nir: Make intrinsic_name buffer long enough

When using cmpswap on an image, it was being trunctated to
lvm.amdgcn.image.atomic.cmpswa, with the coords type missing entirely.

v2: Add stable CC

CC: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Grazvydas Ignotas <notasas at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/common/ac_nir_to_llvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 8877c2241d..b5c6848bf5 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3397,7 +3397,7 @@ static LLVMValueRef visit_image_atomic(struct nir_to_llvm_context *ctx,
 	const char *base_name = "llvm.amdgcn.image.atomic";
 	const char *atomic_name;
 	LLVMValueRef coords;
-	char intrinsic_name[32], coords_type[8];
+	char intrinsic_name[41], coords_type[8];
 	const struct glsl_type *type = glsl_without_array(var->type);
 
 	if (ctx->stage == MESA_SHADER_FRAGMENT)




More information about the mesa-commit mailing list