Commit e7a2e45c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ddraw/tests: Don't use log2f to avoid mingwex dependency.

parent 4a91eb36
...@@ -8205,7 +8205,7 @@ static void test_color_fill(void) ...@@ -8205,7 +8205,7 @@ static void test_color_fill(void)
float f, g; float f, g;
expected = tests[i].result & mask; expected = tests[i].result & mask;
f = ceilf(log2f(expected + 1.0f)); f = ceilf(logf(expected + 1.0f) / logf(2.0f));
g = (f + 1.0f) / 2.0f; g = (f + 1.0f) / 2.0f;
g -= (int)g; g -= (int)g;
expected_broken = (expected / exp2f(f) - g) * 256; expected_broken = (expected / exp2f(f) - g) * 256;
......
...@@ -8953,7 +8953,7 @@ static void test_color_fill(void) ...@@ -8953,7 +8953,7 @@ static void test_color_fill(void)
float f, g; float f, g;
expected = tests[i].result & mask; expected = tests[i].result & mask;
f = ceilf(log2f(expected + 1.0f)); f = ceilf(logf(expected + 1.0f) / logf(2.0f));
g = (f + 1.0f) / 2.0f; g = (f + 1.0f) / 2.0f;
g -= (int)g; g -= (int)g;
expected_broken = (expected / exp2f(f) - g) * 256; expected_broken = (expected / exp2f(f) - g) * 256;
......
...@@ -10601,7 +10601,7 @@ static void test_color_fill(void) ...@@ -10601,7 +10601,7 @@ static void test_color_fill(void)
float f, g; float f, g;
expected = tests[i].result & U3(z_fmt).dwZBitMask; expected = tests[i].result & U3(z_fmt).dwZBitMask;
f = ceilf(log2f(expected + 1.0f)); f = ceilf(logf(expected + 1.0f) / logf(2.0f));
g = (f + 1.0f) / 2.0f; g = (f + 1.0f) / 2.0f;
g -= (int)g; g -= (int)g;
expected_broken = (expected / exp2f(f) - g) * 256; expected_broken = (expected / exp2f(f) - g) * 256;
......
...@@ -10575,7 +10575,7 @@ static void test_color_fill(void) ...@@ -10575,7 +10575,7 @@ static void test_color_fill(void)
float f, g; float f, g;
expected = tests[i].result & U3(z_fmt).dwZBitMask; expected = tests[i].result & U3(z_fmt).dwZBitMask;
f = ceilf(log2f(expected + 1.0f)); f = ceilf(logf(expected + 1.0f) / logf(2.0f));
g = (f + 1.0f) / 2.0f; g = (f + 1.0f) / 2.0f;
g -= (int)g; g -= (int)g;
expected_broken = (expected / exp2f(f) - g) * 256; expected_broken = (expected / exp2f(f) - g) * 256;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment