ac/nir: fix intrinsic name string size in visit_image_atomic()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 20 Nov 2018 09:01:01 +0000 (10:01 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 20 Nov 2018 09:23:45 +0000 (10:23 +0100)
Fixes an assertion in SoTTR.

Fixes: dd0172e865 ("radv: Use structured intrinsics instead of indexing workaround for GFX9.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index a19e66fe2a0993c2a32cc944953e53337cbf0b69..c7fc676abde2cc189085de5649eed9c088ac6755 100644 (file)
@@ -2424,7 +2424,7 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx,
 
        bool cmpswap = instr->intrinsic == nir_intrinsic_image_deref_atomic_comp_swap;
        const char *atomic_name;
-       char intrinsic_name[41];
+       char intrinsic_name[64];
        enum ac_atomic_op atomic_subop;
        const struct glsl_type *type = glsl_without_array(var->type);
        MAYBE_UNUSED int length;