diff options
author | José Fonseca <[email protected]> | 2014-11-07 14:26:58 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2014-11-08 10:32:39 +0000 |
commit | d268eac3a9c81febc5efcae7fe6854045bfc5144 (patch) | |
tree | 4c9261723400fb319dab0461eb8d46c34613fca1 /docs/relnotes/10.3.3.html | |
parent | 42443339f10354523af09df7a13eabe6f3766d5a (diff) |
util/format: Generate floating point constants for clamping.
This commit causes the generated C code to change as
union util_format_r32g32b32a32_sscaled pixel;
- pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647);
- pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647);
- pixel.chan.b = (int32_t)CLAMP(src[2], -2147483648, 2147483647);
- pixel.chan.a = (int32_t)CLAMP(src[3], -2147483648, 2147483647);
+ pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648.0f, 2147483647.0f);
+ pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648.0f, 2147483647.0f);
+ pixel.chan.b = (int32_t)CLAMP(src[2], -2147483648.0f, 2147483647.0f);
+ pixel.chan.a = (int32_t)CLAMP(src[3], -2147483648.0f, 2147483647.0f);
memcpy(dst, &pixel, sizeof pixel);
which surprisingly makes a difference for MSVC.
Thanks to Juraj Svec for diagnosing this and drafting a fix.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29661
Diffstat (limited to 'docs/relnotes/10.3.3.html')
0 files changed, 0 insertions, 0 deletions