diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-01 11:52:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-01 19:42:59 +0300 |
commit | 9e2f678ba25cb292257fc9949373917ec48a6d46 (patch) | |
tree | cdeb6efa4a91fd5a4381ebeb47d725ed7342d36f /source/blender/blenlib/BLI_bitmap.h | |
parent | 63dc52c66e25b49c659c52e4064b78e0ed90f2f9 (diff) |
Fix mistake in atomic bitmap
Internally values are stored as 32bit integers, no idea why i thought
they were 8 bit.
Diffstat (limited to 'source/blender/blenlib/BLI_bitmap.h')
-rw-r--r-- | source/blender/blenlib/BLI_bitmap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index bf3329f8ed5..03390a0dbcd 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -72,9 +72,9 @@ typedef unsigned int BLI_bitmap; #define BLI_BITMAP_TEST_AND_SET_ATOMIC(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - (atomic_fetch_and_or_uint8((uint8_t*)&(_bitmap)[(_index) >> _BITMAP_POWER], \ - (1u << ((_index) & _BITMAP_MASK))) & \ - (1u << ((_index) & _BITMAP_MASK)))) + (atomic_fetch_and_or_uint32((uint32_t*)&(_bitmap)[(_index) >> _BITMAP_POWER], \ + (1u << ((_index) & _BITMAP_MASK))) & \ + (1u << ((_index) & _BITMAP_MASK)))) #define BLI_BITMAP_TEST_BOOL(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ |