Merging as much of PR #408 as we safely can.

PR 408's cmakelists.txt file has too many issues (OpenCL breaks on Windows/OSX) and changing our options to have the "BASISU_" prefix will break upstream builds.
This commit is contained in:
Richard Geldreich
2025-11-06 13:19:40 -05:00
parent b1110111d4
commit 196db8cbe2
11 changed files with 77 additions and 57 deletions

View File

@@ -1880,7 +1880,7 @@ half_float float_to_half(float val, bool toward_zero)
if (toward_zero)
m = (int)truncf((1 << 24) * fabsf(fi.f));
else
m = lrintf((1 << 24) * fabsf(fi.f));
m = (int)lrintf((1 << 24) * fabsf(fi.f));
}
else
{
@@ -1888,7 +1888,7 @@ half_float float_to_half(float val, bool toward_zero)
if (toward_zero)
m = (int)truncf((float)flt_m * (1.0f / (float)(1 << 13)));
else
m = lrintf((float)flt_m * (1.0f / (float)(1 << 13)));
m = (int)lrintf((float)flt_m * (1.0f / (float)(1 << 13)));
}
}