LibGfx: Fix sse enabled builds by removing implicit float conversion

This commit is contained in:
Sahan Fernando 2021-04-17 18:55:40 +10:00 committed by Andreas Kling
parent e4d9fa914e
commit e6b396c248
Notes: sideshowbarker 2024-07-18 19:31:16 +09:00

View File

@ -78,7 +78,7 @@ inline f32x4 linear_to_gamma4(f32x4 x)
// Source for approximation: https://mimosa-pudica.net/fast-gamma/
constexpr float a = 0.00279491f;
constexpr float b = 1.15907984f;
float c = (b / sqrt(1 + a)) - 1;
float c = (b / sqrtf(1.0f + a)) - 1;
return ((b * __builtin_ia32_rsqrtps(x + a)) - c) * x;
}