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
5757 // Lowest bits numbered from 0 through N - H - 1
5858 NBL_CONSTEXPR_STATIC_INLINE uint32_t lowMask = (1 << (N - H)) - 1 ;
5959 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 );
6161
6262 uint32_t low = i & lowMask;
6363 uint32_t mid = i & midMask;
@@ -76,8 +76,8 @@ namespace impl
7676 // N - 1 is then the highest bit, and N - 2 through N - H are the middle bits
7777 // Lowest bits numbered from 0 through N - H - 1
7878 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 ));
8079 NBL_CONSTEXPR_STATIC_INLINE uint32_t highMask = 1 << (N - 1 );
80+ NBL_CONSTEXPR_STATIC_INLINE uint32_t midMask = ~(lowMask | highMask);
8181
8282 uint32_t low = i & lowMask;
8383 uint32_t mid = i & midMask;
You can’t perform that action at this time.
0 commit comments