From 9e2f678ba25cb292257fc9949373917ec48a6d46 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 1 Aug 2018 10:52:01 +0200 Subject: Fix mistake in atomic bitmap Internally values are stored as 32bit integers, no idea why i thought they were 8 bit. --- source/blender/blenlib/BLI_bitmap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenlib') 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 *), \ -- cgit v1.2.3