File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
include/nbl/builtin/hlsl/workgroup Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ namespace impl
57
57
// Lowest bits numbered from 0 through N - H - 1
58
58
NBL_CONSTEXPR_STATIC_INLINE uint32_t lowMask = (1 << (N - H)) - 1 ;
59
59
NBL_CONSTEXPR_STATIC_INLINE uint32_t midMask = 1 << (N - H);
60
- NBL_CONSTEXPR_STATIC_INLINE uint32_t highMask = ~(( 1 << (N - H + 1 )) - 1 );
60
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t highMask = ~(lowMask | midMask );
61
61
62
62
uint32_t low = i & lowMask;
63
63
uint32_t mid = i & midMask;
@@ -76,8 +76,8 @@ namespace impl
76
76
// N - 1 is then the highest bit, and N - 2 through N - H are the middle bits
77
77
// Lowest bits numbered from 0 through N - H - 1
78
78
NBL_CONSTEXPR_STATIC_INLINE uint32_t lowMask = (1 << (N - H)) - 1 ;
79
- NBL_CONSTEXPR_STATIC_INLINE uint32_t midMask = ~((1 << (N - H)) - 1 ) | ~(1 << (N - 1 ));
80
79
NBL_CONSTEXPR_STATIC_INLINE uint32_t highMask = 1 << (N - 1 );
80
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t midMask = ~(lowMask | highMask);
81
81
82
82
uint32_t low = i & lowMask;
83
83
uint32_t mid = i & midMask;
You can’t perform that action at this time.
0 commit comments