Skip to content

Commit 4da1fb8

Browse files
author
kevyuu
committed
Fix redundant extent specialization
1 parent ed696ef commit 4da1fb8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

include/nbl/builtin/hlsl/emulated/vector_t.hlsl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,15 @@ DEFINE_SCALAR_OF_SPECIALIZATION(3)
491491
DEFINE_SCALAR_OF_SPECIALIZATION(4)
492492
#undef DEFINE_SCALAR_OF_SPECIALIZATION
493493

494+
#define DEFINE_EXTENT_SPECIALIZATION(DIMENSION)\
495+
template<typename ScalarType, uint32_t I>\
496+
struct extent<emulated_vector_t##DIMENSION<ScalarType>, I> : extent<ScalarType[DIMENSION], I> {};
497+
498+
DEFINE_EXTENT_SPECIALIZATION(2)
499+
DEFINE_EXTENT_SPECIALIZATION(3)
500+
DEFINE_EXTENT_SPECIALIZATION(4)
501+
#undef DEFINE_EXTENT_SPECIALIZATION
502+
494503
namespace impl
495504
{
496505
template<typename To, typename From>
@@ -627,8 +636,6 @@ NBL_EMULATED_VEC_TRUNCATION(4, 4)
627636

628637
} //namespace impl
629638

630-
template<typename T, uint16_t N, uint32_t I>
631-
struct extent<emulated_vector_t<T, N>, I> : extent<T[N], I> {};
632639
}
633640
}
634641
#endif

0 commit comments

Comments
 (0)