From 0eed49b48e02c3fbc47c8013d3f6f0db3784dae7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 10 Apr 2024 03:21:40 +0200 Subject: [PATCH] Debug AVX512f crashes --- libs/ardour/globals.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 65d5e6ea76..452919c7de 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -207,6 +207,16 @@ setup_hardware_optimization (bool try_optimization) mix_buffers_no_gain = x86_avx512f_mix_buffers_no_gain; copy_vector = x86_avx512f_copy_vector; + if (g_getenv("ARDOUR_AVX_DEBUG")) { + int a = atoi (g_getenv("ARDOUR_AVX_DEBUG")); + if (a & 0x01) compute_peak = default_compute_peak; + if (a & 0x02) find_peaks = default_find_peaks; + if (a & 0x04) apply_gain_to_buffer = default_apply_gain_to_buffer; + if (a & 0x08) mix_buffers_with_gain = default_mix_buffers_with_gain; + if (a & 0x10) mix_buffers_no_gain = default_mix_buffers_no_gain; + if (a & 0x20) copy_vector = default_copy_vector; + } + generic_mix_functions = false; } else