Skip to content

Commit 4e623c4

Browse files
fix GLSL contribution by Eich
1 parent 1db9cbe commit 4e623c4

File tree

1 file changed

+4
-5
lines changed
  • include/nbl/builtin/hlsl/glsl_compat

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct bitfieldExtract {};
102102
template<typename T, bool isSigned>
103103
struct bitfieldExtract<T, isSigned, false>
104104
{
105-
T operator()( T val, uint32_t offsetBits, uint32_t numBits )
105+
static T __call( T val, uint32_t offsetBits, uint32_t numBits )
106106
{
107107
static_assert( is_integral<T>::value, "T is not an integral type!" );
108108
return val;
@@ -112,7 +112,7 @@ struct bitfieldExtract<T, isSigned, false>
112112
template<typename T>
113113
struct bitfieldExtract<T, true, true>
114114
{
115-
T operator()( T val, uint32_t offsetBits, uint32_t numBits )
115+
static T __call( T val, uint32_t offsetBits, uint32_t numBits )
116116
{
117117
return spirv::bitFieldSExtract<T>( val, offsetBits, numBits );
118118
}
@@ -121,7 +121,7 @@ struct bitfieldExtract<T, true, true>
121121
template<typename T>
122122
struct bitfieldExtract<T, false, true>
123123
{
124-
T operator()( T val, uint32_t offsetBits, uint32_t numBits )
124+
static T __call( T val, uint32_t offsetBits, uint32_t numBits )
125125
{
126126
return spirv::bitFieldUExtract<T>( val, offsetBits, numBits );
127127
}
@@ -132,8 +132,7 @@ struct bitfieldExtract<T, false, true>
132132
template<typename T>
133133
T bitfieldExtract( T val, uint32_t offsetBits, uint32_t numBits )
134134
{
135-
return impl::bitfieldExtract<T, is_signed<T>::value, is_integral<T>::value>::template
136-
( val, offsetBits, numBits );
135+
return impl::bitfieldExtract<T, is_signed<T>::value, is_integral<T>::value>::template __call(val,offsetBits,numBits);
137136
}
138137

139138
#endif

0 commit comments

Comments
 (0)