Skip to content

Commit 5d0dad1

Browse files
committed
Compiling bitfieldExtract
1 parent 2125787 commit 5d0dad1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/nbl/builtin/hlsl/bit.hlsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
#include <nbl/builtin/hlsl/cpp_compat.hlsl>
6-
#include <nbl/builtin/hlsl/type_traits.hlsl>
76

87

98
#ifndef __HLSL_VERSION

include/nbl/builtin/hlsl/glsl_compat/core.hlsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "nbl/builtin/hlsl/cpp_compat.hlsl"
88
#include "nbl/builtin/hlsl/spirv_intrinsics/core.hlsl"
9+
#include "nbl/builtin/hlsl/type_traits.hlsl"
910

1011
namespace nbl
1112
{
@@ -84,7 +85,6 @@ void memoryBarrierShared() {
8485
spirv::memoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAcquireReleaseMask | spv::MemorySemanticsWorkgroupMemoryMask);
8586
}
8687

87-
8888
namespace impl
8989
{
9090

@@ -96,7 +96,7 @@ struct bitfieldExtract<T, isSigned, false>
9696
{
9797
T operator()( T val, uint32_t offsetBits, uint32_t numBits )
9898
{
99-
static_assert(is_integral<T>::value, "T is not an integral type!" )
99+
static_assert( is_integral<T>::value, "T is not an integral type!" );
100100
return val;
101101
}
102102
};
@@ -124,7 +124,8 @@ struct bitfieldExtract<T, false, true>
124124
template<typename T>
125125
T bitfieldExtract( T val, uint32_t offsetBits, uint32_t numBits )
126126
{
127-
return impl::bitfieldExtract<T, is_signed<T>::value, is_integral<T>::value>( val, offsetBits, numBits );
127+
return impl::bitfieldExtract<T, is_signed<T>::value, is_integral<T>::value>::template
128+
( val, offsetBits, numBits );
128129
}
129130

130131
#endif

0 commit comments

Comments
 (0)