Skip to content

Commit 402b823

Browse files
author
kevyuu
committed
Replace [[unroll]] with NBL_UNROLL
1 parent 4da1fb8 commit 402b823

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/nbl/builtin/hlsl/morton.hlsl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ template<typename T, uint16_t Dim, uint16_t Bits NBL_FUNC_REQUIRES(concepts::Int
4242
NBL_CONSTEXPR_FUNC bool verifyAnyBitIntegralVec(vector<T, Dim> vec)
4343
{
4444
array_get<vector<T, Dim>, T> getter;
45-
[[unroll]]
45+
NBL_UNROLL
4646
for (uint16_t i = 0; i < Dim; i++)
4747
if (!verifyAnyBitIntegral<T, Bits>(getter(vec, i))) return false;
4848
return true;
@@ -178,7 +178,7 @@ struct Transcoder
178178
array_get<portable_vector_t<encode_t, Dim>, encode_t> getter;
179179
encode_t encoded = getter(interleaveShifted, 0);
180180

181-
[[unroll]]
181+
NBL_UNROLL
182182
for (uint16_t i = 1; i < Dim; i++)
183183
encoded = encoded | getter(interleaveShifted, i);
184184

@@ -196,7 +196,7 @@ struct Transcoder
196196
portable_vector_t<encode_t, Dim> decoded;
197197
array_set<portable_vector_t<encode_t, Dim>, encode_t> setter;
198198
// Write initial values into decoded
199-
[[unroll]]
199+
NBL_UNROLL
200200
for (uint16_t i = 0; i < Dim; i++)
201201
setter(decoded, i, encodedRightShift(encodedValue, i));
202202

@@ -363,7 +363,7 @@ struct code
363363
create(NBL_CONST_REF_ARG(vector<I, D>) cartesian)
364364
{
365365
this_t retVal;
366-
NBL_ASSERT((impl::verifyAnyBitIntegralVec<I, D, Bits >(cartesian) == true));
366+
NBL_ASSERT((impl::verifyAnyBitIntegralVec<I, D, Bits >(cartesian)));
367367
using decode_t = typename transcoder_t::decode_t;
368368
retVal.value = transcoder_t::encode(_static_cast<decode_t>(cartesian));
369369
return retVal;
@@ -466,7 +466,7 @@ struct code
466466
array_get<portable_vector_t<storage_t, D>, storage_t> getter;
467467
this_t retVal;
468468
retVal.value = getter(interleaveShiftedResult, 0);
469-
[[unroll]]
469+
NBL_UNROLL
470470
for (uint16_t i = 1; i < D; i++)
471471
retVal.value = retVal.value | getter(interleaveShiftedResult, i);
472472
return retVal;
@@ -486,7 +486,7 @@ struct code
486486
array_get<portable_vector_t<storage_t, D>, storage_t> getter;
487487
this_t retVal;
488488
retVal.value = getter(interleaveShiftedResult, 0);
489-
[[unroll]]
489+
NBL_UNROLL
490490
for (uint16_t i = 1; i < D; i++)
491491
retVal.value = retVal.value | getter(interleaveShiftedResult, i);
492492

0 commit comments

Comments
 (0)