Skip to content

Commit 99b25ff

Browse files
author
kevyuu
committed
Allow promote to work between emulated type and non emulated type
1 parent 402b823 commit 99b25ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/nbl/builtin/hlsl/cpp_compat/promote.hlsl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ struct Promote
2121
}
2222
};
2323

24-
// TODO(kevinyu): Should we enable truncation from uint64_t to emulated_vector<emulated_uint64_t, N>?
25-
template<typename To, typename From> NBL_PARTIAL_REQ_TOP(concepts::Vectorial<To> && is_scalar_v<From> && is_same_v<typename vector_traits<To>::scalar_type, From>)
24+
template<typename To, typename From> NBL_PARTIAL_REQ_TOP(concepts::Vectorial<To> && (concepts::IntegralLikeScalar<From> || concepts::FloatingPointLikeScalar<From>) && is_same_v<typename vector_traits<To>::scalar_type, From>)
2625
struct Promote<To, From NBL_PARTIAL_REQ_BOT(concepts::Vectorial<To> && is_scalar_v<From> && is_same_v<typename vector_traits<To>::scalar_type, From>) >
2726
{
2827
NBL_CONSTEXPR_FUNC To operator()(const From v)

0 commit comments

Comments
 (0)