Skip to content

Commit 812ae7b

Browse files
author
kevyuu
committed
Fix is_emulating concepts
1 parent 5da522e commit 812ae7b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/nbl/builtin/hlsl/concepts/core.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ namespace impl
7272
template<typename T>
7373
struct is_emulating_floating_point_scalar
7474
{
75-
NBL_CONSTEXPR_STATIC_INLINE bool value = FloatingPointScalar<T>;
75+
NBL_CONSTEXPR_STATIC_INLINE bool value = false;
7676
};
7777

7878
template<typename T>
7979
struct is_emulating_integral_scalar
8080
{
81-
NBL_CONSTEXPR_STATIC_INLINE bool value = IntegralScalar<T>;
81+
NBL_CONSTEXPR_STATIC_INLINE bool value = false;
8282
};
8383
}
8484

8585
//! Floating point types are native floating point types or types that imitate native floating point types (for example emulated_float64_t)
8686
template<typename T>
87-
NBL_BOOL_CONCEPT FloatingPointLikeScalar = impl::is_emulating_floating_point_scalar<T>::value;
87+
NBL_BOOL_CONCEPT FloatingPointLikeScalar = FloatingPointScalar<T> || impl::is_emulating_floating_point_scalar<T>::value;
8888

8989
//! Integral-like types are native integral types or types that imitate native integral types (for example emulated_uint64_t)
9090
template<typename T>
91-
NBL_BOOL_CONCEPT IntegralLikeScalar = impl::is_emulating_integral_scalar<T>::value;
91+
NBL_BOOL_CONCEPT IntegralLikeScalar = IntegralScalar<T> || impl::is_emulating_integral_scalar<T>::value;
9292

9393
}
9494
}

include/nbl/builtin/hlsl/morton.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ NBL_BOOL_CONCEPT Dimension = 1 < D && D < 5;
2828
template<typename T, uint16_t Bits NBL_FUNC_REQUIRES(concepts::Integral<T> && concepts::Scalar<T>)
2929
NBL_CONSTEXPR_FUNC bool verifyAnyBitIntegral(T val)
3030
{
31-
NBL_CONSTEXPR_FUNC_SCOPE_VAR T mask = (~((T(1) << Bits) - 1));
31+
NBL_CONSTEXPR_FUNC_SCOPE_VAR T mask = ~((T(1) << Bits) - 1);
3232
const bool allZero = ((val & mask) == 0);
3333
NBL_IF_CONSTEXPR(is_signed_v<T>)
3434
{

0 commit comments

Comments
 (0)