Commit: f721308bd0893326c784dc2c2b084521ca3c38b8 Author: Sergey Sharybin Date: Tue Jun 16 16:16:56 2020 +0200 Branches: master https://developer.blender.org/rBf721308bd0893326c784dc2c2b084521ca3c38b8
Fix bitscan_reverse_uint on MSVC compiler Was a mistake from the very beginning of implementation. =================================================================== M source/blender/blenlib/intern/math_bits_inline.c =================================================================== diff --git a/source/blender/blenlib/intern/math_bits_inline.c b/source/blender/blenlib/intern/math_bits_inline.c index 8f8f257f1e7..e7a7b17e1e4 100644 --- a/source/blender/blenlib/intern/math_bits_inline.c +++ b/source/blender/blenlib/intern/math_bits_inline.c @@ -63,7 +63,7 @@ MINLINE unsigned int bitscan_reverse_uint(unsigned int a) #ifdef _MSC_VER unsigned long clz; _BitScanReverse(&clz, a); - return clz; + return 31 - clz; #else return (unsigned int)__builtin_clz(a); #endif _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
