From 66ad2ad5398cb61433009553e10fd326d13acb84 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 30 Nov 2022 11:57:54 -0800 Subject: [PATCH] Properly detect SSE instruction support in 32-bit MSVC build. (#5943) --- docs/CHANGELOG.txt | 1 + imgui_internal.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 3868a2ec..71d30d40 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -47,6 +47,7 @@ Other changes: clipping region. Regression added in 1.89. (#5720, #5919) - Misc: fixed parameters to IMGUI_DEBUG_LOG() not being dead-stripped when building with IMGUI_DISABLE_DEBUG_TOOLS is used. (#5901) [@Teselka] +- Misc: fixed compile-time detection of SSE features on MSVC 32-bits builds. (#5943) [@TheMostDiligent] - Backends: Allegro5: restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5. (#5937) [@Espyo] diff --git a/imgui_internal.h b/imgui_internal.h index be018421..dbd76377 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -56,7 +56,7 @@ Index of this file: #include // INT_MIN, INT_MAX // Enable SSE intrinsics if available -#if (defined __SSE__ || defined __x86_64__ || defined _M_X64) && !defined(IMGUI_DISABLE_SSE) +#if (defined __SSE__ || defined __x86_64__ || defined _M_X64 || (defined(_M_IX86_FP) && (_M_IX86_FP >= 1))) && !defined(IMGUI_DISABLE_SSE) #define IMGUI_ENABLE_SSE #include #endif