From db278ec457b181b05b095516b80ccf3e5569dd51 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Sun, 12 Jan 2025 08:11:53 +0100 Subject: [PATCH] [primitives] only run benchmark if opencl enabled there is no need to compare implementation performance if only one optimized version is available. --- libfreerdp/primitives/primitives.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libfreerdp/primitives/primitives.c b/libfreerdp/primitives/primitives.c index e28e244f4..9aa15e446 100644 --- a/libfreerdp/primitives/primitives.c +++ b/libfreerdp/primitives/primitives.c @@ -91,8 +91,6 @@ static BOOL CALLBACK primitives_init_generic_cb(PINIT_ONCE once, PVOID param, PV static BOOL primitives_init_optimized(primitives_t* prims) { - primitives_init_generic(prims); - #if defined(HAVE_CPU_OPTIMIZED_PRIMITIVES) primitives_init_add_opt(prims); primitives_init_andor_opt(prims); @@ -220,7 +218,7 @@ static BOOL primitives_autodetect_best(primitives_t* prims) }; const struct prim_benchmark* best = NULL; -#if !defined(HAVE_CPU_OPTIMIZED_PRIMITIVES) && !defined(WITH_OPENCL) +#if !defined(HAVE_CPU_OPTIMIZED_PRIMITIVES) || !defined(WITH_OPENCL) { struct prim_benchmark* cur = &testcases[0]; cur->prims = primitives_get_by_type(cur->flags);