@@ -102,7 +102,7 @@ struct bitfieldExtract {};
102
102
template<typename T, bool isSigned>
103
103
struct bitfieldExtract<T, isSigned, false >
104
104
{
105
- T operator () ( T val, uint32_t offsetBits, uint32_t numBits )
105
+ static T __call ( T val, uint32_t offsetBits, uint32_t numBits )
106
106
{
107
107
static_assert ( is_integral<T>::value, "T is not an integral type!" );
108
108
return val;
@@ -112,7 +112,7 @@ struct bitfieldExtract<T, isSigned, false>
112
112
template<typename T>
113
113
struct bitfieldExtract<T, true , true >
114
114
{
115
- T operator () ( T val, uint32_t offsetBits, uint32_t numBits )
115
+ static T __call ( T val, uint32_t offsetBits, uint32_t numBits )
116
116
{
117
117
return spirv::bitFieldSExtract<T>( val, offsetBits, numBits );
118
118
}
@@ -121,7 +121,7 @@ struct bitfieldExtract<T, true, true>
121
121
template<typename T>
122
122
struct bitfieldExtract<T, false , true >
123
123
{
124
- T operator () ( T val, uint32_t offsetBits, uint32_t numBits )
124
+ static T __call ( T val, uint32_t offsetBits, uint32_t numBits )
125
125
{
126
126
return spirv::bitFieldUExtract<T>( val, offsetBits, numBits );
127
127
}
@@ -132,8 +132,7 @@ struct bitfieldExtract<T, false, true>
132
132
template<typename T>
133
133
T bitfieldExtract ( T val, uint32_t offsetBits, uint32_t numBits )
134
134
{
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);
137
136
}
138
137
139
138
#endif
0 commit comments